git push origin 3.7Merge branch 'marcosgdf-bug-incorrect-pdf-bank' into 3.7

This commit is contained in:
Laurent Destailleur 2015-09-03 17:04:03 +02:00
commit de741e41e5
2 changed files with 3 additions and 2 deletions

View File

@ -22,6 +22,7 @@ FIX [ bug #3288 ] Tasks box is not properly drawn
FIX [ bug #3211 ] Outstading bill amount of a client showed wrong amounts
FIX [ bug #3321 ] Users with certain permissions were shown a "forbidden access" page even if they had the rights
FIX [ bug #3426 ] Unable to create an invoice from a contract with extrafields
FIX [ bug #3431 ] Invoice bank account is not respected
NEW: Created new ContratLigne::insert function

View File

@ -868,9 +868,9 @@ class pdf_crabe extends ModelePDFFactures
// If payment mode not forced or forced to VIR, show payment with BAN
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR')
{
if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER))
if (! empty($object->fk_account) || ! empty($conf->global->FACTURE_RIB_NUMBER))
{
$bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank);
$bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account);
$account = new Account($this->db);
$account->fetch($bankid);