Fix: the bank information were visible into pdf but were not using
correct setup to decide which bank to show.
This commit is contained in:
parent
8a67a3af10
commit
3475433eaf
@ -956,6 +956,11 @@ if (empty($reshook))
|
|||||||
else if ($action == 'builddoc' && $user->rights->propal->creer) {
|
else if ($action == 'builddoc' && $user->rights->propal->creer) {
|
||||||
if (GETPOST('model')) {
|
if (GETPOST('model')) {
|
||||||
$object->setDocModel($user, GETPOST('model'));
|
$object->setDocModel($user, GETPOST('model'));
|
||||||
|
}
|
||||||
|
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
|
// Define output language
|
||||||
|
|||||||
@ -94,6 +94,7 @@ $hookmanager->initHooks(array('ordercard','globalcard'));
|
|||||||
|
|
||||||
$permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -1072,16 +1073,17 @@ if (empty($reshook))
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Generate order document (define into /core/modules/commande/modules_commande.php)
|
||||||
else if ($action == 'builddoc') // In get or post
|
else if ($action == 'builddoc') // In get or post
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* Generate order document
|
|
||||||
* define into /core/modules/commande/modules_commande.php
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Save last template used to generate document
|
// Save last template used to generate document
|
||||||
if (GETPOST('model'))
|
if (GETPOST('model'))
|
||||||
$object->setDocModel($user, GETPOST('model', 'alpha'));
|
$object->setDocModel($user, GETPOST('model', 'alpha'));
|
||||||
|
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
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
|
|||||||
@ -718,10 +718,11 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
// If payment mode not forced or forced to VIR, show payment with BAN
|
// 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->mode_reglement_code) || $object->mode_reglement_code == 'VIR')
|
||||||
{
|
{
|
||||||
if (! empty($conf->global->FACTURE_RIB_NUMBER))
|
if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER))
|
||||||
{
|
{
|
||||||
|
$bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank);
|
||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
$account->fetch($bankid);
|
||||||
|
|
||||||
$curx=$this->marge_gauche;
|
$curx=$this->marge_gauche;
|
||||||
$cury=$posy;
|
$cury=$posy;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user