mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
feat: Stock value and account balance sync. (#19233)
* feat: Allow user to sync stock_value and account_balance jv if perpetual inventory is checked * fix(test): Sales Invoice * fix(test): Purchase Invoice * fix(test): Delivery Note * fix: more test_case * fix(test): Stock Entry * fix(test): Purchase Receipt * fix(more-test): Stock Entries * fix(more-test): Sales Invoice and Delivery Note * fix: tests for delivery note * fix: tests for stock reconciliation * refactor: stock and account balance function * fix(more-test): Warehouse * fix(test): Landed Cost Voucher * fix: changes requested
This commit is contained in:
committed by
Nabin Hait
parent
7e9b90ad06
commit
a11e738801
@@ -22,7 +22,7 @@ class TestCompany(unittest.TestCase):
|
||||
company.create_chart_of_accounts_based_on = "Existing Company"
|
||||
company.existing_company = "_Test Company"
|
||||
company.save()
|
||||
|
||||
|
||||
expected_results = {
|
||||
"Debtors - CFEC": {
|
||||
"account_type": "Receivable",
|
||||
@@ -37,7 +37,7 @@ class TestCompany(unittest.TestCase):
|
||||
"parent_account": "Cash In Hand - CFEC"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for account, acc_property in expected_results.items():
|
||||
acc = frappe.get_doc("Account", account)
|
||||
for prop, val in acc_property.items():
|
||||
@@ -50,14 +50,14 @@ class TestCompany(unittest.TestCase):
|
||||
countries = ["India", "Brazil", "United Arab Emirates", "Canada", "Germany", "France",
|
||||
"Guatemala", "Indonesia", "Italy", "Mexico", "Nicaragua", "Netherlands", "Singapore",
|
||||
"Brazil", "Argentina", "Hungary", "Taiwan"]
|
||||
|
||||
|
||||
for country in countries:
|
||||
templates = get_charts_for_country(country)
|
||||
if len(templates) != 1 and "Standard" in templates:
|
||||
templates.remove("Standard")
|
||||
|
||||
|
||||
self.assertTrue(templates)
|
||||
|
||||
|
||||
for template in templates:
|
||||
try:
|
||||
company = frappe.new_doc("Company")
|
||||
@@ -67,11 +67,11 @@ class TestCompany(unittest.TestCase):
|
||||
company.create_chart_of_accounts_based_on = "Standard Template"
|
||||
company.chart_of_accounts = template
|
||||
company.save()
|
||||
|
||||
account_types = ["Cost of Goods Sold", "Depreciation",
|
||||
"Expenses Included In Valuation", "Fixed Asset", "Payable", "Receivable",
|
||||
|
||||
account_types = ["Cost of Goods Sold", "Depreciation",
|
||||
"Expenses Included In Valuation", "Fixed Asset", "Payable", "Receivable",
|
||||
"Stock Adjustment", "Stock Received But Not Billed", "Bank", "Cash", "Stock"]
|
||||
|
||||
|
||||
for account_type in account_types:
|
||||
filters = {
|
||||
"company": template,
|
||||
|
||||
@@ -62,5 +62,16 @@
|
||||
"domain": "Manufacturing",
|
||||
"chart_of_accounts": "Standard",
|
||||
"default_holiday_list": "_Test Holiday List"
|
||||
},
|
||||
{
|
||||
"abbr": "TCP1",
|
||||
"company_name": "_Test Company with perpetual inventory",
|
||||
"country": "India",
|
||||
"default_currency": "INR",
|
||||
"doctype": "Company",
|
||||
"domain": "Manufacturing",
|
||||
"chart_of_accounts": "Standard",
|
||||
"enable_perpetual_inventory": 1,
|
||||
"default_holiday_list": "_Test Holiday List"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user