fix: serial no changed after saving stock reconciliation
This commit is contained in:
parent
1fd1e2bb60
commit
35d4829383
@ -4,6 +4,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
from frappe.utils import flt
|
||||||
|
|
||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
columns, data = [], []
|
columns, data = [], []
|
||||||
@ -52,8 +53,8 @@ def get_rows(filters):
|
|||||||
|
|
||||||
def calculate_cost_and_profit(data):
|
def calculate_cost_and_profit(data):
|
||||||
for row in data:
|
for row in data:
|
||||||
row.fractional_cost = row.base_gross_pay * row.utilization
|
row.fractional_cost = flt(row.base_gross_pay) * flt(row.utilization)
|
||||||
row.profit = row.base_grand_total - row.base_gross_pay * row.utilization
|
row.profit = flt(row.base_grand_total) - flt(row.base_gross_pay) * flt(row.utilization)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def get_conditions(filters):
|
def get_conditions(filters):
|
||||||
|
@ -72,7 +72,7 @@ class StockReconciliation(StockController):
|
|||||||
|
|
||||||
if item_dict.get("serial_nos"):
|
if item_dict.get("serial_nos"):
|
||||||
item.current_serial_no = 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.serial_no = item.current_serial_no
|
||||||
|
|
||||||
item.current_qty = item_dict.get("qty")
|
item.current_qty = item_dict.get("qty")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user