Commit ef64f8d1 authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 43962a4c
......@@ -217,7 +217,7 @@ class BaiwangApiService extends PlatformAbstractService
}
public function uuid()
private function uuid()
{
$chars = md5(uniqid(mt_rand(), true));
$uuid = substr ( $chars, 0, 8 ) . '-'
......
......@@ -9,9 +9,12 @@ use App\Finance\Services\Api\BaiwangApiService;
use App\Repositories\Contracts\ThirdApiPlatformRepository;
use App\Services\ThirdPlatform\PlatformBaseService;
use App\Support\Facades\SimpleLogs;
use App\Support\Traits\Helpers;
class InvoiceService
{
use Helpers;
public function __construct(InvoiceRecordRepository $invoiceRecordRepository)
{
$this->apiService = (new BaiwangApiService(app(ThirdApiPlatformRepository::class)));
......@@ -139,7 +142,7 @@ class InvoiceService
$invoiceNumber = 'I';
$invoiceNumber .= $invoiceParams['invoice_platform'] == 'rhawn' ? 'R' : 'B';
$invoiceNumber .= $invoiceParams['invoice_type'] == 'blue' ? 'B' : 'R';
$invoiceNumber .= $invoiceParams['invoice_category'] . date('Ymd',time()).$this->apiService->uuid();
$invoiceNumber .= $invoiceParams['invoice_category'] . date('Ymd',time()).strtoupper($this->randomFromDevice(5));
$platformInfo = $this->apiService->getPlatformInfo()['platform_params'][$invoiceParams['invoice_platform']];
......
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