Version 6.x.x Source

Class NegativeStockError

Inherits from frappe.exceptions.ValidationError


erpnext.stock.stock_ledger.delete_cancelled_entry (voucher_type, voucher_no)

No docs


erpnext.stock.stock_ledger.get_previous_sle (args, for_update=False)

get the last sle on or before the current time-bucket, to get actual qty before transaction, this function is called from various transaction like stock entry, reco etc

args = { "itemcode": "ABC", "warehouse": "XYZ", "postingdate": "2012-12-12", "posting_time": "12:00", "sle": "name of reference Stock Ledger Entry" }


erpnext.stock.stock_ledger.get_stock_ledger_entries (previous_sle, operator=None, order=desc, limit=None, for_update=False, debug=False)

get stock ledger entries filtered by specific posting datetime conditions


erpnext.stock.stock_ledger.get_valuation_rate (item_code, warehouse, allow_zero_rate=False)

No docs


erpnext.stock.stock_ledger.make_entry (args, allow_negative_stock=False, via_landed_cost_voucher=False)

No docs


erpnext.stock.stock_ledger.make_sl_entries (sl_entries, is_amended=None, allow_negative_stock=False, via_landed_cost_voucher=False)

No docs


erpnext.stock.stock_ledger.set_as_cancel (voucher_type, voucher_no)

No docs


Class update_entries_after

Inherits from __builtin__.object

update valution rate and qty after transaction from the current time-bucket onwards

Parameters:

__init__ (self, args, allow_zero_rate=False, allow_negative_stock=None, via_landed_cost_voucher=False, verbose=1)

No docs


build (self)

No docs


get_fifo_values (self, sle)

No docs


get_moving_average_values (self, sle)

No docs


get_serialized_values (self, sle)

No docs


get_sle_after_datetime (self)

get Stock Ledger Entries after a particular datetime, for reposting


get_sle_before_datetime (self)

get previous stock ledger entry before current time-bucket


process_sle (self, sle)

No docs


raise_exceptions (self)

No docs


update_bin (self)

No docs


validate_negative_stock (self, sle)

validate negative stock for entries current datetime onwards will not consider cancelled entries