fixed
This commit is contained in:
parent
ba2cbec8b7
commit
132480a46e
@ -290,7 +290,9 @@ class CompanyController extends BaseApiController
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
// 上交股金金额
|
// 上交股金金额
|
||||||
$amount = $serviceGroupCompany['shareholder_money'];
|
$amount = $serviceGroupCompany['shareholder_money'];
|
||||||
|
if ($amount == 0) {
|
||||||
|
return $this->fail('股金金额不能为0');
|
||||||
|
}
|
||||||
$sharecapitalChangeLogData = [
|
$sharecapitalChangeLogData = [
|
||||||
'subordinate_company_id' => $serviceGroupCompany['id'],
|
'subordinate_company_id' => $serviceGroupCompany['id'],
|
||||||
'parent_company_id' => $villageCompany['id'],
|
'parent_company_id' => $villageCompany['id'],
|
||||||
@ -334,7 +336,7 @@ class CompanyController extends BaseApiController
|
|||||||
];
|
];
|
||||||
CompanyAccountLog::create($company_log2);
|
CompanyAccountLog::create($company_log2);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return $this->success('上交成功');
|
return $this->success('上交成功', [], 1, 1);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
return $this->fail($e->getMessage());
|
return $this->fail($e->getMessage());
|
||||||
|
@ -81,8 +81,8 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
'sn' => $order->sn,
|
'sn' => $order->sn,
|
||||||
'user_id' => $order->user_id,
|
'user_id' => $order->user_id,
|
||||||
'company_id' => $company['id']??0,
|
'company_id' => $company['id']??0,
|
||||||
'change_type' => 300,
|
'change_type' => CompanyAccountLog::COMPANY_DEPOSIT,
|
||||||
'change_object' => 2,
|
'change_object' => CompanyAccountLog::DEPOSIT,
|
||||||
'action' => 1,
|
'action' => 1,
|
||||||
'change_amount' => $order->order_amount,
|
'change_amount' => $order->order_amount,
|
||||||
'left_amount' =>$left_amount,
|
'left_amount' =>$left_amount,
|
||||||
|
@ -81,11 +81,11 @@ class ShareProfit
|
|||||||
$money = bcdiv($datas['template_info']['over_decimal'], count($responsible_area), 2);
|
$money = bcdiv($datas['template_info']['over_decimal'], count($responsible_area), 2);
|
||||||
$left_amount = 0;
|
$left_amount = 0;
|
||||||
foreach ($responsible_area as $kkk => $vvv) {
|
foreach ($responsible_area as $kkk => $vvv) {
|
||||||
$left_amount += bcadd(1000, $money, 2);
|
$left_amount += bcadd($company['shareholder_money'], $money, 2);
|
||||||
$company_log = [
|
$company_log = [
|
||||||
'sn' => generate_sn(UserAccountLog::class, 'sn', 20),
|
'sn' => generate_sn(UserAccountLog::class, 'sn', 20),
|
||||||
'company_id' => $datas['company_id'],
|
'company_id' => $datas['company_id'],
|
||||||
'change_object' => CompanyAccountLog::COMPANY_MONEY, //变动对象
|
'change_object' => CompanyAccountLog::SHAREHOLDER, //变动对象
|
||||||
'change_type' => CompanyAccountLog::TASK_INC_SHAREHOLDER_MONEY, //变动类型
|
'change_type' => CompanyAccountLog::TASK_INC_SHAREHOLDER_MONEY, //变动类型
|
||||||
'action' => CompanyAccountLog::INC, //1-增加 2-减少
|
'action' => CompanyAccountLog::INC, //1-增加 2-减少
|
||||||
'left_amount' => $left_amount, //变动后数量
|
'left_amount' => $left_amount, //变动后数量
|
||||||
|
Loading…
x
Reference in New Issue
Block a user