@@ -735,25 +735,25 @@ public function canCreditmemo()
735735 * for this we have additional diapason for 0
736736 * TotalPaid - contains amount, that were not rounded.
737737 */
738- $ totalRefunded = $ this ->priceCurrency ->round ($ this ->getTotalPaid ()) - $ this ->getTotalRefunded ();
738+ $ totalRefundable = $ this ->priceCurrency ->round ($ this ->getTotalPaid ()) - $ this ->getTotalRefunded ();
739739 if (abs ((float ) $ this ->getGrandTotal ()) < .0001 ) {
740- return $ this ->canCreditmemoForZeroTotal ($ totalRefunded );
740+ return $ this ->canCreditmemoForZeroTotal ($ totalRefundable );
741741 }
742742
743- return $ this ->canCreditmemoForZeroTotalRefunded ($ totalRefunded );
743+ return $ this ->canCreditmemoForZeroTotalRefunded ($ totalRefundable );
744744 }
745745
746746 /**
747747 * Retrieve credit memo for zero total refunded availability.
748748 *
749- * @param float $totalRefunded
749+ * @param float $totalRefundable
750750 * @return bool
751751 */
752- private function canCreditmemoForZeroTotalRefunded ($ totalRefunded )
752+ private function canCreditmemoForZeroTotalRefunded ($ totalRefundable )
753753 {
754- $ isRefundZero = abs ((float ) $ totalRefunded ) < .0001 ;
754+ $ isRefundZero = abs ((float ) $ totalRefundable ) < .0001 ;
755755 // 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 ;
757757 $ hasActionFlag = $ this ->getActionFlag (self ::ACTION_FLAG_EDIT ) === false ;
758758 if ($ isRefundZero || $ hasAdjustmentFee || $ hasActionFlag ) {
759759 return false ;
@@ -765,10 +765,10 @@ private function canCreditmemoForZeroTotalRefunded($totalRefunded)
765765 /**
766766 * Retrieve credit memo for zero total availability.
767767 *
768- * @param float $totalRefunded
768+ * @param float $totalRefundable
769769 * @return bool
770770 */
771- private function canCreditmemoForZeroTotal ($ totalRefunded )
771+ private function canCreditmemoForZeroTotal ($ totalRefundable )
772772 {
773773 if ($ this ->areThereRefundableItems ()) {
774774 return true ;
@@ -785,7 +785,7 @@ private function canCreditmemoForZeroTotal($totalRefunded)
785785 $ paidAmtIsRefunded = $ this ->getTotalRefunded () == $ totalPaid && $ creditmemos ;
786786 if ($ hasDueAmount ||
787787 $ paidAmtIsRefunded ||
788- (!$ checkAmtTotalPaid && abs ($ totalRefunded - $ this ->getAdjustmentNegative ()) < .0001 )) {
788+ (!$ checkAmtTotalPaid && abs ($ totalRefundable - $ this ->getAdjustmentNegative ()) < .0001 )) {
789789 return false ;
790790 }
791791 return true ;
0 commit comments