File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
Model/Order/Creditmemo/Total
Test/Unit/Model/Order/Creditmemo/Total
design/frontend/Magento/luma/Magento_Checkout/web/css/source/module
dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Sales \Model \Order \Creditmemo \Total ;
7
7
8
+ /**
9
+ * Discount total calculator
10
+ */
8
11
class Discount extends AbstractTotal
9
12
{
10
13
/**
14
+ * Collect discount
15
+ *
11
16
* @param \Magento\Sales\Model\Order\Creditmemo $creditmemo
12
17
* @return $this
13
18
* @throws \Magento\Framework\Exception\LocalizedException
@@ -34,7 +39,7 @@ public function collect(\Magento\Sales\Model\Order\Creditmemo $creditmemo)
34
39
*/
35
40
if ($ baseShippingAmount && $ order ->getBaseShippingAmount () <= 0 ) {
36
41
throw new \Magento \Framework \Exception \LocalizedException (
37
- new \ Magento \ Framework \ Phrase ("You can not refund shipping if there is no shipping amount. " , [] )
42
+ __ ("You can not refund shipping if there is no shipping amount. " )
38
43
);
39
44
}
40
45
if ($ baseShippingAmount ) {
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ public function testCollectNonZeroShipping()
292
292
->method ('getBaseShippingDiscountAmount ' );
293
293
$ this ->orderMock ->expects ($ this ->once ())
294
294
->method ('getBaseShippingAmount ' )
295
- ->willReturn ( '0.0000 ' );
295
+ ->willReturn ('0.0000 ' );
296
296
$ this ->assertEquals ($ this ->total , $ this ->total ->collect ($ this ->creditmemoMock ));
297
297
}
298
298
}
Original file line number Diff line number Diff line change 627
627
}
628
628
629
629
&-item-details {
630
- padding-bottom : 35px ;
631
630
display : table-cell ;
631
+ padding-bottom : 35px ;
632
632
vertical-align : top ;
633
633
white-space : normal ;
634
634
width : 99% ;
Original file line number Diff line number Diff line change @@ -152,7 +152,9 @@ define([
152
152
} ) ;
153
153
154
154
it ( 'test subscribe when cart data was changed' , function ( ) {
155
- mocks [ 'Magento_Customer/js/customer-data' ] . get ( 'cart' ) ( { data_id : 2 } ) ;
155
+ mocks [ 'Magento_Customer/js/customer-data' ] . get ( 'cart' ) ( {
156
+ data_id : 2
157
+ } ) ;
156
158
expect ( mocks [ 'Magento_Checkout/js/model/cart/totals-processor/default' ] . estimateTotals ) . toHaveBeenCalled ( ) ;
157
159
} ) ;
158
160
} ) ;
You can’t perform that action at this time.
0 commit comments