Fix: Public note not stored in private note when creating a supplier invoice.
This commit is contained in:
parent
247daaabc5
commit
27c1e7614f
@ -188,7 +188,7 @@ if ($_POST['action'] == 'add' && $user->rights->fournisseur->facture->creer)
|
|||||||
$facfou->libelle = $_POST['libelle'];
|
$facfou->libelle = $_POST['libelle'];
|
||||||
$facfou->date = $datefacture;
|
$facfou->date = $datefacture;
|
||||||
$facfou->date_echeance = $datedue;
|
$facfou->date_echeance = $datedue;
|
||||||
$facfou->note = $_POST['note'];
|
$facfou->note_public = $_POST['note'];
|
||||||
|
|
||||||
$facid = $facfou->create($user);
|
$facid = $facfou->create($user);
|
||||||
|
|
||||||
|
|||||||
@ -67,6 +67,7 @@ class FactureFournisseur extends Facture
|
|||||||
var $total_tva;
|
var $total_tva;
|
||||||
var $total_ttc;
|
var $total_ttc;
|
||||||
var $note;
|
var $note;
|
||||||
|
var $note_public;
|
||||||
var $propalid;
|
var $propalid;
|
||||||
var $lignes;
|
var $lignes;
|
||||||
var $fournisseur;
|
var $fournisseur;
|
||||||
@ -120,9 +121,13 @@ class FactureFournisseur extends Facture
|
|||||||
if (! $remise) $remise = 0 ;
|
if (! $remise) $remise = 0 ;
|
||||||
$totalht = ($amount - $remise);
|
$totalht = ($amount - $remise);
|
||||||
|
|
||||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn (facnumber, libelle, fk_soc, datec, datef, note, fk_user_author, date_lim_reglement) ';
|
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn (facnumber, libelle, fk_soc, datec, datef,';
|
||||||
$sql .= " VALUES ('".addslashes($number)."','".addslashes($this->libelle)."',";
|
$sql.= ' note, note_public, fk_user_author, date_lim_reglement) ';
|
||||||
$sql .= $this->socid.", ".$this->db->idate(mktime()).",'".$this->db->idate($this->date)."','".addslashes($this->note)."', ".$user->id.",'".$this->db->idate($this->date_echeance)."');";
|
$sql.= " VALUES ('".addslashes($number)."','".addslashes($this->libelle)."',";
|
||||||
|
$sql.= " ".$this->socid.", ".$this->db->idate(gmmktime()).",'".$this->db->idate($this->date)."',";
|
||||||
|
$sql.= " '".addslashes($this->note)."',";
|
||||||
|
$sql.= " '".addslashes($this->note_public)."',";
|
||||||
|
$sql.= " ".$user->id.",'".$this->db->idate($this->date_echeance)."');";
|
||||||
|
|
||||||
dolibarr_syslog("FactureFournisseur::create sql=".$sql, LOG_DEBUG);
|
dolibarr_syslog("FactureFournisseur::create sql=".$sql, LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user