|
|
@@ -190,6 +190,17 @@ class ExpendController extends BaseController
|
|
|
}
|
|
|
$staffName = $staff->name ?? '';
|
|
|
$ptStyle = dict::getDict('ptStyle', 'ghs');
|
|
|
+ $bxId = 0;
|
|
|
+ if ($bx == 1) {
|
|
|
+ $bxData = [
|
|
|
+ 'mainId' => $this->mainId,
|
|
|
+ 'staffId' => $getStaffId,
|
|
|
+ 'staffName' => $staffName,
|
|
|
+ 'remark' => '登记时已报销',
|
|
|
+ ];
|
|
|
+ $bx = ExpendBxClass::add($bxData, true);
|
|
|
+ $bxId = $bx->id ?? 0;
|
|
|
+ }
|
|
|
$expendData = [
|
|
|
'type' => $type,
|
|
|
'amount' => $amount,
|
|
|
@@ -200,8 +211,11 @@ class ExpendController extends BaseController
|
|
|
'ptStyle' => $ptStyle,
|
|
|
'payWay' => $payWay,
|
|
|
'bx' => $bx,
|
|
|
+ 'bxId' => $bxId,
|
|
|
];
|
|
|
ExpendClass::add($expendData);
|
|
|
+ $bx->amount = $amount;
|
|
|
+ $bx->save();
|
|
|
$transaction->commit();
|
|
|
util::complete();
|
|
|
} catch (\Exception $e) {
|