diff --git a/src/components/PaymentProviderChip.tsx b/src/components/PaymentProviderChip.tsx index 86865c60d..457b5fe52 100644 --- a/src/components/PaymentProviderChip.tsx +++ b/src/components/PaymentProviderChip.tsx @@ -1,5 +1,6 @@ import { FC } from 'react' +import { Avatar, Icon, Typography } from '~/components/designSystem' import { ProviderTypeEnum } from '~/generated/graphql' import { useInternationalization } from '~/hooks/core/useInternationalization' import Adyen from '~/public/images/adyen.svg' @@ -8,10 +9,8 @@ import Gocardless from '~/public/images/gocardless.svg' import Stripe from '~/public/images/stripe.svg' import { tw } from '~/styles/utils' -import { Avatar, Typography } from './designSystem' - interface PaymentProviderChipProps { - paymentProvider: ProviderTypeEnum + paymentProvider?: ProviderTypeEnum | 'manual' | 'manual_long' className?: string } @@ -40,13 +39,25 @@ export const PaymentProviderChip: FC = ({ }) => { const { translate } = useInternationalization() + if (paymentProvider === undefined) { + return null + } + + const isManual = paymentProvider === 'manual' || paymentProvider === 'manual_long' + const manualLabel = + paymentProvider === 'manual' ? 'text_1737110192586abtitcui0xt' : 'text_173799550683709p2rqkoqd5' + return (
- {providers[paymentProvider].icon} + {paymentProvider === 'manual' || paymentProvider === 'manual_long' ? ( + + ) : ( + providers[paymentProvider].icon + )} - - {translate(providers[paymentProvider].label)} + + {isManual ? translate(manualLabel) : translate(providers[paymentProvider].label)}
) diff --git a/src/components/creditNote/CreditNoteFormCalculation.tsx b/src/components/creditNote/CreditNoteFormCalculation.tsx index b133f158d..48fe18c6e 100644 --- a/src/components/creditNote/CreditNoteFormCalculation.tsx +++ b/src/components/creditNote/CreditNoteFormCalculation.tsx @@ -1,5 +1,6 @@ import { gql } from '@apollo/client' import { InputAdornment } from '@mui/material' +import Decimal from 'decimal.js' import { FormikProps } from 'formik' import { debounce } from 'lodash' import _get from 'lodash/get' @@ -15,7 +16,6 @@ import { CreditNoteItemInput, CurrencyEnum, InvoiceForCreditNoteFormCalculationFragment, - InvoicePaymentStatusTypeEnum, LagoApiError, useCreditNoteEstimateLazyQuery, } from '~/generated/graphql' @@ -36,6 +36,7 @@ gql` currency versionNumber paymentDisputeLostAt + totalPaidAmountCents fees { id appliedTaxes { @@ -87,15 +88,18 @@ export const CreditNoteFormCalculation = ({ setPayBackValidation, }: CreditNoteFormCalculationProps) => { const { translate } = useInternationalization() - const canOnlyCredit = - invoice?.paymentStatus !== InvoicePaymentStatusTypeEnum.Succeeded || - !!invoice.paymentDisputeLostAt + + const hasNoPayment = Number(invoice?.totalPaidAmountCents) === 0 + const canOnlyCredit = hasNoPayment || !!invoice?.paymentDisputeLostAt + const currency = invoice?.currency || CurrencyEnum.Usd const currencyPrecision = getCurrencyPrecision(currency) const isLegacyInvoice = (invoice?.versionNumber || 0) < 3 - const [getEstimate, { data: estimationData, error: estimationError, loading: estiationLoading }] = - useCreditNoteEstimateLazyQuery() + const [ + getEstimate, + { data: estimationData, error: estimationError, loading: estimationLoading }, + ] = useCreditNoteEstimateLazyQuery() // eslint-disable-next-line react-hooks/exhaustive-deps const debouncedQuery = useCallback( @@ -123,7 +127,6 @@ export const CreditNoteFormCalculation = ({ }, [getEstimate, debouncedQuery, feeForEstimate, formikProps.values.fees, invoice?.id]) const { - hasCreditOrCoupon, maxCreditableAmountCents, maxRefundableAmountCents, proRatedCouponAmount, @@ -169,10 +172,6 @@ export const CreditNoteFormCalculation = ({ }, ]), ), - hasCreditOrCoupon: isError - ? false - : (estimationData?.creditNoteEstimate?.maxCreditableAmountCents || 0) > - (estimationData?.creditNoteEstimate?.maxRefundableAmountCents || 0), } }, [currency, estimationData?.creditNoteEstimate, estimationError]) @@ -187,12 +186,58 @@ export const CreditNoteFormCalculation = ({ }, ]) } else if (payBack.length < 2) { - formikProps.setFieldValue( - 'payBack.0.value', - !totalTaxIncluded ? undefined : Number(totalTaxIncluded || 0)?.toFixed(currencyPrecision), - ) + if (payBack[0].type === CreditTypeEnum.credit) { + formikProps.setFieldValue( + 'payBack.0.value', + !totalTaxIncluded ? undefined : Number(totalTaxIncluded || 0)?.toFixed(currencyPrecision), + ) + } else if (payBack[0].type === CreditTypeEnum.refund) { + formikProps.setFieldValue( + 'payBack.0.value', + !maxRefundableAmountCents + ? undefined + : Number( + deserializeAmount(maxRefundableAmountCents || 0, currency).toFixed( + currencyPrecision, + ), + ), + ) + } } + const foundRefundPayback = payBack.find((item) => item.type === CreditTypeEnum.refund) + const foundCreditPayback = payBack.find((item) => item.type === CreditTypeEnum.credit) + + const deserializedLocalMaxRefundableAmount = deserializeAmount( + maxRefundableAmountCents, + currency, + ) + const deserializedLocalMaxCreditableAmount = deserializeAmount( + maxCreditableAmountCents, + currency, + ) + + const calculatedMaxRefundableAmount = new Decimal(deserializedLocalMaxRefundableAmount) + .minus(foundCreditPayback?.value || 0) + .abs() + .toNumber() + + const limitMaxRefundableAmount = + calculatedMaxRefundableAmount >= deserializedLocalMaxRefundableAmount + ? deserializedLocalMaxRefundableAmount + : calculatedMaxRefundableAmount + + const localMaxRefundableAmount = + payBack.length === 1 ? deserializedLocalMaxRefundableAmount : limitMaxRefundableAmount + + const localMaxCreditableAmount = + payBack.length === 1 + ? deserializedLocalMaxCreditableAmount + : new Decimal(deserializedLocalMaxCreditableAmount) + .minus(foundRefundPayback?.value || 0) + .abs() + .toNumber() + setPayBackValidation( array().of( object().shape({ @@ -200,25 +245,25 @@ export const CreditNoteFormCalculation = ({ value: number() .required('') .when('type', ([type]) => { + const limit = new Decimal(totalTaxIncluded) + .minus(foundRefundPayback?.value || 0) + .minus(foundCreditPayback?.value || 0) + + if (payBack.length === 2 && limit.isNegative()) { + return number().max(limit.toNumber(), LagoApiError.DoesNotMatchItemAmounts) + } + return type === CreditTypeEnum.refund - ? number().max( - deserializeAmount(maxRefundableAmountCents, currency) || 0, - PayBackErrorEnum.maxRefund, - ) - : number().max( - deserializeAmount(maxCreditableAmountCents, currency) || 0, - PayBackErrorEnum.maxRefund, - ) + ? number().max(localMaxRefundableAmount || 0, PayBackErrorEnum.refundMax) + : number().max(localMaxCreditableAmount || 0, PayBackErrorEnum.creditMax) }), }), ), ) - formikProps.setTouched({ - payBack: true, - }) + formikProps.setTouched({ payBack: true }) // eslint-disable-next-line react-hooks/exhaustive-deps - }, [totalTaxIncluded, canOnlyCredit]) + }, [totalTaxIncluded, canOnlyCredit, payBack, maxRefundableAmountCents, maxCreditableAmountCents]) if (!invoice) return null @@ -238,40 +283,31 @@ export const CreditNoteFormCalculation = ({ - {estiationLoading ? ( - - ) : !proRatedCouponAmount || hasError ? ( - '-' - ) : ( - `-${intlFormatNumber(proRatedCouponAmount || 0, { - currency, - })}` - )} + {estimationLoading && } + {!estimationLoading && (!proRatedCouponAmount || hasError) + ? '-' + : `-${intlFormatNumber(proRatedCouponAmount || 0, { currency })}`} )} {translate('text_636bedf292786b19d3398f02')} - {estiationLoading ? ( - - ) : !totalExcludedTax || hasError ? ( - '-' - ) : ( - intlFormatNumber(totalExcludedTax, { - currency, - }) - )} + {estimationLoading && } + {!estimationLoading && (!totalExcludedTax || hasError) + ? '-' + : intlFormatNumber(totalExcludedTax, { currency })} - {!totalExcludedTax ? ( + {!totalExcludedTax && ( {translate('text_636bedf292786b19d3398f06')} - {estiationLoading ? : '-'} + {estimationLoading ? : '-'} - ) : !!taxes?.size ? ( + )} + {totalExcludedTax && !!taxes?.size ? ( Array.from(taxes.values()) .sort((a, b) => b.taxRate - a.taxRate) .map((tax) => ( @@ -280,33 +316,19 @@ export const CreditNoteFormCalculation = ({ {tax.label} ({tax.taxRate}%) - {estiationLoading ? ( - - ) : !tax.amount || hasError ? ( - '-' - ) : ( - intlFormatNumber(tax.amount, { - currency, - }) - )} + {estimationLoading && } + {!estimationLoading && (!tax.amount || hasError) + ? '-' + : intlFormatNumber(tax.amount, { currency })} )) ) : ( - {`${translate( - 'text_636bedf292786b19d3398f06', - )} (0%)`} + {`${translate('text_636bedf292786b19d3398f06')} (0%)`} - {estiationLoading ? ( - - ) : hasError ? ( - '-' - ) : ( - intlFormatNumber(0, { - currency, - }) - )} + {estimationLoading && } + {!estimationLoading && hasError ? '-' : intlFormatNumber(0, { currency })} )} @@ -315,36 +337,28 @@ export const CreditNoteFormCalculation = ({ {translate('text_636bedf292786b19d3398f0a')} - {estiationLoading ? ( - - ) : !totalTaxIncluded || hasError ? ( - '-' - ) : ( - intlFormatNumber(totalTaxIncluded, { - currency, - }) - )} + {estimationLoading && } + {!estimationLoading && (!totalTaxIncluded || hasError) + ? '-' + : intlFormatNumber(totalTaxIncluded, { currency })} + {canOnlyCredit && ( {translate('text_636bedf292786b19d3398f0e')} - {estiationLoading ? ( - - ) : totalTaxIncluded === undefined || hasError ? ( - '-' - ) : ( - intlFormatNumber(totalTaxIncluded, { - currency, - }) - )} + {estimationLoading && } + {!estimationLoading && (totalTaxIncluded === undefined || hasError) + ? '-' + : intlFormatNumber(totalTaxIncluded, { currency })} )} + {!canOnlyCredit && ( 1}> @@ -352,26 +366,10 @@ export const CreditNoteFormCalculation = ({ name="payBack.0.type" value={payBack[0]?.type} onChange={(value) => { - if (value === CreditTypeEnum.refund && hasCreditOrCoupon) { - formikProps.setFieldValue('payBack', [ - { - type: value, - value: Number(invoice?.refundableAmountCents || 0) / 100, - }, - { - type: CreditTypeEnum.credit, - value: - Math.round( - (totalTaxIncluded || 0) * 100 - - Number(invoice?.refundableAmountCents || 0), - ) / 100, - }, - ]) - } else { - formikProps.setFieldValue('payBack.0.type', value) - } + formikProps.setFieldValue('payBack.0.type', value) }} placeholder={translate('text_637d0e628762bd8fc95f045d')} + disableClearable data={[ { value: CreditTypeEnum?.credit, @@ -381,33 +379,46 @@ export const CreditNoteFormCalculation = ({ { value: CreditTypeEnum?.refund, disabled: payBack[1]?.type === CreditTypeEnum.refund, - label: translate( - hasCreditOrCoupon - ? 'text_637d10c83077eff6e8c79cd0' - : 'text_637d0e6d94c87b04785fc6d2', - { - max: intlFormatNumber( - deserializeAmount(invoice?.refundableAmountCents || 0, currency), - { - currency, - }, - ), - }, - ), + label: translate('text_637d10c83077eff6e8c79cd0', { + max: intlFormatNumber( + deserializeAmount(invoice?.refundableAmountCents || 0, currency), + { + currency, + }, + ), + }), }, ]} /> {payBack.length > 1 ? ( <> - formikProps.setFieldValue('payBack', [ - { type: payBack[1].type, value: totalTaxIncluded }, - ]) - } + onClick={() => { + formikProps.setFieldValue('payBack', [payBack[1]]) + }} /> ) : ( - {estiationLoading ? ( - - ) : !payBack[0]?.value || hasError ? ( - '-' - ) : ( - intlFormatNumber(payBack[0]?.value || 0, { - currency, - }) - )} + {estimationLoading && } + {!estimationLoading && (!payBack[0]?.value || hasError) + ? '-' + : intlFormatNumber(payBack[0]?.value || 0, { currency })} )} - {payBack.length < 2 ? ( + {payBack.length < 2 && payBack?.[0].type && ( - ) : ( + )} + + {payBack.length === 2 && ( { - formikProps.setFieldValue('payBack', [ - { type: payBack[0].type, value: totalTaxIncluded }, - ]) + formikProps.setFieldValue('payBack', [payBack[0]]) }} /> @@ -552,7 +568,7 @@ export const CreditNoteFormCalculation = ({ )} - {_get(formikProps.errors, 'payBack.0.value') === LagoApiError.DoesNotMatchItemAmounts && ( + {_get(formikProps.errors, 'payBack.1.value') === LagoApiError.DoesNotMatchItemAmounts && ( {translate('text_637e334680481f653e8caa9d', { total: intlFormatNumber(totalTaxIncluded || 0, { diff --git a/src/components/creditNote/types.ts b/src/components/creditNote/types.ts index 3e88f591b..3e70f8ce8 100644 --- a/src/components/creditNote/types.ts +++ b/src/components/creditNote/types.ts @@ -54,4 +54,6 @@ export enum CreditNoteFeeErrorEnum { export enum PayBackErrorEnum { maxRefund = 'maxRefund', + creditMax = 'creditMax', + refundMax = 'refundMax', } diff --git a/src/components/customers/CustomerInvoicesList.tsx b/src/components/customers/CustomerInvoicesList.tsx index 0ae678552..cca8d2876 100644 --- a/src/components/customers/CustomerInvoicesList.tsx +++ b/src/components/customers/CustomerInvoicesList.tsx @@ -3,7 +3,15 @@ import { FC, useRef } from 'react' import { generatePath, useNavigate } from 'react-router-dom' import { createCreditNoteForInvoiceButtonProps } from '~/components/creditNote/utils' -import { Chip, InfiniteScroll, Status, Table, Tooltip, Typography } from '~/components/designSystem' +import { + IconName, + InfiniteScroll, + Status, + StatusType, + Table, + Tooltip, + Typography, +} from '~/components/designSystem' import { UpdateInvoicePaymentStatusDialog, UpdateInvoicePaymentStatusDialogRef, @@ -16,9 +24,10 @@ import { VoidInvoiceDialog, VoidInvoiceDialogRef } from '~/components/invoices/V import { PremiumWarningDialog, PremiumWarningDialogRef } from '~/components/PremiumWarningDialog' import { addToast, hasDefinedGQLError } from '~/core/apolloClient' import { CustomerInvoiceDetailsTabsOptionsEnum } from '~/core/constants/NavigationEnum' -import { invoiceStatusMapping, paymentStatusMapping } from '~/core/constants/statusInvoiceMapping' +import { paymentStatusMapping } from '~/core/constants/statusInvoiceMapping' import { intlFormatNumber } from '~/core/formats/intlFormatNumber' import { + CREATE_INVOICE_PAYMENT_ROUTE, CUSTOMER_INVOICE_CREATE_CREDIT_NOTE_ROUTE, CUSTOMER_INVOICE_DETAILS_ROUTE, } from '~/core/router' @@ -53,6 +62,8 @@ gql` number issuingDate totalAmountCents + totalDueAmountCents + totalPaidAmountCents currency voidable paymentDisputeLostAt @@ -133,6 +144,7 @@ export const CustomerInvoicesList: FC = ({ const { isPremium } = useCurrentUser() const { translate } = useInternationalization() const { hasPermissions } = usePermissions() + const premiumWarningDialogRef = useRef(null) const [retryCollect] = useRetryInvoicePaymentMutation({ @@ -195,29 +207,66 @@ export const CustomerInvoicesList: FC = ({ }, }} columns={[ - { - key: 'status', - minWidth: 80, - title: translate('text_63ac86d797f728a87b2f9fa7'), - content: ({ status, errorDetails, taxProviderVoidable }) => { - const showWarningIcon = - (!!errorDetails?.length && status !== InvoiceStatusTypeEnum.Failed) || - taxProviderVoidable + context === 'finalized' + ? { + key: 'paymentStatus', + minWidth: 120, + title: translate('text_63b5d225b075850e0fe489f4'), + content: ({ + status, + paymentOverdue, + paymentStatus, + paymentDisputeLostAt, + totalAmountCents, + totalPaidAmountCents, + }) => { + if (status !== InvoiceStatusTypeEnum.Finalized) { + return null + } - return ( - - - - ) - }, - }, + let content: { tooltipTitle?: string; statusEndIcon?: IconName } = { + tooltipTitle: undefined, + statusEndIcon: undefined, + } + + const isOverdue = + paymentOverdue && paymentStatus === InvoicePaymentStatusTypeEnum.Pending + const isPartiallyPaid = + totalPaidAmountCents > 0 && totalAmountCents - totalPaidAmountCents > 0 + + if (isPartiallyPaid) { + content = { + tooltipTitle: translate('text_1738071221799vib0l2z1bxe'), + statusEndIcon: 'partially-filled', + } + } else if (!!paymentDisputeLostAt) { + content = { + tooltipTitle: translate('text_172416478461328edo4vwz05'), + statusEndIcon: 'warning-unfilled', + } + } + + return ( + + + + ) + }, + } + : null, { key: 'number', minWidth: 160, @@ -247,47 +296,6 @@ export const CustomerInvoicesList: FC = ({ ) }, }, - context === 'finalized' - ? { - key: 'paymentStatus', - minWidth: 120, - title: translate('text_63b5d225b075850e0fe489f4'), - content: ({ status, paymentStatus, paymentDisputeLostAt }) => { - if (status !== InvoiceStatusTypeEnum.Finalized) { - return null - } - - return ( - - - - ) - }, - } - : null, - context === 'finalized' - ? { - key: 'paymentOverdue', - title: translate('text_666c5b12fea4aa1e1b26bf55'), - content: ({ paymentOverdue }) => - paymentOverdue && ( - - ), - } - : null, { key: 'issuingDate', minWidth: 104, @@ -313,7 +321,15 @@ export const CustomerInvoicesList: FC = ({ }, ]} actionColumn={(invoice) => { - const { status, paymentStatus, voidable, taxStatus } = invoice + const { + status, + paymentStatus, + voidable, + taxStatus, + totalPaidAmountCents, + totalDueAmountCents, + totalAmountCents, + } = invoice const { disabledIssueCreditNoteButton, disabledIssueCreditNoteButtonLabel } = createCreditNoteForInvoiceButtonProps({ @@ -359,6 +375,10 @@ export const CustomerInvoicesList: FC = ({ const canIssueCreditNote = ![InvoiceStatusTypeEnum.Draft, InvoiceStatusTypeEnum.Voided].includes(status) && hasPermissions(['creditNotesCreate']) + const canRecordPayment = + Number(totalDueAmountCents) > 0 && + hasPermissions(['paymentsCreate']) && + Number(totalPaidAmountCents) < Number(totalAmountCents) return [ canDownload @@ -390,6 +410,22 @@ export const CustomerInvoicesList: FC = ({ }, }, + canRecordPayment + ? { + startIcon: 'receipt', + title: translate('text_1737471851634wpeojigr27w'), + + endIcon: isPremium ? undefined : 'sparkles', + onAction: ({ id }) => { + if (isPremium) { + navigate(generatePath(CREATE_INVOICE_PAYMENT_ROUTE, { invoiceId: id })) + } else { + premiumWarningDialogRef.current?.openDialog() + } + }, + } + : null, + canRetryCollect ? { startIcon: 'push', diff --git a/src/components/customers/CustomerPaymentsList.tsx b/src/components/customers/CustomerPaymentsList.tsx new file mode 100644 index 000000000..78b42cfa0 --- /dev/null +++ b/src/components/customers/CustomerPaymentsList.tsx @@ -0,0 +1,142 @@ +import { FC } from 'react' +import { generatePath } from 'react-router-dom' + +import { InfiniteScroll, Status, Table, Typography } from '~/components/designSystem' +import { PaymentProviderChip } from '~/components/PaymentProviderChip' +import { addToast } from '~/core/apolloClient' +import { payablePaymentStatusMapping } from '~/core/constants/statusInvoiceMapping' +import { intlFormatNumber } from '~/core/formats/intlFormatNumber' +import { CUSTOMER_PAYMENT_DETAILS_ROUTE } from '~/core/router' +import { deserializeAmount } from '~/core/serializers/serializeAmount' +import { formatDateToTZ } from '~/core/timezone' +import { copyToClipboard } from '~/core/utils/copyToClipboard' +import { + CurrencyEnum, + GetPaymentListQuery, + GetPaymentListQueryHookResult, + PaymentForPaymentsListFragment, + PaymentTypeEnum, +} from '~/generated/graphql' +import { useInternationalization } from '~/hooks/core/useInternationalization' + +interface CustomerPaymentsListProps { + payments: PaymentForPaymentsListFragment[] + loading: boolean + metadata?: GetPaymentListQuery['payments']['metadata'] + fetchMore?: GetPaymentListQueryHookResult['fetchMore'] +} + +export const CustomerPaymentsList: FC = ({ + payments, + loading, + metadata, + fetchMore, +}) => { + const { translate } = useInternationalization() + + return ( + { + const { currentPage = 0, totalPages = 0 } = metadata || {} + + currentPage < totalPages && + !loading && + fetchMore?.({ + variables: { page: currentPage + 1 }, + }) + }} + > + { + return [ + { + startIcon: 'duplicate', + title: translate('text_1737029625089rtcf3ah5khq'), + onAction: ({ id }) => { + copyToClipboard(id) + addToast({ + severity: 'info', + translateKey: translate('text_17370296250897n2pakp5v33'), + }) + }, + }, + ] + }} + actionColumnTooltip={() => translate('text_637f813d31381b1ed90ab326')} + onRowActionLink={(request) => + generatePath(CUSTOMER_PAYMENT_DETAILS_ROUTE, { + paymentId: request.id, + customerId: request.customer.id, + }) + } + columns={[ + { + key: 'payablePaymentStatus', + title: translate('text_63ac86d797f728a87b2f9fa7'), + minWidth: 80, + content: ({ payablePaymentStatus }) => ( + + ), + }, + { + key: 'payable.__typename', + title: translate('text_63ac86d797f728a87b2f9fad'), + minWidth: 160, + maxSpace: true, + content: ({ payable }) => { + if (payable.__typename === 'Invoice') { + return payable.number + } + if (payable.__typename === 'PaymentRequest') { + return translate('text_17370296250898eqj4qe4qg9', { + count: payable.invoices.length, + }) + } + }, + }, + { + key: 'amountCents', + title: translate('text_6419c64eace749372fc72b3e'), + textAlign: 'right', + content: ({ amountCents, amountCurrency }) => ( + + {intlFormatNumber( + deserializeAmount(amountCents, amountCurrency || CurrencyEnum.Usd), + { + currency: amountCurrency || CurrencyEnum.Usd, + }, + )} + + ), + }, + { + key: 'paymentType', + title: translate('text_1737043182491927uocp2ydo'), + content: ({ paymentType, paymentProviderType }) => ( + + ), + }, + { + key: 'createdAt', + title: translate('text_664cb90097bfa800e6efa3f5'), + content: ({ createdAt, customer }) => + formatDateToTZ(createdAt, customer.applicableTimezone), + }, + ]} + /> + + ) +} diff --git a/src/components/customers/CustomerPaymentsTab.tsx b/src/components/customers/CustomerPaymentsTab.tsx new file mode 100644 index 000000000..fc2ad9077 --- /dev/null +++ b/src/components/customers/CustomerPaymentsTab.tsx @@ -0,0 +1,73 @@ +import { FC } from 'react' +import { generatePath } from 'react-router-dom' + +import { CustomerPaymentsList } from '~/components/customers/CustomerPaymentsList' +import { ButtonLink, Skeleton, Typography } from '~/components/designSystem' +import { CREATE_PAYMENT_ROUTE } from '~/core/router' +import { useGetPaymentListQuery } from '~/generated/graphql' +import { useInternationalization } from '~/hooks/core/useInternationalization' +import { useCurrentUser } from '~/hooks/useCurrentUser' +import { usePermissions } from '~/hooks/usePermissions' + +interface CustomerPaymentsTabProps { + externalCustomerId: string +} + +export const CustomerPaymentsTab: FC = ({ externalCustomerId }) => { + const { translate } = useInternationalization() + const { hasPermissions } = usePermissions() + const { isPremium } = useCurrentUser() + + const { data, loading, fetchMore } = useGetPaymentListQuery({ + variables: { externalCustomerId: externalCustomerId as string, limit: 20 }, + skip: !externalCustomerId, + }) + + const payments = data?.payments.collection || [] + + const urlSearchParams = new URLSearchParams({ externalId: externalCustomerId }) + + const canRecordPayment = hasPermissions(['paymentsCreate']) && isPremium + + return ( +
+
+ {loading ? ( + + ) : ( +
+ + {translate('text_6672ebb8b1b50be550eccbed')} + + {canRecordPayment && ( + + {translate('text_1737471851634wpeojigr27w')} + + )} +
+ )} +
+ + {!loading && !payments.length && ( + + {translate('text_17380560401786gmefzvw1rl')} + + )} + + {payments.length > 0 && ( + + )} +
+ ) +} diff --git a/src/components/designSystem/Filters/FiltersPanelItemTypeSwitch.tsx b/src/components/designSystem/Filters/FiltersPanelItemTypeSwitch.tsx index 1751261cd..44b8da05b 100644 --- a/src/components/designSystem/Filters/FiltersPanelItemTypeSwitch.tsx +++ b/src/components/designSystem/Filters/FiltersPanelItemTypeSwitch.tsx @@ -11,6 +11,7 @@ import { FiltersItemCurrency } from './filtersElements/FiltersItemCurrency' import { FiltersItemCustomer } from './filtersElements/FiltersItemCustomer' import { FiltersItemInvoiceType } from './filtersElements/FiltersItemInvoiceType' import { FiltersItemIssuingDate } from './filtersElements/FiltersItemIssuingDate' +import { FiltersItemPartiallyPaid } from './filtersElements/FiltersItemPartiallyPaid' import { FiltersItemPaymentDisputeLost } from './filtersElements/FiltersItemPaymentDisputeLost' import { FiltersItemPaymentOverdue } from './filtersElements/FiltersItemPaymentOverdue' import { FiltersItemPaymentStatus } from './filtersElements/FiltersItemPaymentStatus' @@ -47,6 +48,9 @@ export const FiltersPanelItemTypeSwitch = ({ [AvailableFiltersEnum.issuingDate]: ( ), + [AvailableFiltersEnum.partiallyPaid]: ( + + ), [AvailableFiltersEnum.paymentDisputeLost]: ( ), diff --git a/src/components/designSystem/Filters/filtersElements/FiltersItemPartiallyPaid.tsx b/src/components/designSystem/Filters/filtersElements/FiltersItemPartiallyPaid.tsx new file mode 100644 index 000000000..4816bdad7 --- /dev/null +++ b/src/components/designSystem/Filters/filtersElements/FiltersItemPartiallyPaid.tsx @@ -0,0 +1,35 @@ +import { ComboBox } from '~/components/form' +import { useInternationalization } from '~/hooks/core/useInternationalization' + +import { FiltersFormValues } from '../types' + +type FiltersItemPartiallyPaidProps = { + value: FiltersFormValues['filters'][0]['value'] + setFilterValue: (value: string) => void +} + +export const FiltersItemPartiallyPaid = ({ + value, + setFilterValue, +}: FiltersItemPartiallyPaidProps) => { + const { translate } = useInternationalization() + + return ( + setFilterValue(partiallyPaid)} + value={value} + /> + ) +} diff --git a/src/components/designSystem/Filters/types.ts b/src/components/designSystem/Filters/types.ts index de47a0a58..042601604 100644 --- a/src/components/designSystem/Filters/types.ts +++ b/src/components/designSystem/Filters/types.ts @@ -22,6 +22,7 @@ export enum AvailableFiltersEnum { paymentDisputeLost = 'paymentDisputeLost', paymentOverdue = 'paymentOverdue', paymentStatus = 'paymentStatus', + partiallyPaid = 'partiallyPaid', status = 'status', invoiceNumber = 'invoiceNumber', amount = 'amount', @@ -49,6 +50,7 @@ export const InvoiceAvailableFilters = [ AvailableFiltersEnum.customerExternalId, AvailableFiltersEnum.invoiceType, AvailableFiltersEnum.issuingDate, + AvailableFiltersEnum.partiallyPaid, AvailableFiltersEnum.paymentDisputeLost, AvailableFiltersEnum.paymentOverdue, AvailableFiltersEnum.paymentStatus, @@ -66,6 +68,7 @@ const translationMap: Record = { [AvailableFiltersEnum.currency]: 'text_632b4acf0c41206cbcb8c324', [AvailableFiltersEnum.issuingDate]: 'text_6419c64eace749372fc72b39', [AvailableFiltersEnum.customerExternalId]: 'text_65201c5a175a4b0238abf29a', + [AvailableFiltersEnum.partiallyPaid]: 'text_1738071221799vib0l2z1bxe', [AvailableFiltersEnum.paymentDisputeLost]: 'text_66141e30699a0631f0b2ed32', [AvailableFiltersEnum.paymentOverdue]: 'text_666c5b12fea4aa1e1b26bf55', [AvailableFiltersEnum.invoiceNumber]: 'text_1734698875218fbxzci2g2s2', diff --git a/src/components/designSystem/Filters/utils.ts b/src/components/designSystem/Filters/utils.ts index 187068c9d..16575987e 100644 --- a/src/components/designSystem/Filters/utils.ts +++ b/src/components/designSystem/Filters/utils.ts @@ -45,8 +45,11 @@ export const parseAmountValue = (value: string) => { } } -export const FILTER_VALUE_MAP: Partial> = { +export const FILTER_VALUE_MAP: Record = { [AvailableFiltersEnum.amount]: parseAmountValue, + [AvailableFiltersEnum.currency]: (value: string) => value, + [AvailableFiltersEnum.invoiceNumber]: (value: string) => value, + [AvailableFiltersEnum.customerAccountType]: (value: string) => value, [AvailableFiltersEnum.issuingDate]: (value: string) => { return { issuingDateFrom: (value as string).split(',')[0], @@ -55,6 +58,7 @@ export const FILTER_VALUE_MAP: Partial> = }, [AvailableFiltersEnum.customerExternalId]: (value: string) => (value as string).split(filterDataInlineSeparator)[0], + [AvailableFiltersEnum.partiallyPaid]: (value: string) => value === 'true', [AvailableFiltersEnum.paymentDisputeLost]: (value: string) => value === 'true', [AvailableFiltersEnum.paymentOverdue]: (value: string) => value === 'true', [AvailableFiltersEnum.paymentStatus]: (value: string) => (value as string).split(','), diff --git a/src/components/emails/DunningEmail.tsx b/src/components/emails/DunningEmail.tsx index 33e35e94d..7d083e540 100644 --- a/src/components/emails/DunningEmail.tsx +++ b/src/components/emails/DunningEmail.tsx @@ -38,7 +38,7 @@ gql` fragment InvoicesForDunningEmail on Invoice { id number - totalAmountCents + totalDueAmountCents currency } ` @@ -159,17 +159,17 @@ export const DunningEmail: FC = ({ ), }, { - key: 'totalAmountCents', + key: 'totalDueAmountCents', textAlign: 'right', title: ( - {translate('text_6419c64eace749372fc72b3e')} + {translate('text_17374735502775afvcm9pqxk')} ), content: (row) => ( {intlFormatNumber( - deserializeAmount(row.totalAmountCents, row.currency || currency), + deserializeAmount(row.totalDueAmountCents, row.currency || currency), { currency: row.currency || currency, locale: locale, diff --git a/src/pages/InvoiceCreditNoteList.tsx b/src/components/invoices/InvoiceCreditNoteList.tsx similarity index 98% rename from src/pages/InvoiceCreditNoteList.tsx rename to src/components/invoices/InvoiceCreditNoteList.tsx index 1aaf3c069..d81527285 100644 --- a/src/pages/InvoiceCreditNoteList.tsx +++ b/src/components/invoices/InvoiceCreditNoteList.tsx @@ -49,7 +49,7 @@ gql` ${CreditNotesForTableFragmentDoc} ` -const InvoiceCreditNoteList = () => { +export const InvoiceCreditNoteList = () => { const { invoiceId, customerId } = useParams() const { translate } = useInternationalization() const { isPremium } = useCurrentUser() @@ -149,8 +149,6 @@ const InvoiceCreditNoteList = () => { ) } -export default InvoiceCreditNoteList - InvoiceCreditNoteList.displayName = 'InvoiceCreditNoteList' const Header = styled.div` diff --git a/src/components/invoices/InvoiceCustomerInfos.tsx b/src/components/invoices/InvoiceCustomerInfos.tsx index 8f2553b60..58a9c8b8e 100644 --- a/src/components/invoices/InvoiceCustomerInfos.tsx +++ b/src/components/invoices/InvoiceCustomerInfos.tsx @@ -26,6 +26,8 @@ gql` paymentDueDate paymentOverdue status + totalPaidAmountCents + totalAmountCents paymentStatus paymentDisputeLostAt taxProviderVoidable @@ -231,6 +233,8 @@ export const InvoiceCustomerInfos = memo(({ invoice }: InvoiceCustomerInfosProps {...paymentStatusMapping({ status: invoice.status, paymentStatus: invoice.paymentStatus, + totalPaidAmountCents: invoice.totalPaidAmountCents, + totalAmountCents: invoice.totalAmountCents, })} /> ) : ( diff --git a/src/components/invoices/InvoicePaymentList.tsx b/src/components/invoices/InvoicePaymentList.tsx new file mode 100644 index 000000000..d6b6595c8 --- /dev/null +++ b/src/components/invoices/InvoicePaymentList.tsx @@ -0,0 +1,152 @@ +import { FC } from 'react' +import { generatePath, useParams } from 'react-router-dom' + +import { ButtonLink, InfiniteScroll, Status, Table } from '~/components/designSystem' +import { Typography } from '~/components/designSystem/Typography' +import { PaymentProviderChip } from '~/components/PaymentProviderChip' +import { payablePaymentStatusMapping } from '~/core/constants/statusInvoiceMapping' +import { intlFormatNumber } from '~/core/formats/intlFormatNumber' +import { CREATE_INVOICE_PAYMENT_ROUTE, PAYMENT_DETAILS_ROUTE } from '~/core/router' +import { deserializeAmount } from '~/core/serializers/serializeAmount' +import { formatDateToTZ } from '~/core/timezone' +import { + AllInvoiceDetailsForCustomerInvoiceDetailsFragment, + CurrencyEnum, + PaymentTypeEnum, + useGetPaymentListQuery, +} from '~/generated/graphql' +import { useInternationalization } from '~/hooks/core/useInternationalization' +import { useCurrentUser } from '~/hooks/useCurrentUser' +import { usePermissions } from '~/hooks/usePermissions' + +export const InvoicePaymentList: FC<{ + invoiceTotalDueAmount: AllInvoiceDetailsForCustomerInvoiceDetailsFragment['totalDueAmountCents'] +}> = ({ invoiceTotalDueAmount }) => { + const { translate } = useInternationalization() + const { hasPermissions } = usePermissions() + const { isPremium } = useCurrentUser() + const { invoiceId } = useParams() + + const { data, loading, error, fetchMore } = useGetPaymentListQuery({ + variables: { invoiceId: invoiceId as string, limit: 20 }, + skip: !invoiceId, + }) + + const payments = data?.payments.collection || [] + + const canRecordPayment = + invoiceTotalDueAmount > 0 && hasPermissions(['paymentsCreate']) && isPremium + + return ( + <> +
+ {translate('text_6672ebb8b1b50be550eccbed')} + {canRecordPayment && ( + + {translate('text_1737471851634wpeojigr27w')} + + )} +
+ {!loading && !payments.length && ( + + {translate('text_17380560401785kuvb6m2yfm')} + + )} + {!loading && payments.length > 0 && ( + { + const { currentPage = 0, totalPages = 0 } = data?.payments.metadata || {} + + currentPage < totalPages && + !loading && + fetchMore?.({ variables: { page: currentPage + 1 } }) + }} + > +
+ generatePath(PAYMENT_DETAILS_ROUTE, { + paymentId: request.id, + }) + } + columns={[ + { + key: 'payablePaymentStatus', + title: translate('text_63ac86d797f728a87b2f9fa7'), + minWidth: 80, + content: ({ payablePaymentStatus }) => ( + + ), + }, + { + key: 'payable.__typename', + title: translate('text_63ac86d797f728a87b2f9fad'), + minWidth: 160, + maxSpace: true, + content: ({ payable }) => { + if (payable.__typename === 'Invoice') { + return payable.number + } + if (payable.__typename === 'PaymentRequest') { + return translate('text_17370296250898eqj4qe4qg9', { + count: payable.invoices.length, + }) + } + }, + }, + { + key: 'amountCents', + title: translate('text_6419c64eace749372fc72b3e'), + textAlign: 'right', + content: ({ amountCents, amountCurrency }) => ( + + {intlFormatNumber( + deserializeAmount(amountCents, amountCurrency || CurrencyEnum.Usd), + { + currency: amountCurrency || CurrencyEnum.Usd, + }, + )} + + ), + }, + { + key: 'paymentType', + title: translate('text_1737043182491927uocp2ydo'), + content: ({ paymentType, paymentProviderType }) => ( + + ), + }, + { + key: 'createdAt', + title: translate('text_664cb90097bfa800e6efa3f5'), + content: ({ createdAt, customer }) => + formatDateToTZ(createdAt, customer.applicableTimezone), + }, + ]} + /> + + )} + + ) +} diff --git a/src/components/invoices/InvoicesList.tsx b/src/components/invoices/InvoicesList.tsx index dc9e2f03c..54b8439bd 100644 --- a/src/components/invoices/InvoicesList.tsx +++ b/src/components/invoices/InvoicesList.tsx @@ -3,7 +3,15 @@ import { useEffect, useRef } from 'react' import { generatePath, useNavigate, useSearchParams } from 'react-router-dom' import { createCreditNoteForInvoiceButtonProps } from '~/components/creditNote/utils' -import { Chip, InfiniteScroll, Status, Table, Tooltip, Typography } from '~/components/designSystem' +import { + IconName, + InfiniteScroll, + Status, + StatusType, + Table, + Tooltip, + Typography, +} from '~/components/designSystem' import { AvailableFiltersEnum, AvailableQuickFilters, @@ -30,6 +38,7 @@ import { CustomerInvoiceDetailsTabsOptionsEnum } from '~/core/constants/Navigati import { invoiceStatusMapping, paymentStatusMapping } from '~/core/constants/statusInvoiceMapping' import { intlFormatNumber } from '~/core/formats/intlFormatNumber' import { + CREATE_INVOICE_PAYMENT_ROUTE, CUSTOMER_INVOICE_CREATE_CREDIT_NOTE_ROUTE, CUSTOMER_INVOICE_DETAILS_ROUTE, INVOICE_SETTINGS_ROUTE, @@ -156,7 +165,14 @@ const InvoicesList = ({ isLoading={isLoading} hasError={!!error} actionColumn={(invoice) => { - const { status, paymentStatus, voidable } = invoice + const { + status, + paymentStatus, + voidable, + totalDueAmountCents, + totalPaidAmountCents, + totalAmountCents, + } = invoice const { disabledIssueCreditNoteButton, disabledIssueCreditNoteButtonLabel } = createCreditNoteForInvoiceButtonProps({ @@ -200,6 +216,10 @@ const InvoicesList = ({ const canIssueCreditNote = ![InvoiceStatusTypeEnum.Draft, InvoiceStatusTypeEnum.Voided].includes(status) && hasPermissions(['creditNotesCreate']) + const canRecordPayment = + Number(totalDueAmountCents) > 0 && + hasPermissions(['paymentsCreate']) && + Number(totalPaidAmountCents) < Number(totalAmountCents) return [ canDownload @@ -231,6 +251,22 @@ const InvoicesList = ({ }, }, + canRecordPayment + ? { + startIcon: 'receipt', + title: translate('text_1737471851634wpeojigr27w'), + + endIcon: isPremium ? undefined : 'sparkles', + onAction: ({ id }) => { + if (isPremium) { + navigate(generatePath(CREATE_INVOICE_PAYMENT_ROUTE, { invoiceId: id })) + } else { + premiumWarningDialogRef.current?.openDialog() + } + }, + } + : null, + canRetryCollect ? { startIcon: 'push', @@ -364,39 +400,60 @@ const InvoicesList = ({ key: 'paymentStatus', title: translate('text_6419c64eace749372fc72b40'), minWidth: 80, - content: ({ status, paymentStatus, paymentDisputeLostAt }) => { + content: ({ + status, + paymentStatus, + paymentDisputeLostAt, + paymentOverdue, + totalAmountCents, + totalPaidAmountCents, + }) => { if (status !== InvoiceStatusTypeEnum.Finalized) { return null } + let content: { tooltipTitle?: string; statusEndIcon?: IconName } = { + tooltipTitle: undefined, + statusEndIcon: undefined, + } + + const isOverdue = + paymentOverdue && paymentStatus === InvoicePaymentStatusTypeEnum.Pending + const isPartiallyPaid = + totalPaidAmountCents > 0 && totalAmountCents - totalPaidAmountCents > 0 + + if (isPartiallyPaid) { + content = { + tooltipTitle: translate('text_1738071221799vib0l2z1bxe'), + statusEndIcon: 'partially-filled', + } + } else if (!!paymentDisputeLostAt) { + content = { + tooltipTitle: translate('text_172416478461328edo4vwz05'), + statusEndIcon: 'warning-unfilled', + } + } + return ( - + ) }, }, - { - key: 'paymentOverdue', - title: translate('text_666c5b12fea4aa1e1b26bf55'), - content: ({ paymentOverdue }) => - paymentOverdue && ( - - ), - }, { key: 'customer.name', title: translate('text_65201c5a175a4b0238abf29a'), diff --git a/src/components/invoices/PaymentsList.tsx b/src/components/invoices/PaymentsList.tsx new file mode 100644 index 000000000..f4fa24ed6 --- /dev/null +++ b/src/components/invoices/PaymentsList.tsx @@ -0,0 +1,219 @@ +import { ApolloError, gql, LazyQueryHookOptions } from '@apollo/client' +import { FC, useEffect, useRef } from 'react' +import { generatePath, useSearchParams } from 'react-router-dom' + +import { InfiniteScroll, Status, Table, Typography } from '~/components/designSystem' +import { PaymentProviderChip } from '~/components/PaymentProviderChip' +import { addToast } from '~/core/apolloClient' +import { payablePaymentStatusMapping } from '~/core/constants/statusInvoiceMapping' +import { intlFormatNumber } from '~/core/formats/intlFormatNumber' +import { PAYMENT_DETAILS_ROUTE } from '~/core/router' +import { deserializeAmount } from '~/core/serializers/serializeAmount' +import { formatDateToTZ } from '~/core/timezone' +import { copyToClipboard } from '~/core/utils/copyToClipboard' +import { + CurrencyEnum, + GetPaymentListQuery, + GetPaymentListQueryHookResult, + PaymentForPaymentsListFragment, + PaymentTypeEnum, +} from '~/generated/graphql' +import { useInternationalization } from '~/hooks/core/useInternationalization' + +gql` + fragment PaymentForPaymentsList on Payment { + amountCents + amountCurrency + createdAt + id + payable { + ... on Invoice { + id + number + } + ... on PaymentRequest { + invoices { + id + } + } + } + payablePaymentStatus + paymentProviderType + paymentType + providerPaymentId + reference + customer { + id + name + displayName + applicableTimezone + } + } +` + +interface PaymentsListProps { + isLoading: boolean + payments?: PaymentForPaymentsListFragment[] + metadata?: GetPaymentListQuery['payments']['metadata'] + error?: ApolloError + variables?: LazyQueryHookOptions['variables'] + fetchMore?: GetPaymentListQueryHookResult['fetchMore'] +} + +export const PaymentsList: FC = ({ + isLoading, + payments, + metadata, + error, + variables, + fetchMore, +}) => { + const [searchParams] = useSearchParams() + const { translate } = useInternationalization() + + const listContainerElementRef = useRef(null) + + useEffect(() => { + // Scroll to top of list when switching tabs + listContainerElementRef?.current?.scrollTo({ top: 0 }) + }, [searchParams]) + + return ( +
+ { + const { currentPage = 0, totalPages = 0 } = metadata || {} + + currentPage < totalPages && + !isLoading && + fetchMore?.({ + variables: { page: currentPage + 1 }, + }) + }} + > +
{ + return [ + { + startIcon: 'duplicate', + title: translate('text_1737029625089rtcf3ah5khq'), + onAction: ({ id }) => { + copyToClipboard(id) + addToast({ + severity: 'info', + translateKey: translate('text_17370296250897n2pakp5v33'), + }) + }, + }, + ] + }} + actionColumnTooltip={() => translate('text_637f813d31381b1ed90ab326')} + onRowActionLink={(request) => + generatePath(PAYMENT_DETAILS_ROUTE, { + paymentId: request.id, + }) + } + columns={[ + { + key: 'payablePaymentStatus', + title: translate('text_63ac86d797f728a87b2f9fa7'), + minWidth: 80, + content: ({ payablePaymentStatus }) => ( + + ), + }, + { + key: 'payable.__typename', + title: translate('text_63ac86d797f728a87b2f9fad'), + minWidth: 160, + content: ({ payable }) => { + if (payable.__typename === 'Invoice') { + return payable.number + } + if (payable.__typename === 'PaymentRequest') { + return translate('text_17370296250898eqj4qe4qg9', { + count: payable.invoices.length, + }) + } + }, + }, + { + key: 'amountCents', + title: translate('text_6419c64eace749372fc72b3e'), + textAlign: 'right', + content: ({ amountCents, amountCurrency }) => ( + + {intlFormatNumber( + deserializeAmount(amountCents, amountCurrency || CurrencyEnum.Usd), + { + currency: amountCurrency || CurrencyEnum.Usd, + }, + )} + + ), + }, + { + key: 'customer.displayName', + title: translate('text_63ac86d797f728a87b2f9fb3'), + maxSpace: true, + content: ({ customer }) => customer?.displayName || customer?.name, + }, + { + key: 'paymentType', + title: translate('text_1737043182491927uocp2ydo'), + content: ({ paymentType, paymentProviderType }) => ( + + ), + }, + { + key: 'createdAt', + title: translate('text_664cb90097bfa800e6efa3f5'), + content: ({ createdAt, customer }) => + formatDateToTZ(createdAt, customer.applicableTimezone), + }, + ]} + placeholder={{ + errorState: variables?.searchTerm + ? { + title: translate('text_623b53fea66c76017eaebb6e'), + subtitle: translate('text_63bab307a61c62af497e0599'), + } + : { + title: translate('text_63ac86d797f728a87b2f9fea'), + subtitle: translate('text_63ac86d797f728a87b2f9ff2'), + buttonTitle: translate('text_63ac86d797f728a87b2f9ffa'), + buttonAction: () => location.reload(), + buttonVariant: 'primary', + }, + emptyState: variables?.searchTerm + ? { + title: translate('text_1738056040178doq581h3d2o'), + subtitle: translate('text_63ebafd92755e50052a86e14'), + } + : { + title: translate('text_173805604017831h2cebcami'), + subtitle: translate('text_1738056040178gw94jzmzckx'), + }, + }} + /> + + + ) +} diff --git a/src/components/invoices/details/InvoiceDetailsTableFooter.tsx b/src/components/invoices/details/InvoiceDetailsTableFooter.tsx index 08c86bff6..b63552fcd 100644 --- a/src/components/invoices/details/InvoiceDetailsTableFooter.tsx +++ b/src/components/invoices/details/InvoiceDetailsTableFooter.tsx @@ -22,6 +22,8 @@ gql` subTotalExcludingTaxesAmountCents subTotalIncludingTaxesAmountCents totalAmountCents + totalDueAmountCents + totalPaidAmountCents currency invoiceType status @@ -330,7 +332,7 @@ export const InvoiceDetailsTableFooter = memo( {invoice.invoiceType === InvoiceTypeEnum.Credit ? translate('text_63887b52e514213fed57fc1c') - : translate('text_637ccf8133d2c9a7d11ce70d')} + : translate('text_1738063764295zomiafl8b4s')} + + + + + + + + + + {invoice.status === InvoiceStatusTypeEnum.Draft ? ( diff --git a/src/components/settings/dunnings/PreviewCampaignEmailDrawer.tsx b/src/components/settings/dunnings/PreviewCampaignEmailDrawer.tsx index 0ccfeda49..378a64a19 100644 --- a/src/components/settings/dunnings/PreviewCampaignEmailDrawer.tsx +++ b/src/components/settings/dunnings/PreviewCampaignEmailDrawer.tsx @@ -9,6 +9,7 @@ import { deserializeAmount } from '~/core/serializers/serializeAmount' import { LocaleEnum } from '~/core/translations' import { CurrencyEnum, + InvoicesForDunningEmailFragment, useGetOrganizationInfoForPreviewDunningCampaignLazyQuery, } from '~/generated/graphql' import { useContextualLocale } from '~/hooks/core/useContextualLocale' @@ -45,10 +46,12 @@ export const PreviewCampaignEmailDrawer = forwardRef ({ + const invoices: InvoicesForDunningEmailFragment[] = Array.from({ + length: DUMMY_INVOICES_COUNT, + }).map((_, index) => ({ id: `${index}`, number: `${data?.organization?.name.slice(0, 3).toUpperCase()}-1234-567-89${index + 1}`, - totalAmountCents: + totalDueAmountCents: index === 0 ? DUMMY_OVERDUE_AMOUNT_CENTS - 10000 * (DUMMY_INVOICES_COUNT - 1) : 10000, currency: CurrencyEnum.Usd, })) diff --git a/src/core/constants/NavigationEnum.ts b/src/core/constants/NavigationEnum.ts index 672828232..e93401784 100644 --- a/src/core/constants/NavigationEnum.ts +++ b/src/core/constants/NavigationEnum.ts @@ -1,4 +1,22 @@ export enum CustomerInvoiceDetailsTabsOptionsEnum { overview = 'overview', + payments = 'payments', creditNotes = 'credit-notes', } + +export enum InvoiceListTabEnum { + 'invoices' = 'invoices', + 'payments' = 'payments', + 'creditNotes' = 'creditNotes', +} + +export enum CustomerDetailsTabsOptions { + creditNotes = 'creditNotes', + overview = 'overview', + wallet = 'wallet', + invoices = 'invoices', + payments = 'payments', + settings = 'settings', + usage = 'usage', + information = 'information', +} diff --git a/src/core/constants/externalUrls.ts b/src/core/constants/externalUrls.ts index 2cae5a1fa..ad037b78b 100644 --- a/src/core/constants/externalUrls.ts +++ b/src/core/constants/externalUrls.ts @@ -109,3 +109,11 @@ export const buildSalesforceUrl = ({ export const buildStripeCustomerUrl = (stripeCustomerId: string) => { return `https://dashboard.stripe.com/customers/${stripeCustomerId}` } + +export const buildStripePaymentUrl = (stripePaymentId: string) => { + return `https://dashboard.stripe.com/payments/${stripePaymentId}` +} + +export const buildGoCardlessPaymentUrl = (goCardlessPaymentId: string) => { + return `https://manage.gocardless.com/payments/${goCardlessPaymentId}` +} diff --git a/src/core/constants/statusInvoiceMapping.ts b/src/core/constants/statusInvoiceMapping.ts index a1bf53007..1c0b63bf1 100644 --- a/src/core/constants/statusInvoiceMapping.ts +++ b/src/core/constants/statusInvoiceMapping.ts @@ -1,5 +1,9 @@ -import { StatusProps, StatusType } from '~/components/designSystem' -import { InvoicePaymentStatusTypeEnum, InvoiceStatusTypeEnum } from '~/generated/graphql' +import { IconName, StatusProps, StatusType } from '~/components/designSystem' +import { + InvoicePaymentStatusTypeEnum, + InvoiceStatusTypeEnum, + PayablePaymentStatusEnum, +} from '~/generated/graphql' export const invoiceStatusMapping = ({ status, @@ -25,23 +29,52 @@ export const invoiceStatusMapping = ({ export const paymentStatusMapping = ({ status, paymentStatus, + totalPaidAmountCents, + totalAmountCents, }: { - status: InvoiceStatusTypeEnum - paymentStatus: InvoicePaymentStatusTypeEnum + status?: InvoiceStatusTypeEnum + paymentStatus?: InvoicePaymentStatusTypeEnum + totalPaidAmountCents?: number + totalAmountCents?: number }): StatusProps => { + const isPartiallyPaid = + totalAmountCents && + totalPaidAmountCents && + totalPaidAmountCents > 0 && + totalAmountCents - totalPaidAmountCents > 0 + + const endIcon: IconName | undefined = isPartiallyPaid ? 'partially-filled' : undefined + if (status === InvoiceStatusTypeEnum.Finalized) { switch (paymentStatus) { case InvoicePaymentStatusTypeEnum.Pending: - return { label: 'pending', type: StatusType.default } + return { label: 'pending', type: StatusType.default, endIcon } case InvoicePaymentStatusTypeEnum.Failed: - return { label: 'failed', type: StatusType.warning } + return { label: 'failed', type: StatusType.warning, endIcon } case InvoicePaymentStatusTypeEnum.Succeeded: - return { label: 'succeeded', type: StatusType.success } + return { label: 'succeeded', type: StatusType.success, endIcon } default: - return { label: 'n/a', type: StatusType.default } + return { label: 'n/a', type: StatusType.default, endIcon } } } - return { label: 'n/a', type: StatusType.default } + return { label: 'n/a', type: StatusType.default, endIcon } +} + +export const payablePaymentStatusMapping = ({ + payablePaymentStatus, +}: { + payablePaymentStatus?: PayablePaymentStatusEnum +}): StatusProps => { + switch (payablePaymentStatus) { + case PayablePaymentStatusEnum.Pending: + return { label: 'pending', type: StatusType.default } + case PayablePaymentStatusEnum.Failed: + return { label: 'failed', type: StatusType.warning } + case PayablePaymentStatusEnum.Succeeded: + return { label: 'succeeded', type: StatusType.success } + default: + return { label: 'n/a', type: StatusType.default } + } } diff --git a/src/core/router/ObjectsRoutes.tsx b/src/core/router/ObjectsRoutes.tsx index cb8a51bcf..611b77287 100644 --- a/src/core/router/ObjectsRoutes.tsx +++ b/src/core/router/ObjectsRoutes.tsx @@ -20,12 +20,14 @@ const CreateCoupon = lazyLoad(() => import('~/pages/CreateCoupon')) const CreateAddOn = lazyLoad(() => import('~/pages/CreateAddOn')) const CreateSubscription = lazyLoad(() => import('~/pages/CreateSubscription')) const WalletForm = lazyLoad(() => import('~/pages/WalletForm/WalletForm')) +const CreatePayment = lazyLoad(() => import('~/pages/CreatePayment')) // Details const SubscriptionDetails = lazyLoad(() => import('~/pages/SubscriptionDetails')) const PlanDetails = lazyLoad(() => import('~/pages/PlanDetails')) const AddOnDetails = lazyLoad(() => import('~/pages/AddOnDetails')) const CouponDetails = lazyLoad(() => import('~/pages/CouponDetails')) +const PaymentDetails = lazyLoad(() => import('~/pages/PaymentDetails')) // ----------- Routes ----------- // Lists @@ -68,6 +70,9 @@ export const UPGRADE_DOWNGRADE_SUBSCRIPTION = export const CREATE_WALLET_ROUTE = '/customer/:customerId/wallet/create' export const EDIT_WALLET_ROUTE = '/customer/:customerId/wallet/:walletId' +export const CREATE_PAYMENT_ROUTE = '/create/payment' +export const CREATE_INVOICE_PAYMENT_ROUTE = '/invoice/:invoiceId/create/payment' + // Details export const CUSTOMER_SUBSCRIPTION_DETAILS_ROUTE = '/customer/:customerId/subscription/:subscriptionId/:tab' @@ -77,6 +82,8 @@ export const CUSTOMER_SUBSCRIPTION_PLAN_DETAILS = '/customer/:customerId/subscription/:subscriptionId/plan/:planId/:tab' export const ADD_ON_DETAILS_ROUTE = '/add-on/:addOnId' export const COUPON_DETAILS_ROUTE = '/coupon/:couponId' +export const PAYMENT_DETAILS_ROUTE = '/payment/:paymentId' +export const CUSTOMER_PAYMENT_DETAILS_ROUTE = '/customer/:customerId/payment/:paymentId' export const objectListRoutes: CustomRouteObject[] = [ { @@ -172,6 +179,12 @@ export const objectCreationRoutes: CustomRouteObject[] = [ element: , permissions: ['walletsCreate', 'walletsUpdate'], }, + { + path: [CREATE_PAYMENT_ROUTE, CREATE_INVOICE_PAYMENT_ROUTE], + private: true, + element: , + permissions: ['paymentsCreate'], + }, ] export const objectDetailsRoutes: CustomRouteObject[] = [ @@ -199,4 +212,10 @@ export const objectDetailsRoutes: CustomRouteObject[] = [ element: , permissions: ['couponsView'], }, + { + path: [PAYMENT_DETAILS_ROUTE, CUSTOMER_PAYMENT_DETAILS_ROUTE], + private: true, + element: , + permissions: ['paymentsView'], + }, ] diff --git a/src/core/timezone/utils.ts b/src/core/timezone/utils.ts index 767c75b42..5f01089fb 100644 --- a/src/core/timezone/utils.ts +++ b/src/core/timezone/utils.ts @@ -51,3 +51,33 @@ export const intlFormatDateToDateMed = ( locale: locale, }).toLocaleString(DateTime.DATE_MED) } + +export const intlFormatDateTime = ( + date: string, + { + timezone = TimezoneEnum.TzUtc, + locale = LocaleEnum.en, + }: { + timezone?: TimezoneEnum | null | undefined + locale?: LocaleEnum + }, +) => { + const localeDateTime = DateTime.fromISO(date, { + zone: getTimezoneConfig(timezone).name, + locale: locale, + }) + + const localeDate = localeDateTime.toLocaleString(DateTime.DATE_MED) + + const localeTime = localeDateTime + .toLocaleParts({ + hour: '2-digit', + minute: '2-digit', + hour12: LocaleEnum.en === locale, + timeZoneName: 'short', + }) + .map((part) => part.value) + .join('') + + return { date: localeDate, time: localeTime } +} diff --git a/src/generated/graphql.tsx b/src/generated/graphql.tsx index a4260fe7a..667dacdd0 100644 --- a/src/generated/graphql.tsx +++ b/src/generated/graphql.tsx @@ -1374,6 +1374,16 @@ export type CreatePasswordResetPayload = { id: Scalars['String']['output']; }; +/** Autogenerated input type of CreatePayment */ +export type CreatePaymentInput = { + amountCents: Scalars['BigInt']['input']; + /** A unique identifier for the client performing the mutation. */ + clientMutationId?: InputMaybe; + createdAt: Scalars['ISO8601DateTime']['input']; + invoiceId: Scalars['ID']['input']; + reference: Scalars['String']['input']; +}; + /** Autogenerated input type of CreatePlan */ export type CreatePlanInput = { amountCents: Scalars['BigInt']['input']; @@ -2984,6 +2994,8 @@ export type Invoice = { taxesAmountCents: Scalars['BigInt']['output']; taxesRate: Scalars['Float']['output']; totalAmountCents: Scalars['BigInt']['output']; + totalDueAmountCents: Scalars['BigInt']['output']; + totalPaidAmountCents: Scalars['BigInt']['output']; updatedAt: Scalars['ISO8601DateTime']['output']; versionNumber: Scalars['Int']['output']; voidable: Scalars['Boolean']['output']; @@ -3374,6 +3386,8 @@ export type Mutation = { createOktaIntegration?: Maybe; /** Creates a new password reset */ createPasswordReset?: Maybe; + /** Creates a manual payment */ + createPayment?: Maybe; /** Creates a payment request */ createPaymentRequest?: Maybe; /** Creates a new Plan */ @@ -3705,6 +3719,11 @@ export type MutationCreatePasswordResetArgs = { }; +export type MutationCreatePaymentArgs = { + input: CreatePaymentInput; +}; + + export type MutationCreatePaymentRequestArgs = { input: PaymentRequestCreateInput; }; @@ -4276,6 +4295,40 @@ export type OverdueBalanceCollection = { metadata: CollectionMetadata; }; +export type Payable = Invoice | PaymentRequest; + +export enum PayablePaymentStatusEnum { + Failed = 'failed', + Pending = 'pending', + Processing = 'processing', + Succeeded = 'succeeded' +} + +export type Payment = { + __typename?: 'Payment'; + amountCents: Scalars['BigInt']['output']; + amountCurrency: CurrencyEnum; + createdAt: Scalars['ISO8601DateTime']['output']; + customer: Customer; + id: Scalars['ID']['output']; + payable: Payable; + payablePaymentStatus?: Maybe; + paymentProviderType?: Maybe; + paymentType: PaymentTypeEnum; + providerPaymentId?: Maybe; + reference?: Maybe; + updatedAt?: Maybe; +}; + +/** PaymentCollection type */ +export type PaymentCollection = { + __typename?: 'PaymentCollection'; + /** A collection of paginated PaymentCollection */ + collection: Array; + /** Pagination Metadata for navigating the Pagination */ + metadata: CollectionMetadata; +}; + export type PaymentProvider = AdyenProvider | CashfreeProvider | GocardlessProvider | StripeProvider; /** PaymentProviderCollection type */ @@ -4318,6 +4371,11 @@ export type PaymentRequestCreateInput = { lagoInvoiceIds?: InputMaybe>; }; +export enum PaymentTypeEnum { + Manual = 'manual', + Provider = 'provider' +} + /** Permissions Type */ export type Permissions = { __typename?: 'Permissions'; @@ -4648,12 +4706,16 @@ export type Query = { overdueBalances: OverdueBalanceCollection; /** Query a password reset by token */ passwordReset: ResetPassword; + /** Query a single Payment */ + payment?: Maybe; /** Query a single payment provider */ paymentProvider?: Maybe; /** Query organization's payment providers */ paymentProviders?: Maybe; /** Query payment requests of an organization */ paymentRequests: PaymentRequestCollection; + /** Query payments of an organization */ + payments: PaymentCollection; /** Query a single plan of an organization */ plan?: Maybe; /** Query plans of an organization */ @@ -4969,9 +5031,11 @@ export type QueryInvoicesArgs = { issuingDateTo?: InputMaybe; limit?: InputMaybe; page?: InputMaybe; + partiallyPaid?: InputMaybe; paymentDisputeLost?: InputMaybe; paymentOverdue?: InputMaybe; paymentStatus?: InputMaybe>; + positiveDueAmount?: InputMaybe; searchTerm?: InputMaybe; selfBilled?: InputMaybe; status?: InputMaybe>; @@ -5002,6 +5066,11 @@ export type QueryPasswordResetArgs = { }; +export type QueryPaymentArgs = { + id: Scalars['ID']['input']; +}; + + export type QueryPaymentProviderArgs = { code?: InputMaybe; id?: InputMaybe; @@ -5022,6 +5091,14 @@ export type QueryPaymentRequestsArgs = { }; +export type QueryPaymentsArgs = { + externalCustomerId?: InputMaybe; + invoiceId?: InputMaybe; + limit?: InputMaybe; + page?: InputMaybe; +}; + + export type QueryPlanArgs = { id: Scalars['ID']['input']; }; @@ -6459,7 +6536,7 @@ export type XeroIntegration = { export type UserIdentifierQueryVariables = Exact<{ [key: string]: never; }>; -export type UserIdentifierQuery = { __typename?: 'Query', me: { __typename?: 'User', id: string, email?: string | null, premium: boolean, memberships: Array<{ __typename?: 'Membership', id: string, organization: { __typename?: 'Organization', id: string, name: string, logoUrl?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }> }, organization?: { __typename?: 'CurrentOrganization', id: string, name: string, logoUrl?: string | null, timezone?: TimezoneEnum | null, defaultCurrency: CurrencyEnum, premiumIntegrations: Array } | null }; +export type UserIdentifierQuery = { __typename?: 'Query', me: { __typename?: 'User', id: string, email?: string | null, premium: boolean, memberships: Array<{ __typename?: 'Membership', id: string, organization: { __typename?: 'Organization', id: string, name: string, logoUrl?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, paymentsCreate: boolean, paymentsView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }> }, organization?: { __typename?: 'CurrentOrganization', id: string, name: string, logoUrl?: string | null, timezone?: TimezoneEnum | null, defaultCurrency: CurrencyEnum, premiumIntegrations: Array } | null }; export type DeleteAddOnFragment = { __typename?: 'AddOn', id: string, name: string }; @@ -6542,7 +6619,7 @@ export type TerminateCouponMutationVariables = Exact<{ export type TerminateCouponMutation = { __typename?: 'Mutation', terminateCoupon?: { __typename?: 'Coupon', id: string, amountCents?: any | null, amountCurrency?: CurrencyEnum | null, percentageRate?: number | null, code?: string | null, expirationAt?: any | null, name: string, frequency: CouponFrequency, reusable: boolean, couponType: CouponTypeEnum, status: CouponStatusEnum, customersCount: number, expiration: CouponExpiration, frequencyDuration?: number | null, billableMetrics?: Array<{ __typename?: 'BillableMetric', id: string, name: string }> | null, plans?: Array<{ __typename?: 'Plan', id: string, name: string }> | null } | null }; -export type InvoiceForCreditNoteFormCalculationFragment = { __typename?: 'Invoice', id: string, couponsAmountCents: any, paymentStatus: InvoicePaymentStatusTypeEnum, creditableAmountCents: any, refundableAmountCents: any, feesAmountCents: any, currency?: CurrencyEnum | null, versionNumber: number, paymentDisputeLostAt?: any | null, fees?: Array<{ __typename?: 'Fee', id: string, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null }> | null }; +export type InvoiceForCreditNoteFormCalculationFragment = { __typename?: 'Invoice', id: string, couponsAmountCents: any, paymentStatus: InvoicePaymentStatusTypeEnum, creditableAmountCents: any, refundableAmountCents: any, feesAmountCents: any, currency?: CurrencyEnum | null, versionNumber: number, paymentDisputeLostAt?: any | null, totalPaidAmountCents: any, fees?: Array<{ __typename?: 'Fee', id: string, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null }> | null }; export type CreditNoteEstimateQueryVariables = Exact<{ invoiceId: Scalars['ID']['input']; @@ -6689,9 +6766,9 @@ export type GetCustomerCreditNotesQueryVariables = Exact<{ export type GetCustomerCreditNotesQuery = { __typename?: 'Query', creditNotes: { __typename?: 'CreditNoteCollection', metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalPages: number, totalCount: number }, collection: Array<{ __typename?: 'CreditNote', id: string, number: string, totalAmountCents: any, refundAmountCents: any, creditAmountCents: any, currency: CurrencyEnum, createdAt: any, canBeVoided: boolean, voidedAt?: any | null, taxProviderSyncable: boolean, errorDetails?: Array<{ __typename?: 'ErrorDetail', id: string, errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, invoice?: { __typename?: 'Invoice', id: string, number: string, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum } } | null }> } }; -export type InvoiceListItemFragment = { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }; +export type InvoiceListItemFragment = { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }; -export type InvoiceForInvoiceListFragment = { __typename?: 'InvoiceCollection', collection: Array<{ __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }>, metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalCount: number, totalPages: number } }; +export type InvoiceForInvoiceListFragment = { __typename?: 'InvoiceCollection', collection: Array<{ __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }>, metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalCount: number, totalPages: number } }; export type DownloadInvoiceItemMutationVariables = Exact<{ input: DownloadInvoiceInput; @@ -6705,7 +6782,7 @@ export type RetryInvoicePaymentMutationVariables = Exact<{ }>; -export type RetryInvoicePaymentMutation = { __typename?: 'Mutation', retryInvoicePayment?: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null } | null }; +export type RetryInvoicePaymentMutation = { __typename?: 'Mutation', retryInvoicePayment?: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null } | null }; export type GetCustomerInvoicesQueryVariables = Exact<{ customerId: Scalars['ID']['input']; @@ -6716,7 +6793,7 @@ export type GetCustomerInvoicesQueryVariables = Exact<{ }>; -export type GetCustomerInvoicesQuery = { __typename?: 'Query', customerInvoices: { __typename?: 'InvoiceCollection', collection: Array<{ __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }>, metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalCount: number, totalPages: number } } }; +export type GetCustomerInvoicesQuery = { __typename?: 'Query', customerInvoices: { __typename?: 'InvoiceCollection', collection: Array<{ __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }>, metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalCount: number, totalPages: number } } }; export type CustomerMainInfosFragment = { __typename?: 'Customer', id: string, customerType?: CustomerTypeEnum | null, name?: string | null, firstname?: string | null, lastname?: string | null, externalId: string, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, phone?: string | null, email?: string | null, currency?: CurrencyEnum | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, url?: string | null, zipcode?: string | null, paymentProvider?: ProviderTypeEnum | null, timezone?: TimezoneEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, providerPaymentMethods?: Array | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, targetedObject?: HubspotTargetedObjectsEnum | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string }> | null }; @@ -7053,7 +7130,7 @@ export type CustomerForDunningEmailFragment = { __typename?: 'Customer', display export type OrganizationForDunningEmailFragment = { __typename?: 'CurrentOrganization', name: string, logoUrl?: string | null, email?: string | null, netPaymentTerm: number, billingConfiguration?: { __typename?: 'OrganizationBillingConfiguration', documentLocale?: string | null } | null }; -export type InvoicesForDunningEmailFragment = { __typename?: 'Invoice', id: string, number: string, totalAmountCents: any, currency?: CurrencyEnum | null }; +export type InvoicesForDunningEmailFragment = { __typename?: 'Invoice', id: string, number: string, totalDueAmountCents: any, currency?: CurrencyEnum | null }; export type OrganizationForDatePickerFragment = { __typename?: 'CurrentOrganization', id: string, timezone?: TimezoneEnum | null }; @@ -7110,7 +7187,7 @@ export type DisputeInvoiceMutationVariables = Exact<{ }>; -export type DisputeInvoiceMutation = { __typename?: 'Mutation', loseInvoiceDispute?: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; +export type DisputeInvoiceMutation = { __typename?: 'Mutation', loseInvoiceDispute?: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, totalDueAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, totalPaidAmountCents: any, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; export type TaxForInvoiceEditTaxDialogFragment = { __typename?: 'Tax', id: string, name: string, rate: number, code: string }; @@ -7131,7 +7208,7 @@ export type UpdateInvoicePaymentStatusMutationVariables = Exact<{ }>; -export type UpdateInvoicePaymentStatusMutation = { __typename?: 'Mutation', updateInvoice?: { __typename?: 'Invoice', id: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, integrationSyncable: boolean, externalIntegrationId?: string | null, integrationHubspotSyncable: boolean, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; +export type UpdateInvoicePaymentStatusMutation = { __typename?: 'Mutation', updateInvoice?: { __typename?: 'Invoice', id: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, integrationSyncable: boolean, externalIntegrationId?: string | null, integrationHubspotSyncable: boolean, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; export type InvoiceForFinalizeInvoiceFragment = { __typename?: 'Invoice', id: string, issuingDate: any, customer: { __typename?: 'Customer', id: string, applicableTimezone: TimezoneEnum } }; @@ -7140,16 +7217,27 @@ export type FinalizeInvoiceMutationVariables = Exact<{ }>; -export type FinalizeInvoiceMutation = { __typename?: 'Mutation', finalizeInvoice?: { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; +export type FinalizeInvoiceMutation = { __typename?: 'Mutation', finalizeInvoice?: { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, totalDueAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, totalPaidAmountCents: any, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; + +export type GetInvoiceCreditNotesQueryVariables = Exact<{ + invoiceId: Scalars['ID']['input']; + page?: InputMaybe; + limit?: InputMaybe; +}>; + + +export type GetInvoiceCreditNotesQuery = { __typename?: 'Query', invoiceCreditNotes?: { __typename?: 'CreditNoteCollection', metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalPages: number, totalCount: number }, collection: Array<{ __typename?: 'CreditNote', id: string, number: string, totalAmountCents: any, refundAmountCents: any, creditAmountCents: any, currency: CurrencyEnum, createdAt: any, canBeVoided: boolean, voidedAt?: any | null, taxProviderSyncable: boolean, errorDetails?: Array<{ __typename?: 'ErrorDetail', id: string, errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, invoice?: { __typename?: 'Invoice', id: string, number: string, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum } } | null }> } | null, invoice?: { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, associatedActiveWalletPresent: boolean, paymentStatus: InvoicePaymentStatusTypeEnum, refundableAmountCents: any, creditableAmountCents: any, status: InvoiceStatusTypeEnum, customer: { __typename?: 'Customer', id: string, applicableTimezone: TimezoneEnum, displayName: string } } | null }; export type InvoiceForCreditNotesTableFragment = { __typename?: 'Invoice', id: string, customer: { __typename?: 'Customer', id: string }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null }; -export type InvoiceForInvoiceInfosFragment = { __typename?: 'Invoice', number: string, issuingDate: any, paymentDueDate: any, paymentOverdue: boolean, status: InvoiceStatusTypeEnum, paymentStatus: InvoicePaymentStatusTypeEnum, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, applicableTimezone: TimezoneEnum, deletedAt?: any | null, accountType: CustomerAccountTypeEnum } }; +export type InvoiceForInvoiceInfosFragment = { __typename?: 'Invoice', number: string, issuingDate: any, paymentDueDate: any, paymentOverdue: boolean, status: InvoiceStatusTypeEnum, totalPaidAmountCents: any, totalAmountCents: any, paymentStatus: InvoicePaymentStatusTypeEnum, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, applicableTimezone: TimezoneEnum, deletedAt?: any | null, accountType: CustomerAccountTypeEnum } }; export type CustomerMetadatasForInvoiceOverviewFragment = { __typename?: 'Customer', id: string, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }; export type InvoiceMetadatasForInvoiceOverviewFragment = { __typename?: 'Invoice', id: string, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null }; +export type PaymentForPaymentsListFragment = { __typename?: 'Payment', amountCents: any, amountCurrency: CurrencyEnum, createdAt: any, id: string, payablePaymentStatus?: PayablePaymentStatusEnum | null, paymentProviderType?: ProviderTypeEnum | null, paymentType: PaymentTypeEnum, providerPaymentId?: string | null, reference?: string | null, payable: { __typename?: 'Invoice', id: string, number: string } | { __typename?: 'PaymentRequest', invoices: Array<{ __typename?: 'Invoice', id: string }> }, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum } }; + export type InvoiceForVoidInvoiceDialogFragment = { __typename?: 'Invoice', id: string, number: string }; export type VoidInvoiceMutationVariables = Exact<{ @@ -7157,7 +7245,7 @@ export type VoidInvoiceMutationVariables = Exact<{ }>; -export type VoidInvoiceMutation = { __typename?: 'Mutation', voidInvoice?: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, integrationSyncable: boolean, externalIntegrationId?: string | null, integrationHubspotSyncable: boolean, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; +export type VoidInvoiceMutation = { __typename?: 'Mutation', voidInvoice?: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, integrationSyncable: boolean, externalIntegrationId?: string | null, integrationHubspotSyncable: boolean, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; export type FeeForDeleteAdjustmentFeeDialogFragment = { __typename?: 'Fee', id: string }; @@ -7188,7 +7276,7 @@ export type CreateAdjustedFeeMutation = { __typename?: 'Mutation', createAdjuste export type FeeForInvoiceDetailsTableFragment = { __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }; -export type InvoiceForDetailsTableFragment = { __typename?: 'Invoice', invoiceType: InvoiceTypeEnum, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, totalAmountCents: any, currency?: CurrencyEnum | null, issuingDate: any, allChargesHaveFees: boolean, versionNumber: number, couponsAmountCents: any, creditNotesAmountCents: any, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, customer: { __typename?: 'Customer', id: string, currency?: CurrencyEnum | null, applicableTimezone: TimezoneEnum }, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null }; +export type InvoiceForDetailsTableFragment = { __typename?: 'Invoice', invoiceType: InvoiceTypeEnum, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, totalAmountCents: any, currency?: CurrencyEnum | null, issuingDate: any, allChargesHaveFees: boolean, versionNumber: number, couponsAmountCents: any, creditNotesAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, customer: { __typename?: 'Customer', id: string, currency?: CurrencyEnum | null, applicableTimezone: TimezoneEnum }, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null }; export type FeeForInvoiceDetailsTableBodyLineFragment = { __typename?: 'Fee', id: string, units: number, preciseUnitAmount: number, amountCents: any, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, charge?: { __typename?: 'Charge', id: string, chargeModel: ChargeModelEnum, minAmountCents: any, payInAdvance: boolean, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, recurring: boolean } } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }; @@ -7202,7 +7290,7 @@ export type FeeForInvoiceDetailsTableBodyLinePercentageFragment = { __typename?: export type FeeForInvoiceDetailsTableBodyLineVolumeFragment = { __typename?: 'Fee', id: string, units: number, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, amountDetails?: { __typename?: 'FeeAmountDetails', flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null } | null }; -export type InvoiceForDetailsTableFooterFragment = { __typename?: 'Invoice', couponsAmountCents: any, creditNotesAmountCents: any, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, totalAmountCents: any, currency?: CurrencyEnum | null, invoiceType: InvoiceTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, versionNumber: number, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null }; +export type InvoiceForDetailsTableFooterFragment = { __typename?: 'Invoice', couponsAmountCents: any, creditNotesAmountCents: any, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, totalAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, currency?: CurrencyEnum | null, invoiceType: InvoiceTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, versionNumber: number, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null }; export type FeeForInvoiceFeeAdvanceDetailsTableFragment = { __typename?: 'Fee', id: string, units: number, preciseUnitAmount: number, amountCents: any, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, charge?: { __typename?: 'Charge', id: string, chargeModel: ChargeModelEnum, minAmountCents: any, payInAdvance: boolean, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, recurring: boolean } } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }; @@ -8078,14 +8166,14 @@ export type UpdateInviteRoleMutationVariables = Exact<{ export type UpdateInviteRoleMutation = { __typename?: 'Mutation', updateInvite?: { __typename?: 'Invite', id: string, role: MembershipRole, email: string } | null }; -export type MemberForEditRoleForDialogFragment = { __typename?: 'Membership', id: string, role: MembershipRole, user: { __typename?: 'User', id: string, email?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }; +export type MemberForEditRoleForDialogFragment = { __typename?: 'Membership', id: string, role: MembershipRole, user: { __typename?: 'User', id: string, email?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, paymentsCreate: boolean, paymentsView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }; export type UpdateMembershipRoleMutationVariables = Exact<{ input: UpdateMembershipInput; }>; -export type UpdateMembershipRoleMutation = { __typename?: 'Mutation', updateMembership?: { __typename?: 'Membership', id: string, role: MembershipRole, user: { __typename?: 'User', id: string, email?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } } | null }; +export type UpdateMembershipRoleMutation = { __typename?: 'Mutation', updateMembership?: { __typename?: 'Membership', id: string, role: MembershipRole, user: { __typename?: 'User', id: string, email?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, paymentsCreate: boolean, paymentsView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } } | null }; export type RevokeInviteMutationVariables = Exact<{ input: RevokeInviteInput; @@ -8239,14 +8327,14 @@ export type UpdatePlanMutation = { __typename?: 'Mutation', updatePlan?: { __typ export type InvoiceFeeFragment = { __typename?: 'Fee', id: string, amountCurrency: CurrencyEnum, feeType: FeeTypesEnum, invoiceName?: string | null, invoiceDisplayName?: string | null, groupedBy: any, succeededAt?: any | null, creditableAmountCents: any, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string } } | null, chargeFilter?: { __typename?: 'ChargeFilter', id: string, invoiceDisplayName?: string | null, values: any } | null }; -export type InvoiceCreateCreditNoteFragment = { __typename?: 'Invoice', id: string, refundableAmountCents: any, creditableAmountCents: any, invoiceType: InvoiceTypeEnum, currency?: CurrencyEnum | null, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, subTotalIncludingTaxesAmountCents: any, availableToCreditAmountCents: any, paymentDisputeLostAt?: any | null, couponsAmountCents: any, feesAmountCents: any, versionNumber: number, fees?: Array<{ __typename?: 'Fee', id: string, amountCurrency: CurrencyEnum, itemCode: string, itemName: string, invoiceName?: string | null, invoiceDisplayName?: string | null, creditableAmountCents: any, succeededAt?: any | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCurrency: CurrencyEnum, feeType: FeeTypesEnum, invoiceName?: string | null, invoiceDisplayName?: string | null, groupedBy: any, succeededAt?: any | null, creditableAmountCents: any, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string } } | null, chargeFilter?: { __typename?: 'ChargeFilter', id: string, invoiceDisplayName?: string | null, values: any } | null }> | null }> | null }; +export type InvoiceCreateCreditNoteFragment = { __typename?: 'Invoice', id: string, refundableAmountCents: any, creditableAmountCents: any, invoiceType: InvoiceTypeEnum, currency?: CurrencyEnum | null, number: string, status: InvoiceStatusTypeEnum, paymentStatus: InvoicePaymentStatusTypeEnum, subTotalIncludingTaxesAmountCents: any, availableToCreditAmountCents: any, totalPaidAmountCents: any, totalAmountCents: any, paymentDisputeLostAt?: any | null, couponsAmountCents: any, feesAmountCents: any, versionNumber: number, fees?: Array<{ __typename?: 'Fee', id: string, amountCurrency: CurrencyEnum, itemCode: string, itemName: string, invoiceName?: string | null, invoiceDisplayName?: string | null, creditableAmountCents: any, succeededAt?: any | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCurrency: CurrencyEnum, feeType: FeeTypesEnum, invoiceName?: string | null, invoiceDisplayName?: string | null, groupedBy: any, succeededAt?: any | null, creditableAmountCents: any, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string } } | null, chargeFilter?: { __typename?: 'ChargeFilter', id: string, invoiceDisplayName?: string | null, values: any } | null }> | null }> | null }; export type GetInvoiceCreateCreditNoteQueryVariables = Exact<{ id: Scalars['ID']['input']; }>; -export type GetInvoiceCreateCreditNoteQuery = { __typename?: 'Query', invoice?: { __typename?: 'Invoice', id: string, refundableAmountCents: any, creditableAmountCents: any, invoiceType: InvoiceTypeEnum, currency?: CurrencyEnum | null, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, subTotalIncludingTaxesAmountCents: any, availableToCreditAmountCents: any, paymentDisputeLostAt?: any | null, couponsAmountCents: any, feesAmountCents: any, versionNumber: number, fees?: Array<{ __typename?: 'Fee', id: string, amountCurrency: CurrencyEnum, itemCode: string, itemName: string, invoiceName?: string | null, invoiceDisplayName?: string | null, creditableAmountCents: any, succeededAt?: any | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCurrency: CurrencyEnum, feeType: FeeTypesEnum, invoiceName?: string | null, invoiceDisplayName?: string | null, groupedBy: any, succeededAt?: any | null, creditableAmountCents: any, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string } } | null, chargeFilter?: { __typename?: 'ChargeFilter', id: string, invoiceDisplayName?: string | null, values: any } | null }> | null }> | null } | null }; +export type GetInvoiceCreateCreditNoteQuery = { __typename?: 'Query', invoice?: { __typename?: 'Invoice', id: string, refundableAmountCents: any, creditableAmountCents: any, invoiceType: InvoiceTypeEnum, currency?: CurrencyEnum | null, number: string, status: InvoiceStatusTypeEnum, paymentStatus: InvoicePaymentStatusTypeEnum, subTotalIncludingTaxesAmountCents: any, availableToCreditAmountCents: any, totalPaidAmountCents: any, totalAmountCents: any, paymentDisputeLostAt?: any | null, couponsAmountCents: any, feesAmountCents: any, versionNumber: number, fees?: Array<{ __typename?: 'Fee', id: string, amountCurrency: CurrencyEnum, itemCode: string, itemName: string, invoiceName?: string | null, invoiceDisplayName?: string | null, creditableAmountCents: any, succeededAt?: any | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCurrency: CurrencyEnum, feeType: FeeTypesEnum, invoiceName?: string | null, invoiceDisplayName?: string | null, groupedBy: any, succeededAt?: any | null, creditableAmountCents: any, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string } } | null, chargeFilter?: { __typename?: 'ChargeFilter', id: string, invoiceDisplayName?: string | null, values: any } | null }> | null }> | null } | null }; export type CreateCreditNoteMutationVariables = Exact<{ input: CreateCreditNoteInput; @@ -8425,12 +8513,12 @@ export type UpdateTaxMutationVariables = Exact<{ export type UpdateTaxMutation = { __typename?: 'Mutation', updateTax?: { __typename?: 'Tax', id: string, code: string, description?: string | null, name: string, rate: number, customersCount: number } | null }; -export type CurrentUserInfosFragment = { __typename?: 'User', id: string, email?: string | null, premium: boolean, memberships: Array<{ __typename?: 'Membership', id: string, organization: { __typename?: 'Organization', id: string, name: string, logoUrl?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }> }; +export type CurrentUserInfosFragment = { __typename?: 'User', id: string, email?: string | null, premium: boolean, memberships: Array<{ __typename?: 'Membership', id: string, organization: { __typename?: 'Organization', id: string, name: string, logoUrl?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, paymentsCreate: boolean, paymentsView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }> }; export type GetCurrentUserInfosQueryVariables = Exact<{ [key: string]: never; }>; -export type GetCurrentUserInfosQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, email?: string | null, premium: boolean, memberships: Array<{ __typename?: 'Membership', id: string, organization: { __typename?: 'Organization', id: string, name: string, logoUrl?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }> } }; +export type GetCurrentUserInfosQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, email?: string | null, premium: boolean, memberships: Array<{ __typename?: 'Membership', id: string, organization: { __typename?: 'Organization', id: string, name: string, logoUrl?: string | null }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, paymentsCreate: boolean, paymentsView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }> } }; export type GetEmailSettingsQueryVariables = Exact<{ [key: string]: never; }>; @@ -8459,7 +8547,7 @@ export type GetOrganizationInfosQueryVariables = Exact<{ [key: string]: never; } export type GetOrganizationInfosQuery = { __typename?: 'Query', organization?: { __typename?: 'CurrentOrganization', id: string, name: string, logoUrl?: string | null, timezone?: TimezoneEnum | null, defaultCurrency: CurrencyEnum, premiumIntegrations: Array } | null }; -export type MembershipPermissionsFragment = { __typename?: 'Membership', id: string, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }; +export type MembershipPermissionsFragment = { __typename?: 'Membership', id: string, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, paymentsCreate: boolean, paymentsView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }; export type SideNavInfosQueryVariables = Exact<{ [key: string]: never; }>; @@ -8526,7 +8614,7 @@ export type GetTaxesForAddOnFormQuery = { __typename?: 'Query', taxes: { __typen export type EditBillableMetricFragment = { __typename?: 'BillableMetric', id: string, name: string, code: string, expression?: string | null, description?: string | null, aggregationType: AggregationTypeEnum, fieldName?: string | null, subscriptionsCount: number, plansCount: number, recurring: boolean, roundingFunction?: RoundingFunctionEnum | null, roundingPrecision?: number | null, filters?: Array<{ __typename?: 'BillableMetricFilter', key: string, values: Array }> | null }; -export type CreateCreditNoteInvoiceFragment = { __typename?: 'Invoice', id: string, currency?: CurrencyEnum | null, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, creditableAmountCents: any, refundableAmountCents: any, subTotalIncludingTaxesAmountCents: any, availableToCreditAmountCents: any, paymentDisputeLostAt?: any | null, invoiceType: InvoiceTypeEnum, couponsAmountCents: any, feesAmountCents: any, versionNumber: number, fees?: Array<{ __typename?: 'Fee', id: string, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null }> | null }; +export type CreateCreditNoteInvoiceFragment = { __typename?: 'Invoice', id: string, currency?: CurrencyEnum | null, number: string, status: InvoiceStatusTypeEnum, paymentStatus: InvoicePaymentStatusTypeEnum, creditableAmountCents: any, refundableAmountCents: any, subTotalIncludingTaxesAmountCents: any, availableToCreditAmountCents: any, totalPaidAmountCents: any, totalAmountCents: any, paymentDisputeLostAt?: any | null, invoiceType: InvoiceTypeEnum, couponsAmountCents: any, feesAmountCents: any, versionNumber: number, fees?: Array<{ __typename?: 'Fee', id: string, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxName: string, taxRate: number }> | null }> | null }; export type TaxInfosForCreateInvoiceFragment = { __typename?: 'Tax', id: string, name: string, code: string, rate: number }; @@ -8560,6 +8648,27 @@ export type FetchDraftInvoiceTaxesMutationVariables = Exact<{ export type FetchDraftInvoiceTaxesMutation = { __typename?: 'Mutation', fetchDraftInvoiceTaxes?: { __typename?: 'AnrokFeeObjectCollection', collection: Array<{ __typename?: 'AnrokFeeObject', amountCents?: any | null, itemId?: string | null, taxAmountCents?: any | null, taxBreakdown?: Array<{ __typename?: 'AnrokBreakdownObject', name?: string | null, rate?: number | null, taxAmount?: any | null, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null }> } | null }; +export type GetPayableInvoicesQueryVariables = Exact<{ + customerExternalId?: InputMaybe; +}>; + + +export type GetPayableInvoicesQuery = { __typename?: 'Query', invoices: { __typename?: 'InvoiceCollection', collection: Array<{ __typename?: 'Invoice', id: string, number: string, currency?: CurrencyEnum | null }> } }; + +export type GetPayableInvoiceQueryVariables = Exact<{ + id: Scalars['ID']['input']; +}>; + + +export type GetPayableInvoiceQuery = { __typename?: 'Query', invoice?: { __typename?: 'Invoice', id: string, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, totalDueAmountCents: any, issuingDate: any, currency?: CurrencyEnum | null, invoiceType: InvoiceTypeEnum } | null }; + +export type CreatePaymentMutationVariables = Exact<{ + input: CreatePaymentInput; +}>; + + +export type CreatePaymentMutation = { __typename?: 'Mutation', createPayment?: { __typename?: 'Payment', id: string } | null }; + export type TaxForPlanAndChargesInPlanFormFragment = { __typename?: 'Tax', id: string, code: string, name: string, rate: number }; export type BillableMetricForPlanFragment = { __typename?: 'BillableMetric', id: string, name: string, code: string, aggregationType: AggregationTypeEnum, recurring: boolean, filters?: Array<{ __typename?: 'BillableMetricFilter', id: string, key: string, values: Array }> | null }; @@ -8644,7 +8753,7 @@ export type GetCustomerDraftInvoicesQueryVariables = Exact<{ }>; -export type GetCustomerDraftInvoicesQuery = { __typename?: 'Query', customerInvoices: { __typename?: 'InvoiceCollection', collection: Array<{ __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }>, metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalCount: number, totalPages: number } } }; +export type GetCustomerDraftInvoicesQuery = { __typename?: 'Query', customerInvoices: { __typename?: 'InvoiceCollection', collection: Array<{ __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }>, metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalCount: number, totalPages: number } } }; export type GetCustomerInfosForDraftInvoicesListQueryVariables = Exact<{ customerId: Scalars['ID']['input']; @@ -8654,14 +8763,14 @@ export type GetCustomerInfosForDraftInvoicesListQueryVariables = Exact<{ export type GetCustomerInfosForDraftInvoicesListQuery = { __typename?: 'Query', customer?: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum } | null, customerInvoices: { __typename?: 'InvoiceCollection', metadata: { __typename?: 'CollectionMetadata', totalCount: number } } }; -export type AllInvoiceDetailsForCustomerInvoiceDetailsFragment = { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null }; +export type AllInvoiceDetailsForCustomerInvoiceDetailsFragment = { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, totalDueAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, totalPaidAmountCents: any, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null }; export type GetInvoiceDetailsQueryVariables = Exact<{ id: Scalars['ID']['input']; }>; -export type GetInvoiceDetailsQuery = { __typename?: 'Query', invoice?: { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; +export type GetInvoiceDetailsQuery = { __typename?: 'Query', invoice?: { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, totalDueAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, totalPaidAmountCents: any, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; export type IntegrationsListForCustomerInvoiceDetailsQueryVariables = Exact<{ limit?: InputMaybe; @@ -8682,7 +8791,7 @@ export type RefreshInvoiceMutationVariables = Exact<{ }>; -export type RefreshInvoiceMutation = { __typename?: 'Mutation', refreshInvoice?: { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; +export type RefreshInvoiceMutation = { __typename?: 'Mutation', refreshInvoice?: { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, number: string, paymentStatus: InvoicePaymentStatusTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, totalAmountCents: any, totalDueAmountCents: any, currency?: CurrencyEnum | null, refundableAmountCents: any, creditableAmountCents: any, voidable: boolean, paymentDisputeLostAt?: any | null, integrationSyncable: boolean, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, associatedActiveWalletPresent: boolean, issuingDate: any, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, subTotalExcludingTaxesAmountCents: any, subTotalIncludingTaxesAmountCents: any, allChargesHaveFees: boolean, versionNumber: number, paymentDueDate: any, paymentOverdue: boolean, totalPaidAmountCents: any, couponsAmountCents: any, creditNotesAmountCents: any, prepaidCreditAmountCents: any, progressiveBillingCreditAmountCents: any, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, customer: { __typename?: 'Customer', name?: string | null, displayName: string, id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, currency?: CurrencyEnum | null, legalNumber?: string | null, legalName?: string | null, taxIdentificationNumber?: string | null, email?: string | null, addressLine1?: string | null, addressLine2?: string | null, state?: string | null, country?: CountryCode | null, city?: string | null, zipcode?: string | null, deletedAt?: any | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null } | null, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, displayInInvoice: boolean, key: string, value: string }> | null }, creditNotes?: Array<{ __typename?: 'CreditNote', id: string, couponsAdjustmentAmountCents: any, number: string, subTotalExcludingTaxesAmountCents: any, currency: CurrencyEnum, totalAmountCents: any, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, amountCurrency: CurrencyEnum, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, groupedBy: any, itemName: string, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum } } | null, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null } }> }> | null, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, description?: string | null, feeType: FeeTypesEnum, invoiceDisplayName?: string | null, invoiceName?: string | null, itemName: string, units: number, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoiceSubscriptions?: Array<{ __typename?: 'InvoiceSubscription', fromDatetime?: any | null, toDatetime?: any | null, chargesFromDatetime?: any | null, chargesToDatetime?: any | null, inAdvanceChargesFromDatetime?: any | null, inAdvanceChargesToDatetime?: any | null, subscription: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, interval: PlanInterval, amountCents: any, amountCurrency: CurrencyEnum, invoiceDisplayName?: string | null } }, fees?: Array<{ __typename?: 'Fee', id: string, amountCents: any, invoiceName?: string | null, invoiceDisplayName?: string | null, units: number, groupedBy: any, description?: string | null, feeType: FeeTypesEnum, itemName: string, preciseUnitAmount: number, eventsCount?: any | null, adjustedFee: boolean, adjustedFeeType?: AdjustedFeeTypeEnum | null, succeededAt?: any | null, currency: CurrencyEnum, subscription?: { __typename?: 'Subscription', id: string, name?: string | null, plan: { __typename?: 'Plan', id: string, name: string, invoiceDisplayName?: string | null, interval: PlanInterval } } | null, charge?: { __typename?: 'Charge', id: string, payInAdvance: boolean, invoiceDisplayName?: string | null, chargeModel: ChargeModelEnum, minAmountCents: any, prorated: boolean, billableMetric: { __typename?: 'BillableMetric', id: string, name: string, aggregationType: AggregationTypeEnum, recurring: boolean } } | null, chargeFilter?: { __typename?: 'ChargeFilter', invoiceDisplayName?: string | null, values: any } | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, taxRate: number }> | null, trueUpFee?: { __typename?: 'Fee', id: string } | null, trueUpParentFee?: { __typename?: 'Fee', id: string } | null, amountDetails?: { __typename?: 'FeeAmountDetails', freeUnits?: string | null, fixedFeeUnitAmount?: string | null, flatUnitAmount?: string | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, paidUnits?: string | null, perPackageSize?: number | null, perPackageUnitAmount?: string | null, fixedFeeTotalAmount?: string | null, freeEvents?: number | null, minMaxAdjustmentTotalAmount?: string | null, paidEvents?: number | null, rate?: string | null, units?: string | null, graduatedRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitAmount?: string | null, perUnitTotalAmount?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null, graduatedPercentageRanges?: Array<{ __typename?: 'FeeAmountDetailsGraduatedPercentageRange', toValue?: any | null, flatUnitAmount?: string | null, fromValue?: any | null, perUnitTotalAmount?: string | null, rate?: string | null, totalWithFlatAmount?: string | null, units?: string | null }> | null } | null }> | null, invoice: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum } }> | null, metadata?: Array<{ __typename?: 'InvoiceMetadata', id: string, key: string, value: string }> | null, appliedTaxes?: Array<{ __typename?: 'InvoiceAppliedTax', id: string, amountCents: any, feesAmountCents: any, taxableAmountCents: any, taxRate: number, taxName: string, enumedTaxCode?: InvoiceAppliedTaxOnWholeInvoiceCodeEnum | null }> | null } | null }; export type SyncIntegrationInvoiceMutationVariables = Exact<{ input: SyncIntegrationInvoiceInput; @@ -8721,7 +8830,7 @@ export type RetryTaxProviderVoidingMutation = { __typename?: 'Mutation', retryTa export type CustomerForRequestOverduePaymentFormFragment = { __typename?: 'Customer', email?: string | null }; -export type InvoicesForRequestOverduePaymentFormFragment = { __typename?: 'Invoice', id: string, number: string, totalAmountCents: any, currency?: CurrencyEnum | null, issuingDate: any }; +export type InvoicesForRequestOverduePaymentFormFragment = { __typename?: 'Invoice', id: string, number: string, totalDueAmountCents: any, currency?: CurrencyEnum | null, issuingDate: any }; export type LastPaymentRequestFragment = { __typename?: 'PaymentRequest', createdAt: any }; @@ -8730,7 +8839,7 @@ export type GetRequestOverduePaymentInfosQueryVariables = Exact<{ }>; -export type GetRequestOverduePaymentInfosQuery = { __typename?: 'Query', organization?: { __typename?: 'CurrentOrganization', defaultCurrency: CurrencyEnum, name: string, logoUrl?: string | null, email?: string | null, netPaymentTerm: number, billingConfiguration?: { __typename?: 'OrganizationBillingConfiguration', documentLocale?: string | null } | null } | null, customer?: { __typename?: 'Customer', externalId: string, currency?: CurrencyEnum | null, email?: string | null, displayName: string, paymentProvider?: ProviderTypeEnum | null, netPaymentTerm?: number | null, billingConfiguration?: { __typename?: 'CustomerBillingConfiguration', documentLocale?: string | null } | null } | null, paymentRequests: { __typename?: 'PaymentRequestCollection', collection: Array<{ __typename?: 'PaymentRequest', createdAt: any }> }, invoices: { __typename?: 'InvoiceCollection', collection: Array<{ __typename?: 'Invoice', id: string, number: string, totalAmountCents: any, currency?: CurrencyEnum | null, issuingDate: any }> } }; +export type GetRequestOverduePaymentInfosQuery = { __typename?: 'Query', organization?: { __typename?: 'CurrentOrganization', defaultCurrency: CurrencyEnum, name: string, logoUrl?: string | null, email?: string | null, netPaymentTerm: number, billingConfiguration?: { __typename?: 'OrganizationBillingConfiguration', documentLocale?: string | null } | null } | null, customer?: { __typename?: 'Customer', externalId: string, currency?: CurrencyEnum | null, email?: string | null, displayName: string, paymentProvider?: ProviderTypeEnum | null, netPaymentTerm?: number | null, billingConfiguration?: { __typename?: 'CustomerBillingConfiguration', documentLocale?: string | null } | null } | null, paymentRequests: { __typename?: 'PaymentRequestCollection', collection: Array<{ __typename?: 'PaymentRequest', createdAt: any }> }, invoices: { __typename?: 'InvoiceCollection', collection: Array<{ __typename?: 'Invoice', id: string, number: string, totalDueAmountCents: any, currency?: CurrencyEnum | null, issuingDate: any }> } }; export type CreatePaymentRequestMutationVariables = Exact<{ input: PaymentRequestCreateInput; @@ -8786,15 +8895,6 @@ export type OktaAcceptInviteMutationVariables = Exact<{ export type OktaAcceptInviteMutation = { __typename?: 'Mutation', oktaAcceptInvite?: { __typename?: 'LoginUser', token: string, user: { __typename?: 'User', id: string, organizations: Array<{ __typename?: 'Organization', id: string, name: string, timezone?: TimezoneEnum | null }> } } | null }; -export type GetInvoiceCreditNotesQueryVariables = Exact<{ - invoiceId: Scalars['ID']['input']; - page?: InputMaybe; - limit?: InputMaybe; -}>; - - -export type GetInvoiceCreditNotesQuery = { __typename?: 'Query', invoiceCreditNotes?: { __typename?: 'CreditNoteCollection', metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalPages: number, totalCount: number }, collection: Array<{ __typename?: 'CreditNote', id: string, number: string, totalAmountCents: any, refundAmountCents: any, creditAmountCents: any, currency: CurrencyEnum, createdAt: any, canBeVoided: boolean, voidedAt?: any | null, taxProviderSyncable: boolean, errorDetails?: Array<{ __typename?: 'ErrorDetail', id: string, errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null, invoice?: { __typename?: 'Invoice', id: string, number: string, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum } } | null }> } | null, invoice?: { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, associatedActiveWalletPresent: boolean, paymentStatus: InvoicePaymentStatusTypeEnum, refundableAmountCents: any, creditableAmountCents: any, status: InvoiceStatusTypeEnum, customer: { __typename?: 'Customer', id: string, applicableTimezone: TimezoneEnum, displayName: string } } | null }; - export type InvoiceDetailsForInvoiceOverviewFragment = { __typename?: 'Invoice', id: string, invoiceType: InvoiceTypeEnum, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, issuingDate: any, externalIntegrationId?: string | null, taxProviderVoidable: boolean, integrationHubspotSyncable: boolean, externalHubspotIntegrationId?: string | null, integrationSalesforceSyncable: boolean, externalSalesforceIntegrationId?: string | null, customer: { __typename?: 'Customer', id: string, applicableTimezone: TimezoneEnum, accountType: CustomerAccountTypeEnum, anrokCustomer?: { __typename?: 'AnrokCustomer', id: string, externalAccountId?: string | null } | null, netsuiteCustomer?: { __typename?: 'NetsuiteCustomer', externalCustomerId?: string | null } | null, xeroCustomer?: { __typename?: 'XeroCustomer', externalCustomerId?: string | null } | null, hubspotCustomer?: { __typename?: 'HubspotCustomer', externalCustomerId?: string | null } | null, salesforceCustomer?: { __typename?: 'SalesforceCustomer', externalCustomerId?: string | null } | null } }; export type NetsuiteIntegrationInfosForInvoiceOverviewFragment = { __typename?: 'NetsuiteIntegration', id: string, accountId?: string | null, name: string }; @@ -8811,6 +8911,7 @@ export type GetInvoicesListQueryVariables = Exact<{ issuingDateTo?: InputMaybe; limit?: InputMaybe; page?: InputMaybe; + partiallyPaid?: InputMaybe; paymentDisputeLost?: InputMaybe; paymentOverdue?: InputMaybe; paymentStatus?: InputMaybe | InvoicePaymentStatusTypeEnum>; @@ -8822,7 +8923,17 @@ export type GetInvoicesListQueryVariables = Exact<{ }>; -export type GetInvoicesListQuery = { __typename?: 'Query', invoices: { __typename?: 'InvoiceCollection', metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalPages: number, totalCount: number }, collection: Array<{ __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }> } }; +export type GetInvoicesListQuery = { __typename?: 'Query', invoices: { __typename?: 'InvoiceCollection', metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalPages: number, totalCount: number }, collection: Array<{ __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, taxStatus?: InvoiceTaxStatusTypeEnum | null, paymentStatus: InvoicePaymentStatusTypeEnum, paymentOverdue: boolean, number: string, issuingDate: any, totalAmountCents: any, totalDueAmountCents: any, totalPaidAmountCents: any, currency?: CurrencyEnum | null, voidable: boolean, paymentDisputeLostAt?: any | null, taxProviderVoidable: boolean, invoiceType: InvoiceTypeEnum, creditableAmountCents: any, refundableAmountCents: any, associatedActiveWalletPresent: boolean, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, errorDetails?: Array<{ __typename?: 'ErrorDetail', errorCode: ErrorCodesEnum, errorDetails?: string | null }> | null }> } }; + +export type GetPaymentListQueryVariables = Exact<{ + invoiceId?: InputMaybe; + externalCustomerId?: InputMaybe; + limit?: InputMaybe; + page?: InputMaybe; +}>; + + +export type GetPaymentListQuery = { __typename?: 'Query', payments: { __typename?: 'PaymentCollection', metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalPages: number, totalCount: number }, collection: Array<{ __typename?: 'Payment', amountCents: any, amountCurrency: CurrencyEnum, createdAt: any, id: string, payablePaymentStatus?: PayablePaymentStatusEnum | null, paymentProviderType?: ProviderTypeEnum | null, paymentType: PaymentTypeEnum, providerPaymentId?: string | null, reference?: string | null, payable: { __typename?: 'Invoice', id: string, number: string } | { __typename?: 'PaymentRequest', invoices: Array<{ __typename?: 'Invoice', id: string }> }, customer: { __typename?: 'Customer', id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum } }> } }; export type GetCreditNotesListQueryVariables = Exact<{ amountFrom?: InputMaybe; @@ -8865,6 +8976,15 @@ export type CreateCreditNotesDataExportMutationVariables = Exact<{ export type CreateCreditNotesDataExportMutation = { __typename?: 'Mutation', createCreditNotesDataExport?: { __typename?: 'DataExport', id: string } | null }; +export type InvoiceForPaymentDetailsFragment = { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, paymentStatus: InvoicePaymentStatusTypeEnum, number: string, totalAmountCents: any, issuingDate: any, currency?: CurrencyEnum | null, paymentOverdue: boolean, totalPaidAmountCents: any, paymentDisputeLostAt?: any | null }; + +export type GetPaymentDetailsQueryVariables = Exact<{ + id: Scalars['ID']['input']; +}>; + + +export type GetPaymentDetailsQuery = { __typename?: 'Query', payment?: { __typename?: 'Payment', id: string, amountCents: any, amountCurrency: CurrencyEnum, createdAt: any, updatedAt?: any | null, reference?: string | null, paymentType: PaymentTypeEnum, paymentProviderType?: ProviderTypeEnum | null, payablePaymentStatus?: PayablePaymentStatusEnum | null, providerPaymentId?: string | null, customer: { __typename?: 'Customer', deletedAt?: any | null, id: string, name?: string | null, displayName: string, applicableTimezone: TimezoneEnum }, payable: { __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, paymentStatus: InvoicePaymentStatusTypeEnum, number: string, totalAmountCents: any, issuingDate: any, currency?: CurrencyEnum | null, paymentOverdue: boolean, totalPaidAmountCents: any, paymentDisputeLostAt?: any | null } | { __typename?: 'PaymentRequest', id: string, invoices: Array<{ __typename?: 'Invoice', id: string, status: InvoiceStatusTypeEnum, paymentStatus: InvoicePaymentStatusTypeEnum, number: string, totalAmountCents: any, issuingDate: any, currency?: CurrencyEnum | null, paymentOverdue: boolean, totalPaidAmountCents: any, paymentDisputeLostAt?: any | null }> } } | null }; + export type GetPlanForDetailsQueryVariables = Exact<{ planId: Scalars['ID']['input']; }>; @@ -9253,7 +9373,7 @@ export type RemoveTaxManagementIntegrationMutation = { __typename?: 'Mutation', export type InviteItemForMembersSettingsFragment = { __typename?: 'Invite', id: string, email: string, token: string, role: MembershipRole, organization: { __typename?: 'Organization', id: string, name: string } }; -export type MembershipItemForMembershipSettingsFragment = { __typename?: 'Membership', id: string, role: MembershipRole, user: { __typename?: 'User', id: string, email?: string | null }, organization: { __typename?: 'Organization', id: string, name: string }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }; +export type MembershipItemForMembershipSettingsFragment = { __typename?: 'Membership', id: string, role: MembershipRole, user: { __typename?: 'User', id: string, email?: string | null }, organization: { __typename?: 'Organization', id: string, name: string }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, paymentsCreate: boolean, paymentsView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }; export type GetInvitesQueryVariables = Exact<{ page?: InputMaybe; @@ -9269,7 +9389,7 @@ export type GetMembersQueryVariables = Exact<{ }>; -export type GetMembersQuery = { __typename?: 'Query', memberships: { __typename?: 'MembershipCollection', metadata: { __typename?: 'Metadata', currentPage: number, totalPages: number, totalCount: number, adminCount: number }, collection: Array<{ __typename?: 'Membership', id: string, role: MembershipRole, user: { __typename?: 'User', id: string, email?: string | null }, organization: { __typename?: 'Organization', id: string, name: string }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }> } }; +export type GetMembersQuery = { __typename?: 'Query', memberships: { __typename?: 'MembershipCollection', metadata: { __typename?: 'Metadata', currentPage: number, totalPages: number, totalCount: number, adminCount: number }, collection: Array<{ __typename?: 'Membership', id: string, role: MembershipRole, user: { __typename?: 'User', id: string, email?: string | null }, organization: { __typename?: 'Organization', id: string, name: string }, permissions: { __typename?: 'Permissions', addonsCreate: boolean, addonsDelete: boolean, addonsUpdate: boolean, addonsView: boolean, analyticsView: boolean, analyticsOverdueBalancesView: boolean, billableMetricsCreate: boolean, billableMetricsDelete: boolean, billableMetricsUpdate: boolean, billableMetricsView: boolean, couponsAttach: boolean, couponsCreate: boolean, couponsDelete: boolean, couponsDetach: boolean, couponsUpdate: boolean, couponsView: boolean, creditNotesCreate: boolean, creditNotesView: boolean, creditNotesVoid: boolean, customerSettingsUpdateGracePeriod: boolean, customerSettingsUpdateLang: boolean, customerSettingsUpdatePaymentTerms: boolean, customerSettingsUpdateTaxRates: boolean, customerSettingsView: boolean, customersCreate: boolean, customersDelete: boolean, customersUpdate: boolean, customersView: boolean, developersKeysManage: boolean, developersManage: boolean, draftInvoicesUpdate: boolean, dunningCampaignsCreate: boolean, dunningCampaignsUpdate: boolean, dunningCampaignsView: boolean, invoiceCustomSectionsCreate: boolean, invoiceCustomSectionsUpdate: boolean, invoicesCreate: boolean, invoicesSend: boolean, invoicesUpdate: boolean, invoicesView: boolean, invoicesVoid: boolean, organizationEmailsUpdate: boolean, organizationEmailsView: boolean, organizationIntegrationsCreate: boolean, organizationIntegrationsDelete: boolean, organizationIntegrationsUpdate: boolean, organizationIntegrationsView: boolean, organizationInvoicesUpdate: boolean, organizationInvoicesView: boolean, organizationMembersCreate: boolean, organizationMembersDelete: boolean, organizationMembersUpdate: boolean, organizationMembersView: boolean, organizationTaxesUpdate: boolean, organizationTaxesView: boolean, organizationUpdate: boolean, organizationView: boolean, paymentsCreate: boolean, paymentsView: boolean, plansCreate: boolean, plansDelete: boolean, plansUpdate: boolean, plansView: boolean, subscriptionsCreate: boolean, subscriptionsUpdate: boolean, subscriptionsView: boolean, walletsCreate: boolean, walletsTerminate: boolean, walletsTopUp: boolean, walletsUpdate: boolean } }> } }; export type NetsuiteIntegrationDetailsFragment = { __typename?: 'NetsuiteIntegration', id: string, name: string, accountId?: string | null, clientId?: string | null, clientSecret?: string | null, code: string, scriptEndpointUrl: string, syncCreditNotes?: boolean | null, syncInvoices?: boolean | null, syncPayments?: boolean | null, tokenId?: string | null, tokenSecret?: string | null }; @@ -9547,6 +9667,8 @@ export const InvoiceListItemFragmentDoc = gql` number issuingDate totalAmountCents + totalDueAmountCents + totalPaidAmountCents currency voidable paymentDisputeLostAt @@ -9853,7 +9975,7 @@ export const InvoicesForDunningEmailFragmentDoc = gql` fragment InvoicesForDunningEmail on Invoice { id number - totalAmountCents + totalDueAmountCents currency } `; @@ -9874,6 +9996,36 @@ export const AddOnForInvoiceEditTaxDialogFragmentDoc = gql` } } ${TaxForInvoiceEditTaxDialogFragmentDoc}`; +export const PaymentForPaymentsListFragmentDoc = gql` + fragment PaymentForPaymentsList on Payment { + amountCents + amountCurrency + createdAt + id + payable { + ... on Invoice { + id + number + } + ... on PaymentRequest { + invoices { + id + } + } + } + payablePaymentStatus + paymentProviderType + paymentType + providerPaymentId + reference + customer { + id + name + displayName + applicableTimezone + } +} + `; export const InvoiceForVoidInvoiceDialogFragmentDoc = gql` fragment InvoiceForVoidInvoiceDialog on Invoice { id @@ -10596,6 +10748,7 @@ export const InvoiceForCreditNoteFormCalculationFragmentDoc = gql` currency versionNumber paymentDisputeLostAt + totalPaidAmountCents fees { id appliedTaxes { @@ -10611,11 +10764,14 @@ export const CreateCreditNoteInvoiceFragmentDoc = gql` id currency number + status paymentStatus creditableAmountCents refundableAmountCents subTotalIncludingTaxesAmountCents availableToCreditAmountCents + totalPaidAmountCents + totalAmountCents paymentDisputeLostAt invoiceType ...InvoiceForCreditNoteFormCalculation @@ -10827,6 +10983,8 @@ export const MembershipPermissionsFragmentDoc = gql` organizationTaxesView organizationUpdate organizationView + paymentsCreate + paymentsView plansCreate plansDelete plansUpdate @@ -11812,6 +11970,8 @@ export const InvoiceForDetailsTableFooterFragmentDoc = gql` subTotalExcludingTaxesAmountCents subTotalIncludingTaxesAmountCents totalAmountCents + totalDueAmountCents + totalPaidAmountCents currency invoiceType status @@ -11899,6 +12059,8 @@ export const InvoiceForInvoiceInfosFragmentDoc = gql` paymentDueDate paymentOverdue status + totalPaidAmountCents + totalAmountCents paymentStatus paymentDisputeLostAt taxProviderVoidable @@ -11955,6 +12117,7 @@ export const AllInvoiceDetailsForCustomerInvoiceDetailsFragmentDoc = gql` status taxStatus totalAmountCents + totalDueAmountCents currency refundableAmountCents creditableAmountCents @@ -12018,7 +12181,7 @@ export const InvoicesForRequestOverduePaymentFormFragmentDoc = gql` fragment InvoicesForRequestOverduePaymentForm on Invoice { id number - totalAmountCents + totalDueAmountCents currency issuingDate } @@ -12062,6 +12225,20 @@ export const SalesforceIntegrationInfosForInvoiceOverviewFragmentDoc = gql` instanceId } `; +export const InvoiceForPaymentDetailsFragmentDoc = gql` + fragment InvoiceForPaymentDetails on Invoice { + id + status + paymentStatus + number + totalAmountCents + issuingDate + currency + paymentOverdue + totalPaidAmountCents + paymentDisputeLostAt +} + `; export const DeletePlanDialogFragmentDoc = gql` fragment DeletePlanDialog on Plan { id @@ -15980,6 +16157,62 @@ export function useFinalizeInvoiceMutation(baseOptions?: Apollo.MutationHookOpti export type FinalizeInvoiceMutationHookResult = ReturnType; export type FinalizeInvoiceMutationResult = Apollo.MutationResult; export type FinalizeInvoiceMutationOptions = Apollo.BaseMutationOptions; +export const GetInvoiceCreditNotesDocument = gql` + query getInvoiceCreditNotes($invoiceId: ID!, $page: Int, $limit: Int) { + invoiceCreditNotes(invoiceId: $invoiceId, page: $page, limit: $limit) { + ...CreditNotesForTable + } + invoice(id: $invoiceId) { + id + invoiceType + associatedActiveWalletPresent + paymentStatus + refundableAmountCents + creditableAmountCents + status + customer { + id + applicableTimezone + displayName + } + } +} + ${CreditNotesForTableFragmentDoc}`; + +/** + * __useGetInvoiceCreditNotesQuery__ + * + * To run a query within a React component, call `useGetInvoiceCreditNotesQuery` and pass it any options that fit your needs. + * When your component renders, `useGetInvoiceCreditNotesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetInvoiceCreditNotesQuery({ + * variables: { + * invoiceId: // value for 'invoiceId' + * page: // value for 'page' + * limit: // value for 'limit' + * }, + * }); + */ +export function useGetInvoiceCreditNotesQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: GetInvoiceCreditNotesQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetInvoiceCreditNotesDocument, options); + } +export function useGetInvoiceCreditNotesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetInvoiceCreditNotesDocument, options); + } +export function useGetInvoiceCreditNotesSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(GetInvoiceCreditNotesDocument, options); + } +export type GetInvoiceCreditNotesQueryHookResult = ReturnType; +export type GetInvoiceCreditNotesLazyQueryHookResult = ReturnType; +export type GetInvoiceCreditNotesSuspenseQueryHookResult = ReturnType; +export type GetInvoiceCreditNotesQueryResult = Apollo.QueryResult; export const VoidInvoiceDocument = gql` mutation voidInvoice($input: VoidInvoiceInput!) { voidInvoice(input: $input) { @@ -22160,6 +22393,130 @@ export function useFetchDraftInvoiceTaxesMutation(baseOptions?: Apollo.MutationH export type FetchDraftInvoiceTaxesMutationHookResult = ReturnType; export type FetchDraftInvoiceTaxesMutationResult = Apollo.MutationResult; export type FetchDraftInvoiceTaxesMutationOptions = Apollo.BaseMutationOptions; +export const GetPayableInvoicesDocument = gql` + query GetPayableInvoices($customerExternalId: String) { + invoices(positiveDueAmount: true, customerExternalId: $customerExternalId) { + collection { + id + number + currency + } + } +} + `; + +/** + * __useGetPayableInvoicesQuery__ + * + * To run a query within a React component, call `useGetPayableInvoicesQuery` and pass it any options that fit your needs. + * When your component renders, `useGetPayableInvoicesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetPayableInvoicesQuery({ + * variables: { + * customerExternalId: // value for 'customerExternalId' + * }, + * }); + */ +export function useGetPayableInvoicesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetPayableInvoicesDocument, options); + } +export function useGetPayableInvoicesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetPayableInvoicesDocument, options); + } +export function useGetPayableInvoicesSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(GetPayableInvoicesDocument, options); + } +export type GetPayableInvoicesQueryHookResult = ReturnType; +export type GetPayableInvoicesLazyQueryHookResult = ReturnType; +export type GetPayableInvoicesSuspenseQueryHookResult = ReturnType; +export type GetPayableInvoicesQueryResult = Apollo.QueryResult; +export const GetPayableInvoiceDocument = gql` + query GetPayableInvoice($id: ID!) { + invoice(id: $id) { + id + number + paymentStatus + status + totalDueAmountCents + issuingDate + currency + invoiceType + } +} + `; + +/** + * __useGetPayableInvoiceQuery__ + * + * To run a query within a React component, call `useGetPayableInvoiceQuery` and pass it any options that fit your needs. + * When your component renders, `useGetPayableInvoiceQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetPayableInvoiceQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useGetPayableInvoiceQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: GetPayableInvoiceQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetPayableInvoiceDocument, options); + } +export function useGetPayableInvoiceLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetPayableInvoiceDocument, options); + } +export function useGetPayableInvoiceSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(GetPayableInvoiceDocument, options); + } +export type GetPayableInvoiceQueryHookResult = ReturnType; +export type GetPayableInvoiceLazyQueryHookResult = ReturnType; +export type GetPayableInvoiceSuspenseQueryHookResult = ReturnType; +export type GetPayableInvoiceQueryResult = Apollo.QueryResult; +export const CreatePaymentDocument = gql` + mutation CreatePayment($input: CreatePaymentInput!) { + createPayment(input: $input) { + id + } +} + `; +export type CreatePaymentMutationFn = Apollo.MutationFunction; + +/** + * __useCreatePaymentMutation__ + * + * To run a mutation, you first call `useCreatePaymentMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreatePaymentMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createPaymentMutation, { data, loading, error }] = useCreatePaymentMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreatePaymentMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreatePaymentDocument, options); + } +export type CreatePaymentMutationHookResult = ReturnType; +export type CreatePaymentMutationResult = Apollo.MutationResult; +export type CreatePaymentMutationOptions = Apollo.BaseMutationOptions; export const GetPlansDocument = gql` query getPlans($page: Int, $limit: Int, $searchTerm: String) { plans(page: $page, limit: $limit, searchTerm: $searchTerm) { @@ -23390,64 +23747,8 @@ export function useOktaAcceptInviteMutation(baseOptions?: Apollo.MutationHookOpt export type OktaAcceptInviteMutationHookResult = ReturnType; export type OktaAcceptInviteMutationResult = Apollo.MutationResult; export type OktaAcceptInviteMutationOptions = Apollo.BaseMutationOptions; -export const GetInvoiceCreditNotesDocument = gql` - query getInvoiceCreditNotes($invoiceId: ID!, $page: Int, $limit: Int) { - invoiceCreditNotes(invoiceId: $invoiceId, page: $page, limit: $limit) { - ...CreditNotesForTable - } - invoice(id: $invoiceId) { - id - invoiceType - associatedActiveWalletPresent - paymentStatus - refundableAmountCents - creditableAmountCents - status - customer { - id - applicableTimezone - displayName - } - } -} - ${CreditNotesForTableFragmentDoc}`; - -/** - * __useGetInvoiceCreditNotesQuery__ - * - * To run a query within a React component, call `useGetInvoiceCreditNotesQuery` and pass it any options that fit your needs. - * When your component renders, `useGetInvoiceCreditNotesQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useGetInvoiceCreditNotesQuery({ - * variables: { - * invoiceId: // value for 'invoiceId' - * page: // value for 'page' - * limit: // value for 'limit' - * }, - * }); - */ -export function useGetInvoiceCreditNotesQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: GetInvoiceCreditNotesQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(GetInvoiceCreditNotesDocument, options); - } -export function useGetInvoiceCreditNotesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(GetInvoiceCreditNotesDocument, options); - } -export function useGetInvoiceCreditNotesSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { - const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(GetInvoiceCreditNotesDocument, options); - } -export type GetInvoiceCreditNotesQueryHookResult = ReturnType; -export type GetInvoiceCreditNotesLazyQueryHookResult = ReturnType; -export type GetInvoiceCreditNotesSuspenseQueryHookResult = ReturnType; -export type GetInvoiceCreditNotesQueryResult = Apollo.QueryResult; export const GetInvoicesListDocument = gql` - query getInvoicesList($currency: CurrencyEnum, $customerExternalId: String, $invoiceType: [InvoiceTypeEnum!], $issuingDateFrom: ISO8601Date, $issuingDateTo: ISO8601Date, $limit: Int, $page: Int, $paymentDisputeLost: Boolean, $paymentOverdue: Boolean, $paymentStatus: [InvoicePaymentStatusTypeEnum!], $searchTerm: String, $status: [InvoiceStatusTypeEnum!], $amountFrom: Int, $amountTo: Int, $selfBilled: Boolean) { + query getInvoicesList($currency: CurrencyEnum, $customerExternalId: String, $invoiceType: [InvoiceTypeEnum!], $issuingDateFrom: ISO8601Date, $issuingDateTo: ISO8601Date, $limit: Int, $page: Int, $partiallyPaid: Boolean, $paymentDisputeLost: Boolean, $paymentOverdue: Boolean, $paymentStatus: [InvoicePaymentStatusTypeEnum!], $searchTerm: String, $status: [InvoiceStatusTypeEnum!], $amountFrom: Int, $amountTo: Int, $selfBilled: Boolean) { invoices( currency: $currency customerExternalId: $customerExternalId @@ -23456,6 +23757,7 @@ export const GetInvoicesListDocument = gql` issuingDateTo: $issuingDateTo limit: $limit page: $page + partiallyPaid: $partiallyPaid paymentDisputeLost: $paymentDisputeLost paymentOverdue: $paymentOverdue paymentStatus: $paymentStatus @@ -23497,6 +23799,7 @@ export const GetInvoicesListDocument = gql` * issuingDateTo: // value for 'issuingDateTo' * limit: // value for 'limit' * page: // value for 'page' + * partiallyPaid: // value for 'partiallyPaid' * paymentDisputeLost: // value for 'paymentDisputeLost' * paymentOverdue: // value for 'paymentOverdue' * paymentStatus: // value for 'paymentStatus' @@ -23524,6 +23827,61 @@ export type GetInvoicesListQueryHookResult = ReturnType; export type GetInvoicesListSuspenseQueryHookResult = ReturnType; export type GetInvoicesListQueryResult = Apollo.QueryResult; +export const GetPaymentListDocument = gql` + query getPaymentList($invoiceId: ID, $externalCustomerId: ID, $limit: Int, $page: Int) { + payments( + invoiceId: $invoiceId + externalCustomerId: $externalCustomerId + limit: $limit + page: $page + ) { + metadata { + currentPage + totalPages + totalCount + } + collection { + ...PaymentForPaymentsList + } + } +} + ${PaymentForPaymentsListFragmentDoc}`; + +/** + * __useGetPaymentListQuery__ + * + * To run a query within a React component, call `useGetPaymentListQuery` and pass it any options that fit your needs. + * When your component renders, `useGetPaymentListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetPaymentListQuery({ + * variables: { + * invoiceId: // value for 'invoiceId' + * externalCustomerId: // value for 'externalCustomerId' + * limit: // value for 'limit' + * page: // value for 'page' + * }, + * }); + */ +export function useGetPaymentListQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetPaymentListDocument, options); + } +export function useGetPaymentListLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetPaymentListDocument, options); + } +export function useGetPaymentListSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(GetPaymentListDocument, options); + } +export type GetPaymentListQueryHookResult = ReturnType; +export type GetPaymentListLazyQueryHookResult = ReturnType; +export type GetPaymentListSuspenseQueryHookResult = ReturnType; +export type GetPaymentListQueryResult = Apollo.QueryResult; export const GetCreditNotesListDocument = gql` query getCreditNotesList($amountFrom: Int, $amountTo: Int, $creditStatus: [CreditNoteCreditStatusEnum!], $currency: CurrencyEnum, $customerExternalId: String, $invoiceNumber: String, $issuingDateFrom: ISO8601Date, $issuingDateTo: ISO8601Date, $reason: [CreditNoteReasonEnum!], $refundStatus: [CreditNoteRefundStatusEnum!], $limit: Int, $page: Int, $searchTerm: String, $selfBilled: Boolean) { creditNotes( @@ -23693,6 +24051,73 @@ export function useCreateCreditNotesDataExportMutation(baseOptions?: Apollo.Muta export type CreateCreditNotesDataExportMutationHookResult = ReturnType; export type CreateCreditNotesDataExportMutationResult = Apollo.MutationResult; export type CreateCreditNotesDataExportMutationOptions = Apollo.BaseMutationOptions; +export const GetPaymentDetailsDocument = gql` + query GetPaymentDetails($id: ID!) { + payment(id: $id) { + id + amountCents + amountCurrency + createdAt + updatedAt + reference + paymentType + paymentProviderType + payablePaymentStatus + providerPaymentId + customer { + deletedAt + id + name + displayName + applicableTimezone + } + payable { + ... on Invoice { + ...InvoiceForPaymentDetails + } + ... on PaymentRequest { + id + invoices { + ...InvoiceForPaymentDetails + } + } + } + } +} + ${InvoiceForPaymentDetailsFragmentDoc}`; + +/** + * __useGetPaymentDetailsQuery__ + * + * To run a query within a React component, call `useGetPaymentDetailsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetPaymentDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetPaymentDetailsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useGetPaymentDetailsQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: GetPaymentDetailsQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetPaymentDetailsDocument, options); + } +export function useGetPaymentDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetPaymentDetailsDocument, options); + } +export function useGetPaymentDetailsSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(GetPaymentDetailsDocument, options); + } +export type GetPaymentDetailsQueryHookResult = ReturnType; +export type GetPaymentDetailsLazyQueryHookResult = ReturnType; +export type GetPaymentDetailsSuspenseQueryHookResult = ReturnType; +export type GetPaymentDetailsQueryResult = Apollo.QueryResult; export const GetPlanForDetailsDocument = gql` query getPlanForDetails($planId: ID!) { plan(id: $planId) { diff --git a/src/hooks/useCreateEditCustomer.ts b/src/hooks/useCreateEditCustomer.ts index a3661132a..d8974533a 100644 --- a/src/hooks/useCreateEditCustomer.ts +++ b/src/hooks/useCreateEditCustomer.ts @@ -3,6 +3,7 @@ import { useEffect } from 'react' import { generatePath, useNavigate, useParams } from 'react-router-dom' import { addToast, hasDefinedGQLError } from '~/core/apolloClient' +import { CustomerDetailsTabsOptions } from '~/core/constants/NavigationEnum' import { CUSTOMER_DETAILS_ROUTE, CUSTOMER_DETAILS_TAB_ROUTE, @@ -24,7 +25,6 @@ import { useUpdateCustomerMutation, } from '~/generated/graphql' import { useInternationalization } from '~/hooks/core/useInternationalization' -import { CustomerDetailsTabsOptions } from '~/pages/CustomerDetails' gql` fragment CustomerForExternalAppsAccordion on Customer { diff --git a/src/hooks/usePermissions.ts b/src/hooks/usePermissions.ts index 8fdfbc5be..292c31387 100644 --- a/src/hooks/usePermissions.ts +++ b/src/hooks/usePermissions.ts @@ -65,6 +65,8 @@ gql` organizationTaxesView organizationUpdate organizationView + paymentsCreate + paymentsView plansCreate plansDelete plansUpdate diff --git a/src/pages/CreateCreditNote.tsx b/src/pages/CreateCreditNote.tsx index 33cd389a6..046039cbc 100644 --- a/src/pages/CreateCreditNote.tsx +++ b/src/pages/CreateCreditNote.tsx @@ -4,7 +4,6 @@ import _get from 'lodash/get' import { DateTime } from 'luxon' import { useEffect, useMemo, useRef, useState } from 'react' import { generatePath, useNavigate, useParams } from 'react-router-dom' -import styled from 'styled-components' import { array, object, string } from 'yup' import { CreditNoteCodeSnippet } from '~/components/creditNote/CreditNoteCodeSnippet' @@ -20,7 +19,6 @@ import { Icon, Skeleton, Status, - StatusProps, StatusType, Typography, } from '~/components/designSystem' @@ -28,6 +26,7 @@ import { Checkbox, ComboBoxField, TextInputField } from '~/components/form' import { WarningDialog, WarningDialogRef } from '~/components/WarningDialog' import { hasDefinedGQLError } from '~/core/apolloClient' import { CustomerInvoiceDetailsTabsOptionsEnum } from '~/core/constants/NavigationEnum' +import { paymentStatusMapping } from '~/core/constants/statusInvoiceMapping' import { intlFormatNumber } from '~/core/formats/intlFormatNumber' import { CUSTOMER_INVOICE_DETAILS_ROUTE } from '~/core/router' import { deserializeAmount } from '~/core/serializers/serializeAmount' @@ -40,13 +39,12 @@ import { CreditNoteReasonEnum, CurrencyEnum, InvoiceForCreditNoteFormCalculationFragmentDoc, - InvoicePaymentStatusTypeEnum, InvoiceTypeEnum, LagoApiError, } from '~/generated/graphql' import { useInternationalization } from '~/hooks/core/useInternationalization' import { useCreateCreditNote } from '~/hooks/useCreateCreditNote' -import { HEADER_TABLE_HEIGHT, PageHeader, theme } from '~/styles' +import { PageHeader } from '~/styles' import { Content, Main, Side, Subtitle, Title } from '~/styles/mainObjectsForm' gql` @@ -54,11 +52,14 @@ gql` id currency number + status paymentStatus creditableAmountCents refundableAmountCents subTotalIncludingTaxesAmountCents availableToCreditAmountCents + totalPaidAmountCents + totalAmountCents paymentDisputeLostAt invoiceType ...InvoiceForCreditNoteFormCalculation @@ -108,26 +109,6 @@ const determineCheckboxValue = ( return additionnalValue } -const mapStatus = (type?: InvoicePaymentStatusTypeEnum | undefined): StatusProps => { - switch (type) { - case InvoicePaymentStatusTypeEnum.Succeeded: - return { - type: StatusType.success, - label: 'succeeded', - } - case InvoicePaymentStatusTypeEnum.Pending: - return { - type: StatusType.default, - label: 'pending', - } - default: - return { - type: StatusType.warning, - label: 'failed', - } - } -} - const CreateCreditNote = () => { const navigate = useNavigate() const { translate } = useInternationalization() @@ -154,7 +135,6 @@ const CreateCreditNote = () => { const [payBackValidation, setPayBackValidation] = useState(array()) - const statusMap = mapStatus(invoice?.paymentStatus) const formikProps = useFormik>({ initialValues: { description: undefined, @@ -253,6 +233,9 @@ const CreateCreditNote = () => { ) const isPrepaidCreditsInvoice = invoice?.invoiceType === InvoiceTypeEnum.Credit + const isPartiallyPaid = + invoice?.totalPaidAmountCents > 0 && + invoice?.totalAmountCents - invoice?.totalPaidAmountCents > 0 const creditFeeValue = formikProps.values.creditFee?.[0]?.value @@ -305,20 +288,20 @@ const CreateCreditNote = () => { <> - - + + - + - +
- +
) : ( <> @@ -326,7 +309,7 @@ const CreateCreditNote = () => { {translate('text_636bedf292786b19d3398ec4')} {translate('text_636bedf292786b19d3398ec6')} - + @@ -348,14 +331,39 @@ const CreateCreditNote = () => { }, ), })} + {isPartiallyPaid && ( + + {translate('text_1738147471201z79f2wsgfic', { + paidAmount: intlFormatNumber( + deserializeAmount(invoice?.totalPaidAmountCents || 0, currency), + { + currency, + }, + ), + })} + + )} - {!!invoice?.paymentDisputeLostAt ? ( - - ) : ( - - )} - +
+ {!!invoice?.paymentDisputeLostAt ? ( + + ) : ( + + )} +
+ @@ -413,7 +421,7 @@ const CreateCreditNote = () => { {isPrepaidCreditsInvoice && ( - +
{ {translate('text_636bedf292786b19d3398ee0')} - +
)} {feeForCredit && @@ -458,7 +466,7 @@ const CreateCreditNote = () => { return (
- +
{ {translate('text_636bedf292786b19d3398ee0')} - +
{Object.keys(subscription?.fees)?.map((groupFeeKey) => { const child = subscription?.fees[groupFeeKey] as FromFee @@ -599,7 +607,7 @@ const CreateCreditNote = () => { /> )} - +
- +
)}
@@ -642,34 +650,3 @@ const CreateCreditNote = () => { } export default CreateCreditNote - -const StyledCard = styled.div<{ $loading?: boolean }>` - border: 1px solid ${theme.palette.grey[300]}; - border-radius: 12px; - box-sizing: border-box; - padding: ${theme.spacing(4)}; - display: flex; - align-items: center; - - > *:first-child { - display: flex; - margin-right: ${theme.spacing(3)}; - } - - > *:last-child { - margin-left: auto; - } -` - -const HeaderLine = styled.div` - display: flex; - align-items: center; - justify-content: space-between; - box-shadow: ${theme.shadows[7]}; - height: ${HEADER_TABLE_HEIGHT}px; -` - -const ButtonContainer = styled.div` - padding: 0 ${theme.spacing(8)}; - margin-bottom: ${theme.spacing(20)}; -` diff --git a/src/pages/CreatePayment.tsx b/src/pages/CreatePayment.tsx new file mode 100644 index 000000000..1fdd05bee --- /dev/null +++ b/src/pages/CreatePayment.tsx @@ -0,0 +1,406 @@ +import { gql } from '@apollo/client' +import { InputAdornment } from '@mui/material' +import { useFormik } from 'formik' +import { DateTime } from 'luxon' +import { useCallback, useEffect, useMemo, useRef } from 'react' +import { generatePath, useNavigate, useParams, useSearchParams } from 'react-router-dom' +import { date, object, string } from 'yup' + +import { Alert, Button, Status, Table, Typography } from '~/components/designSystem' +import { AmountInputField, ComboBox, DatePickerField, TextInputField } from '~/components/form' +import { CenteredPage } from '~/components/layouts/Pages' +import { WarningDialog, WarningDialogRef } from '~/components/WarningDialog' +import { addToast } from '~/core/apolloClient' +import { InvoiceListTabEnum } from '~/core/constants/NavigationEnum' +import { paymentStatusMapping } from '~/core/constants/statusInvoiceMapping' +import { getCurrencySymbol, intlFormatNumber } from '~/core/formats/intlFormatNumber' +import { INVOICES_TAB_ROUTE, PAYMENT_DETAILS_ROUTE } from '~/core/router' +import { deserializeAmount, serializeAmount } from '~/core/serializers/serializeAmount' +import { intlFormatDateTime } from '~/core/timezone' +import { + CreatePaymentInput, + CurrencyEnum, + InvoiceTypeEnum, + LagoApiError, + useCreatePaymentMutation, + useGetPayableInvoiceQuery, + useGetPayableInvoicesQuery, +} from '~/generated/graphql' +import { useInternationalization } from '~/hooks/core/useInternationalization' +import { useLocationHistory } from '~/hooks/core/useLocationHistory' +import { useOrganizationInfos } from '~/hooks/useOrganizationInfos' +import { FormLoadingSkeleton } from '~/styles/mainObjectsForm' +import { tw } from '~/styles/utils' + +gql` + query GetPayableInvoices($customerExternalId: String) { + invoices(positiveDueAmount: true, customerExternalId: $customerExternalId) { + collection { + id + number + currency + } + } + } + + query GetPayableInvoice($id: ID!) { + invoice(id: $id) { + id + number + paymentStatus + status + totalDueAmountCents + issuingDate + currency + invoiceType + } + } + + mutation CreatePayment($input: CreatePaymentInput!) { + createPayment(input: $input) { + id + } + } +` + +const today = DateTime.now() + +const CreatePayment = () => { + const { translate } = useInternationalization() + const navigate = useNavigate() + const { goBack } = useLocationHistory() + const params = useParams<{ invoiceId?: string }>() + const [searchParams] = useSearchParams() + + const warningDirtyAttributesDialogRef = useRef(null) + const { timezone } = useOrganizationInfos() + + const formikProps = useFormik({ + initialValues: { + invoiceId: params.invoiceId ?? '', + amountCents: '', + reference: '', + createdAt: today, + }, + validationSchema: object().shape({ + invoiceId: string().required(''), + amountCents: string() + .required('') + .test((value) => maxAmount(value)), + reference: string().max(40).required(''), + createdAt: date().required(''), + }), + enableReinitialize: true, + validateOnMount: true, + onSubmit: async (values) => { + await createPayment({ + variables: { + input: { + ...values, + amountCents: serializeAmount(values.amountCents, currency), + createdAt: values.createdAt.toISO(), + }, + }, + }) + }, + }) + + const { data: payableInvoices, loading: payableInvoicesLoading } = useGetPayableInvoicesQuery({ + variables: { + customerExternalId: searchParams.get('externalId'), + }, + }) + + const { data: { invoice } = {}, loading: invoiceLoading } = useGetPayableInvoiceQuery({ + variables: { id: formikProps.values.invoiceId }, + skip: !formikProps.values.invoiceId, + }) + + useEffect(() => { + if (invoice && invoice.invoiceType === InvoiceTypeEnum.Credit) { + formikProps.setFieldValue( + 'amountCents', + deserializeAmount(invoice.totalDueAmountCents, invoice.currency ?? CurrencyEnum.Usd), + ) + } + }, [invoice]) + + const currency = invoice?.currency ?? CurrencyEnum.Usd + + const [createPayment, { error: createError }] = useCreatePaymentMutation({ + context: { silentErrorCodes: [LagoApiError.UnprocessableEntity] }, + onCompleted({ createPayment: createdPayment }) { + if (!!createdPayment) { + addToast({ + severity: 'success', + translateKey: 'text_173755495088700ivx6izvjv', + }) + navigate(generatePath(PAYMENT_DETAILS_ROUTE, { paymentId: createdPayment?.id })) + } + }, + }) + + useEffect(() => { + if (createError) { + const errorCode = createError.graphQLErrors[0].extensions?.details + + formikProps.setErrors({ + ...formikProps.errors, + ...(errorCode ?? {}), + }) + } + }, [createError]) + + const maxAmount = useCallback( + (value: string) => { + const amount = Number(value) + + const isExceeding = + amount > 0 && amount <= deserializeAmount(invoice?.totalDueAmountCents ?? 0, currency) + + if (!isExceeding) { + return false + } + return true + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [invoice], + ) + + const remainingAmount = useMemo(() => { + const totalAmount = deserializeAmount(invoice?.totalDueAmountCents ?? 0, currency) + const amount = Number(formikProps.values.amountCents) + + return totalAmount - amount + }, [formikProps.values.amountCents, invoice, currency]) + + const onLeave = () => { + goBack( + generatePath(INVOICES_TAB_ROUTE, { + tab: InvoiceListTabEnum.payments, + }), + ) + } + + const dateTime = intlFormatDateTime(formikProps.values.createdAt, { + timezone, + }) + + return ( + <> + + + + {translate('text_1737473550277wkq2gsbaiab')} + +
@@ -348,6 +350,53 @@ export const InvoiceDetailsTableFooter = memo(
+ + {translate('text_1738063681339ucxmt3asspd')} + + + + {hasTaxProviderError + ? '-' + : intlFormatNumber( + deserializeAmount(-invoice?.totalPaidAmountCents || 0, currency), + { + currencyDisplay: 'symbol', + currency, + }, + )} + +
+ + {translate('text_17374735502775afvcm9pqxk')} + + + + {hasTaxProviderError + ? '-' + : intlFormatNumber(deserializeAmount(invoice?.totalDueAmountCents || 0, currency), { + currencyDisplay: 'symbol', + currency, + })} + +
{ + return + }, + }, + { + key: 'number', + title: translate('text_64188b3d9735d5007d71226c'), + maxSpace: true, + content: ({ number }) => number, + }, + { + key: 'totalDueAmountCents', + title: translate('text_17374735502775afvcm9pqxk'), + textAlign: 'right', + content: ({ totalDueAmountCents }) => ( + + {intlFormatNumber( + deserializeAmount(totalDueAmountCents, currency), + { + currency, + }, + )} + + ), + }, + { + key: 'issuingDate', + title: translate('text_6419c64eace749372fc72b39'), + content: ({ issuingDate }) => + intlFormatDateTime(issuingDate, { timezone }).date, + }, + ]} + /> + )} + + + +
+
+ + {translate('text_1737472944878h2ejm3kxd8h')} + + + {translate('text_173747294487841dlz5wqd9p')} + +
+
+
+ + + {translate('text_1737473550277yfvnl60zpiz', { + date: dateTime.date, + hour: dateTime.time, + })} + +
+ + + + + {getCurrencySymbol(currency)} + + ), + }} + helperText={ + invoice && + translate('text_1737473550277cncnhv0x6cm', { + amount: intlFormatNumber(remainingAmount, { + currency, + }), + }) + } + /> + + + + {translate('text_17374735502775voeeu0q7b7')} + + +
+
+ + + )} + + + + + + + + + + + ) +} + +export default CreatePayment diff --git a/src/pages/CreditNoteDetails.tsx b/src/pages/CreditNoteDetails.tsx index edf219e5e..b91abc473 100644 --- a/src/pages/CreditNoteDetails.tsx +++ b/src/pages/CreditNoteDetails.tsx @@ -28,7 +28,10 @@ import { buildNetsuiteCreditNoteUrl, buildXeroCreditNoteUrl, } from '~/core/constants/externalUrls' -import { CustomerInvoiceDetailsTabsOptionsEnum } from '~/core/constants/NavigationEnum' +import { + CustomerDetailsTabsOptions, + CustomerInvoiceDetailsTabsOptionsEnum, +} from '~/core/constants/NavigationEnum' import formatCreditNotesItems from '~/core/formats/formatCreditNotesItems' import { composeChargeFilterDisplayName, @@ -68,8 +71,6 @@ import ErrorImage from '~/public/images/maneki/error.svg' import { MenuPopper, PageHeader, theme } from '~/styles' import { SectionHeader } from '~/styles/customer' -import { CustomerDetailsTabsOptions } from './CustomerDetails' - gql` query getCreditNote($id: ID!) { creditNote(id: $id) { diff --git a/src/pages/CustomerDetails.tsx b/src/pages/CustomerDetails.tsx index 3f72ae5d3..62974c446 100644 --- a/src/pages/CustomerDetails.tsx +++ b/src/pages/CustomerDetails.tsx @@ -9,6 +9,7 @@ import { import { CustomerCreditNotesList } from '~/components/customers/CustomerCreditNotesList' import { CustomerInvoicesTab } from '~/components/customers/CustomerInvoicesTab' import { CustomerMainInfos } from '~/components/customers/CustomerMainInfos' +import { CustomerPaymentsTab } from '~/components/customers/CustomerPaymentsTab' import { CustomerSettings } from '~/components/customers/CustomerSettings' import { DeleteCustomerDialog, @@ -30,6 +31,7 @@ import { import { GenericPlaceholder } from '~/components/GenericPlaceholder' import { PremiumWarningDialog, PremiumWarningDialogRef } from '~/components/PremiumWarningDialog' import { CustomerWalletsList } from '~/components/wallets/CustomerWalletList' +import { CustomerDetailsTabsOptions } from '~/core/constants/NavigationEnum' import { CREATE_INVOICE_ROUTE, CREATE_SUBSCRIPTION, @@ -90,16 +92,6 @@ gql` ${CustomerMainInfosFragmentDoc} ` -export enum CustomerDetailsTabsOptions { - creditNotes = 'creditNotes', - overview = 'overview', - wallet = 'wallet', - invoices = 'invoices', - settings = 'settings', - usage = 'usage', - information = 'information', -} - const CustomerDetails = () => { const deleteDialogRef = useRef(null) const addCouponDialogRef = useRef(null) @@ -426,6 +418,14 @@ const CustomerDetails = () => { /> ), }, + { + title: translate('text_6672ebb8b1b50be550eccbed'), + link: generatePath(CUSTOMER_DETAILS_TAB_ROUTE, { + customerId: customerId as string, + tab: CustomerDetailsTabsOptions.payments, + }), + component: , + }, { title: translate('text_63725b30957fd5b26b308dd3'), link: generatePath(CUSTOMER_DETAILS_TAB_ROUTE, { diff --git a/src/pages/CustomerDraftInvoicesList.tsx b/src/pages/CustomerDraftInvoicesList.tsx index 1736bb2d8..a08febd20 100644 --- a/src/pages/CustomerDraftInvoicesList.tsx +++ b/src/pages/CustomerDraftInvoicesList.tsx @@ -5,6 +5,7 @@ import styled from 'styled-components' import { CustomerInvoicesList } from '~/components/customers/CustomerInvoicesList' import { Avatar, Button, Icon, Skeleton, Typography } from '~/components/designSystem' import { SearchInput } from '~/components/SearchInput' +import { CustomerDetailsTabsOptions } from '~/core/constants/NavigationEnum' import { CUSTOMER_DETAILS_TAB_ROUTE } from '~/core/router' import { InvoiceForInvoiceListFragmentDoc, @@ -18,8 +19,6 @@ import { useLocationHistory } from '~/hooks/core/useLocationHistory' import { useDebouncedSearch } from '~/hooks/useDebouncedSearch' import { NAV_HEIGHT, PageHeader, theme } from '~/styles' -import { CustomerDetailsTabsOptions } from './CustomerDetails' - gql` query getCustomerDraftInvoices( $customerId: ID! diff --git a/src/pages/CustomerInvoiceDetails.tsx b/src/pages/CustomerInvoiceDetails.tsx index 8bcd5f379..bf5efd44f 100644 --- a/src/pages/CustomerInvoiceDetails.tsx +++ b/src/pages/CustomerInvoiceDetails.tsx @@ -31,13 +31,19 @@ import { FinalizeInvoiceDialog, FinalizeInvoiceDialogRef, } from '~/components/invoices/FinalizeInvoiceDialog' +import { InvoiceCreditNoteList } from '~/components/invoices/InvoiceCreditNoteList' +import { InvoicePaymentList } from '~/components/invoices/InvoicePaymentList' import { VoidInvoiceDialog, VoidInvoiceDialogRef } from '~/components/invoices/VoidInvoiceDialog' import { PremiumWarningDialog, PremiumWarningDialogRef } from '~/components/PremiumWarningDialog' import { addToast, LagoGQLError } from '~/core/apolloClient' -import { CustomerInvoiceDetailsTabsOptionsEnum } from '~/core/constants/NavigationEnum' +import { + CustomerDetailsTabsOptions, + CustomerInvoiceDetailsTabsOptionsEnum, +} from '~/core/constants/NavigationEnum' import { invoiceStatusMapping, paymentStatusMapping } from '~/core/constants/statusInvoiceMapping' import { intlFormatNumber } from '~/core/formats/intlFormatNumber' import { + CREATE_INVOICE_PAYMENT_ROUTE, CUSTOMER_CREDIT_NOTE_DETAILS_ROUTE, CUSTOMER_DETAILS_TAB_ROUTE, CUSTOMER_INVOICE_CREATE_CREDIT_NOTE_ROUTE, @@ -87,8 +93,6 @@ import { useInternationalization } from '~/hooks/core/useInternationalization' import { useLocationHistory } from '~/hooks/core/useLocationHistory' import { useCurrentUser } from '~/hooks/useCurrentUser' import { usePermissions } from '~/hooks/usePermissions' -import { CustomerDetailsTabsOptions } from '~/pages/CustomerDetails' -import InvoiceCreditNoteList from '~/pages/InvoiceCreditNoteList' import InvoiceOverview from '~/pages/InvoiceOverview' import ErrorImage from '~/public/images/maneki/error.svg' import { MenuPopper, PageHeader, theme } from '~/styles' @@ -102,6 +106,7 @@ gql` status taxStatus totalAmountCents + totalDueAmountCents currency refundableAmountCents creditableAmountCents @@ -280,6 +285,7 @@ const CustomerInvoiceDetails = () => { const addMetadataDrawerDialogRef = useRef(null) const voidInvoiceDialogRef = useRef(null) const disputeInvoiceDialogRef = useRef(null) + const [refreshInvoice, { loading: loadingRefreshInvoice }] = useRefreshInvoiceMutation({ variables: { input: { id: invoiceId || '' } }, context: { @@ -428,6 +434,8 @@ const CustomerInvoiceDetails = () => { number, paymentStatus, totalAmountCents, + totalPaidAmountCents, + totalDueAmountCents, currency, status, taxStatus, @@ -439,6 +447,11 @@ const CustomerInvoiceDetails = () => { associatedActiveWalletPresent, } = (data?.invoice as AllInvoiceDetailsForCustomerInvoiceDetailsFragment) || {} + const canRecordPayment = + Number(totalDueAmountCents) > 0 && + hasPermissions(['paymentsCreate']) && + Number(totalPaidAmountCents) < Number(totalAmountCents) + const hasError = (!!error || !data?.invoice) && !loading const hasTaxProviderError = errorDetails?.find( ({ errorCode }) => errorCode === ErrorCodesEnum.TaxError, @@ -514,6 +527,24 @@ const CustomerInvoiceDetails = () => { /> ), }, + { + title: translate('text_6672ebb8b1b50be550eccbed'), + link: generatePath(CUSTOMER_INVOICE_DETAILS_ROUTE, { + customerId: customerId as string, + invoiceId: invoiceId as string, + tab: CustomerInvoiceDetailsTabsOptionsEnum.payments, + }), + match: [ + generatePath(CUSTOMER_INVOICE_DETAILS_ROUTE, { + customerId: customerId as string, + invoiceId: invoiceId as string, + tab: CustomerInvoiceDetailsTabsOptionsEnum.payments, + }), + ], + component: ( + + ), + }, ] if ( @@ -704,6 +735,27 @@ const CustomerInvoiceDetails = () => { )} ) : null} + {canRecordPayment && ( + + )} - ) : tab === InvoiceListTabEnum.creditNotes ? ( + )} + {tab === InvoiceListTabEnum.payments && ( + <> + + + + )} + {tab === InvoiceListTabEnum.creditNotes && ( <> { {translate('text_66b21236c939426d07ff98ca')} - ) : null} + )} {isOutstandingUrlParams(searchParams) && hasPermissions(['invoicesSend']) && ( + } + > + {({ closePopper }) => ( + + + + )} + + + +
+
+ + + +
+
+ {loading ? ( + + ) : ( + + {intlFormatNumber( + deserializeAmount( + payment?.amountCents, + payment?.amountCurrency || CurrencyEnum.Usd, + ), + { + currency: payment?.amountCurrency, + }, + )} + + )} + {payment?.payablePaymentStatus && ( + + )} +
+ + {loading ? ( + + ) : ( + + {payment?.id} + + )} +
+
+ +
+ + {translate('text_634687079be251fdb43833b7')} + + + {loading && } + {!loading && ( +
+
+ <>{children}} + invalidWrapper={(children) => { + return !!customerId || customer?.id ? ( + + {children} + + ) : ( + <>{children} + ) + }} + > + + {customer?.displayName || customer?.name} + + + } + /> + + + +
+ +
+ + } + /> + { + if ( + payment?.providerPaymentId && + payment?.paymentProviderType && + [ProviderTypeEnum.Stripe, ProviderTypeEnum.Gocardless].includes( + payment.paymentProviderType, + ) + ) { + const href = + payment?.paymentProviderType === ProviderTypeEnum.Stripe + ? buildStripePaymentUrl(payment.providerPaymentId) + : buildGoCardlessPaymentUrl(payment.providerPaymentId) + + // If the payment has a providerPaymentId, it means it was created by a payment provider + return ( + + {children} + + ) + } + + return ( + + {payment?.providerPaymentId} + + ) + }} + invalidWrapper={() => <>{'-'}} + > + + {payment?.providerPaymentId ?? payment?.reference} + + + + } + /> + + } + /> + +
+
+ )} +
+ +
+ + {translate('text_63ac86d797f728a87b2f9f85')} + + +
+ generatePath(CUSTOMER_INVOICE_DETAILS_ROUTE, { + customerId: customerId || (customer?.id as string), + invoiceId: id as string, + tab: InvoiceListTabEnum.invoices, + }) + } + columns={[ + { + key: 'paymentStatus', + title: translate('text_6419c64eace749372fc72b40'), + content: ({ + paymentStatus, + paymentOverdue, + totalAmountCents, + totalPaidAmountCents, + paymentDisputeLostAt, + status, + }) => { + if (status !== InvoiceStatusTypeEnum.Finalized) { + return null + } + + let content: { tooltipTitle?: string; statusEndIcon?: IconName } = { + tooltipTitle: undefined, + statusEndIcon: undefined, + } + + const isOverdue = + paymentOverdue && paymentStatus === InvoicePaymentStatusTypeEnum.Pending + const isPartiallyPaid = + totalPaidAmountCents > 0 && totalAmountCents - totalPaidAmountCents > 0 + + if (isPartiallyPaid) { + content = { + tooltipTitle: translate('text_1738071221799vib0l2z1bxe'), + statusEndIcon: 'partially-filled', + } + } else if (!!paymentDisputeLostAt) { + content = { + tooltipTitle: translate('text_172416478461328edo4vwz05'), + statusEndIcon: 'warning-unfilled', + } + } + + return ( + + + + ) + }, + }, + { + key: 'number', + title: translate('text_64188b3d9735d5007d71226c'), + maxSpace: true, + content: ({ number }) => number, + }, + { + key: 'totalAmountCents', + title: translate('text_6419c64eace749372fc72b3e'), + content: ({ totalAmountCents, currency }) => ( + + {intlFormatNumber( + deserializeAmount(totalAmountCents, currency || CurrencyEnum.Usd), + { + currency: currency || CurrencyEnum.Usd, + }, + )} + + ), + }, + { + key: 'issuingDate', + title: translate('text_6419c64eace749372fc72b39'), + content: ({ issuingDate }) => intlFormatDateTime(issuingDate, { timezone }).date, + }, + ]} + placeholder={{ + emptyState: { + title: translate('text_63b578e959c1366df5d14569'), + subtitle: translate('text_62bb102b66ff57dbfe7905c2'), + }, + }} + /> + + + + ) +} + +export default PaymentDetails diff --git a/src/pages/WalletForm/WalletForm.tsx b/src/pages/WalletForm/WalletForm.tsx index b75104acf..a934fb7ff 100644 --- a/src/pages/WalletForm/WalletForm.tsx +++ b/src/pages/WalletForm/WalletForm.tsx @@ -11,6 +11,7 @@ import { WalletCodeSnippet } from '~/components/wallets/WalletCodeSnippet' import { WarningDialog, WarningDialogRef } from '~/components/WarningDialog' import { addToast } from '~/core/apolloClient' import { FORM_TYPE_ENUM } from '~/core/constants/form' +import { CustomerDetailsTabsOptions } from '~/core/constants/NavigationEnum' import { CUSTOMER_DETAILS_TAB_ROUTE } from '~/core/router' import { getCurrencyPrecision } from '~/core/serializers/serializeAmount' import { @@ -29,7 +30,6 @@ import { } from '~/generated/graphql' import { useInternationalization } from '~/hooks/core/useInternationalization' import { useOrganizationInfos } from '~/hooks/useOrganizationInfos' -import { CustomerDetailsTabsOptions } from '~/pages/CustomerDetails' import { LoadingView } from '~/pages/WalletForm/components/LoadingView' import { SettingsCard } from '~/pages/WalletForm/components/SettingsCard' import { TopUpCard } from '~/pages/WalletForm/components/TopUpCard' diff --git a/translations/base.json b/translations/base.json index b28ab8146..c1b9c79b6 100644 --- a/translations/base.json +++ b/translations/base.json @@ -1512,7 +1512,6 @@ "text_63720bd734e1344aea75b7e9": "Void credits", "text_63720bd734e1344aea75b85d": "Credit available successfully voided", "text_637d0e628762bd8fc95f045d": "Select how to credit", - "text_637d0e6d94c87b04785fc6d2": "Refund customer", "text_637d0e720ace4ea09aaf0630": "Credit on customer wallet", "text_637d0e9729bcc6bb0cb77141": "Add credit method", "text_637d10c83077eff6e8c79cd0": "Refund customer (maximum {{max}})", @@ -1562,7 +1561,6 @@ "text_637ccf8133d2c9a7d11ce705": "Coupons", "text_637ccf8133d2c9a7d11ce708": "Credit notes", "text_6391f05df4bf96d81f3660a7": "Credits", - "text_637ccf8133d2c9a7d11ce70d": "Total amount due", "text_63887b52e514213fed57fc1c": "Total due", "text_637cd81348c50c26dd05a769": "Amount", "text_637ccf8133d2c9a7d11ce73d": "Credit subtotal (excl. tax)", @@ -2822,6 +2820,43 @@ "text_17385950520558ttf6sv58s0": "Partner name", "text_1738595318403vcyh77pwiew": "Partner billing", "text_1738605383523lme9aweoipp": "This invoice has been generated on behalf of this partner.", - "text_1738748043939zqoqzz350yj": "Refresh" + "text_1738748043939zqoqzz350yj": "Refresh", + "text_1737471851634wpeojigr27w": "Record a payment", + "text_1737472944878vyh7qulgo77": "Manually record a payment for this invoice. Please note that once recorded, the payment cannot be edited or deleted.", + "text_17374729448780zbfa44h1s3": "Invoice information", + "text_1737472944878ggfenh0ifpi": "Select the invoice to record the payment.", + "text_17374729448787bzb5yjrbgt": "Search and select an invoice", + "text_1737472944878h2ejm3kxd8h": "Payment information", + "text_173747294487841dlz5wqd9p": "Define the payment information.", + "text_1737472944878qfpm9xbrrdn": "Payment date", + "text_1737472944878njss1jk5yik": "Payment reference", + "text_1737472944878ksy1jz0b4m9": "Reference must be a string of 40 characters maximum", + "text_1737472944878ee19ufaaklg": "Payment amount", + "text_1737473550277cncnhv0x6cm": "Invoice total amount due after payment: {{amount}}", + "text_17374735502775voeeu0q7b7": "A payment can’t be edited or deleted. Please double-check the info details proceeding.", + "text_1737473550277yfvnl60zpiz": "The payment date is recorded on {{date}} at {{hour}}", + "text_1737473550277wkq2gsbaiab": "Record payment", + "text_1737473550277onyc98womp2": "Type a reference", + "text_17374735502775afvcm9pqxk": "Amount due", + "text_173755495088700ivx6izvjv": "Payment successfully recorded", + "text_17370296250897aidak5kjcg": "Search payment", + "text_1737029625089rtcf3ah5khq": "Copy payment id", + "text_17370296250897n2pakp5v33": "Payment ID copied to clipboard", + "text_17370296250898eqj4qe4qg9": "Multiple invoices ({{count}})", + "text_1737043149535dhigi301msf": "Last update", + "text_1737043182491927uocp2ydo": "Method", + "text_17370432002911cyzkxf966v": "Reference", + "text_1737110192586abtitcui0xt": "Manual", + "text_1737112054603c6phsbkyvmx": "Provider payment ID", + "text_173799550683709p2rqkoqd5": "Manual payment", + "text_1738056040178doq581h3d2o": "This payment cannot be found", + "text_173805604017831h2cebcami": "No payments available", + "text_1738056040178gw94jzmzckx": "No payments have been recorded for invoices. Please record a payment or connect your customer to a payment provider to view all payments here.", + "text_17380560401785kuvb6m2yfm": "No payments have been recorded for this invoice. Please record a payment or connect your customer to a payment provider to view all payments here.", + "text_17380560401786gmefzvw1rl": "No payments have been recorded for invoices. Please record a payment or connect your customer to a payment provider to view all payments here.", + "text_1738063681339ucxmt3asspd": "Amount paid", + "text_1738063764295zomiafl8b4s": "Total", + "text_1738071221799vib0l2z1bxe": "Partially paid", + "text_1738147471201z79f2wsgfic": "({{paidAmount}} already paid)", + "text_1738751394771xq525lyxj9k": "Credit amount cannot exceed {{max}}" } -