Commit 4dc45b1d authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: wip - Generate Invoice 15 days up front

parent 45296462
Pipeline #11398 passed with stage
in 0 seconds
...@@ -96,7 +96,9 @@ if open_sale_order is not None: ...@@ -96,7 +96,9 @@ if open_sale_order is not None:
assert current_start_date == hosting_subscription.HostingSubscription_calculateSubscriptionStartDate() assert current_start_date == hosting_subscription.HostingSubscription_calculateSubscriptionStartDate()
# First check if the hosting subscription has been correctly simulated (this script may run only once per year...) # First check if the hosting subscription has been correctly simulated (this script may run only once per year...)
stop_date = calculateOpenOrderLineStopDate(open_order_line, hosting_subscription, start_date_delta=0) stop_date = calculateOpenOrderLineStopDate(open_order_line, hosting_subscription,
# Generate the invoice 15 days earlier
start_date_delta=15)
if current_stop_date < stop_date: if current_stop_date < stop_date:
# Bingo, new subscription to generate # Bingo, new subscription to generate
open_order_line.edit( open_order_line.edit(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment