mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
fix: GL Entries for receiving non CWIP assets using Purchase Receipt (#37660)
* fix: GL Entries for receiving non CWIP assets using Purchase Receipt * fix: rearrange functions * chore: rearrange functions * chore: rearrange functions * fix: Purchase Invoice GL entires for assets * test: cwip accounting unit tests * chore: Attribute error * chore: Purchase Invoice tests * chore: Missing asset account * chore: Missing asset account * chore: update tests * fix: Internal transfer GL Entries * test: Deprecate tests * test: Depricate tests * test: Depricate tests * chore: make `Reserve Stock` checkbox visible in SO * refactor: rename field `Auto Reserve Stock for Sales Order` * feat: add fields to hold SO and SO Item ref in PR Item * test: Deprecate tests * test: Depricate tests * test: Depricate tests * refactor: Remove expense included in valuation accounts * chore: Add back default in transit warehousefield --------- Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
frappe.reload_doctype("Landed Cost Taxes and Charges")
|
||||
|
||||
company_account_map = frappe._dict(
|
||||
frappe.db.sql(
|
||||
"""
|
||||
SELECT name, expenses_included_in_valuation from `tabCompany`
|
||||
"""
|
||||
)
|
||||
)
|
||||
|
||||
for company, account in company_account_map.items():
|
||||
frappe.db.sql(
|
||||
"""
|
||||
UPDATE
|
||||
`tabLanded Cost Taxes and Charges` t, `tabLanded Cost Voucher` l
|
||||
SET
|
||||
t.expense_account = %s
|
||||
WHERE
|
||||
l.docstatus = 1
|
||||
AND l.company = %s
|
||||
AND t.parent = l.name
|
||||
""",
|
||||
(account, company),
|
||||
)
|
||||
|
||||
frappe.db.sql(
|
||||
"""
|
||||
UPDATE
|
||||
`tabLanded Cost Taxes and Charges` t, `tabStock Entry` s
|
||||
SET
|
||||
t.expense_account = %s
|
||||
WHERE
|
||||
s.docstatus = 1
|
||||
AND s.company = %s
|
||||
AND t.parent = s.name
|
||||
""",
|
||||
(account, company),
|
||||
)
|
||||
Reference in New Issue
Block a user