Skip to content

Commit 6918011

Browse files
committed
fixed typos for zero ordertotal creditmemo feature
1 parent 1a805d0 commit 6918011

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,8 @@ private function canCreditmemoForZeroTotalRefunded($totalRefunded)
656656
$isRefundZero = abs($totalRefunded) < .0001;
657657
// Case when Adjustment Fee (adjustment_negative) has been used for first creditmemo
658658
$hasAdjustmentFee = abs($totalRefunded - $this->getAdjustmentNegative()) < .0001;
659-
$hasActinFlag = $this->getActionFlag(self::ACTION_FLAG_EDIT) === false;
660-
if ($isRefundZero || $hasAdjustmentFee || $hasActinFlag) {
659+
$hasActionFlag = $this->getActionFlag(self::ACTION_FLAG_EDIT) === false;
660+
if ($isRefundZero || $hasAdjustmentFee || $hasActionFlag) {
661661
return false;
662662
}
663663

@@ -676,13 +676,12 @@ public function canCreditmemoForZeroTotal($totalRefunded)
676676
//check if total paid is less than grandtotal
677677
$checkAmtTotalPaid = $totalPaid <= $this->getGrandTotal();
678678
//case when amount is due for invoice
679-
$dueAmountCondition = $this->canInvoice() && ($checkAmtTotalPaid);
679+
$hasDueAmount = $this->canInvoice() && ($checkAmtTotalPaid);
680680
//case when paid amount is refunded and order has creditmemo created
681-
682681
$creditmemos = ($this->getCreditmemosCollection() === false) ?
683682
true : (count($this->getCreditmemosCollection()) > 0);
684683
$paidAmtIsRefunded = $this->getTotalRefunded() == $totalPaid && $creditmemos;
685-
if (($dueAmountCondition || $paidAmtIsRefunded) ||
684+
if (($hasDueAmount || $paidAmtIsRefunded) ||
686685
(!$checkAmtTotalPaid &&
687686
abs($totalRefunded - $this->getAdjustmentNegative()) < .0001)) {
688687
return false;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,3 +795,5 @@ Created,Created
795795
"PDF Shipments","PDF Shipments"
796796
"PDF Creditmemos","PDF Creditmemos"
797797
Refunds,Refunds
798+
"Allow Zero GrandTotal for Creditmemo","Allow Zero GrandTotal for Creditmemo"
799+
"Allow Zero GrandTotal","Allow Zero GrandTotal"

0 commit comments

Comments
 (0)