Commit 318f10ec authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 540ed694
......@@ -504,6 +504,11 @@ class InvoiceService
public function sendInvoiceEmail($invoiceParams)
{
$sended = $this->apiService->getPlatformDataEntries('invoice_sended_mail_list','data_values');
if(in_array($invoiceParams['invoice_real_number'],json_decode($sended,true))){
return true;
}
//获取发票地址
if(isset($invoiceParams['invoice_pdf_url']) && !empty($invoiceParams['invoice_pdf_url'])){
$filename = $invoiceParams['platform_invoice_id'].'_'.$invoiceParams['invoice_number'].'_'.$invoiceParams['invoice_real_date'].'.pdf';
......@@ -546,6 +551,8 @@ class InvoiceService
if($cusInfo){
$cusInfo = current($cusInfo);
$this->mailService->sendMailToHtml($title, $cusInfo['cus_invoice_email'],$message);
$this->apiService->storePlatformDataEntries('invoice_sended_mail_list',array_merge($sended,[$invoiceParams['invoice_real_number']]));
}
}
......
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