Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
10fcce8e
Commit
10fcce8e
authored
Mar 04, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trial balance bug
parent
ecd2a6cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTrialBalanceReportSectionList.py
...ounting/AccountModule_getTrialBalanceReportSectionList.py
+2
-1
bt5/erp5_accounting/TestTemplateItem/portal_components/test.erp5.testAccountingReports.py
...Item/portal_components/test.erp5.testAccountingReports.py
+28
-0
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTrialBalanceReportSectionList.py
View file @
10fcce8e
...
...
@@ -41,7 +41,8 @@ request.set('precision', precision)
node_uid
=
[]
gap_uid_list
=
[]
for
gap
in
request
.
get
(
'gap_list'
,
()):
gap_uid_list
.
append
(
portal
.
portal_categories
.
gap
.
restrictedTraverse
(
gap
).
getUid
())
if
gap
:
gap_uid_list
.
append
(
portal
.
portal_categories
.
gap
.
restrictedTraverse
(
gap
).
getUid
())
if
gap_uid_list
:
node_uid
=
[
x
.
uid
for
x
in
portal
.
portal_catalog
(
portal_type
=
'Account'
,
...
...
bt5/erp5_accounting/TestTemplateItem/portal_components/test.erp5.testAccountingReports.py
View file @
10fcce8e
...
...
@@ -3467,6 +3467,34 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
credit
=
300
,
final_debit_balance
=
2100
,
final_credit_balance
=
300
,
final_balance_if_debit
=
1800
,
final_balance_if_credit
=
0
)
def
testTrialBalanceGAPFilterEmptyItemSelected
(
self
):
# Test of GAP filter on trial balance, when empty item is selected in gap_list
# this should not apply filter.
self
.
createAccountStatementDataSet
()
# set request variables and render
request_form
=
self
.
portal
.
REQUEST
.
form
request_form
[
'from_date'
]
=
DateTime
(
2006
,
1
,
1
)
request_form
[
'at_date'
]
=
DateTime
(
2006
,
2
,
2
)
request_form
[
'section_category'
]
=
'group/demo_group'
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'show_empty_accounts'
]
=
0
request_form
[
'expand_accounts'
]
=
1
# the field has an empty item
request_form
[
'gap_list'
]
=
[
''
]
request_form
[
'per_account_class_summary'
]
=
0
request_form
[
'group_analytic'
]
=
[]
request_form
[
'show_detailed_balance_columns'
]
=
1
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
'AccountModule_viewTrialBalanceReport'
)
self
.
assertEqual
(
1
,
len
(
report_section_list
))
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
0
])
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
self
.
assertEqual
(
6
,
len
(
data_line_list
))
def
testTrialBalanceAccountClassSummary
(
self
):
# Test of trial balance with per "account class" summary
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment