diff --git a/app/graphql/types/invoices/object.rb b/app/graphql/types/invoices/object.rb index f5727f14612..657cc76bd76 100644 --- a/app/graphql/types/invoices/object.rb +++ b/app/graphql/types/invoices/object.rb @@ -36,6 +36,7 @@ class Object < Types::BaseObject field :sub_total_including_taxes_amount_cents, GraphQL::Types::BigInt, null: false field :taxes_amount_cents, GraphQL::Types::BigInt, null: false field :total_amount_cents, GraphQL::Types::BigInt, null: false + field :total_due_amount_cents, GraphQL::Types::BigInt, null: false field :issuing_date, GraphQL::Types::ISO8601Date, null: false field :payment_due_date, GraphQL::Types::ISO8601Date, null: false diff --git a/app/services/payment_requests/payments/stripe_service.rb b/app/services/payment_requests/payments/stripe_service.rb index 37962f92441..6c34e75e817 100644 --- a/app/services/payment_requests/payments/stripe_service.rb +++ b/app/services/payment_requests/payments/stripe_service.rb @@ -50,9 +50,6 @@ def update_payment_status(organization_id:, status:, stripe_payment:) result.payable = payment.payable return result if payment.payable.payment_succeeded? - payable_payment_status = payment.payment_provider&.determine_payment_status(status) - payment.update!(status:, payable_payment_status:) - processing = status == "processing" payment.status = status diff --git a/schema.graphql b/schema.graphql index 1d14da0ca0d..42dbe98fa9a 100644 --- a/schema.graphql +++ b/schema.graphql @@ -4533,6 +4533,7 @@ type Invoice { taxesAmountCents: BigInt! taxesRate: Float! totalAmountCents: BigInt! + totalDueAmountCents: BigInt! updatedAt: ISO8601DateTime! versionNumber: Int! voidable: Boolean! diff --git a/schema.json b/schema.json index 3163e532dbd..dde08febb65 100644 --- a/schema.json +++ b/schema.json @@ -21495,6 +21495,22 @@ "deprecationReason": null, "args": [] }, + { + "name": "totalDueAmountCents", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null, + "args": [] + }, { "name": "updatedAt", "description": null, diff --git a/spec/graphql/types/invoices/object_spec.rb b/spec/graphql/types/invoices/object_spec.rb index a1383f9154a..f0f6f953f67 100644 --- a/spec/graphql/types/invoices/object_spec.rb +++ b/spec/graphql/types/invoices/object_spec.rb @@ -34,6 +34,7 @@ it { is_expected.to have_field(:sub_total_including_taxes_amount_cents).of_type('BigInt!') } it { is_expected.to have_field(:taxes_amount_cents).of_type('BigInt!') } it { is_expected.to have_field(:total_amount_cents).of_type('BigInt!') } + it { is_expected.to have_field(:total_due_amount_cents).of_type('BigInt!') } it { is_expected.to have_field(:issuing_date).of_type('ISO8601Date!') } it { is_expected.to have_field(:payment_due_date).of_type('ISO8601Date!') } it { is_expected.to have_field(:payment_overdue).of_type('Boolean!') }