I have some sales invoices created through subscriptions, the sales invoices which are Overdue and Partly Paid, I want to show Partly Paid status with them. At the time we create payment it shows Partly Paid but overnight it changes to Overdue. I have changed the status directly in the tabSales Invoice table in the database and changed the following code in the following files but the status is still changing overnight from Partly Paid to Overdue.
The following changes I have made in the following files
sales_invoice.py in set_status method
if self.is_internal_transfer():
self.status = “Internal Transfer”
elif 0 < outstanding_amount < total:
self.status = “Partly Paid” # brought Partly Paid before Overdue
elif is_overdue(self, total):
self.status = “Overdue”
fix_invoice_statuses.py in method get_correct_status
if 0 < outstanding_amount < total:
status = “Partly Paid” # brought Partly Paid before Overdue
elif is_overdue(doc, total):
status = “Overdue”
elif outstanding_amount > 0 and getdate(doc.due_date) >= TODAY:
status = “Unpaid”
How I can get Partly Paid status with the invoices which are Partly Paid and Overdue? instead of Overdue?