def on_submit(self):
     self.make_gl_entries()
     update_recovery_status(
         self.loan,
         self.posting_date,
         status="NPA" if self.write_off_type == "NPA" else None,
     )
Example #2
0
 def on_submit(self):
     self.make_principal_and_charges_gl_entries()
     update_advance_interests(self.loan, self.posting_date)
     interest_names = self.make_interests()
     for idx, item in enumerate(self.periods):
         if not item.ref_interest:
             item.ref_interest = interest_names[idx]
     self.flags.ignore_validate_update_after_submit = True
     self.save()
     self.make_period_gl_entries()
     update_recovery_status(self.loan, self.posting_date)
 def on_cancel(self):
     self.make_gl_entries(cancel=1)
     update_recovery_status(self.loan, self.posting_date)
 def on_cancel(self):
     self.make_period_gl_entries(cancel=1)
     self.make_interests(cancel=1)
     self.make_principal_and_charges_gl_entries(cancel=1)
     update_recovery_status(self.loan, self.posting_date)