fix phpunit

This commit is contained in:
Frédéric FRANCE 2018-10-16 22:42:18 +02:00 committed by GitHub
parent 00dc78dd01
commit 2e77b9fed9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,8 +76,8 @@ class Paiement extends CommonObject
//paiement de llx_c_paiement
public $num_paiement; // Numero du CHQ, VIR, etc...
public $num_payment; // Numero du CHQ, VIR, etc...
public $payment_id; // Id of external modepayment
public $payment_site; // name of external modepayment
public $payment_id; // Id of external modepayment
public $payment_site; // name of external modepayment
public $bank_account; // Id compte bancaire du paiement
public $bank_line; // Id de la ligne d'ecriture bancaire
// fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...)
@ -233,11 +233,11 @@ class Paiement extends CommonObject
$mtotal = $totalamount;
}
$note = ($this->note_public?$this->note_public:$this->note);
$payment_id = $this->payment_id ? $this->payment_id : null;
$payment_site = $this->payment_site ? $this->payment_site : null;
$payment_id = $this->payment_id ? $this->payment_id : null;
$payment_site = $this->payment_site ? $this->payment_site : null;
$sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, ref, datec, datep, amount, multicurrency_amount, fk_paiement, num_paiement, note, ext_payment_id, ext_payment_site, fk_user_creat)";
$sql.= " VALUES (".$conf->entity.", '".$this->ref."', '". $this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', '".$total."', '".$mtotal."', ".$this->paiementid.", '".$this->num_paiement."', '".$this->db->escape($note)."', '".$this->payment_id."', '".$this->payment_site."', ".$user->id.")";
$sql.= " VALUES (".$conf->entity.", '".$this->ref."', '". $this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', '".$total."', '".$mtotal."', ".$this->paiementid.", '".$this->num_paiement."', '".$this->db->escape($note)."', '".$this->db->escape($payment_id)."', '".$this->db->escape($payment_site)."', ".$user->id.")";
dol_syslog(get_class($this)."::Create insert paiement", LOG_DEBUG);
$resql = $this->db->query($sql);