clean up
This commit is contained in:
32
lib/domain/entities/invoice.dart
Normal file
32
lib/domain/entities/invoice.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package.dart';
|
||||
import 'receipt.dart';
|
||||
|
||||
class Invoice {
|
||||
String invoiceNumber;
|
||||
DateTime invoiceDate;
|
||||
String customerName;
|
||||
String customerPhoneNumber;
|
||||
double amount;
|
||||
String discount;
|
||||
String status;
|
||||
String paymentAttachment;
|
||||
|
||||
List<Package> packages;
|
||||
List<Receipt> receipts;
|
||||
List<String> receiptPhotos;
|
||||
|
||||
Invoice(
|
||||
{this.invoiceNumber,
|
||||
this.invoiceDate,
|
||||
this.customerName,
|
||||
this.customerPhoneNumber,
|
||||
this.amount,
|
||||
this.discount,
|
||||
this.status,
|
||||
this.paymentAttachment,
|
||||
this.packages,
|
||||
this.receiptPhotos,
|
||||
this.receipts});
|
||||
|
||||
double get getAmount => packages.fold(0, (p, e) => (e.rate * e.weight) + p);
|
||||
}
|
||||
Reference in New Issue
Block a user