New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix VAT code removal issue when applying global discounts #29482 #29484
Conversation
@@ -959,7 +959,7 @@ | |||
$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); | |||
$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, 0, 0, $line->vat_src_code); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Propagating the vat_src_code is already supported.
For compatiblity reason it is propagated into field 5.
So you can do
$result = $object->updateline($line->id, $line->subprice, $line->qty, $remise_percent, $line->tva_tx.(empty($line->vat_src_code) ? '' : ' ('.$line->vat_src_code.')'), $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
Can you suggest a PR this way ?
Hi,
Good evening,
Following the post: #29192
I present to you a pr to patch this.