shipmentsummaryworksheet

package
v0.0.0-...-c486877 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

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

func FormatAddress(w2Address *models.Address) string

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

func FormatDate(date time.Time) string

FormatDate formats Dates for Shipment Summary Worksheet

func FormatDollarFromCents

func FormatDollarFromCents(cents unit.Cents) string

FormatDollars formats cents using 000s separator

func FormatDollars

func FormatDollars(dollars float64) string

FormatDollars formats an int using 000s separator

func FormatEnum

func FormatEnum(s string, outSep string) string

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

func FormatOrdersType(order models.Order) string

FormatOrdersType formats OrdersType for Shipment Summary Worksheet

func FormatOrdersTypeAndOrdersNumber

func FormatOrdersTypeAndOrdersNumber(order models.Order) string

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

func FormatPPMWeightFinal(weight unit.Pound) string

FormatPPMWeight formats a ppms final NetWeight for the Shipment Summary Worksheet

func FormatSITDate

func FormatSITDate(sitDate *time.Time) string

FormatSITDate formats a SIT Date for the Shipment Summary Worksheet

func FormatSITDaysInStorage

func FormatSITDaysInStorage(entryDate *time.Time, departureDate *time.Time) string

FormatSITDaysInStorage formats a SIT DaysInStorage for the Shipment Summary Worksheet

func FormatSITNumberAndType

func FormatSITNumberAndType(i int) string

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

func FormatWeights(wtg unit.Pound) string

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 Certifications struct {
	CustomerField string
	OfficeField   string
	DateField     string
}

type Dollar

type Dollar float64

Dollar represents a type for dollar monetary unit

func (Dollar) String

func (d Dollar) String() string

String is a string representation of a Dollar

type Obligation

type Obligation struct {
	Gcc   unit.Cents
	SIT   unit.Cents
	Miles unit.Miles
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL