Skip to content

Commit

Permalink
bug(credit-note) Prevent displaying hardcoded USD in item price
Browse files Browse the repository at this point in the history
Initially done in #1372

Co-Authored-By: Edward Poot <[email protected]>
  • Loading branch information
ansmonjol and edwardmp committed Jan 2, 2024
1 parent b7c9a81 commit 1d20ed8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/generated/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,16 @@ export type CreateAddOnInput = {
taxCodes?: InputMaybe<Array<Scalars['String']['input']>>;
};

/** Create Adjusted Fee Input */
export type CreateAdjustedFeeInput = {
/** A unique identifier for the client performing the mutation. */
clientMutationId?: InputMaybe<Scalars['String']['input']>;
feeId: Scalars['ID']['input'];
invoiceDisplayName?: InputMaybe<Scalars['String']['input']>;
unitAmountCents?: InputMaybe<Scalars['BigInt']['input']>;
units: Scalars['Float']['input'];
};

/** Autogenerated input type of CreateAppliedCoupon */
export type CreateAppliedCouponInput = {
amountCents?: InputMaybe<Scalars['BigInt']['input']>;
Expand Down Expand Up @@ -2116,6 +2126,8 @@ export type Mutation = {
addStripePaymentProvider?: Maybe<StripeProvider>;
/** Creates a new add-on */
createAddOn?: Maybe<AddOn>;
/** Creates Adjusted Fee */
createAdjustedFee?: Maybe<Fee>;
/** Assigns a Coupon to a Customer */
createAppliedCoupon?: Maybe<AppliedCoupon>;
/** Creates a new Billable metric */
Expand Down Expand Up @@ -2260,6 +2272,11 @@ export type MutationCreateAddOnArgs = {
};


export type MutationCreateAdjustedFeeArgs = {
input: CreateAdjustedFeeInput;
};


export type MutationCreateAppliedCouponArgs = {
input: CreateAppliedCouponInput;
};
Expand Down Expand Up @@ -5064,7 +5081,7 @@ export type GetCreditNoteQueryVariables = Exact<{
}>;


export type GetCreditNoteQuery = { __typename?: 'Query', creditNote?: { __typename?: 'CreditNote', id: string, balanceAmountCents: any, canBeVoided: boolean, couponsAdjustmentAmountCents: any, createdAt: any, creditAmountCents: any, creditStatus?: CreditNoteCreditStatusEnum | null, currency: CurrencyEnum, number: string, refundAmountCents: any, refundedAt?: any | null, refundStatus?: CreditNoteRefundStatusEnum | null, subTotalExcludingTaxesAmountCents: any, totalAmountCents: any, customer: { __typename?: 'Customer', id: string, name?: string | null, deletedAt?: any | null, applicableTimezone: TimezoneEnum }, invoice?: { __typename?: 'Invoice', id: string, number: string } | null, appliedTaxes?: Array<{ __typename?: 'CreditNoteAppliedTax', id: string, amountCents: any, baseAmountCents: any, taxRate: number, taxName: string }> | null, items: Array<{ __typename?: 'CreditNoteItem', amountCents: any, fee: { __typename?: 'Fee', id: string, amountCents: any, eventsCount?: any | null, units: number, feeType: FeeTypesEnum, itemName: string, groupName?: string | null, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, tax: { __typename?: 'Tax', id: string, rate: 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, group?: { __typename?: 'Group', id: string, key?: string | null, value: string } | null } }> } | null };
export type GetCreditNoteQuery = { __typename?: 'Query', creditNote?: { __typename?: 'CreditNote', id: string, balanceAmountCents: any, canBeVoided: boolean, couponsAdjustmentAmountCents: any, createdAt: any, creditAmountCents: any, creditStatus?: CreditNoteCreditStatusEnum | null, currency: CurrencyEnum, number: string, refundAmountCents: any, refundedAt?: any | null, refundStatus?: CreditNoteRefundStatusEnum | null, subTotalExcludingTaxesAmountCents: any, totalAmountCents: any, customer: { __typename?: 'Customer', id: string, name?: string | null, deletedAt?: any | null, applicableTimezone: TimezoneEnum }, invoice?: { __typename?: 'Invoice', id: string, number: string } | null, 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, itemName: string, groupName?: string | null, invoiceName?: string | null, appliedTaxes?: Array<{ __typename?: 'FeeAppliedTax', id: string, tax: { __typename?: 'Tax', id: string, rate: 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, group?: { __typename?: 'Group', id: string, key?: string | null, value: string } | null } }> } | null };

export type CustomerDetailsFragment = { __typename?: 'Customer', id: string, name?: string | null, externalId: string, hasActiveWallet: boolean, currency?: CurrencyEnum | null, hasCreditNotes: boolean, creditNotesCreditsAvailableCount: number, creditNotesBalanceAmountCents: any, applicableTimezone: TimezoneEnum, addressLine1?: string | null, addressLine2?: string | null, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, email?: string | null, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, paymentProvider?: ProviderTypeEnum | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array<ProviderPaymentMethodsEnum> | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null };

Expand Down Expand Up @@ -12102,6 +12119,7 @@ export const GetCreditNoteDocument = gql`
}
items {
amountCents
amountCurrency
fee {
id
amountCents
Expand Down
1 change: 1 addition & 0 deletions src/pages/CreditNoteDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ gql`
}
items {
amountCents
amountCurrency
fee {
id
amountCents
Expand Down

0 comments on commit 1d20ed8

Please sign in to comment.