wuggemail@foxmail.com 3 months ago
parent
commit
1a45515e3e
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/cxinv/command/MakeSeal.php
  2. 1 1
      app/cxinv/controller/FinancialSeal.php

+ 1 - 1
app/cxinv/command/MakeSeal.php

@@ -38,7 +38,7 @@ class MakeSeal extends Command
 
     public function GetInfo()
     {
-        $info = ProductFz::where([['status','=',0]])->order("fz_date asc")->cursor();
+        $info = ProductFz::where([['status','=',0]])->order("fz_date asc")->group('company_code')->cursor();
         foreach ($info as $item){
             yield $item->toArray();
         }

+ 1 - 1
app/cxinv/controller/FinancialSeal.php

@@ -49,7 +49,7 @@ class FinancialSeal extends Base{
         $row = $this->model->findOrEmpty($params['id']);
         if($row->isEmpty()) return error('数据不存在');
         $getLastMonth= date("Y-m",strtotime("-1 month"));
-        if($row['fz_date']!=$getLastMonth && $params['status']==0) return error('非上月数据不可解封');
+       if($row['fz_date']!=$getLastMonth && $params['status']==0) return error('非上月数据不可解封');
         if($params['status']==1){
             $montah =   date('Y-m',strtotime('-1 month',strtotime($row['fz_date'])));
             $lasMonth= $this->model->where('fz_date',$montah)->where('company_code',$row->company_code)->findOrEmpty();