forked from Wavyzz/dolibarr
Fix remise all lines all doc (#29770)
* concatenation of the VAT CODE with the VAT using the $object->updateline function * added a condition to concatenate the VAT CODE with the VAT using the command ->update * added a condition to concatenate the VAT CODE with the VAT using the command ->update * added a condition to concatenate the VAT CODE with the VAT using the command ->update
This commit is contained in:
@@ -682,7 +682,11 @@ if (empty($reshook)) {
|
||||
$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
|
||||
$remise_percent = str_replace('*', '', $remise_percent);
|
||||
foreach ($object->lines as $line) {
|
||||
$result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
||||
$tvatx= $line->tva_tx;
|
||||
if (!empty($line->vat_src_code)) {
|
||||
$tvatx .= ' ('.$line->vat_src_code.')';
|
||||
}
|
||||
$result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $remise_percent, $tvatx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
||||
}
|
||||
} elseif ($action == 'addline' && !GETPOST('submitforalllines', 'alpha') && $usercancreate) { // Add a new line
|
||||
$langs->load('errors');
|
||||
|
||||
Reference in New Issue
Block a user