|
|
@@ -439,7 +439,7 @@ class OrderClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
$content .= '<BR>';
|
|
|
- $content .= '花材 数量/单价 金额 <BR>';
|
|
|
+ $content .= '花材 数量/单价 金额 <BR>';
|
|
|
$content .= '--------------------------------<BR>';
|
|
|
|
|
|
if (isset($respond['product']) && !empty($respond['product'])) {
|
|
|
@@ -471,7 +471,7 @@ class OrderClass extends BaseClass
|
|
|
}
|
|
|
}
|
|
|
$content .= '--------------------------------<BR>';
|
|
|
- if(isset($respond['sendCost']) && $respond['sendCost'] > 0){
|
|
|
+ if (isset($respond['sendCost']) && $respond['sendCost'] > 0) {
|
|
|
$content .= ' 运费:' . $respond['sendCost'] . '<BR>';
|
|
|
}
|
|
|
$content .= '订单金额:' . $respond['prePrice'] . '<BR>';
|
|
|
@@ -527,12 +527,25 @@ class OrderClass extends BaseClass
|
|
|
if (isset($showItem['list']) && !empty($showItem['list'])) {
|
|
|
foreach ($showItem['list'] as $itemKey => $itemVal) {
|
|
|
$bigNum = $itemVal['bigNum'] ?? 0;
|
|
|
+ $bigUnitPrice = $itemVal['unitPrice'] ?? 0;
|
|
|
+ $smallUnitPrice = $itemVal['smallUnitPrice'] ?? 0;
|
|
|
$smallNum = $itemVal['smallNum'] ?? 0;
|
|
|
- $printProduct[] = [
|
|
|
- 'name' => $itemVal['name'] ?? '',
|
|
|
- 'num' => $bigNum . '/' . $smallNum,
|
|
|
- 'price' => $itemVal['price'] ?? '0.00'
|
|
|
- ];
|
|
|
+ if ($bigNum > 0) {
|
|
|
+ $bigTotalPrice = bcmul($bigUnitPrice, $bigNum, 2);
|
|
|
+ $printProduct[] = [
|
|
|
+ 'name' => $itemVal['name'] ?? '',
|
|
|
+ 'num' => $bigNum . '/' . $bigUnitPrice,
|
|
|
+ 'price' => $bigTotalPrice
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ if ($smallNum > 0) {
|
|
|
+ $smallTotalPrice = bcmul($smallUnitPrice, $smallNum, 2);
|
|
|
+ $printProduct[] = [
|
|
|
+ 'name' => $itemVal['name'] ?? '',
|
|
|
+ 'num' => $smallNum . '/' . $smallUnitPrice,
|
|
|
+ 'price' => $smallTotalPrice
|
|
|
+ ];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|