Debug module credit transfer

This commit is contained in:
Laurent Destailleur 2020-07-02 15:45:11 +02:00
parent 46eb744b34
commit 16b327f106
2 changed files with 18 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2010-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2010-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
@ -120,7 +120,11 @@ if (empty($reshook))
$form = new Form($db); $form = new Form($db);
$thirdpartystatic = new Societe($db); $thirdpartystatic = new Societe($db);
$invoicestatic = new Facture($db); if ($type != 'bank-transfer') {
$invoicestatic = new Facture($db);
} else {
$invoicestatic = new FactureFournisseur($db);
}
$bprev = new BonPrelevement($db); $bprev = new BonPrelevement($db);
llxHeader('', $langs->trans("NewStandingOrder")); llxHeader('', $langs->trans("NewStandingOrder"));
@ -183,6 +187,7 @@ print '<div class="tabsAction">'."\n";
print '<form action="'.$_SERVER['PHP_SELF'].'?action=create" method="POST">'; print '<form action="'.$_SERVER['PHP_SELF'].'?action=create" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="type" value="'.$type.'">';
if ($nb) { if ($nb) {
if ($pricetowithdraw) { if ($pricetowithdraw) {
print $langs->trans('ExecutionDate').' '; print $langs->trans('ExecutionDate').' ';
@ -190,8 +195,13 @@ if ($nb) {
if ($mysoc->isInEEC()) { if ($mysoc->isInEEC()) {
$title = $langs->trans("CreateForSepa"); $title = $langs->trans("CreateForSepa");
if ($type == 'bank-transfer') {
$title = $langs->trans("CreateSepaFileForPaymentByBankTransfer");
}
print '<select name="format"><option value="FRST">'.$langs->trans('SEPAFRST').'</option><option value="RCUR">'.$langs->trans('SEPARCUR').'</option></select>'; if ($type != 'bank-transfer') {
print '<select name="format"><option value="FRST">'.$langs->trans('SEPAFRST').'</option><option value="RCUR">'.$langs->trans('SEPARCUR').'</option></select>';
}
print '<input class="butAction" type="submit" value="'.$title.'"/>'; print '<input class="butAction" type="submit" value="'.$title.'"/>';
} else { } else {
$title = $langs->trans("CreateAll"); $title = $langs->trans("CreateAll");
@ -363,7 +373,9 @@ if ($resql)
print '<td>'; print '<td>';
print $thirdpartystatic->display_rib('rum'); print $thirdpartystatic->display_rib('rum');
$format = $thirdpartystatic->display_rib('format'); $format = $thirdpartystatic->display_rib('format');
if ($format) print ' ('.$format.')'; if ($type != 'bank-transfer') {
if ($format) print ' ('.$format.')';
}
print '</td>'; print '</td>';
// Amount // Amount
print '<td class="right">'; print '<td class="right">';

View File

@ -10,8 +10,8 @@ PaymentByBankTransferReceipts=Credit transfer orders
PaymentByBankTransferLines=Credit transfer order lines PaymentByBankTransferLines=Credit transfer order lines
WithdrawalsReceipts=Direct debit orders WithdrawalsReceipts=Direct debit orders
WithdrawalReceipt=Direct debit order WithdrawalReceipt=Direct debit order
BankTransferReceipts=Credit transfer receipts BankTransferReceipts=Credit transfer order
BankTransferReceipt=Credit transfer receipt BankTransferReceipt=Credit transfer order
LatestBankTransferReceipts=Latest %s credit transfer orders LatestBankTransferReceipts=Latest %s credit transfer orders
LastWithdrawalReceipts=Latest %s direct debit files LastWithdrawalReceipts=Latest %s direct debit files
WithdrawalsLine=Direct debit order line WithdrawalsLine=Direct debit order line