diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 4bf1eceb6dc..79a6797245a 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -1391,10 +1391,13 @@ if ($action == 'create' && $user->rights->commande->creer) {
print '';
// Bank Account
- print '
| ' . $langs->trans('BankAccount') . ' | ';
- $form->select_comptes($fk_account, 'fk_account', 0, '', 1);
- print ' |
';
-
+ if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled))
+ {
+ print '| ' . $langs->trans('BankAccount') . ' | ';
+ $form->select_comptes($fk_account, 'fk_account', 0, '', 1);
+ print ' |
';
+ }
+
// Delivery delay
print '| ' . $langs->trans('AvailabilityPeriod') . ' | ';
$form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1);
@@ -1995,22 +1998,25 @@ if ($action == 'create' && $user->rights->commande->creer) {
$rowspan ++;
// Bank Account
- print ' |
| ';
- print '';
- print ' | ';
- if ($action == 'editbankaccount') {
- $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1);
- } else {
- $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
- }
- print ' | ';
- print '
';
-
+ if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled))
+ {
+ print '| ';
+ print '';
+ print ' | ';
+ if ($action == 'editbankaccount') {
+ $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1);
+ } else {
+ $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
+ }
+ print ' | ';
+ print '
';
+ }
+
// Total HT
print '| ' . $langs->trans('AmountHT') . ' | ';
print '' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . ' | ';
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 0273dea94b9..3c7269c3e6f 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -136,9 +136,10 @@ else if ($action == 'setmode' && $user->rights->fournisseur->commande->creer)
}
// bank account
-else if ($action == 'setbankaccount' && $user->rights->fournisseur->commande->creer) {
+else if ($action == 'setbankaccount' && $user->rights->fournisseur->commande->creer)
+{
$result=$object->setBankAccount(GETPOST('fk_account', 'int'));
- }
+}
// date de livraison
if ($action == 'setdate_livraison' && $user->rights->fournisseur->commande->creer)
@@ -1268,10 +1269,14 @@ if ($action=="create")
print '
';
// Bank Account
- print '| ' . $langs->trans('BankAccount') . ' | ';
- $form->select_comptes($fk_account, 'fk_account', 0, '', 1);
- print ' |
';
-
+ if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && ! empty($conf->banque->enabled))
+ {
+ $langs->load("bank");
+ print '| ' . $langs->trans('BankAccount') . ' | ';
+ $form->select_comptes($fk_account, 'fk_account', 0, '', 1);
+ print ' |
';
+ }
+
print '| '.$langs->trans('NotePublic').' | ';
print '';
$doleditor = new DolEditor('note_public', GETPOST('note_public'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
@@ -1539,22 +1544,25 @@ elseif (! empty($object->id))
print ' |
';
// Bank Account
- print '| ';
- print '';
- print ' | ';
- if ($action == 'editbankaccount') {
- $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1);
- } else {
- $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
- }
- print ' | ';
- print '
';
-
+ if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && ! empty($conf->banque->enabled))
+ {
+ print '| ';
+ print '';
+ print ' | ';
+ if ($action == 'editbankaccount') {
+ $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1);
+ } else {
+ $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
+ }
+ print ' | ';
+ print '
';
+ }
+
// Delivery date planed
print '| ';
print ' |