小组服务公司任务收益流水 增加remark
This commit is contained in:
parent
977e7534ce
commit
ad6cd8ce6e
@ -52,15 +52,15 @@ class ShareProfit
|
||||
//公司
|
||||
if ($data['company_account_type'] == 1) {
|
||||
$deposit_count = bcadd($company['deposit'], $master_maoney, 2);
|
||||
$this->AccountLog($data['company_id'], $deposit_count, $master_maoney);
|
||||
$this->AccountLog($data['company_id'], $deposit_count, $master_maoney,1,1,1, $data['msg']);
|
||||
|
||||
$company_money_count = bcadd($company['company_money'], $master_maoney, 2);
|
||||
$this->AccountLog($data['company_id'], $company_money_count, $master_maoney);
|
||||
$this->AccountLog($data['company_id'], $company_money_count, $master_maoney, 1, 1,1, $data['msg']);
|
||||
|
||||
Company::where('id', $data['company_id'])->update(['deposit' => Db::raw('deposit+' . $master_maoney), 'company_money' => Db::raw('company_money+' . $master_maoney)]);
|
||||
} elseif ($data['company_account_type'] == 2) {
|
||||
$company_money_count = bcadd($company['shareholder_money'], $data['money'], 2);
|
||||
$this->AccountLog($data['company_id'], $company_money_count, $data['money'], 1, 2);
|
||||
$this->AccountLog($data['company_id'], $company_money_count, $data['money'], 1, 2, 1, $data['msg']);
|
||||
Company::where('id', $data['company_id'])->update([
|
||||
'deposit' => Db::raw('deposit+' . $master_maoney),
|
||||
'company_money' => Db::raw('company_money+' . $master_maoney),
|
||||
@ -105,7 +105,7 @@ class ShareProfit
|
||||
}
|
||||
}
|
||||
|
||||
public function AccountLog($companyId, $left_amount, $changeAmount, $change_object = 1, $change_type = 1, $action = 1)
|
||||
public function AccountLog($companyId, $left_amount, $changeAmount, $change_object = 1, $change_type = 1, $action = 1, $remark='')
|
||||
{
|
||||
$company_log = [
|
||||
'sn' => generate_sn(UserAccountLog::class, 'sn', 20),
|
||||
@ -115,6 +115,7 @@ class ShareProfit
|
||||
'action' => $action, //1-增加 2-减少
|
||||
'left_amount' => $left_amount, //变动后数量
|
||||
'change_amount' => $changeAmount, //变动数量
|
||||
'remark' => $remark, //变动数量
|
||||
'status' => 1,
|
||||
];
|
||||
CompanyAccountLog::create($company_log);
|
||||
|
Loading…
x
Reference in New Issue
Block a user