mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
Fixed asset refactor (#19369)
* refactor: Asset Movement with multiple assets using table * refactor: Create Asset Movement from Asset List & Linking PR/PI with Asset * feat: Auto create asset on Purchase checkbox * refactor: LCV for asset created via PR/PI * refactor: get asset category accounts from item master * refactor: Purchase Receipt for asset purchasing * refactor: Purchase Invoice for asset purchasing * fix: post-refactor delete fixes * refactor: moved asset validation from pr/pi on asset submission * fix: Asset Category should be defined for auto purchasing assets * fix: undo serial_no_update removal (for non asset item) from LCV * fix: remove duplicate calls from item.js * fix: args position of all occurrence of get_asset_category_account() * fix: test cases * fix: landed cost voucher validations * refactor: test case for auto creation of asset * fix: removed invalid assertions * fix: patch errors on travis * fix: codacy fixes * fix: PI Items not fetching details from item * fix: asset movement from list view having default purpose 'Receipt' * chore: msgprint for selecting item code first while creating asset manually * fix: alert messages * minor: asset movement fixes * fix: lcv was made against submitted assets * minor: ux fixes * refac: move specific asset validation to SINV * chore: remove make_purchase_invoice from asset form * make asset movement on asset submission * add PR & PI queries based on item code * refac: not allow last movement cancellation * move asset movement creation on asset submission * asset movement naming series * add tests * fix: code review changes * chore: remove unecessary asset movement updation * refac: setting latest location while making asset movements * Added extra validations * fix: form dashboard make lcv button * fix: auto asset movement creation validation * fix: allow lcv against other items after removing submitted assets * chore: remove unwanted condition * fix: mismatch debit credit on purchase of asset with valuation tax * chore: toggle required field based on movement type * chore: fix lcv error message * fix: travis failing * fix: travis failing test * fix: wrong conditions after merge * fix: cannot cancel assets * fix: travis failing* fix change in deletion of assets * fix: codacy * fix: process cancellation of assets * refac: cancellation of pr only deletes auto created assets * fix: incorrect query
This commit is contained in:
@@ -17,10 +17,6 @@ def execute():
|
||||
frappe.db.sql(""" update `tabAsset` ast, `tabWarehouse` wh
|
||||
set ast.location = wh.warehouse_name where ast.warehouse = wh.name""")
|
||||
|
||||
frappe.db.sql(""" update `tabAsset Movement` ast_mv
|
||||
set ast_mv.source_location = (select warehouse_name from `tabWarehouse` where name = ast_mv.source_warehouse),
|
||||
ast_mv.target_location = (select warehouse_name from `tabWarehouse` where name = ast_mv.target_warehouse)""")
|
||||
|
||||
for d in frappe.get_all('Asset'):
|
||||
doc = frappe.get_doc('Asset', d.name)
|
||||
if doc.calculate_depreciation:
|
||||
|
||||
Reference in New Issue
Block a user