fix banck tranfert supplier

This commit is contained in:
Florian HENRY 2020-11-25 10:58:34 +01:00
parent bac24485c2
commit 12ef03f06d
3 changed files with 8 additions and 2 deletions

View File

@ -164,10 +164,12 @@ class BonPrelevement extends CommonObject
$result = 0;
} else {
$result = -1;
$this->errors[] = get_class($this)."::AddFacture " . $this->db->lasterror;
dol_syslog(get_class($this)."::AddFacture Error $result");
}
} else {
$result = -2;
$this->errors[]=get_class($this)."::AddFacture linedid Empty";
dol_syslog(get_class($this)."::AddFacture Error $result");
}
} else {
@ -245,6 +247,7 @@ class BonPrelevement extends CommonObject
$line_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_lignes");
$result = 0;
} else {
$this->errors[]=get_class($this)."::addline Error -2 " .$this->db->lasterror;
dol_syslog(get_class($this)."::addline Error -2");
$result = -2;
}
@ -1121,7 +1124,8 @@ class BonPrelevement extends CommonObject
if (!$resql)
{
$error++;
dol_syslog(__METHOD__."::Update Error=".$this->db->error(), LOG_ERR);
$this->errors[]=$this->db->lasterror();
dol_syslog(__METHOD__."::Update Error=".$this->db->lasterror(), LOG_ERR);
}
}
}

View File

@ -35,6 +35,8 @@ ALTER TABLE llx_payment_various MODIFY COLUMN ref varchar(30) NULL;
ALTER TABLE llx_prelevement_bons ADD COLUMN type varchar(16) DEFAULT 'debit-order';
ALTER TABLE llx_prelevement_facture CHANGE COLUMN fk_facture_foun fk_facture_fourn integer NULL;
ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture (fk_facture);
ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture_fourn (fk_facture_fourn);

View File

@ -20,7 +20,7 @@ create table llx_prelevement_facture
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_facture integer NULL,
fk_facture_foun integer NULL,
fk_facture_fourn integer NULL,
fk_prelevement_lignes integer NOT NULL
)ENGINE=innodb;