add barcode scan

This commit is contained in:
Sai Naw Wun
2020-09-15 07:13:41 +06:30
parent eccea7ee02
commit ad527409ec
61 changed files with 4387 additions and 488 deletions

View File

@@ -0,0 +1,61 @@
import 'package:fcs/fcs/common/domain/vo/shipment_status.dart';
class Package {
String id;
String trackingID;
String userID;
String userName;
String phoneNumber;
String status;
String shipmentNumber;
String senderFCSID;
String senderName;
String receiverFCSID;
String receiverName;
String receiverAddress;
String receiverNumber;
String boxNumber;
String cargoDesc;
String market;
int rate;
int weight;
String packageType;
String pickUpID;
List<String> photos;
String remark;
DateTime arrivedDate;
int get amount => rate != null && weight != null ? rate * weight : 0;
String get packageNumber =>
shipmentNumber + "-" + receiverNumber + " #" + boxNumber;
double get price => rate.toDouble() * weight;
List<ShipmentStatus> shipmentHistory;
Package({
this.id,
this.trackingID,
this.userID,
this.shipmentNumber,
this.senderFCSID,
this.senderName,
this.receiverFCSID,
this.receiverName,
this.receiverNumber,
this.receiverAddress,
this.boxNumber,
this.rate,
this.weight,
this.packageType,
this.pickUpID,
this.remark,
this.status,
this.arrivedDate,
this.cargoDesc,
this.market,
this.shipmentHistory,
});
}