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
Labels
Merge Requests
16
Merge Requests
16
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
nexedi
slapos.core
Commits
019f4001
Commit
019f4001
authored
Apr 02, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: Ensure the Source Section is consistent with the invoices
parent
456ae120
Pipeline
#14744
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_checkRelatedAccounting.py
...ion_request/SubscriptionRequest_checkRelatedAccounting.py
+12
-1
No files found.
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_checkRelatedAccounting.py
View file @
019f4001
...
...
@@ -30,6 +30,7 @@ if sale_packing_list_list:
strict_causality_uid
=
[
x
.
getUid
()
for
x
in
sale_packing_list_list
],
)
subscription_currency
=
subscription_request
.
getPriceCurrency
()
subscription_source_section
=
subscription_request
.
getSourceSection
()
for
sale_invoice
in
sale_invoice_list
:
sale_invoice
=
sale_invoice
.
getObject
()
if
sale_invoice
.
getPriceCurrency
()
!=
subscription_currency
:
...
...
@@ -42,11 +43,21 @@ if sale_packing_list_list:
}
)
if
sale_invoice
.
getSourceSection
()
!=
subscription_source_section
:
addToStatusList
(
"${invoice_relative_url} Sale Invoice Source ${invoice_source_section} do not match subscription source section ${subscription_source_section}"
,
{
"invoice_relative_url"
:
sale_invoice
.
getRelativeUrl
(),
"invoice_source_section"
:
sale_invoice
.
getSourceSection
(),
"subscription_source_section"
:
subscription_source_section
,
}
)
if
sale_invoice
.
getSimulationState
()
not
in
(
"stopped"
,
"delivered"
,
"cancelled"
):
addToStatusList
(
"${invoice_relative_url} Sale Invoice in unexpected simulation state: ${invoice_simulation_state}"
,
{
"invoice_relative_url"
:
sale_invoice
.
getRelativeU
rl
(),
"invoice_relative_url"
:
sale_invoice
.
absolute_u
rl
(),
"invoice_simulation_state"
:
sale_invoice
.
getSimulationState
(),
}
)
...
...
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