Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
248be76d
Commit
248be76d
authored
Jun 05, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: test: discount price calculation has been changed
parent
c79e4928
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5AccountingScenario.py
..._components/test.erp5.testSlapOSERP5AccountingScenario.py
+5
-5
No files found.
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5AccountingScenario.py
View file @
248be76d
...
...
@@ -47,7 +47,7 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
True
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
True
)
self
.
assertEqual
(
len
(
amount_list
),
1
)
self
.
assert
Equal
(
amount_list
[
0
].
total_price
,
24.384
)
self
.
assert
AlmostEqual
(
amount_list
[
0
].
total_price
,
24.192
)
self
.
assertFalse
(
owner_person
.
Entity_hasOutstandingAmount
())
self
.
assertEqual
(
subscription_request
.
getSimulationState
(),
"invalidated"
)
open_sale_order
=
self
.
portal
.
portal_catalog
.
getResultValue
(
...
...
@@ -69,7 +69,7 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
self
.
assertEqual
(
first_invoice
.
getStartDate
(),
DateTime
(
'2021/03/19'
))
self
.
assertEqual
(
first_invoice
.
getStopDate
(),
DateTime
(
'2021/04/19'
))
# Discount and first subscription
self
.
assert
Equal
(
first_invoice
.
getTotalPrice
(),
24.384
)
self
.
assert
AlmostEqual
(
first_invoice
.
getTotalPrice
(),
24.192
)
# Ensure no unexpected object has been created
# 1 accounting transaction
# 1 open order
...
...
@@ -87,11 +87,11 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
True
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
True
)
self
.
assertEqual
(
len
(
amount_list
),
1
)
self
.
assert
Equal
(
amount_list
[
0
].
total_price
,
175.584
)
self
.
assert
AlmostEqual
(
amount_list
[
0
].
total_price
,
175.392
)
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
())
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
()
self
.
assertEqual
(
len
(
amount_list
),
1
)
self
.
assert
Equal
(
amount_list
[
0
].
total_price
,
125.184
)
self
.
assert
AlmostEqual
(
amount_list
[
0
].
total_price
,
124.992
)
self
.
assertEqual
(
first_invoice
.
getSimulationState
(),
"stopped"
)
# Ensure no unexpected object has been created
# 4 accounting transactions
...
...
@@ -116,7 +116,7 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
)
)
payment_transaction
.
stop
()
self
.
assert
Equal
(
payment_transaction
.
AccountingTransaction_getTotalCredit
(),
74.78399999999999
)
self
.
assert
AlmostEqual
(
payment_transaction
.
AccountingTransaction_getTotalCredit
(),
74.592
)
self
.
tic
()
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
True
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
True
)
...
...
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