Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
cc8e66d0
Commit
cc8e66d0
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
FIX Journal code of bank must be visible of accountaing module on.
parent
04c05efa
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/compta/bank/index.php
+20
-3
20 additions, 3 deletions
htdocs/compta/bank/index.php
with
20 additions
and
3 deletions
htdocs/compta/bank/index.php
+
20
−
3
View file @
cc8e66d0
...
...
@@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs
->
load
(
"banks"
);
$langs
->
load
(
"categories"
);
$langs
->
load
(
"accountancy"
);
$langs
->
load
(
"compta"
);
$action
=
GETPOST
(
'action'
,
'alpha'
);
$massaction
=
GETPOST
(
'massaction'
,
'alpha'
);
...
...
@@ -87,6 +88,7 @@ $arrayfields=array(
'b.label'
=>
array
(
'label'
=>
$langs
->
trans
(
"Label"
),
'checked'
=>
1
),
'b.number'
=>
array
(
'label'
=>
$langs
->
trans
(
"AccountIdShort"
),
'checked'
=>
1
),
'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
),
'b.datec'
=>
array
(
'label'
=>
$langs
->
trans
(
"DateCreation"
),
'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)
$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
foreach
(
$extrafields
->
attribute_label
as
$key
=>
$val
)
$sql
.
=
(
$extrafields
->
attribute_type
[
$key
]
!=
'separate'
?
",ef."
.
$key
.
' as options_'
.
$key
:
''
);
// 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
[
'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.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
);
// Extra fields
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>'
;
}
//
N
umber
//
Bank n
umber
if
(
!
empty
(
$arrayfields
[
'b.number'
][
'checked'
]))
{
print
'<td class="liste_titre">'
;
print
'<input class="flat" size="6" type="text" name="search_number" value="'
.
$search_number
.
'">'
;
print
'</td>'
;
}
//
N
umber
//
Account n
umber
if
(
!
empty
(
$arrayfields
[
'b.account_number'
][
'checked'
]))
{
print
'<td class="liste_titre">'
;
print
'</td>'
;
}
// Accountancy journal
if
(
!
empty
(
$arrayfields
[
'b.accountancy_journal'
][
'checked'
]))
{
print
'<td class="liste_titre">'
;
print
'</td>'
;
}
// Transactions to reconcile
if
(
!
empty
(
$arrayfields
[
'toreconcile'
][
'checked'
]))
{
...
...
@@ -484,6 +493,14 @@ foreach ($accounts as $key=>$type)
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
if
(
!
empty
(
$arrayfields
[
'toreconcile'
][
'checked'
]))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment