Remove duplicate entity list tile from invoices
This commit is contained in:
parent
6ea18ebcfc
commit
41c86bdfc8
|
|
@ -268,11 +268,6 @@ class InvoiceOverview extends StatelessWidget {
|
||||||
widgets.add(EntityListTile(entity: project, isFilter: isFilter));
|
widgets.add(EntityListTile(entity: project, isFilter: isFilter));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((invoice.invoiceId ?? '').isNotEmpty) {
|
|
||||||
final linkedInvoice = state.invoiceState.get(invoice.invoiceId!);
|
|
||||||
widgets.add(EntityListTile(entity: linkedInvoice, isFilter: isFilter));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (invoice.expenseId.isNotEmpty) {
|
if (invoice.expenseId.isNotEmpty) {
|
||||||
final expense = state.vendorState.get(invoice.expenseId);
|
final expense = state.vendorState.get(invoice.expenseId);
|
||||||
widgets.add(EntityListTile(entity: expense, isFilter: isFilter));
|
widgets.add(EntityListTile(entity: expense, isFilter: isFilter));
|
||||||
|
|
@ -303,7 +298,6 @@ class InvoiceOverview extends StatelessWidget {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (invoice.isQuote || invoice.isCredit) {
|
|
||||||
final relatedInvoice = state.invoiceState.map[invoice.invoiceId] ??
|
final relatedInvoice = state.invoiceState.map[invoice.invoiceId] ??
|
||||||
InvoiceEntity(id: invoice.invoiceId);
|
InvoiceEntity(id: invoice.invoiceId);
|
||||||
if ((invoice.invoiceId ?? '').isNotEmpty) {
|
if ((invoice.invoiceId ?? '').isNotEmpty) {
|
||||||
|
|
@ -312,7 +306,8 @@ class InvoiceOverview extends StatelessWidget {
|
||||||
entity: relatedInvoice,
|
entity: relatedInvoice,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
if (invoice.isInvoice) {
|
||||||
final relatedQuote =
|
final relatedQuote =
|
||||||
memoizedInvoiceQuoteSelector(invoice, state.quoteState.map);
|
memoizedInvoiceQuoteSelector(invoice, state.quoteState.map);
|
||||||
if (relatedQuote != null) {
|
if (relatedQuote != null) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue