Commit f84f49bd authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: allow to pay invoices at a date

parent f49f0bea
...@@ -6,6 +6,7 @@ outstanding_amount = portal.restrictedTraverse(outstanding_amount) ...@@ -6,6 +6,7 @@ outstanding_amount = portal.restrictedTraverse(outstanding_amount)
# Check that the total_price matches the outstanding amount list # Check that the total_price matches the outstanding amount list
expected_price = context.Entity_getOutstandingAmountList( expected_price = context.Entity_getOutstandingAmountList(
include_planned=False, include_planned=False,
at_date=date,
section_uid=outstanding_amount.getSourceSectionUid(), section_uid=outstanding_amount.getSourceSectionUid(),
resource_uid=outstanding_amount.getPriceCurrencyUid(), resource_uid=outstanding_amount.getPriceCurrencyUid(),
ledger_uid=outstanding_amount.getLedgerUid(), ledger_uid=outstanding_amount.getLedgerUid(),
...@@ -19,6 +20,7 @@ if total_price != expected_price: ...@@ -19,6 +20,7 @@ if total_price != expected_price:
payment_transaction = context.Entity_createPaymentTransaction( payment_transaction = context.Entity_createPaymentTransaction(
context.Entity_getOutstandingAmountList( context.Entity_getOutstandingAmountList(
include_planned=False, include_planned=False,
at_date=date,
section_uid=outstanding_amount.getSourceSectionUid(), section_uid=outstanding_amount.getSourceSectionUid(),
resource_uid=outstanding_amount.getPriceCurrencyUid(), resource_uid=outstanding_amount.getPriceCurrencyUid(),
ledger_uid=outstanding_amount.getLedgerUid(), ledger_uid=outstanding_amount.getLedgerUid(),
......
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