diff --git a/wizard/ranch_purchase_data_invoice_wizard.py b/wizard/ranch_purchase_data_invoice_wizard.py index 94e72b22c9da907c77cefa44c0d37f13f8defc82..44c82ca86cd1a321ec5b2ec6980ee82c3402da6f 100644 --- a/wizard/ranch_purchase_data_invoice_wizard.py +++ b/wizard/ranch_purchase_data_invoice_wizard.py @@ -58,7 +58,8 @@ class PurchaseDataInvoiceWizard(models.TransientModel): # Get next limit date for cattle_date if today_date_dt <= due_cutoff: - limit_date = payment_system.get_limit_date(cattle_date) + # At most, we use last_limit_date to calculate limit_date + limit_date = payment_system.get_limit_date(last_limit_date) else: limit_date = payment_system.get_limit_date(today_date) diff --git a/wizard/ranch_purchase_data_invoice_wizardd.py b/wizard/ranch_purchase_data_invoice_wizardd.py index 9ac5130d18131dbcef23b44024193b3be1fb2fc7..5c6475584fb3ccded0d42b83a0e2825d2e00c518 100644 --- a/wizard/ranch_purchase_data_invoice_wizardd.py +++ b/wizard/ranch_purchase_data_invoice_wizardd.py @@ -56,7 +56,7 @@ class PurchaseDataInvoiceWizard(models.TransientModel): # Get next limit date for cattle_date if today_date_dt <= due_cutoff: - limit_date = payment_system.get_limit_date(cattle_date) + limit_date = payment_systemlast_limit_date(last_limit_date) else: limit_date = payment_system.get_limit_date(today_date)