add pagination for invoice and update ui for material 3
This commit is contained in:
@@ -133,8 +133,9 @@ class Invoice {
|
||||
cargoTypesMaps.map((e) => CargoType.fromMap(e, e["id"])).toList();
|
||||
var customDutiesMap =
|
||||
List<Map<String, dynamic>>.from(map['custom_duties'] ?? []);
|
||||
var customDuties =
|
||||
customDutiesMap.map((e) => CustomDuty.fromMap(e, e["id"])).toList();
|
||||
var customDuties = customDutiesMap
|
||||
.map((e) => CustomDuty.fromMap(e, e["id"] ?? ""))
|
||||
.toList();
|
||||
var handlingShipmentsMap =
|
||||
List<Map<String, dynamic>>.from(map['handling_fee_shipments'] ?? []);
|
||||
var handingShipments =
|
||||
@@ -149,22 +150,23 @@ class Invoice {
|
||||
var discount = Discount.fromMap(discountMap, discountMap['id']);
|
||||
var paymentMaps = List<Map<String, dynamic>>.from(map['payments'] ?? []);
|
||||
var payments = paymentMaps.map((e) => Payment.fromMap(e, e["id"])).toList();
|
||||
|
||||
return Invoice(
|
||||
id: docID,
|
||||
invoiceNumber: map['invoice_number'],
|
||||
invoiceNumber: map['invoice_number'] ?? "",
|
||||
invoiceDate: invd.toDate(),
|
||||
userName: map['user_name'],
|
||||
fcsID: map['fcs_id'],
|
||||
phoneNumber: map['phone_number'],
|
||||
amount: map['amount'],
|
||||
userName: map['user_name'] ?? "",
|
||||
fcsID: map['fcs_id'] ?? "",
|
||||
phoneNumber: map['phone_number'] ?? "",
|
||||
amount: map['amount'] ?? 0,
|
||||
paidAmount: double.tryParse(map['paid_amount'].toString()) ?? 0,
|
||||
status: map['status'],
|
||||
status: map['status'] ?? "",
|
||||
cartons: cartons,
|
||||
cargoTypes: cargoTypes,
|
||||
shipments: handingShipments,
|
||||
customDuties: customDuties,
|
||||
deliveryFee: map['delivery_fee'],
|
||||
invoiceURL: map['invoice_url'],
|
||||
deliveryFee: map['delivery_fee'] ?? 0,
|
||||
invoiceURL: map['invoice_url'] ?? "",
|
||||
paymentMethod: paymentMethod,
|
||||
discount: discount,
|
||||
payments: payments,
|
||||
|
||||
Reference in New Issue
Block a user