|
|
@@ -44,9 +44,9 @@ class ExpendController extends BaseController
|
|
|
public function actionBx()
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
- $amount = $get['amount'] ?? 0;
|
|
|
+ $postAmount = $get['amount'] ?? 0;
|
|
|
$staffId = $get['staffId'] ?? 0;
|
|
|
- if ($amount <= 0) {
|
|
|
+ if ($postAmount <= 0) {
|
|
|
util::fail('没有需要报销的金额');
|
|
|
}
|
|
|
$connection = Yii::$app->db;//事务处理
|
|
|
@@ -71,7 +71,7 @@ class ExpendController extends BaseController
|
|
|
}
|
|
|
$bx->amount = $total;
|
|
|
$bx->save();
|
|
|
- if (floatval($amount) != floatval($total)) {
|
|
|
+ if (floatval($postAmount) != floatval($total)) {
|
|
|
util::fail('金额有问题,返回上页再进来');
|
|
|
}
|
|
|
$transaction->commit();
|