Merge pull request #7546 from turbo124/v5-develop

v5.3.100
This commit is contained in:
David Bomba 2022-06-13 08:16:16 +10:00 committed by GitHub
commit 4e4a7a4be1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 728 additions and 254 deletions

View File

@ -1 +1 @@
5.3.99
5.3.100

View File

@ -23,7 +23,7 @@ class ShowInvoiceRequest extends Request
*/
public function authorize() : bool
{
return auth()->guard('contact')->user()->client_id === (int)$this->invoice->client_id
return (int)auth()->guard('contact')->user()->client_id === (int)$this->invoice->client_id
&& auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES;
}
}

View File

@ -27,9 +27,8 @@ class CreatePaymentMethodRequest extends FormRequest
$available_methods[] = $method['gateway_type_id'];
});
if (in_array($this->query('method'), $available_methods)) {
return true;
}
if (in_array($this->query('method'), $available_methods))
return true;
return false;
}

View File

@ -486,7 +486,7 @@ class Client extends BaseModel implements HasLocalePreference
}
if($this->currency()->code == 'EUR' && in_array(GatewayType::BANK_TRANSFER, array_column($pms, 'gateway_type_id'))){
if($this->currency()->code == 'EUR' && (in_array(GatewayType::BANK_TRANSFER, array_column($pms, 'gateway_type_id')) || in_array(GatewayType::SEPA, array_column($pms, 'gateway_type_id'))) ){
foreach($pms as $pm){
@ -501,18 +501,6 @@ class Client extends BaseModel implements HasLocalePreference
}
// if ($this->currency()->code == 'EUR' && in_array(GatewayType::SEPA, array_column($pms, 'gateway_type_id'))) {
// foreach ($pms as $pm) {
// if ($pm['gateway_type_id'] == GatewayType::SEPA) {
// $cg = CompanyGateway::find($pm['company_gateway_id']);
// if ($cg && $cg->fees_and_limits->{GatewayType::SEPA}->is_enabled) {
// return $cg;
// }
// }
// }
// }
if ($this->country && $this->country->iso_3166_3 == 'GBR' && in_array(GatewayType::DIRECT_DEBIT, array_column($pms, 'gateway_type_id'))) {
foreach ($pms as $pm) {
if ($pm['gateway_type_id'] == GatewayType::DIRECT_DEBIT) {

View File

@ -346,7 +346,7 @@ class Invoice extends BaseModel
return '<h5><span class="badge badge-danger">'.ctrans('texts.overdue').'</span></h5>';
break;
case self::STATUS_UNPAID:
return '<h5><span class="badge badge-warning">'.ctrans('texts.unpaid').'</span></h5>';
return '<h5><span class="badge badge-warning text-white">'.ctrans('texts.unpaid').'</span></h5>';
break;
case self::STATUS_REVERSED:
return '<h5><span class="badge badge-info">'.ctrans('texts.reversed').'</span></h5>';

View File

@ -212,7 +212,7 @@ class Payment extends BaseModel
return '<h6><span class="badge badge-secondary">'.ctrans('texts.payment_status_1').'</span></h6>';
break;
case self::STATUS_CANCELLED:
return '<h6><span class="badge badge-warning">'.ctrans('texts.payment_status_2').'</span></h6>';
return '<h6><span class="badge badge-warning text-white">'.ctrans('texts.payment_status_2').'</span></h6>';
break;
case self::STATUS_FAILED:
return '<h6><span class="badge badge-danger">'.ctrans('texts.payment_status_3').'</span></h6>';

949
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -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.99',
'app_tag' => '5.3.99',
'app_version' => '5.3.100',
'app_tag' => '5.3.100',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -1,6 +1,4 @@
<?php
/*
|--------------------------------------------------------------------------
| API Routes