Merge pull request #8320 from turbo124/v5-develop

v5.5.77
This commit is contained in:
David Bomba 2023-03-01 10:28:14 +11:00 committed by GitHub
commit 1185316beb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 168 additions and 82 deletions

View File

@ -1 +1 @@
5.5.76
5.5.77

View File

@ -531,7 +531,6 @@ class BankTransactionController extends BaseController
*/
public function match(MatchBankTransactionRequest $request)
{
// MatchBankTransactions::dispatch(auth()->user()->company()->id, auth()->user()->company()->db, $request->all());
$bts = (new MatchBankTransactions(auth()->user()->company()->id, auth()->user()->company()->db, $request->all()))->handle();

View File

@ -58,7 +58,7 @@ class ProductController extends BaseController
* summary="Gets a list of products",
* description="Lists products, search and filters allow fine grained lists to be generated.
Query parameters can be added to performed more fine grained filtering of the products, these are handled by the ProductFilters class which defines the methods available",
* Query parameters can be added to performed more fine grained filtering of the products, these are handled by the ProductFilters class which defines the methods available",
* @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),

View File

@ -15,7 +15,7 @@ class PaymentMethodsTable extends Component
use WithPagination;
use WithSorting;
public int $per_page = 10;
public $per_page = 10;
public Client $client;

View File

@ -12,6 +12,7 @@
namespace App\Http\Requests\BankTransaction;
use App\Http\Requests\Request;
use App\Models\BankTransaction;
use App\Models\Expense;
use App\Models\Payment;
@ -24,7 +25,7 @@ class MatchBankTransactionRequest extends Request
*/
public function authorize() : bool
{
return auth()->user()->isAdmin();
return auth()->user()->isAdmin() || auth()->user()->can('create', BankTransaction::class) || auth()->user()->hasPermission('edit_bank_transaction');
}
public function rules()

View File

@ -31,7 +31,7 @@ class PreviewInvoiceRequest extends Request
*/
public function authorize() : bool
{
return auth()->user()->can('create', Invoice::class) || auth()->user()->can('create', Quote::class) || auth()->user()->can('create', RecurringInvoice::class) || auth()->user()->can('create', Credit::class);
return auth()->user()->hasIntersectPermissionsOrAdmin(['view_invoice', 'view_quote', 'view_recurring_invoice', 'view_credit', 'create_invoice', 'create_quote', 'create_recurring_invoice', 'create_credit','edit_invoice', 'edit_quote', 'edit_recurring_invoice', 'edit_credit']);
}
public function rules()

View File

@ -28,7 +28,7 @@ class PreviewPurchaseOrderRequest extends Request
*/
public function authorize() : bool
{
return auth()->user()->can('create', PurchaseOrder::class);
return auth()->user()->hasIntersectPermissionsOrAdmin(['create_purchase_order', 'edit_purchase_order', 'view_purchase_order']);
}
public function rules()

View File

@ -26,7 +26,7 @@ class UpdateProductRequest extends Request
*/
public function authorize() : bool
{
return auth()->user()->can('create', Product::class);
return auth()->user()->can('edit', $this->product);
}
public function rules()

View File

@ -54,6 +54,14 @@ class BaseImport
public $transformer;
public ?array $column_map = [];
public ?string $hash;
public ?string $import_type;
public ?bool $skip_header;
public function __construct(array $request, Company $company)
{
$this->company = $company;
@ -78,6 +86,7 @@ class BaseImport
public function getCsvData($entity_type)
{
$base64_encoded_csv = Cache::pull($this->hash.'-'.$entity_type);
if (empty($base64_encoded_csv)) {
return null;
}
@ -636,6 +645,14 @@ class BaseImport
ksort($keys);
$data = array_map(function ($row) use ($keys) {
$row_count = count($row);
$key_count = count($keys);
if($key_count > $row_count) {
$row = array_pad($row, $key_count, ' ');
}
return array_combine($keys, array_intersect_key($row, $keys));
}, $data);

View File

@ -42,7 +42,7 @@ class CSVIngest implements ShouldQueue
public ?string $skip_header;
public $column_map;
public ?array $column_map = [];
public array $request;

View File

@ -50,6 +50,7 @@ class BankTransactionTransformer extends EntityTransformer
{
return [
'id' => (string) $this->encodePrimaryKey($bank_transaction->id),
'user_id' => (string) $this->encodePrimaryKey($bank_transaction->user_id),
'bank_integration_id' => (string) $this->encodePrimaryKey($bank_transaction->bank_integration_id),
'transaction_id' => (int) $bank_transaction->transaction_id,
'amount' => (float) $bank_transaction->amount ?: 0,

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.5.76',
'app_tag' => '5.5.76',
'app_version' => '5.5.77',
'app_tag' => '5.5.77',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -2,20 +2,29 @@
<div class="center">
<p>{{ ctrans('texts.confirmation_message') }}</p>
<!-- <a href="{{ url("/user/confirm/{$user->confirmation_code}") }}" target="_blank" class="button">
{{ ctrans('texts.confirm') }}
</a> -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr style="border: 0 !important; ">
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
<a href="{{ url("/user/confirm/{$user->confirmation_code}") }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">
{{ ctrans('texts.confirm') }}
</a>
</td>
</tr>
</table>
<div>
<!--[if (gte mso 9)|(IE)]>
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
<tr>
<td align="center" valign="top">
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
<tbody>
<tr>
<td align="center" class="new_button" style="border-radius: 2px; background-color: '.$this->settings->primary_color.'">
<a href="{{ url("/user/confirm/{$user->confirmation_code}") }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid '.$this->settings->primary_color.'; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
<singleline label="cta button">{{ ctrans('texts.confirm') }}</singleline>
</a>
</td>
</tr>
</tbody>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</div>
</div>
@endcomponent

View File

@ -3,17 +3,29 @@
<h1>{{ ctrans('texts.login_link_requested_label') }}</h1>
<p>{{ ctrans('texts.login_link_requested') }}</p>
<!-- <a href="{{ $url }}" target="_blank" class="button"> {{ ctrans('texts.login')}}</a> -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr style="border: 0 !important; ">
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
<a href="{{ $url }}") }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">
{{ ctrans('texts.login')}}
</a>
</td>
</tr>
</table>
<div>
<!--[if (gte mso 9)|(IE)]>
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
<tr>
<td align="center" valign="top">
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
<tbody>
<tr>
<td align="center" class="new_button" style="border-radius: 2px; background-color: '.$this->settings->primary_color.'">
<a href="{{ $url }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid '.$this->settings->primary_color.'; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
<singleline label="cta button">{{ ctrans('texts.login') }}</singleline>
</a>
</td>
</tr>
</tbody>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</div>
</div>
@endcomponent

View File

@ -3,17 +3,29 @@
<h1>{{ ctrans('texts.ach_verification_notification_label') }}</h1>
<p>{{ ctrans('texts.ach_verification_notification') }}</p>
<!-- <a class="button" href="{{ $url }}">{{ ctrans('texts.complete_verification') }}</a> -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr style="border: 0 !important; ">
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
<a href="{{ $url }}") }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">
{{ ctrans('texts.complete_verification') }}
</a>
</td>
</tr>
</table>
<div>
<!--[if (gte mso 9)|(IE)]>
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
<tr>
<td align="center" valign="top">
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
<tbody>
<tr>
<td align="center" class="new_button" style="border-radius: 2px; background-color: '.$this->settings->primary_color.'">
<a href="{{ $url }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid '.$this->settings->primary_color.'; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
<singleline label="cta button">{{ ctrans('texts.complete_verification') }}</singleline>
</a>
</td>
</tr>
</tbody>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</div>
</div>
@endcomponent

View File

@ -96,17 +96,29 @@
</table>
@endif
<!-- <a href="{{ url('/') }}" target="_blank" class="button">{{ ctrans('texts.account_login')}}</a> -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr style="border: 0 !important; ">
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
<a href="{{ url('/') }}") }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">
{{ ctrans('texts.account_login') }}
</a>
</td>
</tr>
</table>
<div>
<!--[if (gte mso 9)|(IE)]>
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
<tr>
<td align="center" valign="top">
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
<tbody>
<tr>
<td align="center" class="new_button" style="border-radius: 2px; background-color: '.$this->settings->primary_color.'">
<a href="{{ url('/') }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid '.$this->settings->primary_color.'; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
<singleline label="cta button">{{ ctrans('texts.account_login') }}</singleline>
</a>
</td>
</tr>
</tbody>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</div>
<p>{{ ctrans('texts.email_signature')}}</p>
<p>{{ ctrans('texts.email_from') }}</p>

View File

@ -91,17 +91,30 @@
</table>
@endif
<!-- <a href="{{ url('/') }}" target="_blank" class="button">{{ ctrans('texts.account_login')}}</a> -->
<div>
<!--[if (gte mso 9)|(IE)]>
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
<tr>
<td align="center" valign="top">
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
<tbody>
<tr>
<td align="center" class="new_button" style="border-radius: 2px; background-color: '.$this->settings->primary_color.'">
<a href="{{ url('/') }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid '.$this->settings->primary_color.'; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
<singleline label="cta button">{{ ctrans('texts.account_login') }}</singleline>
</a>
</td>
</tr>
</tbody>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</div>
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr style="border: 0 !important; ">
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
<a href="{{ url('/') }}") }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">
{{ ctrans('texts.account_login') }}
</a>
</td>
</tr>
</table>
<p>{{ ctrans('texts.email_signature')}}</p>
<p>{{ ctrans('texts.email_from') }}</p>

View File

@ -2,20 +2,30 @@
<div class="center">
<h1>{{ ctrans('texts.migration_completed')}}</h1>
<p>{{ ctrans('texts.migration_completed_description')}}</p>
<!--
<a href="{{ url('/') }}" target="_blank" class="button">
{{ ctrans('texts.account_login')}}
</a> -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr style="border: 0 !important; ">
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
<a href="{{ url('/') }}") }}" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">
{{ ctrans('texts.account_login') }}
</a>
</td>
</tr>
</table>
<div>
<!--[if (gte mso 9)|(IE)]>
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
<tr>
<td align="center" valign="top">
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
<tbody>
<tr>
<td align="center" class="new_button" style="border-radius: 2px; background-color: '.$this->settings->primary_color.'">
<a href="{{ url('/') }}" target="_blank" class="new_button" style="text-decoration: none; border: 1px solid '.$this->settings->primary_color.'; display: inline-block; border-radius: 2px; padding-top: 15px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px; font-size: 20px; color: #fff">
<singleline label="cta button">{{ ctrans('texts.account_login') }}</singleline>
</a>
</td>
</tr>
</tbody>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</div>
<p>{{ ctrans('texts.email_signature')}}<br/> {{ ctrans('texts.email_from') }}</p>
</div>