Merge pull request #15531 from FHenry/develop

Fix bank transfert supplier
This commit is contained in:
Laurent Destailleur 2020-11-25 13:06:10 +01:00 committed by GitHub
commit ac859bc38e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 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);
}
}
}
@ -1316,7 +1320,7 @@ class BonPrelevement extends CommonObject
$url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id;
if ($this->type == 'bank-transfer') {
$url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/card.php?id='.$this->id;
$url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id;
}
if ($option != 'nolink')

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;