mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 02:31:21 +00:00
feat: add outstanding field in payment schedule
This commit is contained in:
committed by
Deepesh Garg
parent
7a3dbe1b72
commit
4b9aed2c0e
@@ -9,6 +9,7 @@
|
|||||||
"description",
|
"description",
|
||||||
"discount_percentage",
|
"discount_percentage",
|
||||||
"discounted_amount",
|
"discounted_amount",
|
||||||
|
"outstanding",
|
||||||
"column_break_3",
|
"column_break_3",
|
||||||
"due_date",
|
"due_date",
|
||||||
"invoice_portion",
|
"invoice_portion",
|
||||||
@@ -89,12 +90,18 @@
|
|||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Discounted Amount",
|
"label": "Discounted Amount",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "outstanding",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"label": "Outstanding",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-02-08 12:45:25.734948",
|
"modified": "2021-02-09 20:47:56.617701",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Schedule",
|
"name": "Payment Schedule",
|
||||||
|
|||||||
@@ -757,3 +757,4 @@ erpnext.patches.v13_0.setup_fields_for_80g_certificate_and_donation
|
|||||||
erpnext.patches.v13_0.rename_membership_settings_to_non_profit_settings
|
erpnext.patches.v13_0.rename_membership_settings_to_non_profit_settings
|
||||||
erpnext.patches.v12_0.create_taxable_value_field
|
erpnext.patches.v12_0.create_taxable_value_field
|
||||||
erpnext.patches.v12_0.add_company_link_to_einvoice_settings
|
erpnext.patches.v12_0.add_company_link_to_einvoice_settings
|
||||||
|
erpnext.patches.v13_0.update_payment_terms_outstanding
|
||||||
|
|||||||
15
erpnext/patches/v13_0/update_payment_terms_outstanding.py
Normal file
15
erpnext/patches/v13_0/update_payment_terms_outstanding.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 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)
|
||||||
|
''')
|
||||||
Reference in New Issue
Block a user