add shipments
This commit is contained in:
@@ -41,6 +41,19 @@ class Box {
|
||||
shipmentNumber + "-" + receiverNumber + " #" + boxNumber;
|
||||
double get price => rate.toDouble() * weight;
|
||||
|
||||
double getShipmentWeight(double volumetricRatio) {
|
||||
if (length == null ||
|
||||
length <= 0 ||
|
||||
width == null ||
|
||||
width <= 0 ||
|
||||
height == null ||
|
||||
height <= 0 ||
|
||||
volumetricRatio == null ||
|
||||
volumetricRatio <= 0) return 0;
|
||||
|
||||
return (length * width * height) / volumetricRatio;
|
||||
}
|
||||
|
||||
List<ShipmentStatus> shipmentHistory;
|
||||
|
||||
Box(
|
||||
|
||||
Reference in New Issue
Block a user