fix: Code cleanup
This commit is contained in:
parent
6a43f6718a
commit
ec421df4e4
@ -90,13 +90,13 @@ class GLEntry(Document):
|
|||||||
|
|
||||||
if account_type == "Profit and Loss" \
|
if account_type == "Profit and Loss" \
|
||||||
and self.company == dimension.company and dimension.mandatory_for_pl and not dimension.disabled:
|
and self.company == dimension.company and dimension.mandatory_for_pl and not dimension.disabled:
|
||||||
if not self.get(frappe.scrub(dimension.fieldname)):
|
if not self.get(dimension.fieldname):
|
||||||
frappe.throw(_("Accounting Dimension <b>{0}</b> is required for 'Profit and Loss' account {1}.")
|
frappe.throw(_("Accounting Dimension <b>{0}</b> is required for 'Profit and Loss' account {1}.")
|
||||||
.format(dimension.label, self.account))
|
.format(dimension.label, self.account))
|
||||||
|
|
||||||
if account_type == "Balance Sheet" \
|
if account_type == "Balance Sheet" \
|
||||||
and self.company == dimension.company and dimension.mandatory_for_bs and not dimension.disabled:
|
and self.company == dimension.company and dimension.mandatory_for_bs and not dimension.disabled:
|
||||||
if not self.get(frappe.scrub(dimension.fieldname)):
|
if not self.get(dimension.fieldname):
|
||||||
frappe.throw(_("Accounting Dimension <b>{0}</b> is required for 'Balance Sheet' account {1}.")
|
frappe.throw(_("Accounting Dimension <b>{0}</b> is required for 'Balance Sheet' account {1}.")
|
||||||
.format(dimension.label, self.account))
|
.format(dimension.label, self.account))
|
||||||
|
|
||||||
|
@ -290,9 +290,6 @@ class Subscription(Document):
|
|||||||
invoice.save()
|
invoice.save()
|
||||||
invoice.submit()
|
invoice.submit()
|
||||||
|
|
||||||
for dimension in accounting_dimensions:
|
|
||||||
invoice.load_from_db()
|
|
||||||
|
|
||||||
return invoice
|
return invoice
|
||||||
|
|
||||||
def get_items_from_plans(self, plans, prorate=0):
|
def get_items_from_plans(self, plans, prorate=0):
|
||||||
|
@ -5,7 +5,8 @@ erpnext.doctypes_with_dimensions = ["GL Entry", "Sales Invoice", "Purchase Invoi
|
|||||||
"Purchase Order Item", "Journal Entry Account", "Material Request Item", "Delivery Note Item", "Purchase Receipt Item",
|
"Purchase Order Item", "Journal Entry Account", "Material Request Item", "Delivery Note Item", "Purchase Receipt Item",
|
||||||
"Stock Entry Detail", "Payment Entry Deduction", "Sales Taxes and Charges", "Purchase Taxes and Charges", "Shipping Rule",
|
"Stock Entry Detail", "Payment Entry Deduction", "Sales Taxes and Charges", "Purchase Taxes and Charges", "Shipping Rule",
|
||||||
"Landed Cost Item", "Asset Value Adjustment", "Loyalty Program", "Fee Schedule", "Fee Structure", "Stock Reconciliation",
|
"Landed Cost Item", "Asset Value Adjustment", "Loyalty Program", "Fee Schedule", "Fee Structure", "Stock Reconciliation",
|
||||||
"Travel Request", "Fees", "POS Profile", "Opening Invoice Creation Tool", "Opening Invoice Creation Tool Item"];
|
"Travel Request", "Fees", "POS Profile", "Opening Invoice Creation Tool", "Opening Invoice Creation Tool Item", "Subscription",
|
||||||
|
"Subscription Plan"];
|
||||||
|
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.accounts.doctype.accounting_dimension.accounting_dimension.get_dimension_filters",
|
method: "erpnext.accounts.doctype.accounting_dimension.accounting_dimension.get_dimension_filters",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user