|
|
@@ -129,7 +129,7 @@ class ExpendController extends BaseController
|
|
|
public function actionAddExpend()
|
|
|
{
|
|
|
$post = Yii::$app->request->post();
|
|
|
- $type = $post['type'] ?? 0;
|
|
|
+ $type = $post['type'] ?? -1;
|
|
|
$amount = $post['amount'] ?? 0;
|
|
|
$remark = $post['remark'] ?? '';
|
|
|
$bx = $post['bx'] ?? -1;
|
|
|
@@ -139,6 +139,9 @@ class ExpendController extends BaseController
|
|
|
if ($bx == -1) {
|
|
|
util::fail('请选报销状态');
|
|
|
}
|
|
|
+ if ($type == -1) {
|
|
|
+ util::fail('请选择类型');
|
|
|
+ }
|
|
|
$connection = Yii::$app->db;//事务处理
|
|
|
$transaction = $connection->beginTransaction();
|
|
|
try {
|