update pdf top header

This commit is contained in:
Jia Sheng
2024-07-05 20:46:48 +08:00
parent 17df7fda44
commit e8cb4b8f5a
@@ -3,7 +3,11 @@
<br>
<htmlpageheader name="page-header">
<br><br>
<div class="separator"><strong><i>{{ $transaction->bill_no }}</i></strong></div>
@php
$credit_title = \Carbon\Carbon::parse($transaction->created_at)->greaterThanOrEqualTo('2024-04-02') ? 'Refund' : 'Credit';
$bill_no = $credit_title === 'Refund' ? str_replace('CREDIT', 'REFUND', $transaction->bill_no) : $transaction->bill_no;
@endphp
<div class="separator"><strong><i>{{ $bill_no }}</i></strong></div>
</htmlpageheader>
<table>
<tr>
@@ -24,9 +28,6 @@
</td>
<td class="header-details">
<div class="title">
@php
$credit_title = \Carbon\Carbon::parse($transaction->created_at)->greaterThanOrEqualTo('2024-04-02') ? 'Refund' : 'Credit'
@endphp
<strong>
{{ $transaction->type == 9 ? $credit_title : 'Debit' }} Note
</strong>