update carton

This commit is contained in:
2021-01-07 18:15:39 +06:30
parent 045d27945b
commit 016ebed384
16 changed files with 295 additions and 68 deletions

View File

@@ -74,7 +74,7 @@ class Carton {
height <= 0 ||
volumetricRatio == null ||
volumetricRatio <= 0) return 0;
return ((length * width * height) / volumetricRatio).round();
}
@@ -199,9 +199,9 @@ class Carton {
shipmentNumber: map['shipment_number'],
receiverNumber: map['receiver_number'],
boxNumber: map['box_number'],
length: map['length'],
width: map['width'],
height: map['height'],
length: double.tryParse(map['length']?.toString()),
width: double.tryParse(map['width']?.toString()),
height: double.tryParse(map['height']?.toString()),
userName: map['user_name'],
fcsID: map['fcs_id'],
cartonType: map['carton_type'],

View File

@@ -138,6 +138,14 @@ class Package {
package.fcsID != this.fcsID;
}
bool isChangedForEditProcessing(Package package) {
return package.trackingID != this.trackingID ||
package.fcsID != this.fcsID ||
package.market != this.market ||
package.desc != this.desc ||
package.remark != this.remark;
}
@override
bool operator ==(Object other) => other is Package && other.id == id;