mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/bom/tpl/objectline_create.tpl.php htdocs/compta/bank/releve.php htdocs/core/class/html.formsetup.class.php htdocs/takepos/freezone.php
This commit is contained in:
@@ -520,6 +520,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
|
||||
// If we add a line by click on product (invoice exists here because it was created juste before if it didn't exists)
|
||||
if ($action == "addline" && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) {
|
||||
$prod = new Product($db);
|
||||
$prod->fetch($idproduct);
|
||||
@@ -711,6 +712,7 @@ if (empty($reshook)) {
|
||||
$invoice->fetch($placeid);
|
||||
}
|
||||
|
||||
// If we add a line by submitting freezone form (invoice exists here because it was created juste before if it didn't exists)
|
||||
if ($action == "freezone" && $user->hasRight('takepos', 'run')) {
|
||||
$customer = new Societe($db);
|
||||
$customer->fetch($invoice->socid);
|
||||
@@ -728,7 +730,10 @@ if (empty($reshook)) {
|
||||
$localtax1_tx = get_localtax($tva_tx, 1, $customer, $mysoc, $tva_npr);
|
||||
$localtax2_tx = get_localtax($tva_tx, 2, $customer, $mysoc, $tva_npr);
|
||||
|
||||
$invoice->addline($desc, $number, 1, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', 0, 0, 0, '', getDolGlobalInt('TAKEPOS_DISCOUNT_TTC') ? ($number >= 0 ? 'HT' : 'TTC') : (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') ? 'HT' : 'TTC'), $number, 0, -1, 0, '', 0, 0, null, '', '', 0, 100, '', null, 0);
|
||||
$res = $invoice->addline($desc, $number, 1, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', 0, 0, 0, '', getDolGlobalInt('TAKEPOS_DISCOUNT_TTC') ? ($number >= 0 ? 'HT' : 'TTC') : (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') ? 'HT' : 'TTC'), $number, 0, -1, 0, '', 0, 0, null, '', '', 0, 100, '', null, 0);
|
||||
if ($res < 0) {
|
||||
dol_htmloutput_errors($invoice->error, $invoice->errors, 1);
|
||||
}
|
||||
$invoice->fetch($placeid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user