From d43f1879f1007ef98fec2d5869cb64b9ef999a93 Mon Sep 17 00:00:00 2001 From: sp Date: Thu, 29 Apr 2021 10:37:56 +1000 Subject: [PATCH] Lender name is for the direct lending money agencies. --- pay-in-decode.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pay-in-decode.go b/pay-in-decode.go index d7734a0..aa08b8d 100644 --- a/pay-in-decode.go +++ b/pay-in-decode.go @@ -21,7 +21,7 @@ type AiDecodeIncome struct { } type DecodeIncomeDetails struct { - Funders []loan.LenderType + Lender loan.LenderType AAA []PayInAAARow Connective_ANZ []ConnectiveRow Connective_BOC []ConnectiveRow @@ -42,8 +42,7 @@ func (m *AiDecodeIncome) decodeUploadToPayIn(ulMeta loan.Uploads, allowCachedRes m.Id = ulMeta.Id m.Input = ulMeta m.ul.Upload = ulMeta - m.PayIn = make([]loan.PayIn, 0, 100) // finalized payIns, generated - m.Funders = make([]loan.LenderType, 0, 50) // array of valid funders + m.PayIn = make([]loan.PayIn, 0, 100) // finalized payIns, generated if allowCachedResult { e = m.ReadJson() @@ -127,7 +126,7 @@ func (m *AiDecodeIncome) decodePdf() (e error) { raw := string(out) switch m.detectFunder(raw) { case loan.Lender_AAA: - m.Funders = append(m.Funders, loan.Lender_AAA) + m.Lender = loan.Lender_AAA e = m.decodeAAAPdf(raw) // regardless of error, we pump in all available row successed so far for _, row := range m.AAA {