Skip to content

Commit

Permalink
FIX: use tax with code on supplier order line give tax code missing i…
Browse files Browse the repository at this point in the history
…n supplier invoice (#32018)

* FIX: use vat with code on supplier order result code missing in supplier invoice

* FIX: use vat with code on supplier order result code missing in supplier invoice
  • Loading branch information
FHenry authored Nov 21, 2024
1 parent 877fd00 commit 991f53d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion htdocs/fourn/commande/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,16 @@
if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) {
$fk_parent_line = 0;
}

$tva_tx = $lines[$i]->tva_tx;
if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) {
$tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
}

$result = $objecttmp->addline(
$desc,
$lines[$i]->subprice,
$lines[$i]->tva_tx,
$tva_tx,
$lines[$i]->localtax1_tx,
$lines[$i]->localtax2_tx,
$lines[$i]->qty,
Expand Down
7 changes: 6 additions & 1 deletion htdocs/fourn/facture/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,11 @@
$date_end = $lines[$i]->date_end;
}

$tva_tx = $lines[$i]->tva_tx;
if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) {
$tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
}

// FIXME Missing special_code into addline and updateline methods
$object->special_code = $lines[$i]->special_code;

Expand All @@ -1271,7 +1276,7 @@
$result = $object->addline(
$desc,
$pu,
$lines[$i]->tva_tx,
$tva_tx,
$lines[$i]->localtax1_tx,
$lines[$i]->localtax2_tx,
$lines[$i]->qty,
Expand Down

0 comments on commit 991f53d

Please sign in to comment.