diff --git a/app/Models/Client.php b/app/Models/Client.php index 0370601cba9f..c815fc59921b 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -47,9 +47,9 @@ use Illuminate\Contracts\Translation\HasLocalePreference; * @property string|null $logo * @property string|null $phone * @property string|null $routing_id - * @property string $balance - * @property string $paid_to_date - * @property string $credit_balance + * @property float $balance + * @property float $paid_to_date + * @property float $credit_balance * @property int|null $last_login * @property int|null $industry_id * @property int|null $size_id diff --git a/app/Models/Payment.php b/app/Models/Payment.php index 091cf5711018..2da14a4ac872 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -56,7 +56,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property float $exchange_rate * @property int $currency_id * @property int|null $exchange_currency_id - * @property \App\Models\Paymentable $paymentables + * @property \App\Models\Paymentable $paymentable * @property object|null $meta * @property string|null $custom_value1 * @property string|null $custom_value2 diff --git a/app/Utils/Traits/Payment/Refundable.php b/app/Utils/Traits/Payment/Refundable.php index 2c908894dc10..90333743795d 100644 --- a/app/Utils/Traits/Payment/Refundable.php +++ b/app/Utils/Traits/Payment/Refundable.php @@ -171,6 +171,7 @@ trait Refundable $credit_note->save(); if ($data['gateway_refund'] !== false && $total_refund > 0) { + /** @var \App\Models\CompanyGateway $gateway */ $gateway = CompanyGateway::find($this->company_gateway_id); if ($gateway) { @@ -190,8 +191,7 @@ trait Refundable $client_balance_adjustment = $this->adjustInvoices($data); - // $credit_note->ledger()->updateCreditBalance($client_balance_adjustment, $ledger_string); - + /** @var \App\Models\Client $this->client */ $this->client->paid_to_date -= $data['amount']; $this->client->save();