소스 검색

小高薪

cqp 3 달 전
부모
커밋
0f1fe3c957
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      app/Service/RuleSetService.php

+ 5 - 1
app/Service/RuleSetService.php

@@ -47,7 +47,11 @@ class RuleSetService extends Service
             DB::beginTransaction();
 
             $model = new RuleSet();
-            $model->code = $data['code'] ?? '';
+            $model->code = $this->generateBillNo([
+                'top_depart_id' => $user['top_depart_id'],
+                'type' => RuleSet::Order_type,
+                'period' => date("Ym", $data['month'])
+            ]);
             $model->month = $data['month'] ?? 0;
             $model->crt_id = $user['id'];
             $model->top_depart_id = $data['top_depart_id'];