diff --git a/pay-in-decode.go b/pay-in-decode.go index aa08b8d..bce6f8b 100644 --- a/pay-in-decode.go +++ b/pay-in-decode.go @@ -133,7 +133,7 @@ func (m *AiDecodeIncome) decodePdf() (e error) { pi := loan.PayIn{} pi.Id = 0 pi.Ts = row.Period - pi.Amount = row.LoanAmount + pi.Amount = row.LoanFacility pi.Lender = loan.Lender_AAA pi.Settlement = row.Settlement pi.Balance = row.Balance diff --git a/payIn-AAA.go b/payIn-AAA.go index 23d3325..65618b0 100644 --- a/payIn-AAA.go +++ b/payIn-AAA.go @@ -26,12 +26,12 @@ Super Finance Markets Pty Ltd */ type PayInAAARow struct { - Period time.Time - LoanNumber string - Settlement time.Time - LoanAmount float64 - Balance float64 - InTrail float64 + Period time.Time + LoanNumber string + Settlement time.Time + LoanFacility float64 + Balance float64 + InTrail float64 } func (m *AiDecodeIncome) decodeAAAPdf(raw string) (e error) { @@ -118,7 +118,7 @@ func (m *PayInAAARow) processRow(line string) (nextState string, valid bool) { if len(el) >= 5 { m.LoanNumber = el[0] m.Settlement, _ = time.Parse("02-Jan-06", el[1]) - m.LoanAmount = m.currencyToFloat64(el[2]) + m.LoanFacility = m.currencyToFloat64(el[2]) m.Balance = m.currencyToFloat64(el[3]) m.InTrail = m.currencyToFloat64(el[len(el)-1]) //last element valid = true