Browse Source

修改开票pdf对应字段

master
wanghongjun 9 months ago
parent
commit
e9025ed8d6
  1. 32
      app/service/invoice/InvoiceIssuanceService.php
  2. 5
      app/service/invoice/TempInvoiceService.php
  3. 17
      app/service/webService/ChinaTaxes.php

32
app/service/invoice/InvoiceIssuanceService.php

@ -123,7 +123,30 @@ class InvoiceIssuanceService
'PaymentStatus' => 2,
];
return $FeeService->getComputeDetail($param);
$data = $FeeService->getComputeDetail($param);
unset($param['PaymentStatus']);
$data2 = $FeeService->getReadingDetail($param);
$data['ThisLastReadingTime'] = '';
if ($data2['MsgID'] != 1) {
$ThisReadingTime = $data2['ThisReadingTime'] ? self::optionReadingTime($data2['ThisReadingTime']) : '';
$LastReadingTime = $data2['LastReadingTime'] ? self::optionReadingTime($data2['LastReadingTime']) : '';
$data['ThisLastReadingTime'] = $ThisReadingTime . ' 至 ' . $LastReadingTime;
}
return $data;
}
/**
* 处理日期字符
* @param $date
* @return array|string|string[]
*/
protected static function optionReadingTime($date)
{
$date = str_replace('年','-',$date);
$date = str_replace('月','-',$date);
return str_replace('日','',$date);
}
/**
@ -209,6 +232,13 @@ class InvoiceIssuanceService
$feeUsers['jsyj'] = $FeeComputeDetail['WaterAmount'];
$feeUsers['zsfsmc'] = $FeeComputeDetail['chargetype'];
$feeUsers['jfrq'] = $FeeComputeDetail['WaterPayDate'];
$feeUsers['project_name'] = $invoiceIssuance['project_name'] ?? '';
$feeUsers['serial_number'] = $invoiceIssuance['serial_number'];
$feeUsers['WaterUsage'] = $FeeComputeDetail['WaterUsage'];
$feeUsers['WaterItem'] = $FeeComputeDetail['WaterItem'];
$feeUsers['WaterQty'] = $FeeComputeDetail['WaterQty'];
$feeUsers['WaterPrice'] = $FeeComputeDetail['WaterPrice'];
$feeUsers['ThisLastReadingTime'] = $FeeComputeDetail['ThisLastReadingTime'];
// 保存
$is_continue = false;// 是否跳过加工

5
app/service/invoice/TempInvoiceService.php

@ -48,6 +48,11 @@ class TempInvoiceService
$feeUsers['jfrq'] = $FeeComputeDetail['WaterPayDate'];
$feeUsers['project_name'] = $invoiceIssuance['project_name'];
$feeUsers['serial_number'] = $invoiceIssuance['serial_number'];
$feeUsers['WaterUsage'] = $FeeComputeDetail['WaterUsage'];
$feeUsers['WaterItem'] = $FeeComputeDetail['WaterItem'];
$feeUsers['WaterQty'] = $FeeComputeDetail['WaterQty'];
$feeUsers['WaterPrice'] = $FeeComputeDetail['WaterPrice'];
$feeUsers['ThisLastReadingTime'] = $FeeComputeDetail['ThisLastReadingTime'];
// 保存
$is_continue = false;// 是否跳过加工

17
app/service/webService/ChinaTaxes.php

@ -110,6 +110,7 @@ class ChinaTaxes
public function savingDetailedData(): array
{
$userName = !empty($this->puCodeUser['ContactName']) ? $this->puCodeUser['ContactName'] : $this->puCodeUser['UserName'];
$zxbz1 = strpos($this->puCodeUser['WaterUsage'], '居民') !== false ? '0.59' : '0.27';
$mxGrid = [
'bdznsrsbh' => $this->puCodeUser['bdznsrsbh'],// 被代征纳税人识别号 *
'bdznsrmc' => $userName,// 被代征纳税人名称 *
@ -133,23 +134,23 @@ class ChinaTaxes
'ssjmxzDm' => '',// 税收减免性质代码
'wszmkjbz' => 'Y',// 完税证明开具标志为 Y 开具,N不开具
'xmmc' => $this->puCodeUser['project_name'],// 项目名称
'xmbm' => $this->puCodeUser['serial_number'],// 项目编码
'xmbm' => substr(time(),1, 9),// 项目编码
'username' => $userName,// 用户名称(同一个批次,同一个用户编号下,值相同)
'nbyhbm' => $this->puCodeUser['UserCode'],// 用户编号
'jldwmc' => '',// 单位
'sl' => '1',// 数量
'zxbz1' => '1',// 标准
'jldwmc' => '立方米',// 单位
'sl' => $this->puCodeUser['WaterQty'] ?? '',// 数量
'zxbz1' => $zxbz1,// 标准
'skyhmc' => !empty($this->puCodeUser['BankName']) ? $this->puCodeUser['BankName'] : '',// 托收银行(同一个批次,同一个用户编号下,值相同)
'yhzh' => !empty($this->puCodeUser['BankAccountCode']) ? $this->puCodeUser['BankAccountCode'] : '',// 银行账号(同一个批次,同一个用户编号下,值相同)
'zsfsmc' => $this->puCodeUser['zsfsmc'],// 缴费方式(同一个批次,同一个用户编号下,值相同)
'tjsd' => $this->invoiceIssuance['skssqq'] . '至' . $this->invoiceIssuance['skssqz'],// 收费时段(同一个批次,同一个用户编号下,值相同)
'tjsd' => $this->puCodeUser['ThisLastReadingTime'],// 收费时段(同一个批次,同一个用户编号下,值相同)
'jfyj1' => $this->puCodeUser['jsyj'],// 计费依据(同一个批次,同一个用户编号下,值相同)
'yhje' => '0.00',// 优惠金额
'hjje' => $this->puCodeUser['jsyj'],// 合计金额
'jfrq' => $this->puCodeUser['jfrq'],// 缴费时间(同一个批次,同一个用户编号下,值相同)
'lxfs' => '',// 联系方式(同一个批次,同一个用户编号下,值相同)
'lxdz' => '',// 送票地址(同一个批次,同一个用户编号下,值相同)
'remark' => '',// 备注(同一个批次,同一个用户编号下,值相同)
'lxfs' => !empty($this->puCodeUser['CellPhone']) ? $this->puCodeUser['CellPhone'] : '',// 联系方式(同一个批次,同一个用户编号下,值相同)
'lxdz' => !empty($this->puCodeUser['WaterUseAddress']) ? $this->puCodeUser['WaterUseAddress'] : '',// 送票地址(同一个批次,同一个用户编号下,值相同)
'remark' => '',// 备注(同一个批次,同一个用户编号下,值相同)
'bz' => '',// 备注信息(同一个批次,同一个用户编号下,值相同)
];

Loading…
Cancel
Save