Fix test if empty was inverted
This commit is contained in:
parent
259a4e0694
commit
9a6e13d253
@ -3743,7 +3743,7 @@ function yn($yesno, $case=1, $color=0)
|
|||||||
*
|
*
|
||||||
* @param string $num Id of object
|
* @param string $num Id of object
|
||||||
* @param int $level Level of subdirs to return (1, 2 or 3 levels)
|
* @param int $level Level of subdirs to return (1, 2 or 3 levels)
|
||||||
* @param int $alpha Use alpha ref
|
* @param int $alpha 0=Keep number only to forge path, 1=Use alpha part afer the - (By default, use 0).
|
||||||
* @param int $withoutslash 0=With slash at end, 1=without slash at end (except if '/', we return '')
|
* @param int $withoutslash 0=With slash at end, 1=without slash at end (except if '/', we return '')
|
||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param string $modulepart Type of object ('invoice_supplier, 'donation', 'invoice', ...')
|
* @param string $modulepart Type of object ('invoice_supplier, 'donation', 'invoice', ...')
|
||||||
|
|||||||
@ -1197,7 +1197,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog("Error error=".$this->error, LOG_ERR);
|
dol_syslog("Error after updateline error=".$this->error, LOG_ERR);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2096,16 +2096,17 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if ($this->fk_product) {
|
if (empty($this->fk_product))
|
||||||
|
{
|
||||||
$fk_product = "null";
|
$fk_product = "null";
|
||||||
} else {
|
} else {
|
||||||
$fk_product = $this->fk_product;
|
$fk_product = $this->fk_product;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->fk_unit) {
|
if (empty($this->fk_unit)) {
|
||||||
$fk_unit = "'".$this->db->escape($this->fk_unit)."'";
|
|
||||||
} else {
|
|
||||||
$fk_unit = "null";
|
$fk_unit = "null";
|
||||||
|
} else {
|
||||||
|
$fk_unit = "'".$this->db->escape($this->fk_unit)."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user