Skip to content

Commit

Permalink
fix rename
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeholder committed Dec 11, 2024
1 parent 27e8bf6 commit af0c5e5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/elements/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -1700,8 +1700,8 @@ public function updateOrderPaidInformation(): void
$justPaid = $paidInFull && $this->datePaid == null;
$justAuthorized = $authorizedInFull && $this->dateAuthorized == null;

$completeTotal = $this->_getTeller()->add($this->getTotalAuthorized(), $this->getTotalPaid());
$canComplete = $this->_getTeller()->greaterThan($completeTotal, 0);
$completeTotal = $this->getTeller()->add($this->getTotalAuthorized(), $this->getTotalPaid());
$canComplete = $this->getTeller()->greaterThan($completeTotal, 0);

// If it is no longer paid in full, set datePaid to null
if (!$paidInFull) {
Expand Down Expand Up @@ -2663,24 +2663,24 @@ public function getPaidStatusHtml(): string
*/
public function getTotal(): float
{
return (float)$this->_getTeller()->add($this->getItemSubtotal(), $this->getAdjustmentsTotal());
return (float)$this->getTeller()->add($this->getItemSubtotal(), $this->getAdjustmentsTotal());
}

/**
* Get the total price of the order, whose minimum value is enforced by the configured {@link Store::getMinimumTotalPriceStrategy() strategy set for minimum total price}.
*/
public function getTotalPrice(): float
{
$total = (float)$this->_getTeller()->add($this->getItemSubtotal(), $this->getAdjustmentsTotal());
$total = (float)$this->getTeller()->add($this->getItemSubtotal(), $this->getAdjustmentsTotal());
// Don't get the pre-rounded total.
$strategy = $this->getStore()->getMinimumTotalPriceStrategy();

if ($strategy === Store::MINIMUM_TOTAL_PRICE_STRATEGY_ZERO) {
return (float)$this->_getTeller()->max(0, $total);
return (float)$this->getTeller()->max(0, $total);
}

if ($strategy === Store::MINIMUM_TOTAL_PRICE_STRATEGY_SHIPPING) {
return (float)$this->_getTeller()->max($this->getTotalShippingCost(), $total);
return (float)$this->getTeller()->max($this->getTotalShippingCost(), $total);
}

return $total;
Expand Down

0 comments on commit af0c5e5

Please sign in to comment.