Skip to content

Commit

Permalink
multiple typos fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Percival authored and dbca-asi committed Oct 23, 2017
1 parent 9e0f053 commit 9b702a1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ledger/payments/bpoint/facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _submit_info(self,order_number,reference,amount,action,_type,sub_type,bank_c
if amount:
amount = int(amount*100)
if bank_card.last_digits:
bank_card_last_digits = bank_card.last_digits
bankcard_lastdigits = bank_card.last_digits
# Handle any other exceptions that occur that are not from bpoint
try:
res = self.gateway.handle_txn(order_number,reference,action,amount,card_details,
Expand All @@ -80,7 +80,7 @@ def _submit_info(self,order_number,reference,amount,action,_type,sub_type,bank_c
res.settlement_date,
res.txn_number,
res.dvtoken,
bank_card.last_digits
bankcard_lastdigits
)

def _create_txn(self,action,crn1,amount,amount_original,amount_surcharge,
Expand Down
4 changes: 4 additions & 0 deletions ledger/payments/invoice/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ def make_payment(self):
)
if len(card_details) == 3:
card.last_digits = card_details[2]
else:
card.last_digits = None
txn = bpoint_facade.pay_with_temptoken(
'payment',
'telephoneorder',
Expand Down Expand Up @@ -317,6 +319,8 @@ def move_funds(self,amount,invoice,details):
invoice.save()

# Update the oracle interface invoices sp as to prevent duplicate sending of amounts to oracle

from ledger.payments.models import OracleParserInvoice
OracleParserInvoice.objects.filter(reference=self.reference).update(reference=invoice.reference)

update_payments(invoice.reference)
Expand Down
2 changes: 1 addition & 1 deletion ledger/payments/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def generate_trans_csv(system,start,end,region=None,district=None):
if invoices:
strIO = StringIO()
fieldnames = ['Created', 'Payment Method', 'Transaction Type', 'Amount', 'Approved', 'Source', 'Product Names',
'Product Codes']
'Product Codes', 'Invoice']
writer = csv.DictWriter(strIO, fieldnames=fieldnames)
writer.writeheader()
for i in invoices:
Expand Down
2 changes: 1 addition & 1 deletion ledger/payments/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ def update_payments(invoice_reference):
refunded += new_amount
line.save()
# Check if the whole amount paid on the invoice has been allocated otherwise add to the first line item
if i.total_payment_amount > paid:
if i.total_payment > paid:
first_item = i.order.lines.first()
# Bpoint
for b in bpoint_transactions:
Expand Down
2 changes: 2 additions & 0 deletions parkstay/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
ROOT_URLCONF = 'parkstay.urls'
SITE_ID = 1

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_ps')

# number of seconds before expiring a temporary booking
BOOKING_TIMEOUT = 1200

Expand Down

0 comments on commit 9b702a1

Please sign in to comment.