Documentation ¶
Index ¶
- func CalculateRemainingPPMEntitlement(finalIncentive *unit.Cents, sitMemberPaid float64, sitGTCCPaid float64, ...) float64
- func CalculateShipmentSITAllowance(appCtx appcontext.AppContext, shipment models.MTOShipment) (int, error)
- func FetchMovingExpensesShipmentSummaryWorksheet(PPMShipment models.PPMShipment, _ appcontext.AppContext, _ *auth.Session) (models.MovingExpenses, error)
- func FormatAddress(w2Address *models.Address) string
- func FormatCurrentPPMStatus(ppm models.PPMShipment) string
- func FormatDate(date time.Time) string
- func FormatDollarFromCents(cents unit.Cents) string
- func FormatDollars(dollars float64) string
- func FormatEnum(s string, outSep string) string
- func FormatGrade(grade *internalmessages.OrderPayGrade) string
- func FormatOrdersType(order models.Order) string
- func FormatOrdersTypeAndOrdersNumber(order models.Order) string
- func FormatPPMWeightEstimated(ppm models.PPMShipment) string
- func FormatPPMWeightFinal(weight unit.Pound) string
- func FormatSITDate(sitDate *time.Time) string
- func FormatSITDaysInStorage(entryDate *time.Time, departureDate *time.Time) string
- func FormatSITNumberAndType(i int) string
- func FormatServiceMemberAffiliation(affiliation *models.ServiceMemberAffiliation) string
- func FormatServiceMemberFullName(serviceMember models.ServiceMember) string
- func FormatWeights(wtg unit.Pound) string
- func NewSSWPPMComputer(ppmCloseoutFetcher services.PPMCloseoutFetcher) services.SSWPPMComputer
- func NewSSWPPMGenerator(pdfGenerator *paperwork.Generator) (services.SSWPPMGenerator, error)
- func SSWGetEntitlement(grade internalmessages.OrderPayGrade, hasDependents bool, ...) models.SSWMaxWeightEntitlement
- func SubTotalExpenses(expenseDocuments models.MovingExpenses) map[string]float64
- type Certifications
- type Dollar
- type Obligation
- type ObligationType
- type SSWMaxWeightEntitlement
- type SSWPPMComputer
- func (SSWPPMComputer *SSWPPMComputer) ComputeObligations(_ appcontext.AppContext, _ models.ShipmentSummaryFormData, _ route.Planner) (obligation models.Obligations, err error)
- func (SSWPPMComputer *SSWPPMComputer) FetchDataShipmentSummaryWorksheetFormData(appCtx appcontext.AppContext, session *auth.Session, ppmShipmentID uuid.UUID) (*models.ShipmentSummaryFormData, error)
- func (s SSWPPMComputer) FormatShipment(ppm models.PPMShipment, weightAllotment models.SSWMaxWeightEntitlement, ...) models.WorkSheetShipment
- func (SSWPPMComputer *SSWPPMComputer) FormatValuesShipmentSummaryWorksheet(shipmentSummaryFormData models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page1Values, services.Page2Values, services.Page3Values, error)
- func (s SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage1(data models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page1Values, error)
- func (s *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage2(data models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page2Values, error)
- func (s *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage3(data models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page3Values, error)
- type SSWPPMGenerator
- type WorkSheetSIT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateRemainingPPMEntitlement ¶
func CalculateRemainingPPMEntitlement(finalIncentive *unit.Cents, sitMemberPaid float64, sitGTCCPaid float64, aoa *unit.Cents) float64
Calculates cost for the Remaining PPM Incentive (pre-tax) field on page 2 of SSW form.
func CalculateShipmentSITAllowance ¶
func CalculateShipmentSITAllowance(appCtx appcontext.AppContext, shipment models.MTOShipment) (int, error)
CalculateShipmentSITAllowance finds the number of days allowed in SIT for a shipment based on its entitlement and any approved SIT extensions
func FetchMovingExpensesShipmentSummaryWorksheet ¶
func FetchMovingExpensesShipmentSummaryWorksheet(PPMShipment models.PPMShipment, _ appcontext.AppContext, _ *auth.Session) (models.MovingExpenses, error)
FetchMovingExpensesShipmentSummaryWorksheet fetches moving expenses for the Shipment Summary Worksheet TODO: update to create moving expense summary with the new moving expense model
func FormatAddress ¶
FormatAddress retrieves a PPMShipment W2Address and formats it for the SSW Document
func FormatCurrentPPMStatus ¶
func FormatCurrentPPMStatus(ppm models.PPMShipment) string
FormatCurrentPPMStatus formats FormatCurrentPPMStatus for the Shipment Summary Worksheet
func FormatDate ¶
FormatDate formats Dates for Shipment Summary Worksheet
func FormatDollarFromCents ¶
FormatDollars formats cents using 000s separator
func FormatDollars ¶
FormatDollars formats an int using 000s separator
func FormatEnum ¶
FormatEnum titlecases string const types (e.g. THIS_CONSTANT -> This Constant) outSep specifies the character to use for rejoining the string
func FormatGrade ¶
func FormatGrade(grade *internalmessages.OrderPayGrade) string
FormatGrade formats the service member's rank for Shipment Summary Worksheet
func FormatOrdersType ¶
FormatOrdersType formats OrdersType for Shipment Summary Worksheet
func FormatOrdersTypeAndOrdersNumber ¶
FormatOrdersTypeAndOrdersNumber formats OrdersTypeAndOrdersNumber for Shipment Summary Worksheet
func FormatPPMWeightEstimated ¶
func FormatPPMWeightEstimated(ppm models.PPMShipment) string
FormatPPMWeight formats a ppms EstimatedNetWeight for the Shipment Summary Worksheet
func FormatPPMWeightFinal ¶
FormatPPMWeight formats a ppms final NetWeight for the Shipment Summary Worksheet
func FormatSITDate ¶
FormatSITDate formats a SIT Date for the Shipment Summary Worksheet
func FormatSITDaysInStorage ¶
FormatSITDaysInStorage formats a SIT DaysInStorage for the Shipment Summary Worksheet
func FormatSITNumberAndType ¶
FormatSITNumberAndType formats FormatSITNumberAndType for the Shipment Summary Worksheet
func FormatServiceMemberAffiliation ¶
func FormatServiceMemberAffiliation(affiliation *models.ServiceMemberAffiliation) string
FormatServiceMemberAffiliation formats ServiceMemberAffiliation in human friendly format
func FormatServiceMemberFullName ¶
func FormatServiceMemberFullName(serviceMember models.ServiceMember) string
FormatServiceMemberFullName formats ServiceMember full name for Shipment Summary Worksheet
func FormatWeights ¶
FormatWeights formats a unit.Pound using 000s separator
func NewSSWPPMComputer ¶
func NewSSWPPMComputer(ppmCloseoutFetcher services.PPMCloseoutFetcher) services.SSWPPMComputer
NewSSWPPMComputer creates a SSWPPMComputer
func NewSSWPPMGenerator ¶
func NewSSWPPMGenerator(pdfGenerator *paperwork.Generator) (services.SSWPPMGenerator, error)
NewSSWPPMGenerator creates a SSWPPMGenerator
func SSWGetEntitlement ¶
func SSWGetEntitlement(grade internalmessages.OrderPayGrade, hasDependents bool, spouseHasProGear bool) models.SSWMaxWeightEntitlement
SSWGetEntitlement calculates the entitlement for the shipment summary worksheet based on the parameters of a move (hasDependents, spouseHasProGear)
func SubTotalExpenses ¶
func SubTotalExpenses(expenseDocuments models.MovingExpenses) map[string]float64
Types ¶
type Certifications ¶
type Obligation ¶
Obligation an object representing the obligations section on the shipment summary worksheet
func (Obligation) FormatSIT ¶
func (obligation Obligation) FormatSIT() float64
FormatSIT formats the SIT Cost into a dollar float for the shipment summary worksheet
func (Obligation) GCC100 ¶
func (obligation Obligation) GCC100() float64
GCC100 calculates the 100% GCC on shipment summary worksheet
func (Obligation) GCC95 ¶
func (obligation Obligation) GCC95() float64
GCC95 calculates the 95% GCC on shipment summary worksheet
func (Obligation) MaxAdvance ¶
func (obligation Obligation) MaxAdvance() float64
MaxAdvance calculates the Max Advance on the shipment summary worksheet
type ObligationType ¶
type ObligationType int
ObligationType type corresponding to obligation sections of shipment summary worksheet
type SSWMaxWeightEntitlement ¶
type SSWMaxWeightEntitlement struct { Entitlement unit.Pound ProGear unit.Pound SpouseProGear unit.Pound TotalWeight unit.Pound }
SSWMaxWeightEntitlement weight allotment for the shipment summary worksheet.
type SSWPPMComputer ¶
type SSWPPMComputer struct {
services.PPMCloseoutFetcher
}
SSWPPMComputer is the concrete struct implementing the services.shipmentsummaryworksheet interface
func (*SSWPPMComputer) ComputeObligations ¶
func (SSWPPMComputer *SSWPPMComputer) ComputeObligations(_ appcontext.AppContext, _ models.ShipmentSummaryFormData, _ route.Planner) (obligation models.Obligations, err error)
ComputeObligations is helper function for computing the obligations section of the shipment summary worksheet Obligations must remain as static test data until new computer system is finished
func (*SSWPPMComputer) FetchDataShipmentSummaryWorksheetFormData ¶
func (SSWPPMComputer *SSWPPMComputer) FetchDataShipmentSummaryWorksheetFormData(appCtx appcontext.AppContext, session *auth.Session, ppmShipmentID uuid.UUID) (*models.ShipmentSummaryFormData, error)
FetchDataShipmentSummaryWorksheetFormData fetches the pages for the Shipment Summary Worksheet for a given Move ID
func (SSWPPMComputer) FormatShipment ¶
func (s SSWPPMComputer) FormatShipment(ppm models.PPMShipment, weightAllotment models.SSWMaxWeightEntitlement, isPaymentPacket bool) models.WorkSheetShipment
func (*SSWPPMComputer) FormatValuesShipmentSummaryWorksheet ¶
func (SSWPPMComputer *SSWPPMComputer) FormatValuesShipmentSummaryWorksheet(shipmentSummaryFormData models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page1Values, services.Page2Values, services.Page3Values, error)
FormatValuesShipmentSummaryWorksheet returns the formatted pages for the Shipment Summary Worksheet
func (SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage1 ¶
func (s SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage1(data models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page1Values, error)
FormatValuesShipmentSummaryWorksheetFormPage1 formats the data for page 1 of the Shipment Summary Worksheet
func (*SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage2 ¶
func (s *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage2(data models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page2Values, error)
FormatValuesShipmentSummaryWorksheetFormPage2 formats the data for page 2 of the Shipment Summary Worksheet
func (*SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage3 ¶
func (s *SSWPPMComputer) FormatValuesShipmentSummaryWorksheetFormPage3(data models.ShipmentSummaryFormData, isPaymentPacket bool) (services.Page3Values, error)
FormatValuesShipmentSummaryWorksheetFormPage3 formats the data for page 3 of the Shipment Summary Worksheet
type SSWPPMGenerator ¶
type SSWPPMGenerator struct {
// contains filtered or unexported fields
}
SSWPPMGenerator is the concrete struct implementing the services.shipmentsummaryworksheet interface
func (*SSWPPMGenerator) FillSSWPDFForm ¶
func (SSWPPMGenerator *SSWPPMGenerator) FillSSWPDFForm(Page1Values services.Page1Values, Page2Values services.Page2Values, Page3Values services.Page3Values) (sswfile afero.File, pdfInfo *pdfcpu.PDFInfo, err error)
FillSSWPDFForm takes form data and fills an existing PDF form template with said data
type WorkSheetSIT ¶
type WorkSheetSIT struct { NumberAndTypes string EntryDates string EndDates string DaysInStorage string }
WorkSheetSIT is an object representing SIT on the Shipment Summary Worksheet
func FormatAllSITSForAOAPacket ¶
func FormatAllSITSForAOAPacket(ppm models.PPMShipment) WorkSheetSIT
FormatAllSITs formats SIT line items for the Shipment Summary Worksheet AOA Packet
func FormatAllSITSForPaymentPacket ¶
func FormatAllSITSForPaymentPacket(expenseDocuments models.MovingExpenses) WorkSheetSIT
FormatAllSITs formats SIT line items for the Shipment Summary Worksheet Payment Packet