diff --git a/VERSION.txt b/VERSION.txt index 9c7d58fcd98c..719920388ff8 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.3.18 \ No newline at end of file +5.3.19 \ No newline at end of file diff --git a/app/PaymentDrivers/BasePaymentDriver.php b/app/PaymentDrivers/BasePaymentDriver.php index 3053a6b9e783..18a6cc1b3c89 100644 --- a/app/PaymentDrivers/BasePaymentDriver.php +++ b/app/PaymentDrivers/BasePaymentDriver.php @@ -56,7 +56,7 @@ class BasePaymentDriver protected $refundable = false; /* Token billing */ - protected $token_billing = false; + public $token_billing = false; /* Authorise payment methods */ protected $can_authorise_credit_card = false; diff --git a/app/Services/Invoice/AutoBillInvoice.php b/app/Services/Invoice/AutoBillInvoice.php index 96e72f487058..f4d6d4cfa7d9 100644 --- a/app/Services/Invoice/AutoBillInvoice.php +++ b/app/Services/Invoice/AutoBillInvoice.php @@ -291,23 +291,13 @@ class AutoBillInvoice extends AbstractService * @param float $amount The amount to charge * @return ClientGatewayToken The client gateway token */ - // private function - // { - // $gateway_tokens = $this->client->gateway_tokens()->orderBy('is_default', 'DESC')->get(); - - // foreach ($gateway_tokens as $gateway_token) { - // if ($this->validGatewayLimits($gateway_token, $amount)) { - // return $gateway_token; - // } - // } - // } public function getGateway($amount) { //get all client gateway tokens and set the is_default one to the first record - //$gateway_tokens = $this->client->gateway_tokens()->orderBy('is_default', 'DESC'); - $gateway_tokens = $this->client->gateway_tokens; + $gateway_tokens = $this->client->gateway_tokens()->orderBy('is_default', 'DESC'); + // $gateway_tokens = $this->client->gateway_tokens; $filtered_gateways = $gateway_tokens->filter(function ($gateway_token) use($amount) { diff --git a/app/Services/Payment/RefundPayment.php b/app/Services/Payment/RefundPayment.php index 0d10b83fa745..6d9f8a76e1eb 100644 --- a/app/Services/Payment/RefundPayment.php +++ b/app/Services/Payment/RefundPayment.php @@ -242,7 +242,8 @@ class RefundPayment $invoice->service()->updateBalance($refunded_invoice['amount'])->save(); $invoice->ledger()->updateInvoiceBalance($refunded_invoice['amount'], "Refund of payment # {$this->payment->number}")->save(); - + $invoice->paid_to_date -= $refunded_invoice['amount']; + if ($invoice->amount == $invoice->balance) { $invoice->service()->setStatus(Invoice::STATUS_SENT); } else { diff --git a/config/ninja.php b/config/ninja.php index 753291465970..07c28d3eadd1 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.3.18', - 'app_tag' => '5.3.18', + 'app_version' => '5.3.19', + 'app_tag' => '5.3.19', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''), diff --git a/resources/views/errors/guest.blade.php b/resources/views/errors/guest.blade.php new file mode 100644 index 000000000000..9df84c302c60 --- /dev/null +++ b/resources/views/errors/guest.blade.php @@ -0,0 +1,5 @@ +@extends('portal.ninja2020.layout.error') + +@section('title', __('Server Error')) +@section('code', '500') +@section('message', __($message) ?: 'System Error')