mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
update estimated delivery date for E2E
This commit is contained in:
@@ -19,7 +19,31 @@ class GeneratesBookingQuotation
|
||||
$hours = $date->diffInHours($date->copy()->addMinutes($paymentAttemptLimit)->subDays($days)) ;
|
||||
$minutes = $date->diffInMinutes($date->copy()->addMinutes($paymentAttemptLimit)->subDays($days)->subHours($hours));
|
||||
|
||||
$receive_date = $currencyConversionObject ? Carbon::now()->endOfDay()->addWeekdays($currencyConversionObject->getServiceId() === 3 ? 3 : 1)->timezone('Asia/Singapore')->format('4:00 \P\M, jS M, Y \G\M\T T') : null;
|
||||
// Initialize $receive_date to null by default
|
||||
$receive_date = null;
|
||||
|
||||
if ($currencyConversionObject) {
|
||||
$serviceId = $currencyConversionObject->getServiceId();
|
||||
|
||||
switch ($serviceId) {
|
||||
case 3:
|
||||
$daysToAdd = 3;
|
||||
break;
|
||||
case 5:
|
||||
$daysToAdd = 7;
|
||||
break;
|
||||
default:
|
||||
$daysToAdd = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
$receive_date = Carbon::now()
|
||||
->endOfDay()
|
||||
->addWeekdays($daysToAdd)
|
||||
->timezone('Asia/Singapore')
|
||||
->format('4:00 PM, jS M, Y GMT T');
|
||||
}
|
||||
|
||||
|
||||
return [
|
||||
'bank' => new BankResource(Bank::find($calculationObject->getConfigurations()->getBankId())),
|
||||
|
||||
Reference in New Issue
Block a user