chore: batch flag and consumption rate in invariant report

This commit is contained in:
Ankush Menat
2022-02-19 21:21:39 +05:30
committed by Ankush Menat
parent 1fbf2b511f
commit 982476d684
2 changed files with 5 additions and 3 deletions

View File

@@ -60,6 +60,9 @@ def add_invariant_check_fields(sles):
fifo_qty += qty
fifo_value += qty * rate
if sle.actual_qty < 0:
sle.consumption_rate = sle.stock_value_difference / sle.actual_qty
balance_qty += sle.actual_qty
balance_stock_value += sle.stock_value_difference
if sle.voucher_type == "Stock Reconciliation" and not sle.batch_no:
@@ -145,9 +148,9 @@ def get_columns():
"label": "Incoming Rate",
},
{
"fieldname": "outgoing_rate",
"fieldname": "consumption_rate",
"fieldtype": "Float",
"label": "Outgoing Rate",
"label": "Consumption Rate",
},
{
"fieldname": "qty_after_transaction",

View File

@@ -23,7 +23,6 @@ class NegativeStockError(frappe.ValidationError): pass
class SerialNoExistsInFutureTransaction(frappe.ValidationError):
pass
_exceptions = frappe.local('stockledger_exceptions')
def make_sl_entries(sl_entries, allow_negative_stock=False, via_landed_cost_voucher=False):
from erpnext.controllers.stock_controller import future_sle_exists