FIX product_type 9

This commit is contained in:
Nicolas 2022-11-26 16:28:58 +01:00
parent 7884216197
commit 7017b37354
5 changed files with 14 additions and 14 deletions

View File

@ -992,7 +992,7 @@ class FactureRec extends CommonInvoice
if ($this->db->query($sql)) {
$lineId = $this->db->last_insert_id(MAIN_DB_PREFIX."facturedet_rec");
$this->id = $facid;
$this->update_price();
$this->update_price(1);
return $lineId;
} else {
$this->error = $this->db->lasterror();
@ -1166,7 +1166,7 @@ class FactureRec extends CommonInvoice
dol_syslog(get_class($this)."::updateline", LOG_DEBUG);
if ($this->db->query($sql)) {
$this->id = $facid;
$this->update_price();
$this->update_price(1);
return 1;
} else {
$this->error = $this->db->lasterror();

View File

@ -634,7 +634,7 @@ class Delivery extends CommonObject
$sql .= " WHERE rowid = ".((int) $lineid);
if ($this->db->query($sql)) {
$this->update_price();
$this->update_price(1);
return 1;
} else {

View File

@ -359,7 +359,7 @@ class ExpenseReport extends CommonObject
}
if (!$error) {
$result = $this->update_price();
$result = $this->update_price(1);
if ($result > 0) {
if (!$notrigger) {
// Call trigger
@ -1841,7 +1841,7 @@ class ExpenseReport extends CommonObject
$result = $this->line->insert(0, true);
if ($result > 0) {
$result = $this->update_price(); // This method is designed to add line from user input so total calculation must be done using 'auto' mode.
$result = $this->update_price(1); // This method is designed to add line from user input so total calculation must be done using 'auto' mode.
if ($result > 0) {
$this->db->commit();
return $this->line->id;
@ -2180,7 +2180,7 @@ class ExpenseReport extends CommonObject
return -1;
}
$this->update_price();
$this->update_price(1);
$this->db->commit();
@ -2747,7 +2747,7 @@ class ExpenseReportLine
if (!$fromaddline) {
$tmpparent = new ExpenseReport($this->db);
$tmpparent->fetch($this->fk_expensereport);
$result = $tmpparent->update_price();
$result = $tmpparent->update_price(1);
if ($result < 0) {
$error++;
$this->error = $tmpparent->error;
@ -2874,7 +2874,7 @@ class ExpenseReportLine
$tmpparent = new ExpenseReport($this->db);
$result = $tmpparent->fetch($this->fk_expensereport);
if ($result > 0) {
$result = $tmpparent->update_price();
$result = $tmpparent->update_price(1);
if ($result < 0) {
$error++;
$this->error = $tmpparent->error;

View File

@ -2067,7 +2067,7 @@ class CommandeFournisseur extends CommonOrder
}
if ($line->delete($notrigger) > 0) {
$this->update_price();
$this->update_price(1);
return 1;
} else {
$this->error = $line->error;
@ -2564,7 +2564,7 @@ class CommandeFournisseur extends CommonOrder
$sql .= ", ".$comclient->lines[$i]->qty.", ".$comclient->lines[$i]->tva_tx.", ".$comclient->lines[$i]->localtax1_tx.", ".$comclient->lines[$i]->localtax2_tx.", ".$comclient->lines[$i]->remise_percent;
$sql .= ", '".price2num($comclient->lines[$i]->subprice)."','0', '".$this->db->escape($ref)."');";
if ($this->db->query($sql)) {
$this->update_price();
$this->update_price(1);
}
}
@ -2817,7 +2817,7 @@ class CommandeFournisseur extends CommonOrder
// Mise a jour info denormalisees au niveau facture
if ($result >= 0) {
$this->update_price('', 'auto');
$this->update_price('1', 'auto');
$this->db->commit();
return $result;
} else {

View File

@ -590,7 +590,7 @@ class FactureFournisseur extends CommonInvoice
}
// Update total price
$result = $this->update_price();
$result = $this->update_price(1);
if ($result > 0) {
// Actions on extra fields
if (!$error) {
@ -2192,7 +2192,7 @@ class FactureFournisseur extends CommonInvoice
$this->errors[] = $line->error;
} else {
// Update total price into invoice record
$res = $this->update_price('', 'auto', 0, $this->thirdparty);
$res = $this->update_price('1', 'auto', 0, $this->thirdparty);
}
return $res;
@ -2239,7 +2239,7 @@ class FactureFournisseur extends CommonInvoice
$this->db->rollback();
return -3;
} else {
$res = $this->update_price();
$res = $this->update_price(1);
if ($res > 0) {
$this->db->commit();