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
6114606c
Commit
6114606c
authored
9 years ago
by
aspangaro
Browse files
Options
Downloads
Patches
Plain Diff
Accountancy Add a list to select accounting account on accoutancy admin
parent
cdd1641b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/accountancy/admin/index.php
+32
-3
32 additions, 3 deletions
htdocs/accountancy/admin/index.php
with
32 additions
and
3 deletions
htdocs/accountancy/admin/index.php
+
32
−
3
View file @
6114606c
...
...
@@ -31,8 +31,9 @@
require
'../../main.inc.php'
;
// Class
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/admin.lib.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/accounting.lib.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/admin.lib.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/accounting.lib.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/accountancy/class/html.formventilation.class.php'
;
$langs
->
load
(
"compta"
);
$langs
->
load
(
"bills"
);
...
...
@@ -51,7 +52,10 @@ $list = array (
'ACCOUNTING_LENGTH_DESCRIPTION'
,
// adjust size displayed for lines description for dol_trunc
'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT'
,
// adjust size displayed for select account description for dol_trunc
'ACCOUNTING_LENGTH_GACCOUNT'
,
'ACCOUNTING_LENGTH_AACCOUNT'
,
'ACCOUNTING_LENGTH_AACCOUNT'
);
$list_account
=
array
(
'ACCOUNTING_ACCOUNT_CUSTOMER'
,
'ACCOUNTING_ACCOUNT_SUPPLIER'
,
'ACCOUNTING_PRODUCT_BUY_ACCOUNT'
,
...
...
@@ -109,6 +113,14 @@ if ($action == 'update')
}
}
foreach
(
$list_account
as
$constname
)
{
$constvalue
=
GETPOST
(
$constname
,
'alpha'
);
if
(
!
dolibarr_set_const
(
$db
,
$constname
,
$constvalue
,
'chaine'
,
0
,
''
,
$conf
->
entity
))
{
$error
++
;
}
}
if
(
!
$error
)
{
setEventMessages
(
$langs
->
trans
(
"SetupSaved"
),
null
,
'mesgs'
);
...
...
@@ -151,6 +163,7 @@ if ($action == 'setlistsortdone') {
llxHeader
();
$form
=
new
Form
(
$db
);
$formaccountancy
=
New
FormVentilation
(
$db
);
$linkback
=
'<a href="'
.
DOL_URL_ROOT
.
'/admin/modules.php">'
.
$langs
->
trans
(
"BackToModuleList"
)
.
'</a>'
;
print
load_fiche_titre
(
$langs
->
trans
(
'ConfigAccountingExpert'
),
$linkback
,
'title_setup'
);
...
...
@@ -262,6 +275,22 @@ foreach ($list as $key)
print
'</td></tr>'
;
}
foreach
(
$list_account
as
$key
)
{
$var
=!
$var
;
print
'<tr '
.
$bc
[
$var
]
.
' class="value">'
;
// Param
$label
=
$langs
->
trans
(
$key
);
print
'<td><label for="'
.
$key
.
'">'
.
$label
.
'</label></td>'
;
// Value
print
'<td>'
;
print
$formaccountancy
->
select_account
(
$conf
->
global
->
$key
,
$key
,
1
,
''
,
1
,
1
);
print
'</td></tr>'
;
}
$var
=
!
$var
;
print
"<tr "
.
$bc
[
$var
]
.
">"
;
print
'<td width="80%">'
.
$langs
->
trans
(
"ACCOUNTING_LIST_SORT_VENTILATION_TODO"
)
.
'</td>'
;
...
...
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