fix: test cases updated
This commit is contained in:
parent
bcfbb3e9c8
commit
f058755ad3
@ -1589,9 +1589,9 @@ def unlink_payment_on_cancel_of_invoice(enable=1):
|
|||||||
|
|
||||||
|
|
||||||
def enable_discount_accounting(enable=1):
|
def enable_discount_accounting(enable=1):
|
||||||
accounts_settings = frappe.get_doc("Accounts Settings")
|
buying_settings = frappe.get_doc("Buying Settings")
|
||||||
accounts_settings.enable_discount_accounting = enable
|
buying_settings.enable_discount_accounting = enable
|
||||||
accounts_settings.save()
|
buying_settings.save()
|
||||||
|
|
||||||
|
|
||||||
def make_purchase_invoice(**args):
|
def make_purchase_invoice(**args):
|
||||||
|
@ -2685,9 +2685,6 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_sales_invoice_with_discount_accounting_enabled(self):
|
def test_sales_invoice_with_discount_accounting_enabled(self):
|
||||||
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import (
|
|
||||||
enable_discount_accounting,
|
|
||||||
)
|
|
||||||
|
|
||||||
enable_discount_accounting()
|
enable_discount_accounting()
|
||||||
|
|
||||||
@ -2708,9 +2705,6 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
enable_discount_accounting(enable=0)
|
enable_discount_accounting(enable=0)
|
||||||
|
|
||||||
def test_additional_discount_for_sales_invoice_with_discount_accounting_enabled(self):
|
def test_additional_discount_for_sales_invoice_with_discount_accounting_enabled(self):
|
||||||
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import (
|
|
||||||
enable_discount_accounting,
|
|
||||||
)
|
|
||||||
|
|
||||||
enable_discount_accounting()
|
enable_discount_accounting()
|
||||||
additional_discount_account = create_account(
|
additional_discount_account = create_account(
|
||||||
@ -3181,6 +3175,12 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def enable_discount_accounting(enable=1):
|
||||||
|
selling_settings = frappe.get_doc("Selling Settings")
|
||||||
|
selling_settings.enable_discount_accounting = enable
|
||||||
|
selling_settings.save()
|
||||||
|
|
||||||
|
|
||||||
def get_sales_invoice_for_e_invoice():
|
def get_sales_invoice_for_e_invoice():
|
||||||
si = make_sales_invoice_for_ewaybill()
|
si = make_sales_invoice_for_ewaybill()
|
||||||
si.naming_series = "INV-2020-.#####"
|
si.naming_series = "INV-2020-.#####"
|
||||||
|
Loading…
Reference in New Issue
Block a user