|
|
@@ -14,10 +14,10 @@ class GhsClass extends BaseClass
|
|
|
public static $baseFile = '\bizHd\ghs\models\Ghs';
|
|
|
|
|
|
//供应商销售欠款金额增加 ssh 20220306
|
|
|
- public static function xsDebtAmountAdd($ghs, $order)
|
|
|
+ public static function cgDebtAmountAdd($ghs, $order, $bookOrder = false)
|
|
|
{
|
|
|
$amount = $order->realPrice ?? 0;
|
|
|
- $balance = bcadd($ghs->debtAmount, $order->actPrice, 2);
|
|
|
+ $balance = bcadd($ghs->debtAmount, $order->remainDebtPrice, 2);
|
|
|
$ghs->debt = 2;
|
|
|
$ghs->debtAmount = $balance;
|
|
|
$ghs->save();
|
|
|
@@ -26,6 +26,10 @@ class GhsClass extends BaseClass
|
|
|
$orderSn = $order->orderSn ?? '';
|
|
|
$ghsId = $ghs->id ?? 0;
|
|
|
$capitalType = dict::getDict('capitalType', 'xhPurchase', 'id');
|
|
|
+ $event = '购买花材,采购单号:' . $orderSn;
|
|
|
+ if ($bookOrder) {
|
|
|
+ $event = '预订单多退少补,单号' . $orderSn;
|
|
|
+ }
|
|
|
|
|
|
$change = [
|
|
|
'relateId' => $relateId,
|
|
|
@@ -36,7 +40,7 @@ class GhsClass extends BaseClass
|
|
|
'balance' => $balance,
|
|
|
'io' => 1,
|
|
|
'payWay' => $order->payWay,
|
|
|
- 'event' => '购买花材,采购单号:'.$orderSn,
|
|
|
+ 'event' => $event,
|
|
|
'sjId' => $order->sjId ?? 0,
|
|
|
'shopId' => $order->shopId ?? 0,
|
|
|
];
|