add shipments

This commit is contained in:
Sai Naw Wun
2020-10-13 07:50:25 +06:30
parent dc79f424a5
commit e032cee922
31 changed files with 1108 additions and 1035 deletions

View File

@@ -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(