Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update status of reference documents #2380

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@


class FullandFinalStatement(Document):
def on_change(self):
for payable in self.payables:
if payable.component == "Gratuity":
frappe.db.set_value(
"Gratuity",
payable.reference_document,
{"status": self.status, "paid_amount": payable.amount},
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set paid amount of gratuity doc and call set_status method so that the responsibility of setting the correct status is handled within gratuity itself

Also doesn't handle cancellation


def before_insert(self):
self.get_outstanding_statements()

Expand Down
Loading