|
|
@@ -139,6 +139,7 @@ class PurchaseController extends BaseController
|
|
|
if (in_array(strtotime($sendTimeWant), $hasDate) == false) {
|
|
|
util::fail("【{$currentName}】在{$sendTimeWant}没有预售");
|
|
|
}
|
|
|
+ $post['presell'] = 1;
|
|
|
}
|
|
|
}
|
|
|
if (count($productInfoList) != count($ids)) {
|
|
|
@@ -312,20 +313,23 @@ class PurchaseController extends BaseController
|
|
|
$id = $get['id'] ?? 0;
|
|
|
$info = PurchaseService::getInfo($id, true, true);
|
|
|
if (isset($info['mainId']) == false || $info['mainId'] != $this->mainId) {
|
|
|
+ //不能注释,好像分享付款功能要用
|
|
|
//util::fail('没有权限访问');
|
|
|
}
|
|
|
-
|
|
|
$customId = $info['customId'] ?? 0;
|
|
|
$custom = CustomClass::getById($customId);
|
|
|
$hasDebtPay = $custom['debt'] ?? 0;
|
|
|
$book = $info['book'] ?? 0;
|
|
|
+ $presell = $info['presell'] ?? 0;
|
|
|
//预售不能记欠款
|
|
|
if ($book == 1) {
|
|
|
$hasDebtPay = 0;
|
|
|
}
|
|
|
+ if ($presell == 1) {
|
|
|
+ $hasDebtPay = 0;
|
|
|
+ }
|
|
|
$info['hasDebtPay'] = $hasDebtPay;
|
|
|
$info['balance'] = $this->shop->balance ?? 0;
|
|
|
-
|
|
|
util::success($info);
|
|
|
}
|
|
|
|