mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
FIX Journal code of bank must be visible of accountaing module on.
This commit is contained in:
@@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
$langs->load("compta");
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$massaction=GETPOST('massaction','alpha');
|
$massaction=GETPOST('massaction','alpha');
|
||||||
@@ -87,6 +88,7 @@ $arrayfields=array(
|
|||||||
'b.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
'b.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
||||||
'b.number'=>array('label'=>$langs->trans("AccountIdShort"), 'checked'=>1),
|
'b.number'=>array('label'=>$langs->trans("AccountIdShort"), 'checked'=>1),
|
||||||
'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>$conf->accountancy->enabled),
|
'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>$conf->accountancy->enabled),
|
||||||
|
'b.accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>$conf->accountancy->enabled),
|
||||||
'toreconcile'=>array('label'=>$langs->trans("TransactionsToConciliate"), 'checked'=>1),
|
'toreconcile'=>array('label'=>$langs->trans("TransactionsToConciliate"), 'checked'=>1),
|
||||||
'b.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
'b.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||||
'b.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
'b.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||||
@@ -139,7 +141,7 @@ $title=$langs->trans('BankAccounts');
|
|||||||
// Load array of financial accounts (opened by default)
|
// Load array of financial accounts (opened by default)
|
||||||
$accounts = array();
|
$accounts = array();
|
||||||
|
|
||||||
$sql = "SELECT rowid, label, courant, rappro, account_number, datec as date_creation, tms as date_update";
|
$sql = "SELECT rowid, label, courant, rappro, account_number, accountancy_journal, datec as date_creation, tms as date_update";
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
@@ -292,6 +294,7 @@ if (! empty($arrayfields['b.label']['checked'])) print_liste_field_titr
|
|||||||
if (! empty($arrayfields['accountype']['checked'])) print_liste_field_titre($arrayfields['accountype']['label'],$_SERVER["PHP_SELF"],'','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['accountype']['checked'])) print_liste_field_titre($arrayfields['accountype']['label'],$_SERVER["PHP_SELF"],'','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['b.number']['checked'])) print_liste_field_titre($arrayfields['b.number']['label'],$_SERVER["PHP_SELF"],'b.number','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['b.number']['checked'])) print_liste_field_titre($arrayfields['b.number']['label'],$_SERVER["PHP_SELF"],'b.number','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['b.account_number']['checked'])) print_liste_field_titre($arrayfields['b.account_number']['label'],$_SERVER["PHP_SELF"],'b.account_number','',$param,'',$sortfield,$sortorder);
|
if (! empty($arrayfields['b.account_number']['checked'])) print_liste_field_titre($arrayfields['b.account_number']['label'],$_SERVER["PHP_SELF"],'b.account_number','',$param,'',$sortfield,$sortorder);
|
||||||
|
if (! empty($arrayfields['b.accountancy_journal']['checked'])) print_liste_field_titre($arrayfields['b.accountancy_journal']['label'],$_SERVER["PHP_SELF"],'b.accountancy_journal','',$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['toreconcile']['checked'])) print_liste_field_titre($arrayfields['toreconcile']['label'],$_SERVER["PHP_SELF"],'','',$param,'align="center"',$sortfield,$sortorder);
|
if (! empty($arrayfields['toreconcile']['checked'])) print_liste_field_titre($arrayfields['toreconcile']['label'],$_SERVER["PHP_SELF"],'','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||||
@@ -338,19 +341,25 @@ if (! empty($arrayfields['accountype']['checked']))
|
|||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Number
|
// Bank number
|
||||||
if (! empty($arrayfields['b.number']['checked']))
|
if (! empty($arrayfields['b.number']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_number" value="'.$search_number.'">';
|
print '<input class="flat" size="6" type="text" name="search_number" value="'.$search_number.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Number
|
// Account number
|
||||||
if (! empty($arrayfields['b.account_number']['checked']))
|
if (! empty($arrayfields['b.account_number']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Accountancy journal
|
||||||
|
if (! empty($arrayfields['b.accountancy_journal']['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
// Transactions to reconcile
|
// Transactions to reconcile
|
||||||
if (! empty($arrayfields['toreconcile']['checked']))
|
if (! empty($arrayfields['toreconcile']['checked']))
|
||||||
{
|
{
|
||||||
@@ -484,6 +493,14 @@ foreach ($accounts as $key=>$type)
|
|||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Accountancy journal
|
||||||
|
if (! empty($arrayfields['b.accountancy_journal']['checked']))
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
|
print '<td>'.length_accountg($acc->accountancy_journal).'</td>';
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
// Transactions to reconcile
|
// Transactions to reconcile
|
||||||
if (! empty($arrayfields['toreconcile']['checked']))
|
if (! empty($arrayfields['toreconcile']['checked']))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user