This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,23 @@
<?php
namespace Stemcell\Sales\Block\Order\Email;
class Items extends \Magento\Sales\Block\Order\Email\Items
{
public function getPrice(\Magento\Sales\Model\Order\Item $item): string
{
// $discountPercent = $item->getData('customer_discount_percent')*1.0;
$price = $item->getPrice();
// $price = $discountPercent? $price*((100-$discountPercent)/100):$price;
return number_format($price, 2);
}
public function getRowTotal(\Magento\Sales\Model\Order\Item $item): string
{
$discountPercent = $item->getData('customer_discount_percent')*1.0;
$rowTotal = $item->getRowTotal();
$rowTotal = $discountPercent? $rowTotal*((100-$discountPercent)/100):$rowTotal;
return number_format($rowTotal, 2);
}
}
@@ -0,0 +1,27 @@
<?php
namespace Stemcell\Sales\Block\Order\Email\Salesperson;
class Items extends \Magento\Sales\Block\Order\Email\Items
{
public function getPrice(\Magento\Sales\Model\Order\Item $item): string
{
// $discountPercent = $item->getData('customer_discount_percent')*1.0;
$price = $item->getPrice();
// $price = $discountPercent? $price*((100-$discountPercent)/100):$price;
return number_format($price, 2);
}
public function getRowTotal(\Magento\Sales\Model\Order\Item $item): string
{
$discountPercent = $item->getData('customer_discount_percent')*1.0;
$rowTotal = $item->getRowTotal();
$rowTotal = $discountPercent? $rowTotal*((100-$discountPercent)/100):$rowTotal;
return number_format($rowTotal, 2);
}
public function getSalespersonGrandTotal(\Magento\Sales\Model\Order $order): string
{
return '¥'.number_format($order->getGrandTotal(), 2);
}
}