[fix] [minor] stock balance report for serialized item
diff --git a/public/js/stock_grid_report.js b/public/js/stock_grid_report.js
index 46370d2..495ea43 100644
--- a/public/js/stock_grid_report.js
+++ b/public/js/stock_grid_report.js
@@ -28,9 +28,7 @@
var value_diff = (rate * add_qty);
if(add_qty)
- wh.fifo_stack.push([add_qty, sl.incoming_rate, sl.posting_date]);
-
- if(sl.serial_no) value_diff = this.get_serialized_value_diff(sl);
+ wh.fifo_stack.push([add_qty, sl.incoming_rate, sl.posting_date]);
} else {
// outgoing
if(sl.serial_no) {
@@ -113,7 +111,8 @@
$.each(wn.report_dump.data["Stock Ledger Entry"], function(i, sle) {
if(sle.qty > 0 && sle.serial_no) {
$.each(sle.serial_no.trim().split("\n"), function(i, sr) {
- if(sr && sle.incoming_rate !== undefined) {
+ if(sr && sle.incoming_rate !== undefined
+ && !serialized_buying_rates[sr.trim().toLowerCase()]) {
serialized_buying_rates[sr.trim().toLowerCase()] = flt(sle.incoming_rate);
}
});