Commit ef80f120 authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 1ce582c5
......@@ -661,11 +661,19 @@ class InvoiceService
}
$invoiceInfo = $this->invoiceRecordRepository->getInvoiceRecordByRealNumber($params['invoice_real_number']);
if(!$invoiceInfo){
throw new \Exception('没有对应的电子发票提供下载',502);
}
$invoiceInfo = current($invoiceInfo);
$downloadUrl = $this->getDownloadUrl($invoiceInfo);
$filename = $params.'.pdf';
$path = config('filesystems.default.root').'public/finance/invoice/manual/';
$this->saveInvoicePdf($path.$filename, $invoiceInfo['invoice_pdf_url']);
$downloadUrl = 'http://download.rhawn.cn/';
return [ 'downloadUrl' => $downloadUrl.$path.$filename, 'path' => $path, 'filename' => $filename ];
//throw new \Exception('没有对应的电子发票提供下载',502);
}else{
$invoiceInfo = current($invoiceInfo);
$downloadUrl = $this->getDownloadUrl($invoiceInfo);
}
return $downloadUrl;
}
......
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