Commit 3d90a2e2 authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 78bc8839
......@@ -70,4 +70,17 @@ class InvoiceRecordRepositoryEloquent extends BaseRepository implements InvoiceR
return $this->getList(['invoice_status' => ['-1','2']]);
}
public function counts($where)
{
if(!empty($where)){
foreach($where as $whereKey => $whereValue){
if(strtotime($whereValue) && strtotime($whereValue) > 0){
unset($where[$whereKey]);
$where[$whereKey] = ['DATE',$whereValue];
}
}
}
return $this->count($where);
}
}
......@@ -836,11 +836,10 @@ class InvoiceService
}
$invoiceList = $this->invoiceRecordRepository->getList($where,$limit,$offset);
$invocieTotal = 0;
if($invoiceList){
$invoiceList = app(InvoiceRecordTransformer::class)->transform($invoiceList);
}
$invocieTotal = $this->invoiceRecordRepository->count($where);
$invocieTotal = $this->invoiceRecordRepository->counts($where);
return $this->invoiceRecordRepository->pagePaginate($invoiceList,$invocieTotal,$requestParams);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment