2
0
forked from Wavyzz/dolibarr

Compare commits

...

84 Commits

Author SHA1 Message Date
Laurent Destailleur
0c73cdb129 Prepare 12.0.5 2021-02-16 13:42:26 +01:00
Laurent Destailleur
1d6893e928 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-15 16:43:46 +01:00
Laurent Destailleur
6132843586 FIX Filter on date of next generation on template invoices 2021-02-15 16:43:24 +01:00
Laurent Destailleur
a848069178 Merge pull request #16258 from ivanmestre/fix-data-filter-reset-payment-various
Fix #16241 Date filter resets on Miscellaneous Payments
2021-02-11 18:59:32 +01:00
Laurent Destailleur
73cd5e144b Merge pull request #16263 from aspangaro/12p11
WIP FIX: Accountancy - Fix some problems on CEGID export
2021-02-11 18:33:40 +01:00
Laurent Destailleur
c306e8ebe9 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-11 18:23:47 +01:00
Laurent Destailleur
e1334f34b6 Complete repair to clean not correctly available extrafields on proposal 2021-02-11 18:08:01 +01:00
Alexandre SPANGARO
83f9451b43 FIX: Accountancy - Fix some problems on CEGID export 2021-02-11 13:17:20 +01:00
Iván Mestre
a249f4f35a Fix #16241 Date filter resets on Miscellaneous Payments
Changed $search_date_start and $search_date_end variables to get values from search_date_start and search_date_end GET parameters if no their value is empty after checking POST parameters
2021-02-10 15:03:17 -03:00
Laurent Destailleur
90d1b2d349 Prepare 12.0.5 2021-02-10 18:05:36 +01:00
Laurent Destailleur
1282494211 Merge pull request #16243 from ptibogxiv/patch-414
FIX update order by api
2021-02-10 01:17:33 +01:00
Laurent Destailleur
9c535d6d7e Fix comment in js must be a js comment 2021-02-09 21:09:46 +01:00
Laurent Destailleur
0e2c27d795 Fix javascript error 2021-02-09 21:06:11 +01:00
ptibogxiv
e5f6a64846 FIX update order by api
fix update shipping method and shipping date by API (no change with code or functionality juste fix this pb with updating)
2021-02-09 19:24:36 +01:00
Laurent Destailleur
a84bc05f01 Merge pull request #16146 from FHenry/12_fix_pricemin_PRODUIT_CUSTOMER_PRICES
FIX: manage price min for PRODUIT_CUSTOMER_PRICES
2021-02-09 13:39:25 +01:00
Laurent Destailleur
1efee54541 Merge pull request #16230 from FHenry/12_fix_error_assignement
12 fix error assignement
2021-02-09 13:22:57 +01:00
Laurent Destailleur
8acc5e1486 Fix calculation of profit 2021-02-08 23:37:32 +01:00
Florian HENRY
6bcb63c53d fix indent 2021-02-08 20:46:59 +01:00
Florian HENRY
ff6b5c768d fix indent 2021-02-08 20:46:21 +01:00
Florian HENRY
dbbebba497 this->errors is set on triggers action must be set by callers 2021-02-08 20:44:40 +01:00
Laurent Destailleur
8b3c872f2a Fix warning 2021-02-08 17:35:21 +01:00
Laurent Destailleur
3b1143df91 Merge pull request #16223 from ATM-Consulting/fix/12.0_order_addline_remove_warning
FIX: warning when adding a line if $remise_percent is an empty string
2021-02-08 17:34:29 +01:00
Florian Mortgat
ff3707b650 FIX: warning when adding a line if $remise_percent is an empty string 2021-02-08 17:24:40 +01:00
Laurent Destailleur
78052e3239 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-08 17:20:24 +01:00
Laurent Destailleur
a143635f53 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-08 17:20:17 +01:00
Laurent Destailleur
25823d7b90 Merge pull request #16158 from atm-lena/FIX_12.0_SUPPLIER_OBJECTLINE_CONF_DISPLAY
Add hidden conf to display supplier in object lines
2021-02-08 16:58:28 +01:00
Laurent Destailleur
ff9070ff9c Merge pull request #16206 from atm-maxime/fix_supp_inv_backtolistlink
Fix links to go back on supplier invoice list
2021-02-08 15:04:23 +01:00
Laurent Destailleur
9f9ace0565 FIX Localtax must be converted with price2num 2021-02-07 22:15:21 +01:00
Laurent Destailleur
cb94216098 Merge pull request #16205 from atm-maxime/fix_supp_inv_list_leftjoin
Fix #15940 mixing different joins
2021-02-07 19:58:33 +01:00
Maxime Kohlhaas
414a2366fb Fix links to go back on supplier invoice list 2021-02-07 19:28:00 +01:00
Maxime Kohlhaas
0e1353733d Fix #15940 mixing different joins 2021-02-07 19:21:52 +01:00
Laurent Destailleur
d8a33b46de Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-06 01:08:46 +01:00
Laurent Destailleur
4428e2b18e Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/compta/prelevement/card.php
	htdocs/product/price.php
2021-02-06 01:08:37 +01:00
Laurent Destailleur
87c8d917e9 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/prelevement/card.php
2021-02-06 01:03:31 +01:00
Laurent Destailleur
c888ce08c1 Merge pull request #16174 from atm-florianm/fix/10.0_check_withdrawal_already_credited_before_crediting_it
FIX 10.0 - before crediting a withdrawal receipt, check whether it has been credited already
2021-02-06 01:00:56 +01:00
Laurent Destailleur
7d14cde45e Merge pull request #16173 from fappels/11_backport_price_patch
FIX: Add critical price patch from 12 to 11.
2021-02-06 00:59:52 +01:00
Laurent Destailleur
d8c262691b Merge pull request #16175 from nicolas-eoxia/12_fix_missing_hook
fix: add missing hook addMoreActionsButtons in viewcat.php
2021-02-06 00:43:52 +01:00
Laurent Destailleur
e9fa5a647d Fix import 2021-02-05 14:35:10 +01:00
Nicolas
cdd2c165ef add missing hook addMoreActionsButtons in viewcat.php 2021-02-05 11:36:12 +01:00
Florian Mortgat
3f862bf43e FIX 10.0 - before crediting a withdrawal receipt, check whether it has been credited already 2021-02-05 11:34:39 +01:00
Francis Appels
1b55935577 Add critical price patch from 12 to 11. 2021-02-05 10:39:46 +01:00
Laurent Destailleur
3006cf770c FIX Timeout during import 2021-02-05 01:06:59 +01:00
Laurent Destailleur
b58b3a4932 FIX link to create event when task is in a project with a thirdparty 2021-02-04 13:03:05 +01:00
atm-lena
c5f73ec12a Resolve ret 2021-02-04 10:42:42 +01:00
Laurent Destailleur
91c594a66a Fix syntax error 2021-02-03 23:03:47 +01:00
Laurent Destailleur
041decaf93 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-03 20:43:39 +01:00
Laurent Destailleur
4bba124c3f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-03 20:43:32 +01:00
Laurent Destailleur
2576973dc3 Merge pull request #16140 from OPEN-DSI/v11-fix-model-mail-selected
FIX select default mail template
2021-02-03 20:26:40 +01:00
Laurent Destailleur
83e32f96b7 Merge pull request #16138 from ibuiv/patch-3
FIX(path) htdocs removed
2021-02-03 20:25:02 +01:00
Laurent Destailleur
c16ed62ada Merge pull request #16149 from ptibogxiv/patch-410
FIX cash fence for takepos with multientity
2021-02-03 19:57:21 +01:00
Laurent Destailleur
8b6de8fe26 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-03 17:09:56 +01:00
Laurent Destailleur
6ab723e85c Fix bad path of include 2021-02-03 17:09:26 +01:00
atm-lena
e9b5a52a4f Add hidden conf to display supplier in object lines 2021-02-03 15:22:04 +01:00
ptibogxiv
3132877349 FIX cash fence for takepos with multientity 2021-02-02 23:09:23 +01:00
Florian HENRY
d3d0617996 fix: manage price min for PRODUIT_CUSTOMER_PRICES 2021-02-02 13:43:33 +01:00
lvessiller
3b050c3452 FIX select default mail template 2021-02-02 10:34:33 +01:00
ibuiv
fc1d8a2c5b FIX(path) htdocs removed 2021-02-02 10:01:54 +01:00
Laurent Destailleur
99ccfee9ed Merge pull request #16120 from pvma/12.0
Fix/FIX: Show missing notification in Event in user dashboard if assigned by others
2021-01-31 19:07:59 +01:00
Laurent Destailleur
d023afb66f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-31 18:55:11 +01:00
Laurent Destailleur
188ed6984f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-01-31 18:54:32 +01:00
Laurent Destailleur
08aa3eac00 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2021-01-31 18:54:19 +01:00
Laurent Destailleur
9ef5f26624 Merge pull request #14022 from OPEN-DSI/fix_supplier_order_dispatching
FIX: Fix detect dispatched product and set to received completely when the supplier order have services
2021-01-31 18:51:57 +01:00
Paul Vincent M. Ancajas
d80709a7b9 Fix/FIX: making sure the return agenda is only specific to user 2021-02-01 01:41:19 +08:00
Laurent Destailleur
758d91b4a3 Merge pull request #16087 from ATM-Consulting/fix/11.0_required_extrafields_of_type_sellist_not_properly_checked
FIX 11.0 - mandatory extrafields of type sellist
2021-01-31 18:18:05 +01:00
stickler-ci
726e0ceff0 Fixing style errors. 2021-01-31 08:16:59 +00:00
Paul Vincent M. Ancajas
80714d8d6d Fix/FIX: Show notification in Event box of user in his dashboard if assigned by others 2021-01-31 16:09:35 +08:00
Laurent Destailleur
244ee05a9c FIX #14290 #15900 2021-01-30 18:09:13 +01:00
Laurent Destailleur
4f73d26f6a Merge pull request #16094 from aspangaro/12p1
FIX: Accountancy - label_operation is used instead of label_compte
2021-01-30 13:04:54 +01:00
Alexandre SPANGARO
413fc95f9a FIX: Accountancy - label_operation is used instead of label_compte 2021-01-28 23:40:15 +01:00
Laurent Destailleur
62622a2065 Fix: It was no more possible to create paymentintent for offline payment 2021-01-28 23:16:24 +01:00
Laurent Destailleur
1a52eb5ffa Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-28 19:52:17 +01:00
Laurent Destailleur
099fcd7e4e Fix test email
Conflicts:
	htdocs/admin/mails.php
2021-01-28 19:51:54 +01:00
Laurent Destailleur
33964c659e Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-28 14:14:14 +01:00
Laurent Destailleur
d637bbd7e9 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-28 14:14:03 +01:00
Laurent Destailleur
c63a124d1c More complete fix 2021-01-28 14:13:29 +01:00
Juanjo Menent
2f98d8035c Fix: Bad supplier price updater 2021-01-28 13:37:43 +01:00
Laurent Destailleur
19a5caf212 Merge branch '12.0' of https://github.com/dolibarr/dolibarr into 12.0 2021-01-28 00:18:35 +01:00
Laurent Destailleur
2be157c91f Trans 2021-01-28 00:18:11 +01:00
Florian Mortgat
8dfe39258b FIX 11.0 - when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion 2021-01-27 23:46:09 +01:00
Laurent Destailleur
76fb64e8fe Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-27 21:05:17 +01:00
Laurent Destailleur
dd70bee773 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-27 21:05:09 +01:00
Laurent Destailleur
e431b5aacb Merge pull request #16074 from ATM-Consulting/11.0_FIX_wrong_extrafield_insertion_when_creating_intervention
FIX 11.0: when a new intervention is created from an object, a new $e…
2021-01-27 19:35:05 +01:00
Florian Mortgat
35448e3307 FIX 11.0: when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized
Because of this, missing mandatory extrafields are not checked and no extrafields are inserted
2021-01-26 12:42:04 +01:00
kamel
5bae9db0a8 FIX: Fix detect distached product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES) 2020-06-02 17:29:55 +02:00
46 changed files with 228 additions and 77 deletions

View File

@@ -3,6 +3,61 @@ English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 12.0.5 compared to 12.0.4 *****
FIX: before crediting a withdrawal receipt, check whether it has been credited already
FIX: mandatory extrafields of type sellist
FIX: when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion
FIX: when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized
FIX: "openall" filter on ticket list does not include read tickets
FIX: ticket - extrafields of type 'date' are not saved
FIX: ticket - the "openall" filter on the ticket list does not include tickets with status READ
FIX: #14290 #15900
FIX: #15388 #15891
FIX: #15465 External user sees last 5 shipments to other customers in the dashboard
FIX: #15629
FIX: #15751 Miscellaneous payment type change to 0 after updating subledger account
FIX: #15946
FIX: #15966 #15967
FIX: Accountancy - Fix some problems on CEGID export
FIX: Accountancy - label_operation is used instead of label_compte
FIX: Accountancy - Retire entire opening balance feature
FIX: add autofix of count of email target when data is corrupted
FIX: add categories params on llxHeader filter
FIX: Add critical price patch from 12 to 11.
FIX: Bad cleaning of VAT rate when numbers are into code
FIX: Bad dates filtering in the ticket list causes sql error
FIX: balance starting and ending fiscal month #14197
FIX: bom line unit display #13831
FIX: cash fence for takepos with multientity
FIX: Check of customer/vendor code fails in some cases
FIX: create ticket : thirdparty/contact notification #15629
FIX: Creation of thirdparty when setup is empty
FIX: Dates of sales start in TakePOS
FIX: dupliacete customer or supplier code must be error dipslayed with new code proposed
FIX: Export FEC - Force Carriage Return Line Feed
FIX: Facture Situation Out : status condition
FIX: Filter on date of next generation on template invoices
FIX: Fix detect dispatched product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES)
FIX: Invoice Situation Out : status condition
FIX: issue 15659 : Missing test if supplier conf is enabled
FIX: link to create event when task is in a project with a thirdparty
FIX: Localtax must be converted with price2num
FIX: manage price min for PRODUIT_CUSTOMER_PRICES
FIX: missing GETPOST parameters on card_presend.tpl.php
FIX: missing socid into link to create event from project agenda tab
FIX: Must delete extrafields before main table on product deletion.
FIX: (path) htdocs removed
FIX: php alert sms.php
FIX: right to show VAT rate in product list
FIX: select default mail template
FIX: Timeout during import
FIX: update order by api
FIX: useless tracking number displayed on pdf if empty issue #14501
FIX: Visible date of payment
FIX: warning when adding a line if $remise_percent is an empty string
FIX: When creating a new POS sell, the creation date must be modified.
FIX: wrong name for search status param issue #15516
***** ChangeLog for 12.0.4 compared to 12.0.3 *****
FIX: make formConfirm an addreplace-type hook
FIX: regex to remove 'action' parameter: taking feedback from PR#15213 into account

View File

@@ -332,9 +332,9 @@ class AccountancyExport
print length_accountg($line->numero_compte).$separator;
print length_accounta($line->subledger_account).$separator;
print $line->sens.$separator;
print price($line->montant).$separator;
print $line->label_operation.$separator;
print $line->doc_ref;
print price2fec(abs($line->montant)).$separator;
print dol_string_unaccent($line->label_operation).$separator;
print dol_string_unaccent($line->doc_ref);
print $end_line;
}
}

View File

@@ -365,7 +365,7 @@ class BookKeeping extends CommonObject
$sql .= ", ".(!empty($this->subledger_account) ? ("'".$this->db->escape($this->subledger_account)."'") : "NULL");
$sql .= ", ".(!empty($this->subledger_label) ? ("'".$this->db->escape($this->subledger_label)."'") : "NULL");
$sql .= ", '".$this->db->escape($this->numero_compte)."'";
$sql .= ", ".(!empty($this->label_operation) ? ("'".$this->db->escape($this->label_operation)."'") : "NULL");
$sql .= ", ".(!empty($this->label_compte) ? ("'".$this->db->escape($this->label_compte)."'") : "NULL");
$sql .= ", '".$this->db->escape($this->label_operation)."'";
$sql .= ", ".$this->debit;
$sql .= ", ".$this->credit;

View File

@@ -758,8 +758,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$keycode = $listfieldvalue[$i];
if (empty($keycode)) $keycode = $value;
if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') {
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
if ($value == 'price' || preg_match('/^amount/i', $value)) {
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
}
elseif ($value == 'taux' || $value == 'localtax1' || $value == 'localtax2') {
$_POST[$keycode] = price2num(GETPOST($keycode), 8);
}
elseif ($value == 'entity') {
$_POST[$keycode] = getEntity($tabname[$id]);
@@ -791,7 +794,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($result) // Add is ok
{
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
$_POST = array('id'=>$id); // Clean $_POST array, we keep only
$_POST = array('id'=>$id); // Clean $_POST array, we keep only id
}
else
{
@@ -824,8 +827,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$keycode = $listfieldvalue[$i];
if (empty($keycode)) $keycode = $field;
if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
if ($field == 'price' || preg_match('/^amount/i', $field)) {
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
}
elseif ($field == 'taux' || $field == 'localtax1' || $field == 'localtax2') {
$_POST[$keycode] = price2num(GETPOST($keycode), 8);
}
elseif ($field == 'entity') {
$_POST[$keycode] = getEntity($tabname[$id]);

View File

@@ -720,7 +720,7 @@ else
{
if (function_exists('fsockopen') && $port && $server)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testconnect#formmailbeforetitle">'.$langs->trans("DoTestServerAvailability").'</a>';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testconnect&date='.dol_now().'#formmailbeforetitle">'.$langs->trans("DoTestServerAvailability").'</a>';
}
}
else
@@ -796,6 +796,7 @@ else
// Run the test to connect
if ($action == 'testconnect')
{
print '<div id="formmailaftertstconnect" name="formmailaftertstconnect"></div>';
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
@@ -811,6 +812,7 @@ else
}
setEventMessages($errormsg, null, 'errors');
print $errormsg;
}
print '<br>';
}

View File

@@ -269,16 +269,19 @@ dol_fiche_end();
*/
print "<div class='tabsAction'>\n";
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook)) {
if ($user->rights->categorie->creer)
{
$socid = ($object->socid ? "&amp;socid=".$object->socid : "");
print "<a class='butAction' href='edit.php?id=".$object->id.$socid."&amp;type=".$type."'>".$langs->trans("Modify")."</a>";
}
if ($user->rights->categorie->creer)
{
$socid = ($object->socid ? "&amp;socid=".$object->socid : "");
print "<a class='butAction' href='edit.php?id=".$object->id.$socid."&amp;type=".$type."'>".$langs->trans("Modify")."</a>";
}
if ($user->rights->categorie->supprimer)
{
print "<a class='butActionDelete' href='".DOL_URL_ROOT."/categories/viewcat.php?action=delete&amp;id=".$object->id."&amp;type=".$type."'>".$langs->trans("Delete")."</a>";
if ($user->rights->categorie->supprimer)
{
print "<a class='butActionDelete' href='".DOL_URL_ROOT."/categories/viewcat.php?action=delete&amp;id=".$object->id."&amp;type=".$type."'>".$langs->trans("Delete")."</a>";
}
}
print "</div>";

View File

@@ -1201,13 +1201,20 @@ class ActionComm extends CommonObject
}
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
if (!$user->rights->agenda->allactions->read) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_resources AS ar ON a.id = ar.fk_actioncomm AND ar.element_type ='user' AND ar.fk_element = ".$user->id;
}
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql .= " WHERE 1 = 1";
if (empty($load_state_board)) $sql .= " AND a.percent >= 0 AND a.percent < 100";
$sql .= " AND a.entity IN (".getEntity('agenda').")";
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".$user->id.")";
if ($user->socid) $sql .= " AND a.fk_soc = ".$user->socid;
if (!$user->rights->agenda->allactions->read) $sql .= " AND (a.fk_user_author = ".$user->id." OR a.fk_user_action = ".$user->id." OR a.fk_user_done = ".$user->id.")";
if (!$user->rights->agenda->allactions->read) {
$sql .= " AND (a.fk_user_author = ".$user->id." OR a.fk_user_action = ".$user->id." OR a.fk_user_done = ".$user->id;
$sql .= " OR ar.fk_element = ".$user->id; // Added by PV
$sql .= ")";
}
$resql = $this->db->query($sql);
if ($resql)

View File

@@ -942,6 +942,7 @@ if (empty($reshook))
if (count($prodcustprice->lines) > 0) {
$pu_ht = price($prodcustprice->lines[0]->price);
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
$price_min = price($prodcustprice->lines[0]->price_min);
$price_base_type = $prodcustprice->lines[0]->price_base_type;
$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')';

View File

@@ -483,6 +483,7 @@ class Propal extends CommonObject
else
{
$this->error = $line->error;
$this->errors = $line->errors;
$this->db->rollback();
return -2;
}
@@ -727,6 +728,7 @@ class Propal extends CommonObject
else
{
$this->error = $this->line->error;
$this->errors = $this->line->errors;
$this->db->rollback();
return -2;
}
@@ -924,7 +926,7 @@ class Propal extends CommonObject
else
{
$this->error = $this->line->error;
$this->errors = $this->line->errors;
$this->db->rollback();
return -1;
}

View File

@@ -282,7 +282,7 @@ $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'
//llxHeader('',$langs->trans('Proposal'),$help_url);
$sql = 'SELECT';
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT';
$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
$sql .= " typent.code as typent_code,";
$sql .= " ava.rowid as availability,";

View File

@@ -672,6 +672,9 @@ if (empty($reshook))
$qty = price2num(GETPOST('qty'.$predef, 'alpha'));
$remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha')) : 0);
if (empty($remise_percent)) {
$remise_percent = 0;
}
// Extrafields
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
@@ -777,6 +780,7 @@ if (empty($reshook))
{
$pu_ht = price($prodcustprice->lines[0]->price);
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
$price_min = price($prodcustprice->lines[0]->price_min);
$price_base_type = $prodcustprice->lines[0]->price_base_type;
$tva_tx = $prodcustprice->lines[0]->tva_tx;
if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')';

View File

@@ -2002,6 +2002,7 @@ class Commande extends CommonOrder
else
{
$this->error = $line->error;
$this->errors = $line->errors;
$this->db->rollback();
return -2;
}
@@ -3308,6 +3309,7 @@ class Commande extends CommonOrder
if (isset($this->note_public)) $this->note_public = trim($this->note_public);
if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf);
if (isset($this->import_key)) $this->import_key = trim($this->import_key);
$delivery_date = empty($this->delivery_date) ? $this->date_livraison : $this->delivery_date;
// Check parameters
// Put here code to add control on parameters values
@@ -3332,6 +3334,8 @@ class Commande extends CommonOrder
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
$sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").",";
$sql .= " date_livraison=".(strval($this->delivery_date) != '' ? "'".$this->db->idate($this->delivery_date)."'" : 'null').",";
$sql .= " fk_shipping_method=".(isset($this->shipping_method_id) ? $this->shipping_method_id : "null").",";
$sql .= " fk_account=".($this->fk_account > 0 ? $this->fk_account : "null").",";
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";

View File

@@ -263,7 +263,7 @@ $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_P
// llxHeader('',$title,$help_url);
$sql = 'SELECT';
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT';
$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
$sql .= " typent.code as typent_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";

View File

@@ -289,7 +289,7 @@ if ($mode == 'customer')
if ($mode == 'supplier')
{
$cat_type = Categorie::TYPE_SUPPLIER;
$cat_label = $langs->trans("Supplier").' '.lcfirst($langs->trans("Customer"));
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
}
print '<tr><td>'.$cat_label.'</td><td>';
print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);

View File

@@ -581,7 +581,8 @@ class Account extends CommonObject
return $accline->id;
} else {
$this->error = $this->db->lasterror();
$this->error = $accline->error;
$this->errors = $accline->errors;
$this->db->rollback();
return -2;

View File

@@ -53,6 +53,8 @@ $search_accountancy_account = GETPOST("search_accountancy_account");
if ($search_accountancy_account == - 1) $search_accountancy_account = '';
$search_accountancy_subledger = GETPOST("search_accountancy_subledger");
if ($search_accountancy_subledger == - 1) $search_accountancy_subledger = '';
if (empty($search_date_start)) $search_date_start = GETPOST("search_date_start", 'int');
if (empty($search_date_end)) $search_date_end = GETPOST("search_date_end", 'int');
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');

View File

@@ -783,6 +783,7 @@ class Facture extends CommonInvoice
if ($result < 0)
{
$this->error = $newinvoiceline->error;
$this->errors = $newinvoiceline->errors;
$error++;
break;
}
@@ -3227,6 +3228,7 @@ class Facture extends CommonInvoice
else
{
$this->error = $this->line->error;
$this->errors = $this->line->errors;
$this->db->rollback();
return -2;
}

View File

@@ -274,7 +274,7 @@ if ($search_status != '' && $search_status >= -1)
if ($search_status == -1) $sql .= ' AND suspended = 1';
}
$sql .= dolSqlDateFilter('f.date_last_gen', $search_day, $search_month, $search_year);
$sql .= dolSqlDateFilter('f.date_last_gen', $search_day_date_when, $search_month_date_when, $search_year_date_when);
$sql .= dolSqlDateFilter('f.date_when', $search_day_date_when, $search_month_date_when, $search_year_date_when);
$sql .= $db->order($sortfield, $sortorder);

View File

@@ -416,7 +416,7 @@ $formcompany = new FormCompany($db);
$thirdpartystatic = new Societe($db);
$sql = 'SELECT';
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT';
$sql .= ' f.rowid as id, f.ref, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,';
$sql .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,';
$sql .= ' f.fk_user_author,';

View File

@@ -95,16 +95,21 @@ if (empty($reshook))
}
}
// Seems to no be used and replaced with $action == 'infocredit'
if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes')
{
$res = $object->set_credite();
if ($res >= 0)
{
header("Location: card.php?id=".$id);
exit;
}
}
// Seems to no be used and replaced with $action == 'infocredit'
if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes')
{
if ($object->statut == 2) {
$res = -1;
setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors');
} else {
$res=$object->set_credite();
}
if ($res >= 0)
{
header("Location: card.php?id=".$id);
exit;
}
}
if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
{
@@ -145,12 +150,18 @@ if (empty($reshook))
{
$dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$error = $object->set_infocredit($user, $dt);
if ($error)
{
if ($object->statut == 2) {
$error = 1;
setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors');
} else {
$error = $object->set_infocredit($user, $dt);
}
if ($error)
{
setEventMessages($object->error, $object->errors, 'errors');
}
}
}
}
}

View File

@@ -5493,6 +5493,7 @@ abstract class CommonObject
$mandatorypb = false;
if ($attributeType == 'link' && $this->array_options[$key] == '-1') $mandatorypb = true;
if ($this->array_options[$key] === '') $mandatorypb = true;
if ($attributeType == 'sellist' && $this->array_options[$key] == '0') $mandatorypb = true;
if ($mandatorypb)
{
dol_syslog("Mandatory extra field ".$key." is empty");

View File

@@ -2058,9 +2058,12 @@ class ExtraFields
if ($this->attributes[$object->table_element]['required'][$key]) // Value is required
{
// Check if empty without using GETPOST, value can be alpha, int, array, etc...
// check if functionally empty without using GETPOST (depending on the type of extrafield, a
// technically non-empty value may be treated as empty functionally).
// value can be alpha, int, array, etc...
if ((!is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] != 'select' && $_POST["options_".$key] != '0')
|| (!is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] == 'select')
|| (!is_array($_POST["options_".$key]) && isset($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] == 'sellist' && $_POST['options_' . $key] == '0')
|| (is_array($_POST["options_".$key]) && empty($_POST["options_".$key])))
{
//print 'ccc'.$value.'-'.$this->attributes[$object->table_element]['required'][$key];

View File

@@ -448,9 +448,11 @@ class FormMail extends Form
// Zone to select email template
if (count($modelmail_array) > 0)
{
$model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : $arraydefaultmessage->id;
// If list of template is filled
$out .= '<div class="center" style="padding: 0px 0 12px 0">'."\n";
$out .= '<span class="opacitymedium">'.$langs->trans('SelectMailModel').':</span> '.$this->selectarray('modelmailselected', $modelmail_array, 0, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100');
$out .= '<span class="opacitymedium">'.$langs->trans('SelectMailModel').':</span> '.$this->selectarray('modelmailselected', $modelmail_array, $model_mail_selected_id, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100');
if ($user->admin) $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFrom", $langs->transnoentitiesnoconv('Setup').' - '.$langs->transnoentitiesnoconv('EMails')), 1);
$out .= ' &nbsp; ';
$out .= '<input class="button" type="submit" value="'.$langs->trans('Apply').'" name="modelselected" id="modelselected">';

View File

@@ -166,7 +166,7 @@ else
}
}
if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0)
if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0 && empty($conf->global->SUPPLIER_HIDE_SUPPLIER_OBJECTLINES))
{
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
$productfourn = new ProductFournisseur($this->db);

View File

@@ -213,8 +213,9 @@ $helpurl = 'EN:Module_Shipments|FR:Module_Exp&eacute;ditions|ES:M&oacute;dulo_Ex
llxHeader('', $langs->trans('ListOfSendings'), $helpurl);
$sql = 'SELECT';
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
$sql .= " e.rowid, e.ref, e.ref_customer, e.date_expedition as date_expedition, e.weight, e.weight_units, e.date_delivery as date_livraison, l.date_delivery as date_reception, e.fk_statut, e.billed,";
if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT';
$sql .= " e.rowid, e.ref, e.ref_customer, e.date_expedition as date_expedition, e.weight, e.weight_units, e.date_delivery as date_livraison, e.fk_statut, e.billed,";
$sql .= " l.date_delivery as date_reception,";
$sql .= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, ";
$sql .= " typent.code as typent_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
@@ -244,11 +245,12 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid =
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as ee ON e.rowid = ee.fk_source AND ee.sourcetype = 'shipping' AND ee.targettype = 'delivery'";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."livraison as l ON l.rowid = ee.fk_target";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON e.fk_user_author = u.rowid';
if ($search_user > 0) { // Get link to order to get the order id in eesource.fk_source
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as eesource ON eesource.fk_target = e.rowid AND eesource.targettype = 'shipping' AND eesource.sourcetype = 'commande'";
}
// We'll need this table joined to the select in order to filter by sale
if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
if ($search_user > 0)
{
if ($search_user > 0) {
$sql .= ", ".MAIN_DB_PREFIX."element_contact as ec";
$sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc";
}
@@ -275,6 +277,11 @@ if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale;
if ($search_user > 0)
{
// The contact on a shipment is also the contact of the order.
$sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='commande' AND tc.source='internal' AND ec.element_id = eesource.fk_source AND ec.fk_socpeople = ".$db->escape($search_user);
}
if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp);
if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv);
if ($search_company) $sql .= natural_search('s.nom', $search_company);

View File

@@ -318,6 +318,7 @@ class ExpenseReport extends CommonObject
if ($result < 0)
{
$this->error = $newndfline->error;
$this->errors = $newndfline->errors;
$error++;
break;
}

View File

@@ -260,7 +260,13 @@ if (empty($reshook))
}
// Extrafields
$extrafields = new ExtraFields($db);
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
if ($ret < 0) {
$error++;
$action = 'create';
}
$array_options = $extrafields->getOptionalsFromPost($object->table_element);
$object->array_options = $array_options;

View File

@@ -31,7 +31,7 @@
*/
if (!defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE', 'Dolibarr');
if (!defined('DOL_VERSION')) define('DOL_VERSION', '12.0.4'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
if (!defined('DOL_VERSION')) define('DOL_VERSION', '12.0.5'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
if (!defined('EURO')) define('EURO', chr(128));

View File

@@ -3234,6 +3234,7 @@ class CommandeFournisseur extends CommonOrder
{
if (is_array($supplierorderdispatch->lines) && count($supplierorderdispatch->lines) > 0)
{
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$date_liv = dol_now();
// Build array with quantity deliverd by product
@@ -3241,7 +3242,11 @@ class CommandeFournisseur extends CommonOrder
$qtydelivered[$line->fk_product] += $line->qty;
}
foreach ($this->lines as $line) {
$qtywished[$line->fk_product] += $line->qty;
if ($line->product_type == Product::TYPE_PRODUCT ||
($line->product_type == Product::TYPE_SERVICE && !empty($conf->global->STOCK_SUPPORTS_SERVICES))
) {
$qtywished[$line->fk_product] += $line->qty;
}
}
//Compare array
$diff_array = array_diff_assoc($qtydelivered, $qtywished); // Warning: $diff_array is done only on common keys.

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2019 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2021 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Cedric Gross <c.gross@kreiz-it.fr>
* Copyright (C) 2016 Florian Henry <florian.henry@atm-consulting.fr>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
@@ -230,6 +230,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
foreach ($_POST as $key => $value)
{
// without batch module enabled
$reg = array();
if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg))
{
$pos++;
@@ -272,15 +273,19 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) {
if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) {
$dto = GETPOST("dto_".$reg[1].'_'.$reg[2]);
if (empty($dto)) {
$dto = 0;
}
//update supplier price
if (GETPOSTISSET($saveprice)) {
// TODO Use class
$sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price";
$sql .= " SET unitprice='".GETPOST($pu)."'";
$sql .= ", price=".GETPOST($pu)."*quantity";
$sql .= " SET unitprice='".price2num(GETPOST($pu), 'MU')."'";
$sql .= ", price=".price2num(GETPOST($pu), 'MU')."*quantity";
$sql .= ", remise_percent='".$dto."'";
$sql .= " WHERE fk_soc=".$object->socid;
$sql .= " AND fk_product=".GETPOST($prod, 'int');
$sql .= " WHERE fk_soc=".((int) $object->socid);
$sql .= " AND fk_product=".((int) GETPOST($prod, 'int'));
$resql = $db->query($sql);
}

View File

@@ -501,7 +501,7 @@ $help_url = '';
// llxHeader('',$title,$help_url);
$sql = 'SELECT';
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT';
$sql .= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.email,';
$sql .= " typent.code as typent_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";

View File

@@ -142,7 +142,7 @@ if ($id > 0 || !empty($ref))
dol_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'bill');
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<div class="refidno">';
// Ref supplier

View File

@@ -67,7 +67,7 @@ $head = facturefourn_prepare_head($object);
$titre = $langs->trans('SupplierInvoice');
dol_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'bill');
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<div class="refidno">';
// Ref supplier

View File

@@ -319,6 +319,7 @@ if (!$search_all) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefou
if ($search_all || $search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_det as pd ON f.rowid=pd.fk_facture_fourn';
if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product';
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = f.fk_projet";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid';
// We'll need this table joined to the select in order to filter by sale
if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
if ($search_user > 0)
@@ -326,7 +327,6 @@ if ($search_user > 0)
$sql .= ", ".MAIN_DB_PREFIX."element_contact as ec";
$sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc";
}
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid';
$sql .= ' WHERE f.fk_soc = s.rowid';
$sql .= ' AND f.entity IN ('.getEntity('facture_fourn').')';
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;

View File

@@ -1269,6 +1269,14 @@ if ($step == 4 && $datatoimport)
// STEP 5: Summary of choices and launch simulation
if ($step == 5 && $datatoimport)
{
$max_execution_time_for_importexport = (empty($conf->global->IMPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->IMPORT_MAX_EXECUTION_TIME); // 5mn if not defined
$max_time = @ini_get("max_execution_time");
if ($max_time && $max_time < $max_execution_time_for_importexport)
{
dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically.");
@ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300
}
$model = $format;
$liste = $objmodelimport->liste_modeles($db);
@@ -1718,6 +1726,14 @@ if ($step == 5 && $datatoimport)
// STEP 6: Real import
if ($step == 6 && $datatoimport)
{
$max_execution_time_for_importexport = (empty($conf->global->IMPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->IMPORT_MAX_EXECUTION_TIME); // 5mn if not defined
$max_time = @ini_get("max_execution_time");
if ($max_time && $max_time < $max_execution_time_for_importexport)
{
dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically.");
@ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300
}
$model = $format;
$liste = $objmodelimport->liste_modeles($db);
$importid = $_REQUEST["importid"];

View File

@@ -229,7 +229,7 @@ if ($ok && GETPOST('standard', 'alpha'))
{
$extrafields = new ExtraFields($db);
$listofmodulesextra = array('societe'=>'societe', 'adherent'=>'adherent', 'product'=>'product',
'socpeople'=>'socpeople', 'commande'=>'commande', 'facture'=>'facture',
'socpeople'=>'socpeople', 'propal'=>'propal', 'commande'=>'commande', 'facture'=>'facture',
'supplier_proposal'=>'supplier_proposal', 'commande_fournisseur'=>'commande_fournisseur', 'facture_fourn'=>'facture_fourn',
'actioncomm'=>'actioncomm', 'bom_bom'=>'bom_bom', 'mrp_mo'=>'mrp_mo',
'adherent_type'=>'adherent_type', 'user'=>'user', 'projet'=>'projet', 'projet_task'=>'projet_task');

View File

@@ -44,6 +44,7 @@ MakeBankTransferOrder=Make a credit transfer request
WithdrawRequestsDone=%s direct debit payment requests recorded
ThirdPartyBankCode=Third-party bank code
NoInvoiceCouldBeWithdrawed=No invoice debited successfully. Check that invoices are on companies with a valid IBAN and that IBAN has a UMR (Unique Mandate Reference) with mode <strong>%s</strong>.
WithdrawalCantBeCreditedTwice=This withdrawal receipt is already marked as credited; this can't be done twice, as this would potentially create duplicate payments and bank entries.
ClassCredited=Classify credited
ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account?
TransData=Transmission date

View File

@@ -44,6 +44,7 @@ MakeBankTransferOrder=Faire une demande de virement
WithdrawRequestsDone=%s demandes de prélèvements enregistrées
ThirdPartyBankCode=Code banque du tiers
NoInvoiceCouldBeWithdrawed=Aucune facture traitée avec succès. Vérifiez que les factures sont sur les sociétés avec un BAN par défaut valide et que le BAN a un RUM avec le mode <strong> %s </strong>.
WithdrawalCantBeCreditedTwice=Ce bon de prélèvement est déjà classé crédité; cette opération ne peut pas être réalisée deux fois, car cela pourrait engendrer des doublons dans les paiements et les écritures bancaires.
ClassCredited=Classer crédité
ClassCreditedConfirm=Êtes-vous sûr de vouloir classer ce bon de prélèvement comme crédité sur votre compte bancaire ?
TransData=Date de transmission

View File

@@ -1448,7 +1448,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
{
$pathckeditor = constant('JS_CKEDITOR');
}
print '<script><!-- enable ckeditor by main.inc.php -->';
print '<script>';
print '/* enable ckeditor by main.inc.php */';
print 'var CKEDITOR_BASEPATH = \''.$pathckeditor.'\';'."\n";
print 'var ckeditorConfig = \''.dol_buildpath($themesubdir.'/theme/'.$conf->theme.'/ckeditor/config.js'.($ext ? '?'.$ext : ''), 1).'\';'."\n"; // $themesubdir='' in standard usage
print 'var ckeditorFilebrowserBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";

View File

@@ -1666,6 +1666,7 @@ class Product extends CommonObject
if ($result) {
if (count($prodcustprice->lines) > 0) {
$pu_ht = price($prodcustprice->lines[0]->price);
$price_min = price($prodcustprice->lines[0]->price_min);
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
$price_base_type = $prodcustprice->lines[0]->price_base_type;
$tva_tx = $prodcustprice->lines[0]->tva_tx;

View File

@@ -777,7 +777,6 @@ foreach ($listofreferent as $key => $value)
// Each element with at least one line is output
$qualifiedforfinalprofit = true;
if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) $qualifiedforfinalprofit = false;
if ($key == 'propal' && $element->status != Propal::STATUS_SIGNED && $element->status != Propal::STATUS_BILLED) $qualifiedforfinalprofit = false;
//var_dump($key.' '.$qualifiedforfinalprofit);
// Calculate margin
@@ -787,8 +786,7 @@ foreach ($listofreferent as $key => $value)
$total_revenue_ht += $total_ht;
}
if ($margin != "add") // Revert sign
{
if ($margin != "add") { // Revert sign
$total_ht = -$total_ht;
$total_ttc = -$total_ttc;
}

View File

@@ -650,7 +650,8 @@ if ($id > 0 || !empty($ref))
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'task', $socid, 1, '', 10, 'withproject='.$withproject);
$defaultthirdpartyid = $socid > 0 ? $socid : $object->project->socid;
$formactions->showactions($object, 'task', $defaultthirdpartyid, 1, '', 10, 'withproject='.$withproject);
print '</div></div></div>';
}

View File

@@ -431,7 +431,8 @@ class Stripe extends CommonObject
if ($off_session)
{
unset($dataforintent['setup_future_usage']);
$dataforintent["setup_future_usage"] = "off_session";
//$dataforintent["setup_future_usage"] = "off_session";
$dataforintent["off_session"] = true;
}
if (!is_null($payment_method))
{

View File

@@ -636,6 +636,7 @@ class SupplierProposal extends CommonObject
else
{
$this->error = $this->line->error;
$this->errors = $this->line->errors;
$this->db->rollback();
return -2;
}

View File

@@ -255,7 +255,7 @@ $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur';
//llxHeader('',$langs->trans('CommRequest'),$help_url);
$sql = 'SELECT';
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT';
$sql .= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
$sql .= " typent.code as typent_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";

View File

@@ -729,11 +729,10 @@ $( document ).ready(function() {
if ($conf->global->TAKEPOS_NUM_TERMINALS == "1") $_SESSION["takeposterminal"] = 1;
else print "TerminalsDialog();";
}
if ($conf->global->TAKEPOS_CONTROL_CASH_OPENING)
{
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE ";
$sql .= "date(date_creation) = CURDATE() ";
$sql .= "";
if ($conf->global->TAKEPOS_CONTROL_CASH_OPENING) {
$sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE";
$sql .= " entity = ".$conf->entity." AND ";
$sql .= " date(date_creation) = CURDATE()";
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
@@ -917,8 +916,9 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
);
}
$sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE ";
$sql .= "date(date_creation) = CURDATE() ";
$sql = "SELECT rowid, status, entity FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE";
$sql .= " entity = ".$conf->entity." AND ";
$sql .= " date(date_creation) = CURDATE()";
$resql = $db->query($sql);
if ($resql)
{