Skip to content

Commit

Permalink
ledger: filter out the test payments in bpoint that were replayed
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrayndwiga authored and dbca-asi committed Oct 27, 2017
1 parent 655f7b7 commit 9d32e9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ledger/payments/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def generate_items_csv(system,start,end,banked_start,banked_end,region=None,dist
if not district:
eftpos.extend([x for x in CashTransaction.objects.filter(created__gte=start, created__lte=end, source='eftpos').exclude(district__isnull=False)])
banked_cash.extend([x for x in CashTransaction.objects.filter(created__gte=banked_start, created__lte=banked_end).exclude(source='eftpos').exclude(district__isnull=False)])
bpoint.extend([x for x in BpointTransaction.objects.filter(settlement_date__gte=start, settlement_date__lte=end)])
bpoint.extend([x for x in BpointTransaction.objects.filter(settlement_date__gte=start, settlement_date__lte=end).exclude(crn1__endswith='_test')])
bpay.extend([x for x in BpayTransaction.objects.filter(p_date__gte=start, p_date__lte=end)])
else:
eftpos.extend([x for x in CashTransaction.objects.filter(created__gte=start, created__lte=end, source='eftpos',district=district)])
Expand Down Expand Up @@ -380,7 +380,7 @@ def generate_trans_csv(system,start,end,region=None,district=None):
}'''
cash = i.cash_transactions.filter(created__gte=start, created__lte=end, district=district)
if not district:
bpoint = i.bpoint_transactions.filter(settlement_date__gte=start, settlement_date__lte=end)
bpoint = i.bpoint_transactions.filter(settlement_date__gte=start, settlement_date__lte=end).exclude(crn1__endswith='_test')
bpay = i.bpay_transactions.filter(p_date__gte=start, p_date__lte=end)
# Write out the cash transactions
for c in cash:
Expand Down

0 comments on commit 9d32e9b

Please sign in to comment.