Merge pull request #25541 from rohitwaghchaure/fixed-incorrect-serial-no-set
fix: serial no changed after saving stock reconciliation
This commit is contained in:
commit
dc6233b703
@ -4,6 +4,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import flt
|
||||
|
||||
def execute(filters=None):
|
||||
columns, data = [], []
|
||||
@ -52,8 +53,8 @@ def get_rows(filters):
|
||||
|
||||
def calculate_cost_and_profit(data):
|
||||
for row in data:
|
||||
row.fractional_cost = row.base_gross_pay * row.utilization
|
||||
row.profit = row.base_grand_total - row.base_gross_pay * row.utilization
|
||||
row.fractional_cost = flt(row.base_gross_pay) * flt(row.utilization)
|
||||
row.profit = flt(row.base_grand_total) - flt(row.base_gross_pay) * flt(row.utilization)
|
||||
return data
|
||||
|
||||
def get_conditions(filters):
|
||||
|
@ -72,7 +72,7 @@ class StockReconciliation(StockController):
|
||||
|
||||
if item_dict.get("serial_nos"):
|
||||
item.current_serial_no = item_dict.get("serial_nos")
|
||||
if self.purpose == "Stock Reconciliation":
|
||||
if self.purpose == "Stock Reconciliation" and not item.serial_no:
|
||||
item.serial_no = item.current_serial_no
|
||||
|
||||
item.current_qty = item_dict.get("qty")
|
||||
|
Loading…
Reference in New Issue
Block a user