915b34391c
* chore: Added isort to pre-commit config * chore: Sort imports with isort * chore: Clean up imports with pycln * chore: Sort imports with isort * chore: Fix import issues * chore: Clean up sider issues * chore: Remove import errors from flake8 ignore list * chore: Clean up lint issues
18 lines
407 B
Python
18 lines
407 B
Python
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
|
# MIT License. See license.txt
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import frappe
|
|
|
|
|
|
def execute():
|
|
frappe.reload_doc("accounts", "doctype", "Payment Schedule")
|
|
if frappe.db.count('Payment Schedule'):
|
|
frappe.db.sql('''
|
|
UPDATE
|
|
`tabPayment Schedule` ps
|
|
SET
|
|
ps.outstanding = (ps.payment_amount - ps.paid_amount)
|
|
''')
|