@@ -708,25 +708,25 @@ public function canCreditmemo()
708
708
* for this we have additional diapason for 0
709
709
* TotalPaid - contains amount, that were not rounded.
710
710
*/
711
- $ totalRefunded = $ this ->priceCurrency ->round ($ this ->getTotalPaid ()) - $ this ->getTotalRefunded ();
711
+ $ totalRefundable = $ this ->priceCurrency ->round ($ this ->getTotalPaid ()) - $ this ->getTotalRefunded ();
712
712
if (abs ((float ) $ this ->getGrandTotal ()) < .0001 ) {
713
- return $ this ->canCreditmemoForZeroTotal ($ totalRefunded );
713
+ return $ this ->canCreditmemoForZeroTotal ($ totalRefundable );
714
714
}
715
715
716
- return $ this ->canCreditmemoForZeroTotalRefunded ($ totalRefunded );
716
+ return $ this ->canCreditmemoForZeroTotalRefunded ($ totalRefundable );
717
717
}
718
718
719
719
/**
720
720
* Retrieve credit memo for zero total refunded availability.
721
721
*
722
- * @param float $totalRefunded
722
+ * @param float $totalRefundable
723
723
* @return bool
724
724
*/
725
- private function canCreditmemoForZeroTotalRefunded ($ totalRefunded )
725
+ private function canCreditmemoForZeroTotalRefunded ($ totalRefundable )
726
726
{
727
- $ isRefundZero = abs ((float ) $ totalRefunded ) < .0001 ;
727
+ $ isRefundZero = abs ((float ) $ totalRefundable ) < .0001 ;
728
728
// Case when Adjustment Fee (adjustment_negative) has been used for first creditmemo
729
- $ hasAdjustmentFee = abs ($ totalRefunded - $ this ->getAdjustmentNegative ()) < .0001 ;
729
+ $ hasAdjustmentFee = abs ($ totalRefundable - $ this ->getAdjustmentNegative ()) < .0001 ;
730
730
$ hasActionFlag = $ this ->getActionFlag (self ::ACTION_FLAG_EDIT ) === false ;
731
731
if ($ isRefundZero || $ hasAdjustmentFee || $ hasActionFlag ) {
732
732
return false ;
@@ -738,10 +738,10 @@ private function canCreditmemoForZeroTotalRefunded($totalRefunded)
738
738
/**
739
739
* Retrieve credit memo for zero total availability.
740
740
*
741
- * @param float $totalRefunded
741
+ * @param float $totalRefundable
742
742
* @return bool
743
743
*/
744
- private function canCreditmemoForZeroTotal ($ totalRefunded )
744
+ private function canCreditmemoForZeroTotal ($ totalRefundable )
745
745
{
746
746
$ totalPaid = $ this ->getTotalPaid ();
747
747
//check if total paid is less than grandtotal
@@ -754,7 +754,7 @@ private function canCreditmemoForZeroTotal($totalRefunded)
754
754
$ paidAmtIsRefunded = $ this ->getTotalRefunded () == $ totalPaid && $ creditmemos ;
755
755
if (($ hasDueAmount || $ paidAmtIsRefunded ) ||
756
756
(!$ checkAmtTotalPaid &&
757
- abs ($ totalRefunded - $ this ->getAdjustmentNegative ()) < .0001 )) {
757
+ abs ($ totalRefundable - $ this ->getAdjustmentNegative ()) < .0001 )) {
758
758
return false ;
759
759
}
760
760
return true ;
0 commit comments