Skip to content

Commit

Permalink
refactor: remove Recalculate Rate from SCR Item (backport #36929) (#…
Browse files Browse the repository at this point in the history
…36931)

* refactor: remove `Recalculate Rate` from SCR Item (#36929)

(cherry picked from commit cd8ddae)

# 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 <[email protected]>
  • Loading branch information
mergify[bot] and s-aga-r authored Sep 3, 2023
1 parent 5c8bee0 commit 11e67c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ def calculate_items_qty_and_amount(self):
item.rm_cost_per_qty = item.rm_supp_cost / item.qty
rm_supp_cost.pop(item.name)

if item.recalculate_rate:
item.rate = (
flt(item.rm_cost_per_qty) + flt(item.service_cost_per_qty) + flt(item.additional_cost_per_qty)
)
item.rate = (
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.amount = item.qty * item.rate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"rate_and_amount",
"rate",
"amount",
"recalculate_rate",
"column_break_19",
"rm_cost_per_qty",
"service_cost_per_qty",
Expand Down Expand Up @@ -196,7 +195,6 @@
"options": "currency",
"print_width": "100px",
"read_only": 1,
"read_only_depends_on": "eval: doc.recalculate_rate",
"width": "100px"
},
{
Expand Down Expand Up @@ -466,18 +464,12 @@
"fieldname": "accounting_details_section",
"fieldtype": "Section Break",
"label": "Accounting Details"
},
{
"default": "1",
"fieldname": "recalculate_rate",
"fieldtype": "Check",
"label": "Recalculate Rate"
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2023-07-06 18:44:45.599761",
"modified": "2023-09-03 17:04:21.214316",
"modified_by": "Administrator",
"module": "Subcontracting",
"name": "Subcontracting Receipt Item",
Expand Down

0 comments on commit 11e67c7

Please sign in to comment.