@@ -806,6 +806,67 @@ public function collectDataProvider()
806
806
],
807
807
];
808
808
809
+ // scenario 8: 1 items, 1 invoiced, shipping covered by cart rule
810
+ // shipping amount is 0 i.e., free shipping
811
+ $ result ['creditmemo_with_discount_for_entire_shipping_all_prices_including_tax_free_shipping ' ] = [
812
+ 'order_data ' => [
813
+ 'data_fields ' => [
814
+ 'shipping_tax_amount ' => 0 ,
815
+ 'base_shipping_tax_amount ' => 0 ,
816
+ 'shipping_discount_tax_compensation_amount ' => 1.36 ,
817
+ 'base_shipping_discount_tax_compensation_amount ' => 1.36 ,
818
+ 'tax_amount ' => 1.22 ,
819
+ 'base_tax_amount ' => 1.22 ,
820
+ 'tax_invoiced ' => 1.22 ,
821
+ 'base_tax_invoiced ' => 1.22 ,
822
+ 'shipping_amount ' => 0 ,
823
+ 'shipping_discount_amount ' => 15 ,
824
+ 'base_shipping_amount ' => 13.64 ,
825
+ 'discount_tax_compensation_invoiced ' => 1.73 ,
826
+ 'base_discount_tax_compensation_invoiced ' => 1.73
827
+ ],
828
+ ],
829
+ 'creditmemo_data ' => [
830
+ 'items ' => [
831
+ 'item_1 ' => [
832
+ 'order_item ' => [
833
+ 'qty_invoiced ' => 1 ,
834
+ 'tax_invoiced ' => 1.22 ,
835
+ 'base_tax_invoiced ' => 1.22 ,
836
+ 'discount_tax_compensation_amount ' => 1.73 ,
837
+ 'base_discount_tax_compensation_amount ' => 1.73 ,
838
+ 'discount_tax_compensation_invoiced ' => 1.73 ,
839
+ 'base_discount_tax_compensation_invoiced ' => 1.73
840
+ ],
841
+ 'is_last ' => true ,
842
+ 'qty ' => 1 ,
843
+ ],
844
+ ],
845
+ 'is_last ' => true ,
846
+ 'data_fields ' => [
847
+ 'shipping_amount ' => 0 ,
848
+ 'base_shipping_amount ' => 0 ,
849
+ 'grand_total ' => 10.45 ,
850
+ 'base_grand_total ' => 10.45 ,
851
+ 'tax_amount ' => 0 ,
852
+ 'base_tax_amount ' => 0
853
+ ],
854
+ ],
855
+ 'expected_results ' => [
856
+ 'creditmemo_items ' => [
857
+ 'item_1 ' => [
858
+ 'tax_amount ' => 1.22 ,
859
+ 'base_tax_amount ' => 1.22 ,
860
+ ],
861
+ ],
862
+ 'creditmemo_data ' => [
863
+ 'grand_total ' => 14.76 ,
864
+ 'base_grand_total ' => 13.4 ,
865
+ 'tax_amount ' => 1.22 ,
866
+ 'base_tax_amount ' => 1.22 ,
867
+ ],
868
+ ],
869
+ ];
809
870
return $ result ;
810
871
}
811
872
0 commit comments