收款记录

This commit is contained in:
2025-10-09 10:16:21 +08:00
parent 90cce108b0
commit d05106f9df
3 changed files with 18 additions and 9 deletions
@@ -81,8 +81,10 @@ class FinPaymentApplyController extends BaseController
$data['sales_user_name'] = User::where('id', $data['doc_user_id'])->value('name')??'';
if (isset($data['corp_id'])) //公司(渠道)
$data['corp_name'] = SysDictItem::where('id', $data['corp_id'])->value('item_label')??'';
if (isset($data['account_id'])) //收款账号
if (isset($data['account_id'])){ //收款账号
$data['account_name'] = SysAccount::where('id', $data['account_id'])->value('account_name')??'';
$data['account_short_desc'] = SysAccount::where('id', $data['account_id'])->value('short_desc')??'';
}
if (isset($data['country_id'])) //付款来源国家
$data['country_name'] = Country::where('id', $data['country_id'])->value('cn_addr')??'';
if (isset($data['currency_id'])) //付款币种
@@ -111,8 +113,8 @@ class FinPaymentApplyController extends BaseController
$finPaymentStock = FinPaymentStock::where('payment_apply_id', $data['id'])->get();
$stock = [];
foreach ($finPaymentStock as $v) {
$stock[$v['pi_no']] = ['pi_no' => $v['pi_no']];
$stock[$v['pi_no']]['stock_id'] = [$v['stock_id']];
$stock[$v['pi_no']]['pi_no'] = $v['pi_no'];
$stock[$v['pi_no']]['stock_id'][] = [$v['stock_id']];
}
$data['stock'] = array_values($stock);
return $data;
@@ -36,8 +36,10 @@ class FinReceiptController extends BaseController
$data['arrived_at'] = date('Y-m-d H:i:s', $data['arrived_at']);
if (isset($data['received_at']))
$data['received_at'] = date('Y-m-d H:i:s', $data['received_at']);
if (isset($data['account_id'])) //收款账号
if (isset($data['account_id'])) { //收款账号
$data['account_name'] = SysAccount::where('id', $data['account_id'])->value('account_name')??'';
$data['account_short_desc'] = SysAccount::where('id', $data['account_id'])->value('short_desc')??'';
}
if (isset($data['country_id'])) //付款来源国家
$data['country_name'] = Country::where('id', $data['country_id'])->value('cn_addr')??'';
if (isset($data['currency_id'])) //付款币种
@@ -70,14 +70,19 @@ class FinReceiptHisController extends BaseController
$data['arrived_at'] = date('Y-m-d H:i:s', $data['arrived_at']);
if (isset($data['received_at']))
$data['received_at'] = date('Y-m-d H:i:s', $data['received_at']);
if (isset($data['account_id'])) //收款账号
$data['account_name'] = SysAccount::where('id', $data['account_id'])->first()->account_name;
if (isset($data['account_id'])){ //收款账号
$data['account_name'] = SysAccount::where('id', $data['account_id'])->value('account_name')??'';
$data['account_short_desc'] = SysAccount::where('id', $data['account_id'])->value('short_desc')??'';
}
if (isset($data['country_id'])) //付款来源国家
$data['country_name'] = Country::where('id', $data['currency_id'])->first()->cn_addr;
$data['country_name'] = Country::where('id', $data['country_id'])->value('cn_addr')??'';
if (isset($data['currency_id'])) //付款币种
$data['currency_name'] = SysCurrency::where('id', $data['currency_id'])->first()->currency_name;
if (isset($data['fx_receipt_file']))
$data['currency_name'] = SysCurrency::where('id', $data['currency_id'])->value('currency_name')??'';
if (!empty($data['fx_receipt_file'])){
$data['fx_receipt_file_full'] = (new OssService)->generatePrivateUrl($data['fx_receipt_file']);
}elseif (isset($data['fx_receipt_file'])){
$data['fx_receipt_file_full'] = '';
}
if (isset($data['created_by']))
$data['created_by'] = User::where('id', $data['created_by'])->value('name')??'';