Fixed: Stock Movement report showed purchase instead of issue
This commit is contained in:
parent
cc89a548a5
commit
8df9298724
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,5 @@ env
|
||||
.project
|
||||
.pydevproject
|
||||
*/__pycache__/
|
||||
*/.idea/
|
||||
.idea/
|
||||
*.egg-info/
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user