FIX [ bug #3431 ] Invoice bank account is not respected

Close #3431
This commit is contained in:
Marcos García de La Fuente 2015-09-01 11:09:37 +02:00
parent edf05e8d94
commit c4f9bde14d
2 changed files with 3 additions and 2 deletions

View File

@ -21,6 +21,7 @@ FIX: Not showing task extrafields when creating from left menu
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 #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);