Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INT-B-21636 #14235

Merged
merged 7 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions pkg/gen/pptasapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/gen/pptasmessages/p_p_t_a_s_report.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pkg/gen/pptasmessages/p_p_t_a_s_shipment.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions pkg/services/pptas_report/pptas_report_list_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ func (f *pptasReportListFetcher) BuildPPTASReportsFromMoves(appCtx appcontext.Ap
report.TravelType = (*string)(orders.OrdersTypeDetail)
}

if orders.SAC != nil {
report.OrderNumber = orders.SAC
}

err := populateShipmentFields(&report, appCtx, move, orders, f.tacFetcher, f.loaFetcher, f.estimator)
if err != nil {
return nil, err
Expand Down Expand Up @@ -177,7 +173,7 @@ func populateShipmentFields(
}

// populate TGET data
tacErr := inputReportTAC(&pptasShipment, orders, appCtx, tacFetcher, loaFetcher)
tacErr := inputReportTAC(report, &pptasShipment, orders, appCtx, tacFetcher, loaFetcher)
if tacErr != nil {
return tacErr
}
Expand Down Expand Up @@ -516,7 +512,7 @@ func buildServiceItemCrate(serviceItem models.MTOServiceItem) pptasmessages.Crat
}

// inputs all TAC related fields and builds full line of accounting string
func inputReportTAC(pptasShipment *pptasmessages.PPTASShipment, orders models.Order, appCtx appcontext.AppContext, tacFetcher services.TransportationAccountingCodeFetcher, loa services.LineOfAccountingFetcher) error {
func inputReportTAC(report *models.PPTASReport, pptasShipment *pptasmessages.PPTASShipment, orders models.Order, appCtx appcontext.AppContext, tacFetcher services.TransportationAccountingCodeFetcher, loa services.LineOfAccountingFetcher) error {
tac, err := tacFetcher.FetchOrderTransportationAccountingCodes(models.DepartmentIndicator(*orders.DepartmentIndicator), orders.IssueDate, *orders.TAC, appCtx)
if err != nil {
return err
Expand All @@ -530,15 +526,19 @@ func inputReportTAC(pptasShipment *pptasmessages.PPTASShipment, orders models.Or
pptasShipment.Loa = &longLoa
pptasShipment.FiscalYear = tac[0].TacFyTxt
pptasShipment.Appro = tac[0].LineOfAccounting.LoaBafID
pptasShipment.Subhead = tac[0].LineOfAccounting.LoaObjClsID
pptasShipment.ObjClass = tac[0].LineOfAccounting.LoaAlltSnID
pptasShipment.Bcn = tac[0].LineOfAccounting.LoaSbaltmtRcpntID
pptasShipment.SubAllotCD = tac[0].LineOfAccounting.LoaInstlAcntgActID
pptasShipment.Subhead = tac[0].LineOfAccounting.LoaTrsySfxTx
pptasShipment.ObjClass = tac[0].LineOfAccounting.LoaObjClsID
pptasShipment.Bcn = tac[0].LineOfAccounting.LoaAlltSnID
pptasShipment.SubAllotCD = tac[0].LineOfAccounting.LoaSbaltmtRcpntID
pptasShipment.Aaa = tac[0].LineOfAccounting.LoaTrnsnID
pptasShipment.TypeCD = tac[0].LineOfAccounting.LoaJbOrdNm
pptasShipment.Paa = tac[0].LineOfAccounting.LoaDocID
pptasShipment.Paa = tac[0].LineOfAccounting.LoaInstlAcntgActID
pptasShipment.CostCD = tac[0].LineOfAccounting.LoaPgmElmntID
pptasShipment.Ddcd = tac[0].LineOfAccounting.LoaDptID

if report.OrderNumber == nil {
report.OrderNumber = tac[0].LineOfAccounting.LoaDocID
}
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion swagger-def/definitions/PPTASReport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ properties:
type: string
format: date
orderNumber:
description: not to be confused with Orders Number
description: LoaDocID in lines of accounting table. Not to be confused with Orders Number.
type: string
example: '030-00362'
x-nullable: true
Expand Down
10 changes: 5 additions & 5 deletions swagger-def/definitions/PPTASShipment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ properties:
type: string
x-nullable: true
subhead:
description: LoaObjClsID in lines_of_accounting
description: LoaTrsySfxTx in lines_of_accounting
type: string
x-nullable: true
objClass:
description: LoaAlltSnID in lines_of_accounting
description: LoaObjClsID in lines_of_accounting
type: string
x-nullable: true
bcn:
description: LoaSbaltmtRcpntID in lines_of_accounting
description: LoaAlltSnID in lines_of_accounting
type: string
x-nullable: true
subAllotCD:
description: LoaInstlAcntgActID in lines_of_accounting
description: LoaSbaltmtRcpntID in lines_of_accounting
type: string
x-nullable: true
aaa:
Expand All @@ -45,7 +45,7 @@ properties:
type: string
x-nullable: true
paa:
description: LoaDocID in lines_of_accounting
description: LoaInstlAcntgActID in lines_of_accounting
type: string
x-nullable: true
costCD:
Expand Down
14 changes: 8 additions & 6 deletions swagger/pptas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,19 +312,19 @@ definitions:
type: string
x-nullable: true
subhead:
description: LoaObjClsID in lines_of_accounting
description: LoaTrsySfxTx in lines_of_accounting
type: string
x-nullable: true
objClass:
description: LoaAlltSnID in lines_of_accounting
description: LoaObjClsID in lines_of_accounting
type: string
x-nullable: true
bcn:
description: LoaSbaltmtRcpntID in lines_of_accounting
description: LoaAlltSnID in lines_of_accounting
type: string
x-nullable: true
subAllotCD:
description: LoaInstlAcntgActID in lines_of_accounting
description: LoaSbaltmtRcpntID in lines_of_accounting
type: string
x-nullable: true
aaa:
Expand All @@ -336,7 +336,7 @@ definitions:
type: string
x-nullable: true
paa:
description: LoaDocID in lines_of_accounting
description: LoaInstlAcntgActID in lines_of_accounting
type: string
x-nullable: true
costCD:
Expand Down Expand Up @@ -677,7 +677,9 @@ definitions:
type: string
format: date
orderNumber:
description: not to be confused with Orders Number
description: >-
LoaDocID in lines of accounting table. Not to be confused with Orders
Number.
type: string
example: 030-00362
x-nullable: true
Expand Down