mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 16:40:19 +00:00
Merge branch 'version-12-hotfix' into mr-se-warehouse-validation-hotfix
This commit is contained in:
@@ -488,6 +488,8 @@ class StockEntry(StockController):
|
||||
|
||||
if self.purpose in ["Manufacture", "Repack"]:
|
||||
for d in self.get("items"):
|
||||
if d.set_basic_rate_manually: continue
|
||||
|
||||
if (d.transfer_qty and (d.bom_no or d.t_warehouse)
|
||||
and (getattr(self, "pro_doc", frappe._dict()).scrap_warehouse != d.t_warehouse)):
|
||||
|
||||
@@ -499,7 +501,7 @@ class StockEntry(StockController):
|
||||
if raw_material_cost and self.purpose == "Manufacture":
|
||||
d.basic_rate = flt((raw_material_cost - scrap_material_cost) / flt(d.transfer_qty), d.precision("basic_rate"))
|
||||
d.basic_amount = flt((raw_material_cost - scrap_material_cost), d.precision("basic_amount"))
|
||||
elif self.purpose == "Repack" and total_fg_qty and not d.set_basic_rate_manually:
|
||||
elif self.purpose == "Repack" and total_fg_qty:
|
||||
d.basic_rate = flt(raw_material_cost) / flt(total_fg_qty)
|
||||
d.basic_amount = d.basic_rate * flt(d.qty)
|
||||
|
||||
|
||||
@@ -494,7 +494,7 @@
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"depends_on": "eval:parent.purpose===\"Repack\" && doc.t_warehouse",
|
||||
"depends_on": "eval:in_list([\"Repack\", \"Manufacture\"], parent.purpose) && doc.t_warehouse",
|
||||
"fieldname": "set_basic_rate_manually",
|
||||
"fieldtype": "Check",
|
||||
"label": "Set Basic Rate Manually"
|
||||
@@ -502,7 +502,7 @@
|
||||
],
|
||||
"idx": 1,
|
||||
"istable": 1,
|
||||
"modified": "2020-09-04 12:12:35.668198",
|
||||
"modified": "2021-01-05 15:05:04.891447",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Stock Entry Detail",
|
||||
|
||||
@@ -72,7 +72,9 @@ def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=Tru
|
||||
|
||||
update_party_blanket_order(args, out)
|
||||
|
||||
get_price_list_rate(args, item, out)
|
||||
if not doc or cint(doc.get('is_return')) == 0:
|
||||
# get price list rate only if the invoice is not a credit or debit note
|
||||
get_price_list_rate(args, item, out)
|
||||
|
||||
if args.customer and cint(args.is_pos):
|
||||
out.update(get_pos_profile_item_details(args.company, args))
|
||||
|
||||
Reference in New Issue
Block a user