add shipment in processing, update package, processing and receiving

This commit is contained in:
tzw
2025-03-06 17:59:15 +06:30
parent 9e6b288970
commit e75eacd1f9
20 changed files with 746 additions and 603 deletions

View File

@@ -18,6 +18,7 @@ class FcsShipment {
String? reportName;
int packageCount;
int cartonCount;
DateTime? processingDate;
FcsShipment(
{this.id,
@@ -36,7 +37,8 @@ class FcsShipment {
this.destinationPortName,
this.reportName,
this.packageCount = 0,
this.cartonCount = 0});
this.cartonCount = 0,
this.processingDate});
factory FcsShipment.fromMap(Map<String, dynamic> map, String docID) {
var cutoffDate =
@@ -44,6 +46,10 @@ class FcsShipment {
var arrivalDate =
map['eta_date'] == null ? null : (map['eta_date'] as Timestamp);
var processingDate = map['processing_date'] == null
? null
: (map['processing_date'] as Timestamp);
return FcsShipment(
id: docID,
cutoffDate: cutoffDate?.toDate(),
@@ -59,7 +65,8 @@ class FcsShipment {
destinationPortId: map['destination_port_id'],
destinationPortName: map['destination_port_name'],
packageCount: map['package_count'] ?? 0,
cartonCount: map['carton_count'] ?? 0);
cartonCount: map['carton_count'] ?? 0,
processingDate: processingDate?.toDate());
}
Map<String, dynamic> toMap() {