bugs fixs

This commit is contained in:
Linksehat Staging Server
2023-09-01 15:12:45 +07:00
parent 6201fbe2c8
commit df6b3f5c59

View File

@@ -119,7 +119,7 @@ class Appointment extends Model
{ {
return Attribute::make( return Attribute::make(
get: function() { 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 if ( $this->nIDJenisBooking == 3 ) { // Telekonsultasi Sekarang
return $consulPrice * (100-$this->healthCare->commission->nCommissionATC) / 100; return $consulPrice * (100-$this->healthCare->commission->nCommissionATC) / 100;
} }
@@ -137,7 +137,7 @@ class Appointment extends Model
{ {
return Attribute::make( return Attribute::make(
get: function() { 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 if ( $this->nIDJenisBooking == 3 ) { // Telekonsultasi Sekarang
return $consulPrice * ($this->healthCare->commission->nCommissionATC) / 100; return $consulPrice * ($this->healthCare->commission->nCommissionATC) / 100;
} }