fix unit tests as well as missing code
API CI/CD / Validate (composer + pint) (push) Successful in 2m7s
API CI/CD / Test (PHPUnit) (push) Failing after 2m23s
API CI/CD / Build frontend assets (push) Successful in 2m18s
API CI/CD / Security audit (push) Successful in 31s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 2m7s
API CI/CD / Test (PHPUnit) (push) Failing after 2m23s
API CI/CD / Build frontend assets (push) Successful in 2m18s
API CI/CD / Security audit (push) Successful in 31s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -8,6 +8,7 @@ use App\Models\User;
|
||||
use App\Services\ApplicationUrlService;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ExtraChargesChargeService
|
||||
{
|
||||
@@ -89,7 +90,7 @@ class ExtraChargesChargeService
|
||||
$charge->amount = $newAmount;
|
||||
$charge->due_date = $payload['due_date'] ?? $charge->due_date;
|
||||
$charge->charge_type = $chargeType;
|
||||
if (array_key_exists('updated_by', $payload)) {
|
||||
if (array_key_exists('updated_by', $payload) && Schema::hasColumn('additional_charges', 'updated_by')) {
|
||||
$charge->updated_by = $payload['updated_by'];
|
||||
}
|
||||
$charge->save();
|
||||
|
||||
Reference in New Issue
Block a user