|
|
@@ -824,8 +824,8 @@ class OrderClass extends BaseClass
|
|
|
$mainId = $data['mainId'] ?? 0;
|
|
|
$ghsId = $data['ghsId'] ?? 0;
|
|
|
$customId = $data['customId'] ?? 0;
|
|
|
- $distId = $custom['distId'] ?? 0;
|
|
|
- $data['customDistId'] = $distId;
|
|
|
+ $distId = $custom['distId'] ?? 0;
|
|
|
+ $data['customDistId'] = $distId;
|
|
|
$snData = ['shopId' => $shopId, 'mainId' => $mainId, 'ghsId' => $ghsId, 'customId' => $customId];
|
|
|
$orderSn = orderSn::getGhsOrderSn($snData);
|
|
|
|
|
|
@@ -1557,7 +1557,8 @@ class OrderClass extends BaseClass
|
|
|
$list[$key]['customName'] = !empty($val['customId']) ? $val['customName'] : '散客';
|
|
|
|
|
|
$customId = $val['customId'] ?? '';
|
|
|
- $debtAmount = $customInfoList[$customId]['debtAmount'] ?? 0.00;
|
|
|
+ $balance = $customInfoList[$customId]['balance'] ?? 0.00;
|
|
|
+ $debtAmount = $balance<0 ? abs($balance) : 0;
|
|
|
|
|
|
//打印数据组合
|
|
|
$printData = self::getPrintData($val, $debtAmount, $showItemData);
|
|
|
@@ -1976,7 +1977,8 @@ class OrderClass extends BaseClass
|
|
|
|
|
|
$customId = $orderInfo['customId'] ?? 0;
|
|
|
$c = CustomClass::getById($customId);
|
|
|
- $debtAmount = $c['debtAmount'] ?? 0.00;
|
|
|
+ $balance = $c['balance'] ?? 0.00;
|
|
|
+ $debtAmount = $balance<0 ? abs($balance) : 0;
|
|
|
$orderSn = $orderInfo['orderSn'] ?? '';
|
|
|
$shopId = $orderInfo['shopId'] ?? 0;
|
|
|
$shop = ShopClass::getById($shopId, true);
|
|
|
@@ -3059,7 +3061,7 @@ XL;
|
|
|
/**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
|
|
|
$orderMainId = $order->mainId;
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
- $map = [65726, 58, 25119, 28500, 1294, 12925, 2644,10652,2084,89473];
|
|
|
+ $map = [65726, 58, 25119, 28500, 1294, 12925, 2644, 10652, 2084, 89473];
|
|
|
} else {
|
|
|
$map = [828];
|
|
|
}
|
|
|
@@ -3084,7 +3086,7 @@ XL;
|
|
|
}
|
|
|
}
|
|
|
//东莞我要花 手机后四号变星号
|
|
|
- if (in_array((int)$orderMainId, [2644,10652,2084,89473], true)) {
|
|
|
+ if (in_array((int)$orderMainId, [2644, 10652, 2084, 89473], true)) {
|
|
|
$customMobile = preg_replace('/(.{4})$/u', '****', trim($customMobile));
|
|
|
}
|
|
|
$customName = $order->customName ?? '';
|
|
|
@@ -3156,12 +3158,12 @@ XL;
|
|
|
$payTime = $order->payTime ?? '';
|
|
|
$payDate = date('m-d H:i', strtotime($payTime));
|
|
|
$content = '<TEXT x="400" y="30" font="12" w="3" h="3" r="90">' . $customName . '</TEXT>';
|
|
|
-
|
|
|
+
|
|
|
// 地址超过15个字,字体大小(w和h)变小一级(由 w="2" h="2" 变为 w="1" h="1")
|
|
|
$addressLen = mb_strlen($fullAddress, 'UTF-8');
|
|
|
$fontScale = $addressLen > 16 ? '1' : '2';
|
|
|
$content .= '<TEXT x="280" y="30" font="12" w="' . $fontScale . '" h="' . $fontScale . '" r="90">' . $fullAddress . '</TEXT>';
|
|
|
-
|
|
|
+
|
|
|
$content .= '<TEXT x="180" y="30" font="12" w="2" h="2" r="90">' . $customMobile . ' ' . $itemNum . '扎</TEXT>';
|
|
|
$content .= '<TEXT x="86" y="30" font="12" w="2" h="2" r="90">' . $distName . ' ' . $payDate . '</TEXT>';
|
|
|
/**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
|