From ffd1e4efe6b6d481acc52fe9faeb95aab628cc62 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 15 Apr 2016 14:42:08 +0530 Subject: [PATCH] Removed db_set from inside validate --- erpnext/controllers/accounts_controller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index cf93e5ba4ae..7691ff5b5fe 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -63,11 +63,11 @@ class AccountsController(TransactionBase): if cint(is_paid) == 1: if flt(self.paid_amount) == 0: if self.cash_bank_account: - frappe.db.set(self, 'paid_amount', - flt(flt(self.grand_total) - flt(self.write_off_amount), self.precision("paid_amount"))) + self.paid_amount = flt(flt(self.grand_total) - flt(self.write_off_amount), + self.precision("paid_amount")) else: # show message that the amount is not paid - frappe.db.set(self,'paid_amount',0) + self.paid_amount = 0 frappe.throw(_("Note: Payment Entry will not be created since 'Cash or Bank Account' was not specified")) else: frappe.db.set(self,'paid_amount',0)