From 8df9298724329dc3aa945f8a6b69b50b396ea7aa Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Mon, 14 Oct 2013 15:11:33 +0530 Subject: [PATCH] Fixed: Stock Movement report showed purchase instead of issue --- .gitignore | 1 - brewman/views/reports/stock_movement.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4d09397e..bc9f961c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,5 @@ env .project .pydevproject */__pycache__/ -*/.idea/ .idea/ *.egg-info/ \ No newline at end of file diff --git a/brewman/views/reports/stock_movement.py b/brewman/views/reports/stock_movement.py index 0422fb39..a9f527a2 100644 --- a/brewman/views/reports/stock_movement.py +++ b/brewman/views/reports/stock_movement.py @@ -59,7 +59,7 @@ def build_stock_movement(start_date, finish_date): .join(Product.inventories).join(Inventory.voucher).join(Voucher.journals) \ .filter(Voucher.date >= start_date) \ .filter(Voucher.date <= finish_date) \ - .filter(Voucher.type != VoucherType.by_name('Issue').id) \ + .filter(Voucher.type == VoucherType.by_name('Issue').id) \ .filter(Journal.cost_center_id == CostCenter.cost_center_purchase()) \ .group_by(Product).all() for product, quantity in issues: