|
|
@@ -231,6 +231,9 @@ class OrderController extends BaseController
|
|
|
if (empty($order)) {
|
|
|
util::fail('没有找到订单');
|
|
|
}
|
|
|
+ if ($order->forward == 1) {
|
|
|
+ util::fail('售后付款单不能打印');
|
|
|
+ }
|
|
|
OrderClass::valid($order, $this->mainId);
|
|
|
OrderClass::onlinePrint($order, true);
|
|
|
util::complete();
|
|
|
@@ -513,8 +516,6 @@ class OrderController extends BaseController
|
|
|
$hdName = $hd->name ?? '';
|
|
|
$post['hdId'] = $hdId;
|
|
|
$post['hdName'] = $hdName;
|
|
|
-
|
|
|
- //$post['customId'] = $customId;
|
|
|
$customName = $custom->name ?? '';
|
|
|
$post['customName'] = $customName;
|
|
|
$post['customNamePy'] = stringUtil::py($customName);
|
|
|
@@ -540,7 +541,15 @@ class OrderController extends BaseController
|
|
|
$forward = $post['forward'] ?? 0;
|
|
|
if ($forward == 1) {
|
|
|
if ($hasPay != 1) {
|
|
|
- util::fail('负数订单只能线下转账');
|
|
|
+ util::fail('售后付款单只能走线下转账');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //如果不是售后付款单,并且选的不是余额支付,余额又够付当前订单,则自动切到余额支付
|
|
|
+ $balance = $custom->balance ?? 0;
|
|
|
+ $modifyPrice = $post['modifyPrice'] ?? 0;
|
|
|
+ if ($hasPay != 4 && $balance > $modifyPrice) {
|
|
|
+ $post['hasPay'] = 4;
|
|
|
+ $hasPay = 4;
|
|
|
}
|
|
|
}
|
|
|
|