BIG FAT
This commit is contained in:
@ -60,6 +60,23 @@ class Tour {
|
||||
.length;
|
||||
}
|
||||
|
||||
/// Returns true if the car still has loaded articles assigned to a delivery
|
||||
/// that has not been finished yet. Scannable articles count when their
|
||||
/// effective scanned amount (scanned minus removed) is positive; non-scannable
|
||||
/// articles count when their target amount is greater than zero.
|
||||
bool hasUndeliveredLoadedArticles(int carId) {
|
||||
return deliveries.any((delivery) {
|
||||
if (delivery.carId != carId) return false;
|
||||
if (delivery.state == DeliveryState.finished) return false;
|
||||
return delivery.articles.any((article) {
|
||||
if (article.scannable) {
|
||||
return article.scannedAmount > article.scannedRemovedAmount;
|
||||
}
|
||||
return article.amount > 0;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Tour copyWith({
|
||||
DateTime? date,
|
||||
String? discountArticleNumber,
|
||||
|
||||
Reference in New Issue
Block a user