Fixed: Stock Movement report showed purchase instead of issue

This commit is contained in:
Amritanshu 2013-10-14 15:11:33 +05:30
parent cc89a548a5
commit 8df9298724
2 changed files with 1 additions and 2 deletions

1
.gitignore vendored
View File

@ -3,6 +3,5 @@ env
.project .project
.pydevproject .pydevproject
*/__pycache__/ */__pycache__/
*/.idea/
.idea/ .idea/
*.egg-info/ *.egg-info/

View File

@ -59,7 +59,7 @@ def build_stock_movement(start_date, finish_date):
.join(Product.inventories).join(Inventory.voucher).join(Voucher.journals) \ .join(Product.inventories).join(Inventory.voucher).join(Voucher.journals) \
.filter(Voucher.date >= start_date) \ .filter(Voucher.date >= start_date) \
.filter(Voucher.date <= finish_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()) \ .filter(Journal.cost_center_id == CostCenter.cost_center_purchase()) \
.group_by(Product).all() .group_by(Product).all()
for product, quantity in issues: for product, quantity in issues: