| @@ -51,14 +51,31 @@ func apiV1LoanSinglePostBasic(w http.ResponseWriter, r *http.Request, ss *loan.S | |||
| l.Rating = input.Rating | |||
| l.Settlement = input.Settlement | |||
| l.Description = input.Description | |||
| l.ApplicationReceived = input.ApplicationReceived | |||
| l.Lodgement = input.Lodgement | |||
| l.ValuationOrdered = input.ValuationOrdered | |||
| l.ValuationCompleted = input.ValuationCompleted | |||
| l.ConditionalApproved = input.ConditionalApproved | |||
| l.OutstandingReturned = input.OutstandingReturned | |||
| l.FormalApproved = input.FormalApproved | |||
| l.SettlementBooked = input.SettlementBooked | |||
| l.SettlementCompleted = input.SettlementCompleted | |||
| e = l.WriteBasic() | |||
| if e != nil { | |||
| log.Error("cannot save basic loan", e.Error()) | |||
| apiV1Client404Error(w, r, ss) | |||
| } else { | |||
| apiV1SendJson(l, w, r, ss) | |||
| return | |||
| } | |||
| e = l.WriteMileStone() | |||
| if e != nil { | |||
| log.Error("cannot save milestone ", e.Error()) | |||
| apiV1Server500Error(w, r) | |||
| return | |||
| } | |||
| apiV1SendJson(l, w, r, ss) | |||
| } | |||
| } | |||