File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
app/code/Magento/Tax/Model/Plugin Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,12 @@ protected function saveOrderTax(\Magento\Sales\Api\Data\OrderInterface $order)
9797 } else {
9898 $ percentSum = 0 ;
9999 foreach ($ taxRates as $ rate ) {
100- $ realAmount = $ rates ['amount ' ] * $ rate ['percent ' ] / $ rates ['percent ' ];
101- $ realBaseAmount = $ rates ['base_amount ' ] * $ rate ['percent ' ] / $ rates ['percent ' ];
100+ $ percentSum += $ rate ['percent ' ];
101+ }
102+
103+ foreach ($ taxRates as $ rate ) {
104+ $ realAmount = $ rates ['amount ' ] * $ rate ['percent ' ] / $ percentSum ;
105+ $ realBaseAmount = $ rates ['base_amount ' ] * $ rate ['percent ' ] / $ percentSum ;
102106 $ ratesIdQuoteItemId [$ rates ['id ' ]][] = [
103107 'id ' => $ taxesArray ['item_id ' ],
104108 'percent ' => $ rate ['percent ' ],
@@ -110,7 +114,6 @@ protected function saveOrderTax(\Magento\Sales\Api\Data\OrderInterface $order)
110114 'real_amount ' => $ realAmount ,
111115 'real_base_amount ' => $ realBaseAmount ,
112116 ];
113- $ percentSum += $ rate ['percent ' ];
114117 }
115118 }
116119 }
You can’t perform that action at this time.
0 commit comments