diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 915200ab2d2..f1d8c5d1a46 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1342,7 +1342,7 @@ class Facture extends CommonInvoice } else { - $this->error='Bill with id '.$rowid.' or ref '.$ref.' not found'; + $this->error='Bill with id='.$rowid.' or ref='.$ref.' or ref_ext='.$ref_ext.' not found'; dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR); return 0; } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index f8dd19ae7e5..367b156f196 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -147,7 +147,7 @@ class Paiement extends CommonObject * @param int $closepaidinvoices 1=Also close payed invoices to paid, 0=Do nothing more * @return int id of created payment, < 0 if error */ - function create($user,$closepaidinvoices=0) + function create($user, $closepaidinvoices=0) { global $conf, $langs; @@ -190,6 +190,7 @@ class Paiement extends CommonObject // Check parameters if (empty($totalamount) && empty($atleastonepaymentnotnull)) // We accept negative amounts for withdraw reject but not empty arrays { + $this->errors[]='TotalAmountEmpty'; $this->error='TotalAmountEmpty'; return -1; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f180dcad405..cfac17ac326 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6174,6 +6174,7 @@ function dol_getIdFromCode($db, $key, $tablename, $fieldkey='code', $fieldid='id $sql.= " WHERE ".$fieldkey." = '".$db->escape($key)."'"; if (! empty($entityfilter)) $sql.= " AND entity IN (" . getEntity($tablename) . ")"; + dol_syslog('dol_getIdFromCode', LOG_DEBUG); $resql = $db->query($sql); if ($resql)