Commit 51b9cd3b authored by hangjun83's avatar hangjun83

财务开票模块更新

parent f7c06182
...@@ -560,6 +560,15 @@ class InvoiceService ...@@ -560,6 +560,15 @@ class InvoiceService
throw new \Exception('电子发票无效无法提供下载',502); throw new \Exception('电子发票无效无法提供下载',502);
} }
$filename = $invoiceInfo['platform_invoice_id'].'_'.$invoiceInfo['invoice_number'].'_'.$invoiceInfo['invoice_real_date'].'.pdf';
$path = config('filesystems.default.root').'public/finance/invoice/'.$invoiceParams['invoice_platform'].'/'.$invoiceInfo['platform_invoice_id'].'/';
if(!Storage::exists($path.$filename)){
$pdf = $this->apiService->clientRequest('get',$invoiceInfo['invoice_pdf_url'],[]);
if($pdf){
Storage::put($path.$filename,$pdf);
}
}
return $invoiceInfo['invoice_pdf_url']; return $invoiceInfo['invoice_pdf_url'];
} }
......
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