shipmentsummaryworksheet

package
v0.0.0-...-c407d37 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 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(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

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 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 FormatLocation

func FormatLocation(dutyLocation models.DutyLocation) string

FormatLocation formats AuthorizedOrigin and AuthorizedDestination 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 FormatPPMNumberAndType

func FormatPPMNumberAndType(i int) string

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

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 FormatSignature

func FormatSignature(sm models.ServiceMember) string

FormatSignature formats a service member's signature for the Shipment Summary Worksheet

func FormatSignatureDate

func FormatSignatureDate(signature time.Time) string

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

func FormatWeights(wtg unit.Pound) string

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

type Agent struct {
	Name  string
	Email string
	Date  string
	Phone string
}

func FormatAgentInfo

func FormatAgentInfo(agentArray []models.MTOAgent) Agent

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 {
}

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

Jump to

Keyboard shortcuts

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