mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Merge branch 'develop' of https://github.com/frappe/erpnext into support-52577
This commit is contained in:
@@ -119,6 +119,7 @@ def get_assets_details(assets):
|
|||||||
|
|
||||||
fields = [
|
fields = [
|
||||||
"name as asset",
|
"name as asset",
|
||||||
|
"asset_name",
|
||||||
"net_purchase_amount",
|
"net_purchase_amount",
|
||||||
"opening_accumulated_depreciation",
|
"opening_accumulated_depreciation",
|
||||||
"asset_category",
|
"asset_category",
|
||||||
@@ -143,6 +144,12 @@ def get_columns():
|
|||||||
"options": "Asset",
|
"options": "Asset",
|
||||||
"width": 120,
|
"width": 120,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": _("Asset Name"),
|
||||||
|
"fieldname": "asset_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"width": 140,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": _("Depreciation Date"),
|
"label": _("Depreciation Date"),
|
||||||
"fieldname": "depreciation_date",
|
"fieldname": "depreciation_date",
|
||||||
|
|||||||
@@ -340,7 +340,6 @@
|
|||||||
"label": "Maintenance Required"
|
"label": "Maintenance Required"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
|
||||||
"default": "Draft",
|
"default": "Draft",
|
||||||
"fieldname": "status",
|
"fieldname": "status",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
@@ -348,7 +347,7 @@
|
|||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Status",
|
"label": "Status",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Draft\nSubmitted\nPartially Depreciated\nFully Depreciated\nSold\nScrapped\nIn Maintenance\nOut of Order\nIssue\nReceipt\nCapitalized\nWork In Progress",
|
"options": "Draft\nSubmitted\nCancelled\nPartially Depreciated\nFully Depreciated\nSold\nScrapped\nIn Maintenance\nOut of Order\nIssue\nReceipt\nCapitalized\nWork In Progress",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -601,7 +600,7 @@
|
|||||||
"link_fieldname": "target_asset"
|
"link_fieldname": "target_asset"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2025-05-23 00:53:54.249309",
|
"modified": "2025-11-04 22:39:00.817405",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset",
|
"name": "Asset",
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ class Asset(AccountsController):
|
|||||||
status: DF.Literal[
|
status: DF.Literal[
|
||||||
"Draft",
|
"Draft",
|
||||||
"Submitted",
|
"Submitted",
|
||||||
|
"Cancelled",
|
||||||
"Partially Depreciated",
|
"Partially Depreciated",
|
||||||
"Fully Depreciated",
|
"Fully Depreciated",
|
||||||
"Sold",
|
"Sold",
|
||||||
@@ -463,6 +464,7 @@ class Asset(AccountsController):
|
|||||||
"asset_name": self.asset_name,
|
"asset_name": self.asset_name,
|
||||||
"target_location": self.location,
|
"target_location": self.location,
|
||||||
"to_employee": self.custodian,
|
"to_employee": self.custodian,
|
||||||
|
"company": self.company,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
asset_movement = frappe.get_doc(
|
asset_movement = frappe.get_doc(
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Asset",
|
"label": "Asset",
|
||||||
"link_filters": "[[\"Asset\",\"status\",\"not in\",[\"Work In Progress\",\"Capitalized\",\"Fully Depreciated\",\"Sold\",\"Scrapped\",null]]]",
|
"link_filters": "[[\"Asset\",\"status\",\"not in\",[\"Work In Progress\",\"Capitalized\",\"Fully Depreciated\",\"Sold\",\"Scrapped\",\"Cancelled\",null]]]",
|
||||||
"options": "Asset",
|
"options": "Asset",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2025-07-18 15:59:53.981224",
|
"modified": "2025-11-04 23:06:43.644846",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset Repair",
|
"name": "Asset Repair",
|
||||||
|
|||||||
@@ -82,11 +82,21 @@ class AssetRepair(AccountsController):
|
|||||||
|
|
||||||
def validate_purchase_invoices(self):
|
def validate_purchase_invoices(self):
|
||||||
for d in self.invoices:
|
for d in self.invoices:
|
||||||
|
self.validate_purchase_invoice_status(d.purchase_invoice)
|
||||||
invoice_items = self.get_invoice_items(d.purchase_invoice)
|
invoice_items = self.get_invoice_items(d.purchase_invoice)
|
||||||
self.validate_service_purchase_invoice(d.purchase_invoice, invoice_items)
|
self.validate_service_purchase_invoice(d.purchase_invoice, invoice_items)
|
||||||
self.validate_expense_account(d, invoice_items)
|
self.validate_expense_account(d, invoice_items)
|
||||||
self.validate_purchase_invoice_repair_cost(d, invoice_items)
|
self.validate_purchase_invoice_repair_cost(d, invoice_items)
|
||||||
|
|
||||||
|
def validate_purchase_invoice_status(self, purchase_invoice):
|
||||||
|
docstatus = frappe.db.get_value("Purchase Invoice", purchase_invoice, "docstatus")
|
||||||
|
if docstatus == 0:
|
||||||
|
frappe.throw(
|
||||||
|
_("{0} is still in Draft. Please submit it before saving the Asset Repair.").format(
|
||||||
|
get_link_to_form("Purchase Invoice", purchase_invoice)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def get_invoice_items(self, pi):
|
def get_invoice_items(self, pi):
|
||||||
invoice_items = frappe.get_all(
|
invoice_items = frappe.get_all(
|
||||||
"Purchase Invoice Item",
|
"Purchase Invoice Item",
|
||||||
|
|||||||
1223
erpnext/locale/ar.po
1223
erpnext/locale/ar.po
File diff suppressed because it is too large
Load Diff
1230
erpnext/locale/bs.po
1230
erpnext/locale/bs.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/cs.po
1223
erpnext/locale/cs.po
File diff suppressed because it is too large
Load Diff
1229
erpnext/locale/da.po
1229
erpnext/locale/da.po
File diff suppressed because it is too large
Load Diff
1227
erpnext/locale/de.po
1227
erpnext/locale/de.po
File diff suppressed because it is too large
Load Diff
1227
erpnext/locale/eo.po
1227
erpnext/locale/eo.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/es.po
1223
erpnext/locale/es.po
File diff suppressed because it is too large
Load Diff
1225
erpnext/locale/fa.po
1225
erpnext/locale/fa.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/fr.po
1223
erpnext/locale/fr.po
File diff suppressed because it is too large
Load Diff
1228
erpnext/locale/hr.po
1228
erpnext/locale/hr.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/hu.po
1223
erpnext/locale/hu.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/id.po
1223
erpnext/locale/id.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/it.po
1223
erpnext/locale/it.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/my.po
1223
erpnext/locale/my.po
File diff suppressed because it is too large
Load Diff
1225
erpnext/locale/nb.po
1225
erpnext/locale/nb.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/nl.po
1223
erpnext/locale/nl.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/pl.po
1223
erpnext/locale/pl.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/pt.po
1223
erpnext/locale/pt.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/ru.po
1223
erpnext/locale/ru.po
File diff suppressed because it is too large
Load Diff
1231
erpnext/locale/sr.po
1231
erpnext/locale/sr.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1260
erpnext/locale/sv.po
1260
erpnext/locale/sv.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/ta.po
1223
erpnext/locale/ta.po
File diff suppressed because it is too large
Load Diff
1225
erpnext/locale/th.po
1225
erpnext/locale/th.po
File diff suppressed because it is too large
Load Diff
1225
erpnext/locale/tr.po
1225
erpnext/locale/tr.po
File diff suppressed because it is too large
Load Diff
1223
erpnext/locale/vi.po
1223
erpnext/locale/vi.po
File diff suppressed because it is too large
Load Diff
2156
erpnext/locale/zh.po
2156
erpnext/locale/zh.po
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user