Skip to content

Commit 1aabcff

Browse files
author
Oleksii Korshenko
authored
ENGCOM-3677: [BackPort] resolve typos and correct variable names #19280
2 parents 1f8cbd9 + be55b11 commit 1aabcff

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

app/code/Magento/Sales/Model/Order.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,8 +665,8 @@ private function canCreditmemoForZeroTotalRefunded(float $totalRefunded): bool
665665
$isRefundZero = abs($totalRefunded) < .0001;
666666
// Case when Adjustment Fee (adjustment_negative) has been used for first creditmemo
667667
$hasAdjustmentFee = abs($totalRefunded - $this->getAdjustmentNegative()) < .0001;
668-
$hasActinFlag = $this->getActionFlag(self::ACTION_FLAG_EDIT) === false;
669-
if ($isRefundZero || $hasAdjustmentFee || $hasActinFlag) {
668+
$hasActionFlag = $this->getActionFlag(self::ACTION_FLAG_EDIT) === false;
669+
if ($isRefundZero || $hasAdjustmentFee || $hasActionFlag) {
670670
return false;
671671
}
672672

@@ -682,15 +682,15 @@ private function canCreditmemoForZeroTotalRefunded(float $totalRefunded): bool
682682
private function canCreditmemoForZeroTotal(float $totalRefunded): bool
683683
{
684684
$totalPaid = $this->getTotalPaid();
685-
//check if total paid is less than grandtotal
685+
//check if total paid is less than grand total
686686
$checkAmtTotalPaid = $totalPaid <= $this->getGrandTotal();
687687
//case when amount is due for invoice
688-
$dueAmountCondition = $this->canInvoice() && $checkAmtTotalPaid;
688+
$hasDueAmount = $this->canInvoice() && $checkAmtTotalPaid;
689689
//case when paid amount is refunded and order has creditmemo created
690690
$creditmemos = ($this->getCreditmemosCollection() === false) ?
691691
true : (count($this->getCreditmemosCollection()) > 0);
692692
$paidAmtIsRefunded = $this->getTotalRefunded() == $totalPaid && $creditmemos;
693-
if (($dueAmountCondition || $paidAmtIsRefunded)
693+
if (($hasDueAmount || $paidAmtIsRefunded)
694694
|| (!$checkAmtTotalPaid && abs($totalRefunded - $this->getAdjustmentNegative()) < .0001)
695695
) {
696696
return false;

app/code/Magento/Sales/i18n/en_US.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,3 +796,5 @@ Created,Created
796796
"PDF Creditmemos","PDF Creditmemos"
797797
Refunds,Refunds
798798
"Shipment with requested ID %1 doesn't correspond with Order with requested ID %2.","Shipment with requested ID %1 doesn't correspond with Order with requested ID %2."
799+
"Allow Zero GrandTotal for Creditmemo","Allow Zero GrandTotal for Creditmemo"
800+
"Allow Zero GrandTotal","Allow Zero GrandTotal"

0 commit comments

Comments
 (0)