Commit 2246f688 authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 39c4396a
......@@ -40,4 +40,14 @@ class RhawnInvoiceRepositoryEloquent extends BaseRepository implements RhawnInvo
}
return null;
}
public function queryCustomerInfoByInvoiceId($invoiceId)
{
$customerInfo = null;
$customerInfo = $this->join('customers', 'soinvoice.cus_id', 'customers.cus_id')
->where('soinvoice.soi_id', $invoiceId)
->get()->toArray();
return $customerInfo;
}
}
......@@ -172,8 +172,8 @@ class InvoiceService
$applyInvoiceParams['gmfDh'] = $invoiceParams['invoice_customer']['cust_phone']; // 购买方电话
$applyInvoiceParams['gmfYh'] = $invoiceParams['invoice_customer']['cust_bankname']; // 购买方银行名称
$applyInvoiceParams['gmfZh'] = $invoiceParams['invoice_customer']['cust_bankaccount']; // 购买方银行账户
$applyInvoiceParams['gmfMobile'] = $invoiceParams['invoice_customer']['cust_mobile']; // 购买方银行账户
$applyInvoiceParams['gmfEmail'] = $invoiceParams['invoice_customer']['cust_email']; // 购买方邮箱
$applyInvoiceParams['gmfMobile'] = '';//$invoiceParams['invoice_customer']['cust_mobile']; // 购买方银行账户
$applyInvoiceParams['gmfEmail'] = '';//$invoiceParams['invoice_customer']['cust_email']; // 购买方邮箱
$applyInvoiceParams['sqr'] = $invoiceParams['invoice_creater_by'];
$applyInvoiceParams['kpr'] = $invoiceParams['invoice_creater_by'];
......@@ -536,7 +536,13 @@ class InvoiceService
//$html = file_get_contents(resource_path('views/emails/invoice.blade.php'));
$this->mailService->sendMailToHtml($title, 'hangjun@rhawn.cn',$message);
//查询购买方邮箱
$cusInfo = $this->rhawnInvoiceRepository->queryCustomerInfoByInvoiceId($invoiceParams['platform_invoice_id']);
if($cusInfo){
$cusInfo = current($cusInfo);
$this->mailService->sendMailToHtml($title, $cusInfo['cus_invoice_email'],$message);
}
}
public function downLoadInvoice($params)
......
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