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
0
Merge Requests
0
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
Roque
slapos.core
Commits
6d9c9bf3
Commit
6d9c9bf3
authored
May 05, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting&subscription_request: Invoice a single month rather them 3 upfront.
parent
aa3d8cc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_storeOpenSaleOrderJournal.py
...ins/slapos_accounting/Person_storeOpenSaleOrderJournal.py
+5
-2
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
...al_components/test.erp5.testSlapOSSubscriptionScenario.py
+8
-8
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_storeOpenSaleOrderJournal.py
View file @
6d9c9bf3
...
@@ -163,8 +163,11 @@ if (add_line_list):
...
@@ -163,8 +163,11 @@ if (add_line_list):
edit_kw
[
'price'
]
=
subscription_request
.
getPrice
()
edit_kw
[
'price'
]
=
subscription_request
.
getPrice
()
edit_kw
[
'price_currency'
]
=
subscription_request
.
getPriceCurrency
()
edit_kw
[
'price_currency'
]
=
subscription_request
.
getPriceCurrency
()
# While create move the start date to be at least 1 months
# While create move the start date to be at least 1 months
# So we can charge 3 months at once.
# So we can charge 3 months at once
start_date_delta
=
65
# You can increase 65 days to generate 3 months
# You can increase 32 days to generate 2 months
# You can increase 0 days to keep generating one month only
start_date_delta
=
0
open_sale_order_line
.
edit
(
open_sale_order_line
.
edit
(
activate_kw
=
activate_kw
,
activate_kw
=
activate_kw
,
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
View file @
6d9c9bf3
...
@@ -223,9 +223,9 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -223,9 +223,9 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
self
.
login
()
self
.
login
()
# 195 is the month payment
# 195 is the month payment
# 195*
3 is the 3
months to pay upfront to use.
# 195*
1 is the 1
months to pay upfront to use.
# 25 is the reservation fee deduction.
# 25 is the reservation fee deduction.
authAmount
=
(
int
(
self
.
expected_individual_price_with_tax
*
100
)
*
3
-
2500
)
*
quantity
authAmount
=
(
int
(
self
.
expected_individual_price_with_tax
*
100
)
*
1
-
2500
)
*
quantity
data_kw
=
{
data_kw
=
{
'errorCode'
:
'0'
,
'errorCode'
:
'0'
,
'transactionStatus'
:
'6'
,
'transactionStatus'
:
'6'
,
...
@@ -350,11 +350,11 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -350,11 +350,11 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
quantity
=
subscription_request
.
getQuantity
()
quantity
=
subscription_request
.
getQuantity
()
# The values are without tax
# The values are without tax
self
.
assertEqual
(
sale_packing_list_line
.
getQuantity
(),
3
*
quantity
)
self
.
assertEqual
(
sale_packing_list_line
.
getQuantity
(),
1
*
quantity
)
self
.
assertEqual
(
sale_packing_list_line
.
getPrice
(
),
self
.
assertEqual
(
round
(
sale_packing_list_line
.
getPrice
(),
2
),
self
.
expected_individual_price_without_tax
)
round
(
self
.
expected_individual_price_without_tax
,
2
)
)
self
.
assertEqual
(
round
(
sale_packing_list_line
.
getTotalPrice
(),
2
),
self
.
assertEqual
(
round
(
sale_packing_list_line
.
getTotalPrice
(),
2
),
3
*
self
.
expected_individual_price_without_tax
*
quantity
)
round
(
1
*
self
.
expected_individual_price_without_tax
*
quantity
,
2
)
)
self
.
assertEqual
(
sale_packing_list
.
getCausality
(),
self
.
assertEqual
(
sale_packing_list
.
getCausality
(),
subscription_request
.
getRelativeUrl
())
subscription_request
.
getRelativeUrl
())
...
@@ -523,7 +523,7 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -523,7 +523,7 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
self
.
checkAggregatedSalePackingList
(
subscription_request
,
sale_packing_list_list
[
0
])
self
.
checkAggregatedSalePackingList
(
subscription_request
,
sale_packing_list_list
[
0
])
expected_sale_packing_list_amount
=
len
(
subscription_request_list
)
*
3
expected_sale_packing_list_amount
=
len
(
subscription_request_list
)
*
1
self
.
assertEqual
(
expected_sale_packing_list_amount
,
self
.
assertEqual
(
expected_sale_packing_list_amount
,
len
(
self
.
getSubscriptionSalePackingList
(
subscription_request
)))
len
(
self
.
getSubscriptionSalePackingList
(
subscription_request
)))
...
@@ -689,7 +689,7 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -689,7 +689,7 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
self
.
checkAggregatedSalePackingList
(
subscription_request
,
sale_packing_list_list
[
0
])
self
.
checkAggregatedSalePackingList
(
subscription_request
,
sale_packing_list_list
[
0
])
expected_sale_packing_list_amount
=
len
(
subscription_request_list
)
*
3
expected_sale_packing_list_amount
=
len
(
subscription_request_list
)
*
1
self
.
assertEqual
(
expected_sale_packing_list_amount
,
self
.
assertEqual
(
expected_sale_packing_list_amount
,
len
(
self
.
getSubscriptionSalePackingList
(
subscription_request
)))
len
(
self
.
getSubscriptionSalePackingList
(
subscription_request
)))
...
...
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