mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
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:
parent
1ba32d6767
commit
ba2ac30107
|
|
@ -968,7 +968,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->subprice, $line->qty, $remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $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->subprice, $line->qty, $remise_percent, $tvatx, $line->localtax1_tx, $line->localtax2_tx, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
||||
}
|
||||
} elseif ($action == 'addline' && GETPOST('submitforallmargins', 'alpha') && GETPOST('marginforalllines') !== '' && $usercancreate) {
|
||||
// Define margin
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -2107,7 +2107,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->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $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, $line->date_start, $line->date_end, $tvatx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit, $line->multicurrency_subprice);
|
||||
}
|
||||
} elseif ($action == 'addline' && !GETPOST('submitforalllines', 'alpha') && !GETPOST('submitforallmargins', 'alpha') && $usercancreate) { // Add a new line
|
||||
$langs->load('errors');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user