diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php
index 317136e1333..b6e651029de 100644
--- a/htdocs/compta/prelevement/create.php
+++ b/htdocs/compta/prelevement/create.php
@@ -234,7 +234,7 @@ print '';
print '
| '.$langs->trans("AmountTotal").' | ';
print '';
-print price($pricetowithdraw);
+print price($pricetowithdraw, 0, $langs, 1,-1, -1, $conf->currency);
print ' | ';
print '
';
@@ -256,20 +256,20 @@ if ($nb) {
if ($type == 'bank-transfer') {
$title = $langs->trans('BankToPayCreditTransfer').': ';
}
- print $title;
+ print ''.$title.'';
print img_picto('', 'bank_account');
$default_account = ($type == 'bank-transfer' ? 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' : 'PRELEVEMENT_ID_BANKACCOUNT');
- print $form->select_comptes($conf->global->$default_account, 'id_bankaccount', 0, "courant=1", 0, '', 0, '', 1);
- print ' - ';
+ print $form->select_comptes(getDolGlobalInt($default_account), 'id_bankaccount', 0, "courant=1", 0, '', 0, 'widthcentpercentminusx maxwidth300', 1);
+ print ' ';
if (empty($executiondate)) {
$delayindays = 0;
if ($type != 'bank-transfer') {
- $delayindays = $conf->global->PRELEVEMENT_ADDDAYS;
+ $delayindays = getDolGlobalInt('PRELEVEMENT_ADDDAYS');
} else {
- $delayindays = $conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS;
+ $delayindays = getDolGlobalInt('PAYMENTBYBANKTRANSFER_ADDDAYS');
}
$executiondate = dol_time_plus_duree(dol_now(), $delayindays, 'd');
@@ -292,14 +292,14 @@ if ($nb) {
print '';
print '';
}
- print '';
+ print '';
} else {
$title = $langs->trans("CreateAll");
if ($type == 'bank-transfer') {
$title = $langs->trans("CreateFileForPaymentByBankTransfer");
}
print ''."\n";
- print ''."\n";
+ print ''."\n";
}
} else {
if ($mysoc->isInEEC()) {
@@ -307,18 +307,18 @@ if ($nb) {
if ($type == 'bank-transfer') {
$title = $langs->trans("CreateSepaFileForPaymentByBankTransfer");
}
- print ''.$title."\n";
+ print ''.$title."\n";
if ($type != 'bank-transfer') {
$title = $langs->trans("CreateForSepaRCUR");
- print ''.$title."\n";
+ print ''.$title."\n";
}
} else {
$title = $langs->trans("CreateAll");
if ($type == 'bank-transfer') {
$title = $langs->trans("CreateFileForPaymentByBankTransfer");
}
- print ''.$title."\n";
+ print ''.$title."\n";
}
}
} else {
@@ -328,7 +328,9 @@ if ($nb) {
$titlefortab = $langs->transnoentitiesnoconv("PaymentByBankTransfers");
$title = $langs->trans("CreateFileForPaymentByBankTransfer");
}
- print ''.$title."\n";
+ print '';
+ print $title;
+ print "\n";
}
print "\n";
@@ -343,6 +345,9 @@ print '
';
*/
$sql = "SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,";
+if ($type == 'bank-transfer') {
+ $sql .= " f.ref_supplier,";
+}
$sql .= " pfd.rowid as request_row_id, pfd.date_demande, pfd.amount";
if ($type == 'bank-transfer') {
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,";
@@ -423,6 +428,9 @@ if ($resql) {
print '';
print '';
print '| '.$langs->trans($tradinvoice).' | ';
+ if ($type == 'bank-transfer') {
+ print ''.$langs->trans("RefSupplier").' | ';
+ }
print ''.$langs->trans("ThirdParty").' | ';
print ''.$langs->trans("RIB").' | ';
print ''.$langs->trans("RUM").' | ';
@@ -442,17 +450,25 @@ if ($resql) {
$bac->fetch(0, $obj->socid);
+ $invoicestatic->id = $obj->rowid;
+ $invoicestatic->ref = $obj->ref;
+ $invoicestatic->ref_supplier = $obj->ref_supplier;
+
print '
';
// Ref invoice
- print '| ';
- $invoicestatic->id = $obj->rowid;
- $invoicestatic->ref = $obj->ref;
+ print ' | ';
print $invoicestatic->getNomUrl(1, 'withdraw');
print ' | ';
+ if ($type == 'bank-transfer') {
+ print '';
+ print dol_escape_htmltag($invoicestatic->ref_supplier);
+ print ' | ';
+ }
+
// Thirdparty
- print '';
+ print ' | ';
$thirdpartystatic->fetch($obj->socid);
print $thirdpartystatic->getNomUrl(1, 'ban');
print ' | ';