mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
* refactor: remove `Recalculate Rate` from SCR Item (#36929)
(cherry picked from commit cd8ddae7c5)
# Conflicts:
# erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js
# erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py
# erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json
* chore: `conflicts`
---------
Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
This commit is contained in:
@@ -176,10 +176,9 @@ class SubcontractingReceipt(SubcontractingController):
|
|||||||
item.rm_cost_per_qty = item.rm_supp_cost / item.qty
|
item.rm_cost_per_qty = item.rm_supp_cost / item.qty
|
||||||
rm_supp_cost.pop(item.name)
|
rm_supp_cost.pop(item.name)
|
||||||
|
|
||||||
if item.recalculate_rate:
|
item.rate = (
|
||||||
item.rate = (
|
flt(item.rm_cost_per_qty) + flt(item.service_cost_per_qty) + flt(item.additional_cost_per_qty)
|
||||||
flt(item.rm_cost_per_qty) + flt(item.service_cost_per_qty) + flt(item.additional_cost_per_qty)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
item.received_qty = item.qty + flt(item.rejected_qty)
|
item.received_qty = item.qty + flt(item.rejected_qty)
|
||||||
item.amount = item.qty * item.rate
|
item.amount = item.qty * item.rate
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
"rate_and_amount",
|
"rate_and_amount",
|
||||||
"rate",
|
"rate",
|
||||||
"amount",
|
"amount",
|
||||||
"recalculate_rate",
|
|
||||||
"column_break_19",
|
"column_break_19",
|
||||||
"rm_cost_per_qty",
|
"rm_cost_per_qty",
|
||||||
"service_cost_per_qty",
|
"service_cost_per_qty",
|
||||||
@@ -196,7 +195,6 @@
|
|||||||
"options": "currency",
|
"options": "currency",
|
||||||
"print_width": "100px",
|
"print_width": "100px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"read_only_depends_on": "eval: doc.recalculate_rate",
|
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -466,18 +464,12 @@
|
|||||||
"fieldname": "accounting_details_section",
|
"fieldname": "accounting_details_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Accounting Details"
|
"label": "Accounting Details"
|
||||||
},
|
|
||||||
{
|
|
||||||
"default": "1",
|
|
||||||
"fieldname": "recalculate_rate",
|
|
||||||
"fieldtype": "Check",
|
|
||||||
"label": "Recalculate Rate"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-07-06 18:44:45.599761",
|
"modified": "2023-09-03 17:04:21.214316",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Subcontracting",
|
"module": "Subcontracting",
|
||||||
"name": "Subcontracting Receipt Item",
|
"name": "Subcontracting Receipt Item",
|
||||||
|
|||||||
Reference in New Issue
Block a user