Merge branch 'change-credit-note-to-refund-note' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into development

This commit is contained in:
Jia Sheng
2024-07-04 22:08:30 +08:00
2 changed files with 9 additions and 6 deletions
+5 -5
View File
@@ -46,10 +46,10 @@ class SendWelcomeVoucherEmail implements ShouldQueue
{
$currentDatetime = Carbon::now();
$dateToCompare = Carbon::parse($this->voucher->end_date);
// if (!$this->user->hasAttribute($this->voucher->code."_EMAIL_COUNT")
// && $this->user->rewards->where('voucher_id', $this->voucher->id)->count() > 0
// && $currentDatetime->isBefore($dateToCompare))
// {
if (!$this->user->hasAttribute($this->voucher->code."_EMAIL_COUNT")
&& $this->user->rewards->where('voucher_id', $this->voucher->id)->count() > 0
&& $currentDatetime->isBefore($dateToCompare))
{
//Key #1
$keyValuePairObject = new KeyValuePairObject(
$this->voucher->code."_EMAIL_COUNT",
@@ -65,6 +65,6 @@ class SendWelcomeVoucherEmail implements ShouldQueue
(App()->make(CreatesKeyValuePair::class))->execute($this->user, $keyValuePairObject);
$this->user->notify(new WelcomeVoucherEmail($this->user, $this->voucher));
//}
}
}
}
@@ -24,8 +24,11 @@
</td>
<td class="header-details">
<div class="title">
@php
$credit_title = \Carbon\Carbon::parse($transaction->created_at)->isAfter('2024-04-02') ? 'Refund' : 'Credit'
@endphp
<strong>
{{ $transaction->type == 9 ? 'Credit' : 'Debit' }} Note
{{ $transaction->type == 9 ? $credit_title : 'Debit' }} Note
</strong>
</div>