diff --git a/src/components/customers/CustomerInvoicesList.tsx b/src/components/customers/CustomerInvoicesList.tsx index 7958aa9dd..3128152c3 100644 --- a/src/components/customers/CustomerInvoicesList.tsx +++ b/src/components/customers/CustomerInvoicesList.tsx @@ -203,20 +203,18 @@ export const CustomerInvoicesList: FC = ({ key: 'status', minWidth: 80, title: translate('text_63ac86d797f728a87b2f9fa7'), - content: ({ status, errorDetails }) => { - const hasTaxErrors = - !!errorDetails?.length && - [InvoiceStatusTypeEnum.Draft, InvoiceStatusTypeEnum.Voided].includes(status) + content: ({ status, errorDetails, paymentDisputeLostAt }) => { + const showWarningIcon = !!errorDetails?.length || !!paymentDisputeLostAt return ( ) diff --git a/src/components/invoices/InvoicesList.tsx b/src/components/invoices/InvoicesList.tsx index 708a4708c..aa2978c41 100644 --- a/src/components/invoices/InvoicesList.tsx +++ b/src/components/invoices/InvoicesList.tsx @@ -272,20 +272,18 @@ const InvoicesList = ({ key: 'status', title: translate('text_63ac86d797f728a87b2f9fa7'), minWidth: 80, - content: ({ status, errorDetails }) => { - const hasTaxErrors = - !!errorDetails?.length && - [InvoiceStatusTypeEnum.Draft, InvoiceStatusTypeEnum.Voided].includes(status) + content: ({ status, errorDetails, paymentDisputeLostAt }) => { + const showWarningIcon = !!errorDetails?.length || paymentDisputeLostAt return ( ) diff --git a/src/generated/graphql.tsx b/src/generated/graphql.tsx index 4686faee5..647b78126 100644 --- a/src/generated/graphql.tsx +++ b/src/generated/graphql.tsx @@ -2554,6 +2554,7 @@ export type Invoice = { paymentOverdue: Scalars['Boolean']['output']; paymentStatus: InvoicePaymentStatusTypeEnum; prepaidCreditAmountCents: Scalars['BigInt']['output']; + progressiveBillingCreditAmountCents: Scalars['BigInt']['output']; refundableAmountCents: Scalars['BigInt']['output']; sequentialId: Scalars['ID']['output']; status: InvoiceStatusTypeEnum; @@ -2573,6 +2574,7 @@ export type InvoiceAppliedTax = AppliedTax & { __typename?: 'InvoiceAppliedTax'; amountCents: Scalars['BigInt']['output']; amountCurrency: CurrencyEnum; + appliedOnWholeInvoice: Scalars['Boolean']['output']; createdAt: Scalars['ISO8601DateTime']['output']; feesAmountCents: Scalars['BigInt']['output']; id: Scalars['ID']['output']; diff --git a/src/layouts/CustomerInvoiceDetails.tsx b/src/layouts/CustomerInvoiceDetails.tsx index e14b54182..48aaa4e15 100644 --- a/src/layouts/CustomerInvoiceDetails.tsx +++ b/src/layouts/CustomerInvoiceDetails.tsx @@ -720,11 +720,7 @@ const CustomerInvoiceDetails = () => { ? paymentStatusMapping({ status, paymentStatus }) : invoiceStatusMapping({ status }))} endIcon={ - !!data?.invoice?.paymentDisputeLostAt || - (!!data?.invoice?.errorDetails?.length && - [InvoiceStatusTypeEnum.Draft, InvoiceStatusTypeEnum.Voided].includes( - status, - )) + !!data?.invoice?.paymentDisputeLostAt || !!data?.invoice?.errorDetails?.length ? 'warning-unfilled' : undefined }