mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
chore: batch flag and consumption rate in invariant report
This commit is contained in:
committed by
Ankush Menat
parent
1fbf2b511f
commit
982476d684
@@ -60,6 +60,9 @@ def add_invariant_check_fields(sles):
|
|||||||
fifo_qty += qty
|
fifo_qty += qty
|
||||||
fifo_value += qty * rate
|
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_qty += sle.actual_qty
|
||||||
balance_stock_value += sle.stock_value_difference
|
balance_stock_value += sle.stock_value_difference
|
||||||
if sle.voucher_type == "Stock Reconciliation" and not sle.batch_no:
|
if sle.voucher_type == "Stock Reconciliation" and not sle.batch_no:
|
||||||
@@ -145,9 +148,9 @@ def get_columns():
|
|||||||
"label": "Incoming Rate",
|
"label": "Incoming Rate",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "outgoing_rate",
|
"fieldname": "consumption_rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"label": "Outgoing Rate",
|
"label": "Consumption Rate",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "qty_after_transaction",
|
"fieldname": "qty_after_transaction",
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class NegativeStockError(frappe.ValidationError): pass
|
|||||||
class SerialNoExistsInFutureTransaction(frappe.ValidationError):
|
class SerialNoExistsInFutureTransaction(frappe.ValidationError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
_exceptions = frappe.local('stockledger_exceptions')
|
|
||||||
|
|
||||||
def make_sl_entries(sl_entries, allow_negative_stock=False, via_landed_cost_voucher=False):
|
def make_sl_entries(sl_entries, allow_negative_stock=False, via_landed_cost_voucher=False):
|
||||||
from erpnext.controllers.stock_controller import future_sle_exists
|
from erpnext.controllers.stock_controller import future_sle_exists
|
||||||
|
|||||||
Reference in New Issue
Block a user