modify package list

This commit is contained in:
PhyoThandar
2020-06-24 16:06:15 +06:30
parent 3c147e0ecd
commit 76235bed4b
17 changed files with 52727 additions and 190 deletions

View File

@@ -11,6 +11,9 @@ class Invoice {
String paymentAttachment;
List<Package> packages;
List<Receipt> receipts;
List<String> receiptPhotos;
Invoice(
{this.invoiceNumber,
this.invoiceDate,
@@ -20,7 +23,16 @@ class Invoice {
this.discount,
this.status,
this.paymentAttachment,
this.packages});
this.packages,
this.receiptPhotos,
this.receipts});
double get getAmount => packages.fold(0, (p, e) => (e.rate * e.weight) + p);
}
class Receipt {
int amount;
DateTime date;
Receipt({this.amount, this.date});
}