门店绑定优化
This commit is contained in:
@@ -720,7 +720,17 @@ class LedgerForm extends BaseModel
|
||||
$log->saveOrFail();
|
||||
|
||||
//可提现及累计金额更新
|
||||
CashAccount::updateAllCounters(['able_cash' => $v['amount'] * -1, 'total_cash' => $v['amount'] * -1],['user_type' => $v['user_type'], 'user_id' => $v['user_id'], 'order_type' => $v['order_type'], 'fee_type' => $v['fee_type']]);
|
||||
CashAccount::updateAllCounters([
|
||||
'able_cash' => $v['amount'] * -1,
|
||||
'total_cash' => $v['amount'] * -1],
|
||||
[
|
||||
'user_type' => $v['user_type'],
|
||||
'user_id' => $v['user_id'
|
||||
],
|
||||
'order_type' => $v['order_type'],
|
||||
'fee_type' => $v['fee_type'
|
||||
]
|
||||
]);
|
||||
}
|
||||
} else { // 未结算
|
||||
Ledger::updateAll(['status' => 2, 'updated_at' => $time], ['order_id' => $this->order_id, 'order_type' => 2]);
|
||||
@@ -915,7 +925,7 @@ class LedgerForm extends BaseModel
|
||||
|
||||
//增加诊疗费
|
||||
if($productOrder->treatement_price > 0){
|
||||
$platformTreatementTotal = Ledger::find()->where(['order_id' => $this->order_id, 'user_type' => 2, 'order_type' => 1, 'fee_type' => 6])->sum('money'); // 该订单诊疗费用
|
||||
$platformTreatementTotal = Ledger::find()->where(['order_id' => $this->order_id, 'user_type' => 1, 'order_type' => 1, 'fee_type' => 6])->sum('money'); // 该订单诊疗费用
|
||||
$logTreatement = clone $model;
|
||||
$logTreatement->order_id = $this->order_id;
|
||||
$logTreatement->user_id = $store->id;
|
||||
|
||||
Reference in New Issue
Block a user