@@ -708,25 +708,25 @@ public function canCreditmemo()
708708 * for this we have additional diapason for 0
709709 * TotalPaid - contains amount, that were not rounded.
710710 */
711- $ totalRefunded = $ this ->priceCurrency ->round ($ this ->getTotalPaid ()) - $ this ->getTotalRefunded ();
711+ $ totalRefundable = $ this ->priceCurrency ->round ($ this ->getTotalPaid ()) - $ this ->getTotalRefunded ();
712712 if (abs ((float ) $ this ->getGrandTotal ()) < .0001 ) {
713- return $ this ->canCreditmemoForZeroTotal ($ totalRefunded );
713+ return $ this ->canCreditmemoForZeroTotal ($ totalRefundable );
714714 }
715715
716- return $ this ->canCreditmemoForZeroTotalRefunded ($ totalRefunded );
716+ return $ this ->canCreditmemoForZeroTotalRefunded ($ totalRefundable );
717717 }
718718
719719 /**
720720 * Retrieve credit memo for zero total refunded availability.
721721 *
722- * @param float $totalRefunded
722+ * @param float $totalRefundable
723723 * @return bool
724724 */
725- private function canCreditmemoForZeroTotalRefunded ($ totalRefunded )
725+ private function canCreditmemoForZeroTotalRefunded ($ totalRefundable )
726726 {
727- $ isRefundZero = abs ((float ) $ totalRefunded ) < .0001 ;
727+ $ isRefundZero = abs ((float ) $ totalRefundable ) < .0001 ;
728728 // 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 ;
730730 $ hasActionFlag = $ this ->getActionFlag (self ::ACTION_FLAG_EDIT ) === false ;
731731 if ($ isRefundZero || $ hasAdjustmentFee || $ hasActionFlag ) {
732732 return false ;
@@ -738,10 +738,10 @@ private function canCreditmemoForZeroTotalRefunded($totalRefunded)
738738 /**
739739 * Retrieve credit memo for zero total availability.
740740 *
741- * @param float $totalRefunded
741+ * @param float $totalRefundable
742742 * @return bool
743743 */
744- private function canCreditmemoForZeroTotal ($ totalRefunded )
744+ private function canCreditmemoForZeroTotal ($ totalRefundable )
745745 {
746746 $ totalPaid = $ this ->getTotalPaid ();
747747 //check if total paid is less than grandtotal
@@ -754,7 +754,7 @@ private function canCreditmemoForZeroTotal($totalRefunded)
754754 $ paidAmtIsRefunded = $ this ->getTotalRefunded () == $ totalPaid && $ creditmemos ;
755755 if (($ hasDueAmount || $ paidAmtIsRefunded ) ||
756756 (!$ checkAmtTotalPaid &&
757- abs ($ totalRefunded - $ this ->getAdjustmentNegative ()) < .0001 )) {
757+ abs ($ totalRefundable - $ this ->getAdjustmentNegative ()) < .0001 )) {
758758 return false ;
759759 }
760760 return true ;
0 commit comments