@@ -735,25 +735,25 @@ public function canCreditmemo()
735
735
* for this we have additional diapason for 0
736
736
* TotalPaid - contains amount, that were not rounded.
737
737
*/
738
- $ totalRefunded = $ this ->priceCurrency ->round ($ this ->getTotalPaid ()) - $ this ->getTotalRefunded ();
738
+ $ totalRefundable = $ this ->priceCurrency ->round ($ this ->getTotalPaid ()) - $ this ->getTotalRefunded ();
739
739
if (abs ((float ) $ this ->getGrandTotal ()) < .0001 ) {
740
- return $ this ->canCreditmemoForZeroTotal ($ totalRefunded );
740
+ return $ this ->canCreditmemoForZeroTotal ($ totalRefundable );
741
741
}
742
742
743
- return $ this ->canCreditmemoForZeroTotalRefunded ($ totalRefunded );
743
+ return $ this ->canCreditmemoForZeroTotalRefunded ($ totalRefundable );
744
744
}
745
745
746
746
/**
747
747
* Retrieve credit memo for zero total refunded availability.
748
748
*
749
- * @param float $totalRefunded
749
+ * @param float $totalRefundable
750
750
* @return bool
751
751
*/
752
- private function canCreditmemoForZeroTotalRefunded ($ totalRefunded )
752
+ private function canCreditmemoForZeroTotalRefunded ($ totalRefundable )
753
753
{
754
- $ isRefundZero = abs ((float ) $ totalRefunded ) < .0001 ;
754
+ $ isRefundZero = abs ((float ) $ totalRefundable ) < .0001 ;
755
755
// Case when Adjustment Fee (adjustment_negative) has been used for first creditmemo
756
- $ hasAdjustmentFee = abs ($ totalRefunded - $ this ->getAdjustmentNegative ()) < .0001 ;
756
+ $ hasAdjustmentFee = abs ($ totalRefundable - $ this ->getAdjustmentNegative ()) < .0001 ;
757
757
$ hasActionFlag = $ this ->getActionFlag (self ::ACTION_FLAG_EDIT ) === false ;
758
758
if ($ isRefundZero || $ hasAdjustmentFee || $ hasActionFlag ) {
759
759
return false ;
@@ -765,10 +765,10 @@ private function canCreditmemoForZeroTotalRefunded($totalRefunded)
765
765
/**
766
766
* Retrieve credit memo for zero total availability.
767
767
*
768
- * @param float $totalRefunded
768
+ * @param float $totalRefundable
769
769
* @return bool
770
770
*/
771
- private function canCreditmemoForZeroTotal ($ totalRefunded )
771
+ private function canCreditmemoForZeroTotal ($ totalRefundable )
772
772
{
773
773
if ($ this ->areThereRefundableItems ()) {
774
774
return true ;
@@ -785,7 +785,7 @@ private function canCreditmemoForZeroTotal($totalRefunded)
785
785
$ paidAmtIsRefunded = $ this ->getTotalRefunded () == $ totalPaid && $ creditmemos ;
786
786
if ($ hasDueAmount ||
787
787
$ paidAmtIsRefunded ||
788
- (!$ checkAmtTotalPaid && abs ($ totalRefunded - $ this ->getAdjustmentNegative ()) < .0001 )) {
788
+ (!$ checkAmtTotalPaid && abs ($ totalRefundable - $ this ->getAdjustmentNegative ()) < .0001 )) {
789
789
return false ;
790
790
}
791
791
return true ;
0 commit comments