mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
* chore: auto fill asset name and available for use date
(cherry picked from commit af3e807607)
# Conflicts:
# erpnext/assets/doctype/asset/asset.json
* Update asset.json
---------
Co-authored-by: anandbaburajan <anandbaburajan@gmail.com>
This commit is contained in:
@@ -421,6 +421,9 @@ frappe.ui.form.on('Asset', {
|
|||||||
} else {
|
} else {
|
||||||
frm.set_value('purchase_date', purchase_doc.posting_date);
|
frm.set_value('purchase_date', purchase_doc.posting_date);
|
||||||
}
|
}
|
||||||
|
if (!frm.doc.is_existing_asset && !frm.doc.available_for_use_date) {
|
||||||
|
frm.set_value('available_for_use_date', frm.doc.purchase_date);
|
||||||
|
}
|
||||||
const item = purchase_doc.items.find(item => item.item_code === frm.doc.item_code);
|
const item = purchase_doc.items.find(item => item.item_code === frm.doc.item_code);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
doctype_field = frappe.scrub(doctype)
|
doctype_field = frappe.scrub(doctype)
|
||||||
|
|||||||
@@ -79,6 +79,9 @@
|
|||||||
"options": "ACC-ASS-.YYYY.-"
|
"options": "ACC-ASS-.YYYY.-"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "item_code",
|
||||||
|
"fetch_from": "item_code.item_name",
|
||||||
|
"fetch_if_empty": 1,
|
||||||
"fieldname": "asset_name",
|
"fieldname": "asset_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
@@ -512,7 +515,7 @@
|
|||||||
"table_fieldname": "accounts"
|
"table_fieldname": "accounts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2023-01-31 01:03:09.467817",
|
"modified": "2023-03-30 15:07:41.542374",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset",
|
"name": "Asset",
|
||||||
|
|||||||
Reference in New Issue
Block a user