UOM column in Batch Wise Balance History Report (#9359)
* Training Events/Results link to employee dashbord * [minor]Improve validation message for Buying / Selling Setting * [minor]Added UOM cloumn in Batch Wise Balance History Report * modified validation message for buying / selling setting
This commit is contained in:
parent
faf75c4ddd
commit
310d4dc9e0
@ -205,14 +205,14 @@ class PurchaseInvoice(BuyingController):
|
||||
if frappe.db.get_value("Buying Settings", None, "po_required") == 'Yes':
|
||||
for d in self.get('items'):
|
||||
if not d.purchase_order:
|
||||
throw(_("Purchase Order number required for Item {0}").format(d.item_code))
|
||||
throw(_("As per the Buying Settings if Purchase Order Required == 'YES', then for creating Purchase Invoice, user need to create Purchase Order first for item {0}").format(d.item_code))
|
||||
|
||||
def pr_required(self):
|
||||
stock_items = self.get_stock_items()
|
||||
if frappe.db.get_value("Buying Settings", None, "pr_required") == 'Yes':
|
||||
for d in self.get('items'):
|
||||
if not d.purchase_receipt and d.item_code in stock_items:
|
||||
throw(_("Purchase Receipt number required for Item {0}").format(d.item_code))
|
||||
throw(_("As per the Buying Settings if Purchase Reciept Required == 'YES', then for creating Purchase Invoice, user need to create Purchase Receipt first for item {0}").format(d.item_code))
|
||||
|
||||
def validate_write_off_account(self):
|
||||
if self.write_off_amount and not self.write_off_account:
|
||||
|
@ -23,7 +23,8 @@ def execute(filters=None):
|
||||
if qty_dict.opening_qty or qty_dict.in_qty or qty_dict.out_qty or qty_dict.bal_qty:
|
||||
data.append([item, item_map[item]["item_name"], item_map[item]["description"], wh, batch,
|
||||
flt(qty_dict.opening_qty, float_precision), flt(qty_dict.in_qty, float_precision),
|
||||
flt(qty_dict.out_qty, float_precision), flt(qty_dict.bal_qty, float_precision)
|
||||
flt(qty_dict.out_qty, float_precision), flt(qty_dict.bal_qty, float_precision),
|
||||
item_map[item]["stock_uom"]
|
||||
])
|
||||
|
||||
return columns, data
|
||||
@ -33,7 +34,9 @@ def get_columns(filters):
|
||||
|
||||
columns = [_("Item") + ":Link/Item:100"] + [_("Item Name") + "::150"] + [_("Description") + "::150"] + \
|
||||
[_("Warehouse") + ":Link/Warehouse:100"] + [_("Batch") + ":Link/Batch:100"] + [_("Opening Qty") + ":Float:90"] + \
|
||||
[_("In Qty") + ":Float:80"] + [_("Out Qty") + ":Float:80"] + [_("Balance Qty") + ":Float:90"]
|
||||
[_("In Qty") + ":Float:80"] + [_("Out Qty") + ":Float:80"] + [_("Balance Qty") + ":Float:90"] + \
|
||||
[_("UOM") + "::90"]
|
||||
|
||||
|
||||
return columns
|
||||
|
||||
@ -87,7 +90,7 @@ def get_item_warehouse_batch_map(filters, float_precision):
|
||||
|
||||
def get_item_details(filters):
|
||||
item_map = {}
|
||||
for d in frappe.db.sql("select name, item_name, description from tabItem", as_dict=1):
|
||||
for d in frappe.db.sql("select name, item_name, description, stock_uom from tabItem", as_dict=1):
|
||||
item_map.setdefault(d.name, d)
|
||||
|
||||
return item_map
|
||||
|
Loading…
Reference in New Issue
Block a user