213 lines
6.0 KiB
HTML
213 lines
6.0 KiB
HTML
<!-- title: erpnext.stock.utils --><div class="dev-header">
|
|
|
|
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
|
Version 6.x.x</a>
|
|
|
|
|
|
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/stock/utils.py"
|
|
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 style="font-weight: normal;">Class <b>InvalidWarehouseCompany</b></h3>
|
|
|
|
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
|
|
|
|
<div class="docs-attr-desc"><p></p>
|
|
</div>
|
|
<div style="padding-left: 30px;">
|
|
|
|
</div>
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.get_avg_purchase_rate" href="#erpnext.stock.utils.get_avg_purchase_rate" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>get_avg_purchase_rate</b>
|
|
<i class="text-muted">(serial_nos)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>get average value of serial numbers</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.get_bin" href="#erpnext.stock.utils.get_bin" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>get_bin</b>
|
|
<i class="text-muted">(item_code, warehouse)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.get_fifo_rate" href="#erpnext.stock.utils.get_fifo_rate" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>get_fifo_rate</b>
|
|
<i class="text-muted">(previous_stock_queue, qty)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>get FIFO (average) Rate from Queue</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p><span class="label label-info">Public API</span>
|
|
<br><code>/api/method/erpnext.stock.utils.get_incoming_rate</code>
|
|
</p>
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.get_incoming_rate" href="#erpnext.stock.utils.get_incoming_rate" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>get_incoming_rate</b>
|
|
<i class="text-muted">(args)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Get Incoming Rate based on valuation method</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.get_latest_stock_balance" href="#erpnext.stock.utils.get_latest_stock_balance" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>get_latest_stock_balance</b>
|
|
<i class="text-muted">()</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.get_stock_balance" href="#erpnext.stock.utils.get_stock_balance" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>get_stock_balance</b>
|
|
<i class="text-muted">(item_code, warehouse, posting_date=None, posting_time=None, with_valuation_rate=False)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Returns stock balance quantity at given warehouse on given posting date or current date.</p>
|
|
|
|
<p>If <code>with_valuation_rate</code> is True, will return tuple (qty, rate)</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.get_stock_value_on" href="#erpnext.stock.utils.get_stock_value_on" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>get_stock_value_on</b>
|
|
<i class="text-muted">(warehouse=None, posting_date=None, item_code=None)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.get_valid_serial_nos" href="#erpnext.stock.utils.get_valid_serial_nos" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>get_valid_serial_nos</b>
|
|
<i class="text-muted">(sr_nos, qty=0, item_code=)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>split serial nos, validate and return list of valid serial nos</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.get_valuation_method" href="#erpnext.stock.utils.get_valuation_method" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>get_valuation_method</b>
|
|
<i class="text-muted">(item_code)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>get valuation method from item or default</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.update_bin" href="#erpnext.stock.utils.update_bin" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>update_bin</b>
|
|
<i class="text-muted">(args, allow_negative_stock=False, via_landed_cost_voucher=False)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.stock.utils.validate_warehouse_company" href="#erpnext.stock.utils.validate_warehouse_company" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.stock.utils.<b>validate_warehouse_company</b>
|
|
<i class="text-muted">(warehouse, company)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- autodoc --> |