Commit 4ba9ad35 authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_payroll_l10n_fr: stabilize date calculation

As it seems addToDate do not just add 1 unit of time, but is sensitive
to the number of days in a month too
parent d2ed779f
...@@ -117,7 +117,7 @@ if len(payment_transaction_list): ...@@ -117,7 +117,7 @@ if len(payment_transaction_list):
amount_list = [] amount_list = []
for i in range(3): for i in range(3):
start_date = addToDate(first_date_of_month, month=-i) start_date = addToDate(first_date_of_month, month=-i)
stop_date = getLastDateOfMonth(addToDate(last_date_of_month, month=-i)) + 1 stop_date = getLastDateOfMonth(addToDate(first_date_of_month, month=-i)) + 1
amount = -1. * portal.portal_simulation.getInventory( amount = -1. * portal.portal_simulation.getInventory(
from_date=start_date, from_date=start_date,
to_date=stop_date, to_date=stop_date,
......
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