Fix supplier invoice API (#35100)
* Fix supplier invoice API We can't modify mode_reglement_id from API on supplier invoice ! * Update fournisseur.facture.class.php --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
adbbf9e3b2
commit
4f684df12f
1 changed files with 5 additions and 1 deletions
|
|
@ -1229,8 +1229,11 @@ class FactureFournisseur extends CommonInvoice
|
|||
if (empty($this->fk_project)) $this->fk_project = null;
|
||||
else $this->fk_project = intval($this->fk_project);
|
||||
}
|
||||
if (isset($this->mode_reglement_id)) {
|
||||
$this->mode_reglement_id = (int) $this->mode_reglement_id;
|
||||
}
|
||||
if (isset($this->cond_reglement_id)) {
|
||||
$this->cond_reglement_id = trim($this->cond_reglement_id);
|
||||
$this->cond_reglement_id = (int) $this->cond_reglement_id;
|
||||
}
|
||||
if (isset($this->note_private)) {
|
||||
$this->note = trim($this->note_private);
|
||||
|
|
@ -1277,6 +1280,7 @@ class FactureFournisseur extends CommonInvoice
|
|||
$sql .= " fk_facture_source=".($this->fk_facture_source ? ((int) $this->fk_facture_source) : "null").",";
|
||||
$sql .= " vat_reverse_charge = ".($this->vat_reverse_charge != '' ? ((int) $this->db->escape($this->vat_reverse_charge)) : 0).",";
|
||||
$sql .= " fk_projet=".(!empty($this->fk_project) ? ((int) $this->fk_project) : "null").",";
|
||||
$sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? ((int) $this->mode_reglement_id) : "null").",";
|
||||
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? ((int) $this->cond_reglement_id) : "null").",";
|
||||
$sql .= " date_lim_reglement=".(dol_strlen($this->date_echeance) != 0 ? "'".$this->db->idate($this->date_echeance)."'" : 'null').",";
|
||||
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
|
||||
|
|
|
|||
Loading…
Reference in a new issue