Skip to content

Commit

Permalink
Revert back totals
Browse files Browse the repository at this point in the history
  • Loading branch information
asvishnyakov committed Oct 29, 2024
1 parent 2cbde38 commit 9c25ce4
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions src/VirtoCommerce.QuoteModule.ExperienceApi/Schemas/QuoteType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,39 +44,15 @@ public QuoteType(IDynamicPropertyResolverService dynamicPropertyResolverService)

Field<NonNullGraphType<CurrencyType>>(nameof(QuoteRequest.Currency),
resolve: context => context.Source.Currency);

Field<NonNullGraphType<MoneyType>>(nameof(QuoteRequest.ManualRelDiscountAmount),
resolve: context => context.Source.Model.ManualRelDiscountAmount.ToMoney(context.Source.Currency));
Field<NonNullGraphType<MoneyType>>("discountTotal",
resolve: context => context.Source.Model.Totals.DiscountTotal.ToMoney(context.Source.Currency));

Field<NonNullGraphType<MoneyType>>(nameof(QuoteRequest.ManualShippingTotal),
resolve: context => context.Source.Model.ManualShippingTotal.ToMoney(context.Source.Currency));
Field<NonNullGraphType<MoneyType>>("shippingTotal",
resolve: context => context.Source.Model.Totals.ShippingTotal.ToMoney(context.Source.Currency));


Field<NonNullGraphType<MoneyType>>(nameof(QuoteRequest.ManualSubTotal),
resolve: context => context.Source.Model.ManualSubTotal.ToMoney(context.Source.Currency));
Field<NonNullGraphType<MoneyType>>("originalSubTotal",
resolve: context => context.Source.Model.Totals.OriginalSubTotalExlTax.ToMoney(context.Source.Currency));
Field<NonNullGraphType<MoneyType>>("subTotal",
resolve: context => context.Source.Model.Totals.SubTotalExlTax.ToMoney(context.Source.Currency));

Field<NonNullGraphType<MoneyType>>("taxTotal",
resolve: context => context.Source.Model.Totals.TaxTotal.ToMoney(context.Source.Currency));

Field<NonNullGraphType<MoneyType>>("total",
resolve: context => context.Source.Model.Totals.GrandTotalExlTax.ToMoney(context.Source.Currency));
Field<NonNullGraphType<MoneyType>>("totalWithTax",
resolve: context => context.Source.Model.Totals.GrandTotalInclTax.ToMoney(context.Source.Currency));

Field<NonNullGraphType<MoneyType>>("adjustment",
resolve: context => context.Source.Model.Totals.AdjustmentQuoteExlTax.ToMoney(context.Source.Currency));

ExtendableField<NonNullGraphType<QuoteTotalsType>>(nameof(QuoteRequest.Totals),
resolve: context => context.Source.Totals,
deprecationReason: "Use separate fields instead");
resolve: context => context.Source.Totals);
ExtendableField<NonNullGraphType<ListGraphType<NonNullGraphType<QuoteItemType>>>>(nameof(QuoteRequest.Items),
resolve: context => context.Source.Items);
ExtendableField<NonNullGraphType<ListGraphType<NonNullGraphType<QuoteAddressType>>>>(nameof(QuoteRequest.Addresses),
Expand Down

0 comments on commit 9c25ce4

Please sign in to comment.