mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
Utility: Repost stock ledger entries and gl entries for all stock transactions
This commit is contained in:
@@ -105,12 +105,14 @@ erpnext.StockBalance = erpnext.StockAnalytics.extend({
|
||||
var is_fifo = valuation_method == "FIFO";
|
||||
|
||||
if(sl.voucher_type=="Stock Reconciliation") {
|
||||
var qty_diff = sl.qty_after_trasaction - item.closing_qty;
|
||||
var value_diff = (sl.valuation_rate * sl.qty_after_trasaction) - item.closing_value;
|
||||
var qty_diff = sl.qty_after_transaction - (item.temp_closing_qty || 0.0);
|
||||
var value_diff = (sl.valuation_rate * sl.qty_after_transaction) - (item.temp_closing_value || 0.0);
|
||||
} else {
|
||||
var qty_diff = sl.qty;
|
||||
var value_diff = me.get_value_diff(wh, sl, is_fifo);
|
||||
}
|
||||
item.temp_closing_qty += qty_diff;
|
||||
item.temp_closing_value += value_diff;
|
||||
|
||||
if(sl_posting_date < from_date) {
|
||||
item.opening_qty += qty_diff;
|
||||
|
||||
Reference in New Issue
Block a user