Transactions

This commit is contained in:
Hillel Coren 2022-09-20 22:03:32 +03:00
parent 7834bba793
commit 6dd37a02f4
2 changed files with 4 additions and 2 deletions

View File

@ -51,6 +51,7 @@ class CreditStatusColors {
kCreditStatusSent: _colorTheme.colorInfo,
kCreditStatusPartial: _colorTheme.colorPrimary,
kCreditStatusApplied: _colorTheme.colorSuccess,
kCreditStatusViewed: _colorTheme.colorWarning,
};
}
}
@ -67,6 +68,7 @@ class PurchaseOrderStatusColors {
kPurchaseOrderStatusAccepted: _colorTheme.colorPrimary,
kPurchaseOrderStatusReceived: _colorTheme.colorSuccess,
kPurchaseOrderStatusCancelled: _colorTheme.colorDanger,
kPurchaseOrderStatusViewed: _colorTheme.colorWarning,
};
}
}

View File

@ -74,13 +74,13 @@ class EntityStatusChip extends StatelessWidget {
final credit = entity as InvoiceEntity;
label = kCreditStatuses[credit.calculatedStatusId];
color = CreditStatusColors(state.prefState.colorThemeModel)
.colors[credit.statusId];
.colors[credit.calculatedStatusId];
break;
case EntityType.purchaseOrder:
final purchaseOrder = entity as InvoiceEntity;
label = kPurchaseOrderStatuses[purchaseOrder.calculatedStatusId];
color = PurchaseOrderStatusColors(state.prefState.colorThemeModel)
.colors[purchaseOrder.statusId];
.colors[purchaseOrder.calculatedStatusId];
break;
case EntityType.transaction:
final transaction = entity as TransactionEntity;