Skip to content

Commit c560981

Browse files
author
Anna Bukatar
committed
ACP2E-651: Orders Api zero row total issue for order items with discounts
1 parent fe07d7a commit c560981

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Sales\Api\Data\OrderItemInterface;
1111
use Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn;
1212
use Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer;
13+
use Magento\Tests\NamingConvention\true\float;
1314

1415
/**
1516
* Class for changing row total in response.
@@ -69,10 +70,10 @@ public function execute(
6970
* Remove negative values from row totals
7071
*
7172
* @param float $value
72-
* @return mixed
73+
* @return float
7374
*/
74-
private function round(float $value)
75+
private function round(float $value): float
7576
{
76-
return max($value, 0);
77+
return (float) max($value, 0);
7778
}
7879
}

0 commit comments

Comments
 (0)