Merge branch 'develop' into fix/scr-return-rejected-qty

This commit is contained in:
Sagar Sharma 2022-11-17 13:04:15 +05:30 committed by GitHub
commit f71f27462d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 15 deletions

View File

@ -230,9 +230,17 @@ class TestAsset(AssetSetup):
self.assertTrue(asset.journal_entry_for_scrap)
expected_gle = (
("_Test Accumulated Depreciations - _TC", 18000.0 + pro_rata_amount, 0.0),
(
"_Test Accumulated Depreciations - _TC",
flt(18000.0 + pro_rata_amount, asset.precision("gross_purchase_amount")),
0.0,
),
("_Test Fixed Asset - _TC", 0.0, 100000.0),
("_Test Gain/Loss on Asset Disposal - _TC", 82000.0 - pro_rata_amount, 0.0),
(
"_Test Gain/Loss on Asset Disposal - _TC",
flt(82000.0 - pro_rata_amount, asset.precision("gross_purchase_amount")),
0.0,
),
)
gle = frappe.db.sql(
@ -288,9 +296,17 @@ class TestAsset(AssetSetup):
pro_rata_amount = flt(pro_rata_amount, asset.precision("gross_purchase_amount"))
expected_gle = (
("_Test Accumulated Depreciations - _TC", 18000.0 + pro_rata_amount, 0.0),
(
"_Test Accumulated Depreciations - _TC",
flt(18000.0 + pro_rata_amount, asset.precision("gross_purchase_amount")),
0.0,
),
("_Test Fixed Asset - _TC", 0.0, 100000.0),
("_Test Gain/Loss on Asset Disposal - _TC", 57000.0 - pro_rata_amount, 0.0),
(
"_Test Gain/Loss on Asset Disposal - _TC",
flt(57000.0 - pro_rata_amount, asset.precision("gross_purchase_amount")),
0.0,
),
("Debtors - _TC", 25000.0, 0.0),
)

View File

@ -200,11 +200,11 @@ def get_children(doctype, parent=None, location=None, is_root=False):
name as value,
is_group as expandable
from
`tab{doctype}` comp
`tabLocation` comp
where
ifnull(parent_location, "")={parent}
""".format(
doctype=doctype, parent=frappe.db.escape(parent)
parent=frappe.db.escape(parent)
),
as_dict=1,
)

View File

@ -1,10 +1,5 @@
import frappe
from erpnext.setup.install import setup_currency_exchange
def execute():
frappe.reload_doc("accounts", "doctype", "currency_exchange_settings_result")
frappe.reload_doc("accounts", "doctype", "currency_exchange_settings_details")
frappe.reload_doc("accounts", "doctype", "currency_exchange_settings")
setup_currency_exchange()

View File

@ -79,7 +79,7 @@ def get_children(doctype, parent=None, parent_quality_procedure=None, is_root=Fa
]
else:
return frappe.get_all(
doctype,
"Quality Procedure",
fields=["name as value", "is_group as expandable"],
filters=dict(parent_quality_procedure=parent),
order_by="name asc",

View File

@ -689,11 +689,11 @@ def get_children(doctype, parent=None, company=None, is_root=False):
name as value,
is_group as expandable
from
`tab{doctype}` comp
`tabCompany` comp
where
ifnull(parent_company, "")={parent}
""".format(
doctype=doctype, parent=frappe.db.escape(parent)
parent=frappe.db.escape(parent)
),
as_dict=1,
)

View File

@ -63,7 +63,7 @@ def get_children(doctype, parent=None, company=None, is_root=False):
else:
filters["parent_department"] = parent
return frappe.get_all(doctype, fields=fields, filters=filters, order_by="name")
return frappe.get_all("Department", fields=fields, filters=filters, order_by="name")
@frappe.whitelist()