Documentation ¶
Index ¶
- func CalculateRemainingPPMEntitlement(move models.Move, totalEntitlement unit.Pound) (unit.Pound, error)
- 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 FormatDollars(dollars float64) string
- func FormatEnum(s string, outSep string) string
- func FormatGrade(grade *internalmessages.OrderPayGrade) string
- func FormatLocation(dutyLocation models.DutyLocation) string
- func FormatOrdersType(order models.Order) string
- func FormatOrdersTypeAndOrdersNumber(order models.Order) string
- func FormatPPMNumberAndType(i int) string
- func FormatPPMPickupDate(ppm models.PPMShipment) string
- func FormatPPMWeight(ppm models.PPMShipment) string
- func FormatSITDaysInStorage(ppm models.PPMShipment) string
- func FormatSITEndDate(ppm models.PPMShipment) string
- func FormatSITEntryDate(ppm models.PPMShipment) string
- func FormatSITNumberAndType(i int) string
- func FormatServiceMemberAffiliation(affiliation *models.ServiceMemberAffiliation) string
- func FormatServiceMemberFullName(serviceMember models.ServiceMember) string
- func FormatSignature(sm models.ServiceMember) string
- func FormatSignatureDate(signature time.Time) string
- func FormatValuesShipmentSummaryWorksheetFormPage1(data services.ShipmentSummaryFormData) services.Page1Values
- func FormatValuesShipmentSummaryWorksheetFormPage2(data services.ShipmentSummaryFormData) services.Page2Values
- func FormatWeights(wtg unit.Pound) string
- func NewSSWPPMComputer() services.SSWPPMComputer
- func NewSSWPPMGenerator(pdfGenerator *paperwork.Generator) (services.SSWPPMGenerator, error)
- func SSWGetEntitlement(grade internalmessages.OrderPayGrade, hasDependents bool, ...) services.SSWMaxWeightEntitlement
- func SubTotalExpenses(expenseDocuments models.MovingExpenses) map[string]float64
- type Agent
- type Dollar
- type Obligation
- type ObligationType
- type SSWMaxWeightEntitlement
- type SSWPPMComputer
- func (SSWPPMComputer *SSWPPMComputer) ComputeObligations(_ appcontext.AppContext, _ services.ShipmentSummaryFormData, _ route.Planner) (obligation services.Obligations, err error)
- func (SSWPPMComputer *SSWPPMComputer) FetchDataShipmentSummaryWorksheetFormData(appCtx appcontext.AppContext, _ *auth.Session, ppmShipmentID uuid.UUID) (*services.ShipmentSummaryFormData, error)
- func (SSWPPMComputer *SSWPPMComputer) FormatValuesShipmentSummaryWorksheet(shipmentSummaryFormData services.ShipmentSummaryFormData) (services.Page1Values, services.Page2Values)
- type SSWPPMGenerator
- type WorkSheetSIT
- type WorkSheetShipment
- type WorkSheetShipments
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateRemainingPPMEntitlement ¶
func CalculateRemainingPPMEntitlement(move models.Move, totalEntitlement unit.Pound) (unit.Pound, error)
CalculateRemainingPPMEntitlement calculates the remaining PPM entitlement for PPM moves a PPMs remaining entitlement weight is equal to total entitlement - hhg weight
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 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 FormatLocation ¶
func FormatLocation(dutyLocation models.DutyLocation) string
FormatLocation formats AuthorizedOrigin and AuthorizedDestination for Shipment Summary Worksheet
func FormatOrdersType ¶
FormatOrdersType formats OrdersType for Shipment Summary Worksheet
func FormatOrdersTypeAndOrdersNumber ¶
FormatOrdersTypeAndOrdersNumber formats OrdersTypeAndOrdersNumber for Shipment Summary Worksheet
func FormatPPMNumberAndType ¶
FormatPPMNumberAndType formats FormatShipmentNumberAndType for the Shipment Summary Worksheet
func FormatPPMPickupDate ¶
func FormatPPMPickupDate(ppm models.PPMShipment) string
FormatPPMPickupDate formats a shipments ActualPickupDate for the Shipment Summary Worksheet
func FormatPPMWeight ¶
func FormatPPMWeight(ppm models.PPMShipment) string
FormatPPMWeight formats a ppms NetWeight for the Shipment Summary Worksheet
func FormatSITDaysInStorage ¶
func FormatSITDaysInStorage(ppm models.PPMShipment) string
FormatSITDaysInStorage formats a SIT DaysInStorage for the Shipment Summary Worksheet
func FormatSITEndDate ¶
func FormatSITEndDate(ppm models.PPMShipment) string
FormatSITEndDate formats a SIT EstimatedPickupDate for the Shipment Summary Worksheet
func FormatSITEntryDate ¶
func FormatSITEntryDate(ppm models.PPMShipment) string
FormatSITEntryDate formats a SIT EstimatedEntryDate 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 FormatSignature ¶
func FormatSignature(sm models.ServiceMember) string
FormatSignature formats a service member's signature for the Shipment Summary Worksheet
func FormatSignatureDate ¶
FormatSignatureDate formats the date the service member electronically signed for the Shipment Summary Worksheet
func FormatValuesShipmentSummaryWorksheetFormPage1 ¶
func FormatValuesShipmentSummaryWorksheetFormPage1(data services.ShipmentSummaryFormData) services.Page1Values
FormatValuesShipmentSummaryWorksheetFormPage1 formats the data for page 1 of the Shipment Summary Worksheet
func FormatValuesShipmentSummaryWorksheetFormPage2 ¶
func FormatValuesShipmentSummaryWorksheetFormPage2(data services.ShipmentSummaryFormData) services.Page2Values
FormatValuesShipmentSummaryWorksheetFormPage2 formats the data for page 2 of the Shipment Summary Worksheet
func FormatWeights ¶
FormatWeights formats a unit.Pound using 000s separator
func NewSSWPPMComputer ¶
func NewSSWPPMComputer() 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) services.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 Agent ¶
func FormatAgentInfo ¶
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 { }
SSWPPMComputer is the concrete struct implementing the services.shipmentsummaryworksheet interface
func (*SSWPPMComputer) ComputeObligations ¶
func (SSWPPMComputer *SSWPPMComputer) ComputeObligations(_ appcontext.AppContext, _ services.ShipmentSummaryFormData, _ route.Planner) (obligation services.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, _ *auth.Session, ppmShipmentID uuid.UUID) (*services.ShipmentSummaryFormData, error)
FetchDataShipmentSummaryWorksheetFormData fetches the pages for the Shipment Summary Worksheet for a given Move ID
func (*SSWPPMComputer) FormatValuesShipmentSummaryWorksheet ¶
func (SSWPPMComputer *SSWPPMComputer) FormatValuesShipmentSummaryWorksheet(shipmentSummaryFormData services.ShipmentSummaryFormData) (services.Page1Values, services.Page2Values)
FormatValuesShipmentSummaryWorksheet returns the formatted pages for 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) (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 FormatAllSITS ¶
func FormatAllSITS(ppms models.PPMShipments) WorkSheetSIT
FormatAllSITs formats SIT line items for the Shipment Summary Worksheet
type WorkSheetShipment ¶
type WorkSheetShipment struct { EstimatedIncentive string MaxAdvance string FinalIncentive string AdvanceAmountReceived string }
WorkSheetShipment is an object representing specific shipment items on Shipment Summary Worksheet
func FormatCurrentShipment ¶
func FormatCurrentShipment(ppm models.PPMShipment) WorkSheetShipment
type WorkSheetShipments ¶
type WorkSheetShipments struct { ShipmentNumberAndTypes string PickUpDates string ShipmentWeights string ShipmentWeightForObligation string CurrentShipmentStatuses string }
WorkSheetShipments is an object representing shipment line items on Shipment Summary Worksheet
func FormatAllShipments ¶
func FormatAllShipments(ppms models.PPMShipments) WorkSheetShipments
FormatAllShipments formats Shipment line items for the Shipment Summary Worksheet