task #10611: Add option to choose order of key in bank account info on PDF
This commit is contained in:
parent
4180251e95
commit
9fe2aefd76
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@ -48,6 +49,19 @@ if ($_POST["action"] == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
|
||||
dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT",$_POST["BANK_CHEQUERECEIPT_FREE_TEXT"],'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
//Order display of bank account
|
||||
if ($_GET["action"] == 'setbankorder')
|
||||
{
|
||||
if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION",$_GET["value"],'chaine',0,'',$conf->entity) > 0)
|
||||
{
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* view
|
||||
@ -57,12 +71,10 @@ llxHeader("","");
|
||||
|
||||
$html=new Form($db);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameters").'</td>';
|
||||
@ -81,7 +93,8 @@ print '<textarea name="BANK_CHEQUERECEIPT_FREE_TEXT" class="flat" cols="120">'.$
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
print '</table>';
|
||||
print "<br>";
|
||||
|
||||
/*
|
||||
$var=!$var;
|
||||
@ -97,9 +110,57 @@ print "</td></tr>\n";
|
||||
print '</form>';
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
|
||||
//Show bank account order
|
||||
print_titre($langs->trans("BankOrderShow"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="140">'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.$langs->trans("Example").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="60"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$bankorder[0][0]= $langs->trans("BankOrderGlobal");
|
||||
$bankorder[0][1]=$langs->trans("BankOrderGlobalDesc");
|
||||
$bankorder[0][2]=$langs->trans("BankOrderGlobalEx");
|
||||
$bankorder[1][0]=$langs->trans("BankOrderES");
|
||||
$bankorder[1][1]=$langs->trans("BankOrderESDesc");
|
||||
$bankorder[1][2]=$langs->trans("BankOrderESEx");
|
||||
|
||||
$var = true;
|
||||
$i=0;
|
||||
|
||||
while ($i<=1)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$bankorder[$i][0]."</td><td>\n";
|
||||
print $bankorder[$i][1];
|
||||
print '</td>';
|
||||
print '<td nowrap="nowrap">'.$bankorder[$i][2]."</td>\n";
|
||||
|
||||
if ($conf->global->BANK_SHOW_ORDER_OPTION == $i)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print img_picto($langs->trans("Activated"),'on');
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbankorder&value='.$i.'">';
|
||||
print img_picto($langs->trans("Disabled"),'off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
@ -160,3 +160,8 @@ insert into llx_const (name, value, type, note, visible) values ('MAIN_AGENDA_AC
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL','1','chaine','',0);
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE','1','chaine','',0);
|
||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE','1','chaine','',0);
|
||||
|
||||
--
|
||||
-- Bank
|
||||
--
|
||||
insert into llx_const (name, value, type, note, visible) values ('BANK_SHOW_ORDER_OPTION','0','chaine','',0);
|
||||
|
||||
@ -159,3 +159,6 @@ UPDATE llx_documentmodel set type='order_supplier' WHERE type='supplier_order';
|
||||
UPDATE llx_c_type_contact set element='invoice_supplier' WHERE element='facture_fourn';
|
||||
UPDATE llx_c_type_contact set module='invoice_supplier' WHERE module='supplier_invoice';
|
||||
UPDATE llx_c_type_contact set module='order_supplier' WHERE module='supplier_order';
|
||||
|
||||
-- Add display order of bank account
|
||||
insert into llx_const (name, value, type, note, visible) values ('BANK_SHOW_ORDER_OPTION','0','chaine','',0);
|
||||
|
||||
@ -1211,6 +1211,13 @@ EndPointIs=Els clients SOAP hauran d'enviar les seves sol·licituds al punt fina
|
||||
##### Bank #####
|
||||
BankSetupModule=Configuració del mòdul Banc
|
||||
FreeLegalTextOnChequeReceipts=Menció complementària a les remeses de xecs
|
||||
BankOrderShow=Ordre de visualització dels comptes bancaris
|
||||
BankOrderGlobal=General
|
||||
BankOrderGlobalDesc=Ordre de visualització general
|
||||
BankOrderES=Espanyol
|
||||
BankOrderESDesc=Ordre de visualització espanyol
|
||||
BankOrderGlobalEx=CodiBanc CodiOficina Compte DC
|
||||
BankOrderESEx=CodiBanc CodiOficina DC Compte
|
||||
##### Multicompany #####
|
||||
MultiCompanySetup=Configuració del mòdul Multi-empresa
|
||||
##### Suppliers #####
|
||||
|
||||
@ -1203,6 +1203,13 @@ EndPointIs=SOAP clients must send their requests to the Dolibarr endpoint availa
|
||||
##### Bank #####
|
||||
BankSetupModule=Bank module setup
|
||||
FreeLegalTextOnChequeReceipts=Free text on cheque receipts
|
||||
BankOrderShow=Display order of bank accounts
|
||||
BankOrderGlobal=General
|
||||
BankOrderGlobalDesc=General display order
|
||||
BankOrderES=Spanish
|
||||
BankOrderESDesc=Spanish display order
|
||||
BankOrderGlobalEx=BankCode DeskCode AccountNumber Key
|
||||
BankOrderESEx=BankCode DeskCode Key AccountNumber
|
||||
##### Multicompany #####
|
||||
MultiCompanySetup=Multi-company module setup
|
||||
##### Suppliers #####
|
||||
|
||||
@ -1211,6 +1211,13 @@ EndPointIs=Los clientes SOAP deberán enviar sus solicitudes al punto final en l
|
||||
##### Bank #####
|
||||
BankSetupModule=Configuración del módulo Banco
|
||||
FreeLegalTextOnChequeReceipts=Mención complementaria en las remesas de cheques
|
||||
BankOrderShow=Orden de visualización de las cuentas bancarias
|
||||
BankOrderGlobal=General
|
||||
BankOrderGlobalDesc=Orden de visualización general
|
||||
BankOrderES=Español
|
||||
BankOrderESDesc=Orden de visualización español
|
||||
BankOrderGlobalEx=CodigoBanco CodigoOficina Cuenta DC
|
||||
BankOrderESEx=CodigoBanco CodigoOficina DC Cuenta
|
||||
##### Multicompany #####
|
||||
MultiCompanySetup=Configuración del módulo Multi-empresa
|
||||
##### Suppliers #####
|
||||
|
||||
@ -1211,6 +1211,13 @@ EndPointIs=Los clientes SOAP deberán enviar sus solicitudes al punto final en l
|
||||
##### Bank #####
|
||||
BankSetupModule=Configuración del módulo Banco
|
||||
FreeLegalTextOnChequeReceipts=Mención complementaria en las remesas de cheques
|
||||
BankOrderShow=Orden de visualización de las cuentas bancarias
|
||||
BankOrderGlobal=General
|
||||
BankOrderGlobalDesc=Orden de visualización general
|
||||
BankOrderES=Español
|
||||
BankOrderESDesc=Orden de visualización español
|
||||
BankOrderGlobalEx=CodigoBanco CodigoOficina Cuenta DC
|
||||
BankOrderESEx=CodigoBanco CodigoOficina DC Cuenta
|
||||
##### Multicompany #####
|
||||
MultiCompanySetup=Configuración del módulo Multi-empresa
|
||||
##### Suppliers #####
|
||||
|
||||
@ -1213,6 +1213,13 @@ EndPointIs=Les clients SOAP doivent envoyer leur requêtes vers l'endpoint Dolib
|
||||
##### Bank #####
|
||||
BankSetupModule=Configuration du module Banque
|
||||
FreeLegalTextOnChequeReceipts=Mention complémentaire sur les bordereaux de remises de chèques
|
||||
BankOrderShow=Ordre d'affichage des comptes bancaires
|
||||
BankOrderGlobal=Général
|
||||
BankOrderGlobalDesc=Ordre d'affichage général
|
||||
BankOrderES=Espagnole
|
||||
BankOrderESDesc=Ordre d'affichage Espagnole
|
||||
BankOrderGlobalEx=CodeBanque CodeGuichet NúmeroCompte CléRIB
|
||||
BankOrderESEx=CodeBanque CodeGuichet CléRIB NúmeroCompte
|
||||
##### Multicompany #####
|
||||
MultiCompanySetup=Configuration du module Multi-société
|
||||
##### Suppliers #####
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -248,7 +249,7 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text)
|
||||
*/
|
||||
function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account)
|
||||
{
|
||||
global $mysoc;
|
||||
global $mysoc, $conf;
|
||||
|
||||
$pdf->SetXY ($curx, $cury);
|
||||
$pdf->SetFont('','B',8);
|
||||
@ -272,7 +273,8 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account)
|
||||
$pdf->line($curx+1, $cury+1, $curx+1, $cury+10 );
|
||||
|
||||
$fieldstoshow=array('bank','desk','number','key');
|
||||
if ($account->pays_code == 'ES') $fieldstoshow=array('bank','desk','key','number');
|
||||
|
||||
if ($conf->global->BANK_SHOW_ORDER_OPTION==1) $fieldstoshow=array('bank','desk','key','number');
|
||||
|
||||
foreach ($fieldstoshow as $val)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user