1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge pull request #7781 from turbo124/v5-develop

Fixes for logo width for outlook emails
This commit is contained in:
David Bomba 2022-08-24 22:11:04 +10:00 committed by GitHub
commit 2382a1d812
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 40 additions and 16 deletions

View File

@ -1 +1 @@
5.5.15
6

View File

@ -35,6 +35,7 @@ class CreditController extends Controller
$data = [
'credit' => $credit,
'key' => $invitation ? $invitation->key : false,
'invitation' => $invitation
];
if ($invitation && auth()->guard('contact') && ! request()->has('silent') && ! $invitation->viewed_date) {

View File

@ -69,6 +69,7 @@ class InvoiceController extends Controller
$data = [
'invoice' => $invoice,
'invitation' => $invitation,
'key' => $invitation ? $invitation->key : false,
];

View File

@ -61,6 +61,7 @@ class QuoteController extends Controller
$data = [
'quote' => $quote,
'key' => $invitation ? $invitation->key : false,
'invitation' => $invitation
];
if ($invitation && auth()->guard('contact') && ! request()->has('silent') && ! $invitation->viewed_date) {

View File

@ -99,6 +99,7 @@ class PurchaseOrderController extends Controller
'settings' => $purchase_order->company->settings,
'sidebar' => $this->sidebarMenu(),
'company' => $purchase_order->company,
'invitation' => $invitation
];
if ($request->query('mode') === 'fullscreen') {

View File

@ -28,17 +28,17 @@ class QuotesTable extends Component
public $company;
public $sort_field = 'status_id'; // Default sortBy. Feel free to change or pull from client/company settings.
public $sort = 'status_id'; // Default sortBy. Feel free to change or pull from client/company settings.
public $sort_asc = true;
public function sortBy($field)
{
$this->sort_field === $field
$this->sort === $field
? $this->sort_asc = ! $this->sort_asc
: $this->sort_asc = true;
$this->sort_field = $field;
$this->sort = $field;
}
public function mount()
@ -51,7 +51,7 @@ class QuotesTable extends Component
$query = Quote::query()
->with('client.gateway_tokens', 'company', 'client.contacts')
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc');
->orderBy($this->sort, $this->sort_asc ? 'asc' : 'desc');
if (count($this->status) > 0) {

View File

@ -51,6 +51,15 @@ class ValidCreditsRules implements Rule
$unique_array = [];
$total_credit_amount = array_sum(array_column($this->input['credits'], 'amount'));
if($total_credit_amount <= 0){
$this->error_msg = "Total of credits must be more than zero.";
return false;
}
$cred_collection = Credit::withTrashed()->whereIn('id', array_column($this->input['credits'], 'credit_id'))->get();
foreach ($this->input['credits'] as $credit) {

View File

@ -48,6 +48,7 @@ class InstantPayment
public function run()
{
$is_credit_payment = false;
$tokens = [];
@ -107,6 +108,7 @@ class InstantPayment
$payable_amount = Number::roundValue(Number::parseFloat($payable_invoice['amount'], $client->currency()->precision));
$invoice_balance = Number::roundValue(($invoice->partial > 0 ? $invoice->partial : $invoice->balance), $client->currency()->precision);
/*If we don't allow under/over payments force the payable amount - prevents inspect element adjustments in JS*/
if ($settings->client_portal_allow_under_payment == false && $settings->client_portal_allow_over_payment == false) {

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.15',
'app_tag' => '5.5.15',
'app_version' => '5.5.16',
'app_tag' => '5.5.16',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -125,7 +125,7 @@
<img src="{{ $logo ?? '' }}" alt="" width="155" border="0" align="middle" style="display:block;" />
<div style="mso-hide:all;">
<![endif]-->
<img class="logo-light" src="{{ $logo ?? '' }}" alt="" style="margin-top: 10px; max-width: 570px; display: block; margin-left: auto; margin-right: auto;"/>
<img class="logo-light" src="{{ $logo ?? '' }}" alt="" width="400" style="margin-top: 10px; max-width: 570px; display: block; margin-left: auto; margin-right: auto;"/>
<!--[if gte mso 9]>
</div>
<![endif]-->

View File

@ -81,6 +81,15 @@
text-align: left !important;
}
</style>
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
</head>
<body
@ -102,7 +111,7 @@
<img src="{{ $logo ?? '' }}" alt="" width="400" border="0" align="middle" style="display:block;" />
<div style="mso-hide:all;">
<![endif]-->
<img src="{{ $logo ?? '' }}" alt="" style="margin-top: 40px; max-width: 155px; display: block; margin-left: auto; margin-right: auto;"/>
<img src="{{ $logo ?? '' }}" alt="" width="400" style="margin-top: 40px; max-width: 155px; display: block; margin-left: auto; margin-right: auto;"/>
<!--[if gte mso 9]>
</div>
<![endif]-->

View File

@ -3,7 +3,7 @@
@endphp
@push('head')
<meta name="pdf-url" content="{{ $url ?? $entity->pdf_file_path(null, 'url', true) }}?cache_buster={{time()}}">
<meta name="pdf-url" content="{{ $url ?? $entity->pdf_file_path($invitation, 'url', true) }}?cache_buster={{time()}}">
<script src="{{ asset('js/vendor/pdf.js/pdf.min.js') }}"></script>
@endpush
@ -86,7 +86,7 @@
<canvas id="pdf-placeholder" class="shadow rounded-lg bg-white"></canvas>
</div>
@else
<iframe id="pdf-iframe" src="{{ $url ?? $entity->pdf_file_path(null, 'url', true) }}?cache_buster={{time()}}" class="h-screen w-full border-0 mt-4"></iframe>
<iframe id="pdf-iframe" src="{{ $url ?? $entity->pdf_file_path($invitation, 'url', true) }}?cache_buster={{time()}}" class="h-screen w-full border-0 mt-4"></iframe>
@endif

View File

@ -33,7 +33,7 @@
@include('portal.ninja2020.components.entity-documents', ['entity' => $credit])
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $credit])
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $credit, 'invitation' => $invitation])
@endsection

View File

@ -1,2 +1,2 @@
<iframe src="{{ $invoice->pdf_file_path(null, 'url', true) }}"
<iframe src="{{ $invoice->pdf_file_path($invitation, 'url', true) }}"
style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>

View File

@ -96,7 +96,7 @@
@endif
@include('portal.ninja2020.components.entity-documents', ['entity' => $invoice])
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $invoice])
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $invoice, 'invitation' => $invitation])
@include('portal.ninja2020.invoices.includes.terms', ['entities' => [$invoice], 'entity_type' => ctrans('texts.invoice')])
@include('portal.ninja2020.invoices.includes.signature')
@endsection

View File

@ -46,7 +46,7 @@
@endif
@include('portal.ninja2020.components.entity-documents', ['entity' => $purchase_order])
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $purchase_order])
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $purchase_order, 'invitation' => $invitation])
@include('portal.ninja2020.invoices.includes.terms', ['entities' => [$purchase_order], 'entity_type' => ctrans('texts.purchase_order')])
@include('portal.ninja2020.invoices.includes.signature')
@endsection

View File

@ -105,7 +105,7 @@
@endif
@include('portal.ninja2020.components.entity-documents', ['entity' => $quote])
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $quote])
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $quote, 'invitation' => $invitation])
@include('portal.ninja2020.invoices.includes.terms', ['entities' => [$quote], 'entity_type' => ctrans('texts.quote')])
@include('portal.ninja2020.invoices.includes.signature')
@endsection