[minor] stock_ledger_entry.py

This commit is contained in:
Rushabh Mehta 2015-02-18 11:38:05 +05:30
parent e55def23af
commit 2e0e711eb2
2 changed files with 9 additions and 12 deletions

View File

@ -177,11 +177,11 @@ class update_entries_after(object):
self.prev_stock_value = self.stock_value
# update current sle
frappe.db.sql("""update `tabStock Ledger Entry`
set qty_after_transaction=%s, valuation_rate=%s, stock_queue=%s,
stock_value=%s, stock_value_difference=%s where name=%s""",
(self.qty_after_transaction, self.valuation_rate,
json.dumps(self.stock_queue), self.stock_value, stock_value_difference, sle.name))
sle.qty_after_transaction = self.qty_after_transaction
sle.valuation_rate = self.valuation_rate
sle.stock_queue = json.dumps(self.stock_queue)
sle.stock_value_difference = stock_value_difference
sle.save()
def validate_negative_stock(self, sle):
"""

View File

@ -15,13 +15,10 @@
<p>{%= doc.description %}</p>{% } %}
<div>
{% if(doc.warehouse) { %}
<div style="overflow:hidden; min-height: 25px;
white-space:nowrap; text-overflow: ellipsis;"
title="{%= __("For Warehouse") %}">
<span class="label label-default">
{%= doc.warehouse %}
</span>
</div>
<span class="label label-default" title="{%= __("For Warehouse") %}"
style="margin-right: 10px;">
{%= doc.warehouse %}
</span>
{% } %}
{% if(doc.schedule_date) { %}
<span title="{%= __("Reqd By Date") %}" class="label {%=