sitstatus

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DestinationSITLocation = "DESTINATION"

DestinationSITLocation is the constant representing when the shipment in storage occurs at the destination

View Source
const GracePeriodDays = 5

Number of days of grace period after customer contacts prime for delivery out of SIT

View Source
const OriginSITLocation = "ORIGIN"

OriginSITLocation is the constant representing when the shipment in storage occurs at the origin

Variables

This section is empty.

Functions

func CalculateTotalDaysInSIT

func CalculateTotalDaysInSIT(shipmentSITs SortedShipmentSITs, today time.Time) int

func CalculateTotalPastDaysInSIT

func CalculateTotalPastDaysInSIT(shipmentSITs SortedShipmentSITs, today time.Time) int

adds up all the days from pastSITs

func Clamp

func Clamp(input, min, max int) (int, error)

func NewShipmentSITStatus

func NewShipmentSITStatus() services.ShipmentSITStatus

NewShipmentSITStatus creates a new instance of the service object that implements calculating a shipments SIT summary

Types

type SortedShipmentSITs

type SortedShipmentSITs struct {
	PastSITs    models.SITServiceItemGroupings
	CurrentSITs models.SITServiceItemGroupings // Takes an array but at this time only a single CurrentSIT is supported. This could potentially be used for partial delivery current SITs
	FutureSITs  models.SITServiceItemGroupings
}

func SortShipmentSITs

func SortShipmentSITs(sitGroupings models.SITServiceItemGroupings, today time.Time) SortedShipmentSITs

Sort the Shipment's SIT groupings by their summary into either past, current, or future SIT groupings

Jump to

Keyboard shortcuts

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