FIX 16.0 - missing quotes in SQL for frequency unit update for template supplier invoices

This commit is contained in:
atm-florian 2022-04-05 12:28:40 +02:00
parent 3ab993127d
commit b872fb2eac

View File

@ -1769,7 +1769,7 @@ class FactureFournisseurRec extends CommonInvoice
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
$sql .= ' SET frequency = '.($frequency ? $this->db->escape($frequency) : 'null');
if (!empty($unit)) {
$sql .= ', unit_frequency = '.$this->db->escape($unit);
$sql .= ', unit_frequency = \''.$this->db->escape($unit).'\'';
}
$sql .= ' WHERE rowid = ' . (int) $this->id;