|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<?php
|
|
|
|
|
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
|
|
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
|
|
|
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
|
|
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
|
|
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
|
|
|
|
* Copyright (C) 2014-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
|
|
|
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
|
|
|
|
@ -266,24 +266,26 @@ if ($action == 'create')
|
|
|
|
|
print '<input type="hidden" name="action" value="add">';
|
|
|
|
|
print '<input type="hidden" name="clos" value="0">';
|
|
|
|
|
|
|
|
|
|
dol_fiche_head('');
|
|
|
|
|
|
|
|
|
|
print '<table class="border" width="100%">';
|
|
|
|
|
|
|
|
|
|
// Ref
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.($_POST["ref"]?$_POST["ref"]:$account->ref).'" maxlength="12"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Label
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="30" type="text" class="flat" name="label" value="'.GETPOST("label").'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Type
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountType").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("AccountType").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
$formbank->select_type_comptes_financiers(isset($_POST["type"])?$_POST["type"]:1,"type");
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Currency
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Currency").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
$selectedcode=$account->account_currency_code;
|
|
|
|
|
if (! $selectedcode) $selectedcode=$conf->currency;
|
|
|
|
|
@ -293,7 +295,7 @@ if ($action == 'create')
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Status").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos));
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
@ -307,7 +309,7 @@ if ($action == 'create')
|
|
|
|
|
else if (empty($selectedcode)) $selectedcode=$mysoc->country_code;
|
|
|
|
|
$account->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("BankAccountCountry").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("BankAccountCountry").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
print $form->select_country($selectedcode,'account_country_id');
|
|
|
|
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
|
|
|
|
@ -326,11 +328,11 @@ if ($action == 'create')
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Web
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Web").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Web").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="50" type="text" class="flat" name="url" value="'.$_POST["url"].'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Comment
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
|
|
|
|
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
// Editor wysiwyg
|
|
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
|
|
|
|
@ -353,18 +355,18 @@ if ($action == 'create')
|
|
|
|
|
print '<table class="border" width="100%">';
|
|
|
|
|
|
|
|
|
|
// Sold
|
|
|
|
|
print '<tr><td valign="top" width="25%">'.$langs->trans("InitialBankBalance").'</td>';
|
|
|
|
|
print '<tr><td width="25%">'.$langs->trans("InitialBankBalance").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="12" type="text" class="flat" name="solde" value="'.(GETPOST("solde")?GETPOST("solde"):price2num($account->solde)).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Date").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Date").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
$form->select_date('', 're', 0, 0, 0, 'formsoc');
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_allowed" value="'.($_POST["account_min_allowed"]?$_POST["account_min_allowed"]:$account->account_min_allowed).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalDesired").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.($_POST["account_min_desired"]?$_POST["account_min_desired"]:$account->account_min_desired).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
@ -375,7 +377,7 @@ if ($action == 'create')
|
|
|
|
|
print '<table class="border" width="100%">';
|
|
|
|
|
|
|
|
|
|
// If bank account
|
|
|
|
|
print '<tr><td valign="top" width="25%">'.$langs->trans("BankName").'</td>';
|
|
|
|
|
print '<tr><td width="25%">'.$langs->trans("BankName").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="30" type="text" class="flat" name="bank" value="'.$account->bank.'"></td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
@ -452,16 +454,16 @@ if ($action == 'create')
|
|
|
|
|
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="11" maxlength="11" type="text" class="flat" name="bic" value="'.$account->bic.'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
|
|
|
|
print "<textarea class=\"flat\" name=\"domiciliation\" rows=\"2\" cols=\"40\">";
|
|
|
|
|
print $account->domiciliation;
|
|
|
|
|
print "</textarea></td></tr>";
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="30" type="text" class="flat" name="proprio" value="'.$account->proprio.'">';
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
|
|
|
|
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
|
|
|
|
print "<textarea class=\"flat\" name=\"owner_address\" rows=\"2\" cols=\"40\">";
|
|
|
|
|
print $account->owner_address;
|
|
|
|
|
print "</textarea></td></tr>";
|
|
|
|
|
@ -474,25 +476,27 @@ if ($action == 'create')
|
|
|
|
|
// Accountancy code
|
|
|
|
|
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<td colspan="3"><input type="text" name="account_number" value="'.(GETPOST("account_number")?GETPOST('account_number'):$account->account_number).'"></td></tr>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<tr><td width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<td colspan="3"><input type="text" name="account_number" value="'.(GETPOST("account_number")?GETPOST('account_number'):$account->account_number).'"></td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Accountancy journal
|
|
|
|
|
if (! empty($conf->accounting->enabled))
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
|
|
|
|
|
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(GETPOST("accountancy_journal")?GETPOST('accountancy_journal'):$account->accountancy_journal).'"></td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
|
|
|
|
print '<br><div class="center"><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></div>';
|
|
|
|
|
dol_fiche_end();
|
|
|
|
|
|
|
|
|
|
print '<div class="center"><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></div>';
|
|
|
|
|
|
|
|
|
|
print '</form>';
|
|
|
|
|
}
|
|
|
|
|
@ -538,21 +542,21 @@ else
|
|
|
|
|
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
|
|
|
|
|
|
|
|
|
|
// Ref
|
|
|
|
|
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
|
|
|
|
|
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
print $form->showrefnav($account, 'ref', $linkback, 1, 'ref');
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Label
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Label").'</td>';
|
|
|
|
|
print '<td colspan="3">'.$account->label.'</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Type
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("AccountType").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("AccountType").'</td>';
|
|
|
|
|
print '<td colspan="3">'.$account->type_lib[$account->type].'</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Currency
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Currency").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Currency").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
$selectedcode=$account->account_currency_code;
|
|
|
|
|
if (! $selectedcode) $selectedcode=$conf->currency;
|
|
|
|
|
@ -560,7 +564,7 @@ else
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Status").'</td>';
|
|
|
|
|
print '<td colspan="3">'.$account->getLibStatut(4).'</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Country
|
|
|
|
|
@ -579,7 +583,7 @@ else
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Conciliate
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Conciliable").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Conciliable").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
$conciliate=$account->canBeConciliated();
|
|
|
|
|
if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
|
|
|
|
|
@ -587,19 +591,19 @@ else
|
|
|
|
|
else print ($account->rappro==1 ? $langs->trans("Yes") : ($langs->trans("No").' ('.$langs->trans("ConciliationDisabled").')'));
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
|
|
|
|
print '<td colspan="3">'.$account->min_allowed.'</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalDesired").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
|
|
|
|
print '<td colspan="3">'.$account->min_desired.'</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Web").'</td><td colspan="3">';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Web").'</td><td colspan="3">';
|
|
|
|
|
if ($account->url) print '<a href="'.$account->url.'" target="_gobank">';
|
|
|
|
|
print $account->url;
|
|
|
|
|
if ($account->url) print '</a>';
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
|
|
|
|
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
|
|
|
|
|
print '<td colspan="3">'.dol_htmlentitiesbr($account->comment).'</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Other attributes
|
|
|
|
|
@ -687,7 +691,7 @@ else
|
|
|
|
|
if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
|
|
|
|
|
if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans($ibankey).'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans($ibankey).'</td>';
|
|
|
|
|
print '<td colspan="3">'.$account->iban.' ';
|
|
|
|
|
if (! empty($account->iban)) {
|
|
|
|
|
if (! checkIbanForAccount($account)) {
|
|
|
|
|
@ -698,7 +702,7 @@ else
|
|
|
|
|
}
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans($bickey).'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
|
|
|
|
print '<td colspan="3">'.$account->bic.' ';
|
|
|
|
|
if (! empty($account->bic)) {
|
|
|
|
|
if (! checkSwiftForAccount($account)) {
|
|
|
|
|
@ -709,15 +713,15 @@ else
|
|
|
|
|
}
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
|
|
|
|
print nl2br($account->domiciliation);
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td><td colspan="3">';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td><td colspan="3">';
|
|
|
|
|
print $account->proprio;
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
|
|
|
|
print nl2br($account->owner_address);
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
@ -727,13 +731,13 @@ else
|
|
|
|
|
|
|
|
|
|
print '<table class="border" width="100%">';
|
|
|
|
|
// Accountancy code
|
|
|
|
|
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<tr><td width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<td colspan="3">'.$account->account_number.'</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Accountancy journal
|
|
|
|
|
if (! empty($conf->accounting->enabled))
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
|
|
|
|
|
print '<td colspan="3">'.$account->accountancy_journal.'</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -799,24 +803,26 @@ else
|
|
|
|
|
print '<input type="hidden" name="action" value="update">';
|
|
|
|
|
print '<input type="hidden" name="id" value="'.$_REQUEST["id"].'">'."\n\n";
|
|
|
|
|
|
|
|
|
|
dol_fiche_head('');
|
|
|
|
|
|
|
|
|
|
print '<table class="border" width="100%">';
|
|
|
|
|
|
|
|
|
|
// Ref
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.(isset($_POST["ref"])?$_POST["ref"]:$account->ref).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Label
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Label").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="30" type="text" class="flat" name="label" value="'.(isset($_POST["label"])?$_POST["label"]:$account->label).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Type
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountType").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("AccountType").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
$formbank->select_type_comptes_financiers((isset($_POST["type"])?$_POST["type"]:$account->type),"type");
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Currency
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Currency");
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("Currency");
|
|
|
|
|
print '<input type="hidden" value="'.$account->currency_code.'">';
|
|
|
|
|
print '</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
@ -828,7 +834,7 @@ else
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Status").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos));
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
@ -840,7 +846,7 @@ else
|
|
|
|
|
else if (empty($selectedcode)) $selectedcode=$mysoc->country_code;
|
|
|
|
|
$account->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Country").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("Country").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
print $form->select_country($selectedcode,'account_country_id');
|
|
|
|
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
|
|
|
|
@ -859,7 +865,7 @@ else
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Conciliable
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Conciliable").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Conciliable").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
$conciliate=$account->canBeConciliated();
|
|
|
|
|
if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
|
|
|
|
|
@ -868,19 +874,19 @@ else
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Balance
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_allowed" value="'.(isset($_POST["account_min_allowed"])?$_POST["account_min_allowed"]:$account->min_allowed).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalDesired").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.(isset($_POST["account_min_desired"])?$_POST["account_min_desired"]:$account->min_desired).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Web
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Web").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Web").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="50" type="text" class="flat" name="url" value="'.(isset($_POST["url"])?$_POST["url"]:$account->url).'">';
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Comment
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
|
|
|
|
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
|
|
|
|
|
print '<td colspan="3">';
|
|
|
|
|
// Editor wysiwyg
|
|
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
|
|
|
|
@ -903,7 +909,7 @@ else
|
|
|
|
|
print '<table class="border" width="100%">';
|
|
|
|
|
|
|
|
|
|
// If bank account
|
|
|
|
|
print '<tr><td valign="top" width="25%">'.$langs->trans("BankName").'</td>';
|
|
|
|
|
print '<tr><td width="25%">'.$langs->trans("BankName").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="30" type="text" class="flat" name="bank" value="'.$account->bank.'"></td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
@ -975,22 +981,22 @@ else
|
|
|
|
|
if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
|
|
|
|
|
|
|
|
|
|
// IBAN
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans($ibankey).'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans($ibankey).'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="34" maxlength="34" type="text" class="flat" name="iban" value="'.$account->iban.'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans($bickey).'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="11" maxlength="11" type="text" class="flat" name="bic" value="'.$account->bic.'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
|
|
|
|
print "<textarea class=\"flat\" name=\"domiciliation\" rows=\"2\" cols=\"40\">";
|
|
|
|
|
print $account->domiciliation;
|
|
|
|
|
print "</textarea></td></tr>";
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
|
|
|
|
|
print '<td colspan="3"><input size="30" type="text" class="flat" name="proprio" value="'.$account->proprio.'">';
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
|
|
|
|
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
|
|
|
|
print "<textarea class=\"flat\" name=\"owner_address\" rows=\"2\" cols=\"40\">";
|
|
|
|
|
print $account->owner_address;
|
|
|
|
|
print "</textarea></td></tr>";
|
|
|
|
|
@ -1004,25 +1010,27 @@ else
|
|
|
|
|
// Accountancy code
|
|
|
|
|
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<tr><td width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
|
|
|
|
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Accountancy journal
|
|
|
|
|
if (! empty($conf->accounting->enabled))
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
|
|
|
|
|
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(isset($_POST["accountancy_journal"])?$_POST["accountancy_journal"]:$account->accountancy_journal).'"></td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
|
|
|
|
print '<br><div class="center">';
|
|
|
|
|
dol_fiche_end();
|
|
|
|
|
|
|
|
|
|
print '<div class="center">';
|
|
|
|
|
print '<input value="'.$langs->trans("Modify").'" type="submit" class="button">';
|
|
|
|
|
print ' ';
|
|
|
|
|
print '<input name="cancel" value="'.$langs->trans("Cancel").'" type="submit" class="button">';
|
|
|
|
|
|