[fix] Remove recurring id on amendment only if it is same as amended_from

This commit is contained in:
Nabin Hait 2016-11-16 18:43:44 +05:30
parent aa68058910
commit c9b6a07732

View File

@ -54,7 +54,7 @@ class AccountsController(TransactionBase):
self.validate_currency()
if self.meta.get_field("is_recurring"):
if self.amended_from and self.recurring_id:
if self.amended_from and self.recurring_id == self.amended_from:
self.recurring_id = None
if not self.get("__islocal"):
validate_recurring_document(self)