File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Model/Order/Creditmemo/Validation Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,14 @@ public function validate($entity)
83
83
}
84
84
$ orderItem = $ orderItemsById [$ item ->getOrderItemId ()];
85
85
86
+ if (!$ orderItem ->getIsQtyDecimal () && (floor ($ item ->getQty ()) !== $ item ->getQty ())) {
87
+ $ messages [] =__ (
88
+ 'You cannot use decimal quantity to refund item "%1". ' ,
89
+ $ item ->getSku ()
90
+ );
91
+ continue ;
92
+ }
93
+
86
94
if (!$ this ->canRefundItem ($ orderItem , $ item ->getQty (), $ invoiceQtysRefundLimits ) ||
87
95
!$ this ->isQtyAvailable ($ orderItem , $ item ->getQty ())
88
96
) {
Original file line number Diff line number Diff line change @@ -806,3 +806,4 @@ If set YES Email field will be required during Admin order creation for new Cust
806
806
"The coupon code has been removed.","The coupon code has been removed."
807
807
"This creditmemo no longer exists.","This creditmemo no longer exists."
808
808
"Add to address book","Add to address book"
809
+ "You cannot use decimal quantity to refund item","You cannot use decimal quantity to refund item"
You can’t perform that action at this time.
0 commit comments