Documentation
¶
Index ¶
- Constants
- func CalculateTotalDaysInSIT(shipmentSITs SortedShipmentSITs, today time.Time) int
- func CalculateTotalPastDaysInSIT(shipmentSITs SortedShipmentSITs, today time.Time) int
- func Clamp(input, min, max int) (int, error)
- func NewShipmentSITStatus() services.ShipmentSITStatus
- type SortedShipmentSITs
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 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
Click to show internal directories.
Click to hide internal directories.