-request multiple refund

-show remark for refund in dashboard
-show refund remark in export page
This commit is contained in:
JiaSheng
2024-05-22 19:28:42 +08:00
parent 16b67c2ea3
commit 5425c37e52
3 changed files with 19 additions and 1 deletions
@@ -289,7 +289,7 @@
</div>
</div>
</div>
<div class="row m-t-10" v-show="!hasRefundInProgress && [2, 3].includes(item.status) && (totalRequestedRefund + totalRefunds) < data.original_amount">
<div class="row m-t-10" v-show="[2, 3].includes(item.status) && (totalRequestedRefund + totalRefunds) < data.original_amount">
<div class="col" v-if="$store.getters.isAdmin">
<button class="btn btn-xs all-caps b-rad-none bg-master-lighter btn-block no-border requestModal" data-type="transferSummary">Request Refund</button>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="transferSummary" size="large">
@@ -25,6 +25,14 @@
<a :href="route('customer.profile', data.booking.company.reference)">{{data.booking.company.reference}}</a>
</div>
</div>
<div class="col-auto" v-if="$store.getters.isAdmin">
<span class="btn requestModal no-border" size="large" data-type="chatmodal">
<i class="fa fa-comment-o"></i>
</span>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="chatmodal">
<remark-component :section="section" :data="data" module_type="Transaction"></remark-component>
</modal-component>
</div>
<div class="col text-right">
<div class="font-heading fs-10 muted all-caps">Amount</div>
<div class="font-heading fs-14 text-success bold">
+10
View File
@@ -475,6 +475,7 @@ Route::get('/approve_refunds', function(Request $request){
echo '<td>Last Updated At</td>';
echo '<td>Bank Type</td>';
echo '<td>Bank Holder Name</td>';
echo '<td>Note Remark</td>';
echo '</tr>';
foreach ($payments->orderBy('updated_at', 'DESC')->get() as $index => $payment){
$booking = $payment->owner;
@@ -499,6 +500,14 @@ Route::get('/approve_refunds', function(Request $request){
$remark = 'Pre ' . $remark;
}
$refundTransactions = $payment->transactions()->refunds()->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->get();
$noteRemark = '';
foreach ($refundTransactions as $refund) {
$noteRemark .= implode(', ', $refund->remarks->pluck('content')->toArray()) . ' ';
}
echo '<tr>';
echo '<td>'.($index + 1).'.</td>';
echo '<td>'.$payment->updated_at->format('d-M-y').'</td>';
@@ -516,6 +525,7 @@ Route::get('/approve_refunds', function(Request $request){
echo '<td>'.$payment->updated_at->diffForHumans().'</td>';
echo '<td>'.$bankType.'</td>';
echo '<td>'.$booking->bank->holder_name.'</td>';
echo '<td>'.$noteRemark.'</td>';
echo '</tr>';
}
echo '</table>';