File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -656,8 +656,8 @@ private function canCreditmemoForZeroTotalRefunded($totalRefunded)
656
656
$ isRefundZero = abs ($ totalRefunded ) < .0001 ;
657
657
// Case when Adjustment Fee (adjustment_negative) has been used for first creditmemo
658
658
$ hasAdjustmentFee = abs ($ totalRefunded - $ this ->getAdjustmentNegative ()) < .0001 ;
659
- $ hasActinFlag = $ this ->getActionFlag (self ::ACTION_FLAG_EDIT ) === false ;
660
- if ($ isRefundZero || $ hasAdjustmentFee || $ hasActinFlag ) {
659
+ $ hasActionFlag = $ this ->getActionFlag (self ::ACTION_FLAG_EDIT ) === false ;
660
+ if ($ isRefundZero || $ hasAdjustmentFee || $ hasActionFlag ) {
661
661
return false ;
662
662
}
663
663
@@ -676,13 +676,12 @@ public function canCreditmemoForZeroTotal($totalRefunded)
676
676
//check if total paid is less than grandtotal
677
677
$ checkAmtTotalPaid = $ totalPaid <= $ this ->getGrandTotal ();
678
678
//case when amount is due for invoice
679
- $ dueAmountCondition = $ this ->canInvoice () && ($ checkAmtTotalPaid );
679
+ $ hasDueAmount = $ this ->canInvoice () && ($ checkAmtTotalPaid );
680
680
//case when paid amount is refunded and order has creditmemo created
681
-
682
681
$ creditmemos = ($ this ->getCreditmemosCollection () === false ) ?
683
682
true : (count ($ this ->getCreditmemosCollection ()) > 0 );
684
683
$ paidAmtIsRefunded = $ this ->getTotalRefunded () == $ totalPaid && $ creditmemos ;
685
- if (($ dueAmountCondition || $ paidAmtIsRefunded ) ||
684
+ if (($ hasDueAmount || $ paidAmtIsRefunded ) ||
686
685
(!$ checkAmtTotalPaid &&
687
686
abs ($ totalRefunded - $ this ->getAdjustmentNegative ()) < .0001 )) {
688
687
return false ;
Original file line number Diff line number Diff line change @@ -795,3 +795,5 @@ Created,Created
795
795
"PDF Shipments","PDF Shipments"
796
796
"PDF Creditmemos","PDF Creditmemos"
797
797
Refunds,Refunds
798
+ "Allow Zero GrandTotal for Creditmemo","Allow Zero GrandTotal for Creditmemo"
799
+ "Allow Zero GrandTotal","Allow Zero GrandTotal"
You can’t perform that action at this time.
0 commit comments