From ac11133f974229c680b8043373b9dec42fdb562e Mon Sep 17 00:00:00 2001 From: Tanshu Date: Sat, 9 Feb 2013 19:22:31 +0530 Subject: [PATCH] Added batch display in issue. --- brewman/brewman/static/offline.appcache | 2 +- brewman/brewman/static/partial/issue.html | 2 ++ brewman/brewman/views/services/voucher/__init__.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/brewman/brewman/static/offline.appcache b/brewman/brewman/static/offline.appcache index d7b0078e..374745de 100644 --- a/brewman/brewman/static/offline.appcache +++ b/brewman/brewman/static/offline.appcache @@ -1,6 +1,6 @@ CACHE MANIFEST -# version 2013-01-17.1 +# version 2013-02-09.1 CACHE: /partial/404.html diff --git a/brewman/brewman/static/partial/issue.html b/brewman/brewman/static/partial/issue.html index 6e3b2a12..87ae8a3b 100644 --- a/brewman/brewman/static/partial/issue.html +++ b/brewman/brewman/static/partial/issue.html @@ -77,6 +77,7 @@ Product + Batch Quantity Rate Amount @@ -86,6 +87,7 @@ {{inventory.Product.Name}} + {{inventory.Batch.Name}} {{inventory.Quantity}} {{inventory.Rate}} {{inventory.Amount}} diff --git a/brewman/brewman/views/services/voucher/__init__.py b/brewman/brewman/views/services/voucher/__init__.py index e1c93272..8128b1bd 100644 --- a/brewman/brewman/views/services/voucher/__init__.py +++ b/brewman/brewman/views/services/voucher/__init__.py @@ -166,7 +166,7 @@ def voucher_info(voucher): 'Tax': item.tax, 'Discount': item.discount, 'Amount': item.amount, 'Product': {'ProductID': item.product.id, 'Name': item.product.full_name, 'Units': item.product.units, 'Price': item.rate}, - 'Batch': {'BatchID': item.batch.id, 'QuantityRemaining': item.batch.quantity_remaining}}) + 'Batch': {'BatchID': item.batch.id, 'Name': item.batch.name, 'QuantityRemaining': item.batch.quantity_remaining}}) return json_voucher