cqp 3 bulan lalu
induk
melakukan
0f1fe3c957
1 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 5 1
      app/Service/RuleSetService.php

+ 5 - 1
app/Service/RuleSetService.php

@@ -47,7 +47,11 @@ class RuleSetService extends Service
             DB::beginTransaction();
             DB::beginTransaction();
 
 
             $model = new RuleSet();
             $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->month = $data['month'] ?? 0;
             $model->crt_id = $user['id'];
             $model->crt_id = $user['id'];
             $model->top_depart_id = $data['top_depart_id'];
             $model->top_depart_id = $data['top_depart_id'];