From df6b3f5c590bbc502a1001fbc35ebd90e80f8f5e Mon Sep 17 00:00:00 2001 From: Linksehat Staging Server Date: Fri, 1 Sep 2023 15:12:45 +0700 Subject: [PATCH] bugs fixs --- app/Models/OLDLMS/Appointment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/OLDLMS/Appointment.php b/app/Models/OLDLMS/Appointment.php index 32801ab7..ce18e5f4 100644 --- a/app/Models/OLDLMS/Appointment.php +++ b/app/Models/OLDLMS/Appointment.php @@ -119,7 +119,7 @@ class Appointment extends Model { return Attribute::make( get: function() { - $consulPrice = ((float) $this->detail->sPaymentDetails['gross_amount'] ?? 0) - $this->nAdminFee; + $consulPrice = ((float) ($this->detail->sPaymentDetails['gross_amount'] ?? null) ?? 0) - $this->nAdminFee; if ( $this->nIDJenisBooking == 3 ) { // Telekonsultasi Sekarang return $consulPrice * (100-$this->healthCare->commission->nCommissionATC) / 100; } @@ -137,7 +137,7 @@ class Appointment extends Model { return Attribute::make( get: function() { - $consulPrice = ((float) $this->detail->sPaymentDetails['gross_amount'] ?? 0) - $this->nAdminFee; + $consulPrice = ((float) ($this->detail->sPaymentDetails['gross_amount'] ?? null) ?? 0) - $this->nAdminFee; if ( $this->nIDJenisBooking == 3 ) { // Telekonsultasi Sekarang return $consulPrice * ($this->healthCare->commission->nCommissionATC) / 100; }