Hello,
When i go from step1 to step2 in checkout before saveshipping response is :
{“payment_methods”:[{“code”:“test”,“title”:“test”},{“code”:“free”,“title”:“No Payment Information Required”}],“totals”:{“grand_total”:31,“base_grand_total”:33.17,“subtotal”:31,“base_subtotal”:31,“discount_amount”:0,“base_discount_amount”:0,“subtotal_with_discount”:31,“base_subtotal_with_discount”:31,“shipping_amount”:0,“base_shipping_amount”:0,“shipping_discount_amount”:0,“base_shipping_discount_amount”:0,“tax_amount”:2.17,“base_tax_amount”:2.17,“weee_tax_applied_amount”:null,“shipping_tax_amount”:0,“base_shipping_tax_amount”:0,“subtotal_incl_tax”:33.17,“shipping_incl_tax”:0,“base_shipping_incl_tax”:0,“base_currency_code”:“USD”,“quote_currency_code”:“USD”,“items_qty”:5,“items”:[{“item_id”:3912,“price”:5,“base_price”:5,“qty”:2,“row_total”:10,“base_row_total”:10,“row_total_with_discount”:0,“tax_amount”:0.7,“base_tax_amount”:0.7,“tax_percent”:7,“discount_amount”:0,“base_discount_amount”:0,“discount_percent”:0,“price_incl_tax”:5.35,“base_price_incl_tax”:5.35,“row_total_incl_tax”:10.7,“base_row_total_incl_tax”:10.7,“options”:"[]",“weee_tax_applied_amount”:null,“weee_tax_applied”:null,“name”:“BBQ Chicken Skewers”},{“item_id”:3913,“price”:7,“base_price”:7,“qty”:3,“row_total”:21,“base_row_total”:21,“row_total_with_discount”:0,“tax_amount”:1.47,“base_tax_amount”:1.47,“tax_percent”:7,“discount_amount”:0,“base_discount_amount”:0,“discount_percent”:0,“price_incl_tax”:7.49,“base_price_incl_tax”:7.49,“row_total_incl_tax”:22.47,“base_row_total_incl_tax”:22.47,“options”:"[]",“weee_tax_applied_amount”:null,“weee_tax_applied”:null,“name”:“Beef Satay w/Asian Sesame BBQ Sauce”}],“total_segments”:[{“code”:“subtotal”,“title”:“Subtotal”,“value”:31},{“code”:“shipping”,“title”:“Shipping & Handling”,“value”:0},{“code”:“tax”,“title”:“Tax”,“value”:2.17,“area”:“taxes”,“extension_attributes”:{“tax_grandtotal_details”:[{“amount”:2.17,“rates”:[{“percent”:“4”,“title”:“GA STATE TAX”},{“percent”:“3”,“title”:“GA COUNTY TAX”}],“group_id”:1}]}},{“code”:“grand_total”,“title”:“Grand Total”,“value”:33.17,“area”:“footer”}}}
Here you can see base
grand_total":31,“base_grand_total”:33.17
both are different value.
when i debug this :
Magento\Quote\Api\CartTotalRepository
= > $amount = $quoteTotals->getGrandTotal() - $quoteTotals->getTaxAmount();
why this above statement added? here should be some condition if order total without tax then need to do this?