diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index d64a849e663..c4ea066f801 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1577,8 +1577,11 @@ if (empty($reshook)) // Save last template used to generate document if (GETPOST('model')) $object->setDocModel($user, GETPOST('model', 'alpha')); - if (GETPOST('fk_bank')) // this field may come from an external module - $object->fk_bank = GETPOST('fk_bank'); + if (GETPOST('fk_bank')) { // this field may come from an external module + $object->fk_bank = GETPOST('fk_bank'); + } else { + $object->fk_bank = $object->fk_account; + } // Define output language $outputlangs = $langs;