useless product fetch on invoice create (#33505)

This commit is contained in:
atm-lucas 2025-03-19 14:00:03 +01:00 committed by GitHub
parent 324f9631d7
commit 42a1cde41a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -979,13 +979,13 @@ class Facture extends CommonInvoice
*/
if (!$error && $this->fac_rec > 0) {
foreach ($_facrec->lines as $i => $val) {
// For line from template invoice, we use data from template invoice
/*
if ($_facrec->lines[$i]->fk_product) {
$prod = new Product($this->db);
$res = $prod->fetch($_facrec->lines[$i]->fk_product);
}
// For line from template invoice, we use data from template invoice
/*
$tva_tx = get_default_tva($mysoc,$soc,$prod->id);
$tva_npr = get_default_npr($mysoc,$soc,$prod->id);
if (empty($tva_tx)) $tva_npr=0;