1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fixes for spaces in designs

This commit is contained in:
David Bomba 2022-03-16 18:50:34 +11:00
parent 29ed09db5d
commit 1440a1291a
14 changed files with 46 additions and 44 deletions

View File

@ -128,6 +128,13 @@ class EmailTemplateDefaults
return $invoice_message;
}
public static function emailInvoiceReminderTemplate()
{
$invoice_message = '<p>$client<br><br>'.self::transformText('reminder_message').'</p><div class="center">$view_button</div>';
return $invoice_message;
}
public static function emailQuoteSubject()
{
return ctrans('texts.quote_subject', ['number'=>'$number', 'account'=>'$company.name']);

View File

@ -50,7 +50,7 @@ class CompanyDeleted extends Mailable
public function build()
{
App::forgetInstance('translator');
App::setLocale($this->company->getLocale());
App::setLocale($this->account->default_company->getLocale());
$t = app('translator');
$t->replace(Ninja::transformTranslations($this->settings));

View File

@ -379,7 +379,7 @@ document.addEventListener('DOMContentLoaded', function() {
'allow_unsafe_links' => false,
]);
return $converter->convertToHtml($markdown);
return $converter->convert($markdown);
}
// public function processMarkdownOnLineItems(array &$items): void

View File

@ -95,7 +95,7 @@ trait PdfMakerUtilities
if (array_key_exists('process_markdown', $this->data) && array_key_exists('content', $child) && $this->data['process_markdown']) {
$child['content'] = str_replace("<br>", "\r", $child['content']);
$child['content'] = $this->commonmark->convertToHtml($child['content'] ?? '');
$child['content'] = $this->commonmark->convert($child['content'] ?? '');
}
}

View File

@ -90,7 +90,6 @@ class TemplateEngine
if (strlen($this->entity) > 1 && strlen($this->entity_id) > 1) {
$class = 'App\Models\\'.ucfirst($this->entity);
$this->entity_obj = $class::withTrashed()->where('id', $this->decodePrimaryKey($this->entity_id))->company()->first();
nlog("the entity id = ".$this->entity_obj->id);
} else {
$this->mockEntity();
}
@ -168,7 +167,7 @@ class TemplateEngine
'allow_unsafe_links' => false,
]);
$this->body = $converter->convertToHtml($this->body);
$this->body = $converter->convert($this->body);
}
private function entityValues($contact)

View File

@ -81,7 +81,7 @@ trait PaymentEmailBuilder
'allow_unsafe_links' => false,
]);
$data = $converter->convertToHtml($data);
$data = $converter->convert($data);
}
return $data;

View File

@ -89,7 +89,7 @@ trait QuoteEmailBuilder
'allow_unsafe_links' => true,
]);
$data = $converter->convertToHtml($data);
$data = $converter->convert($data);
}
return $data;

View File

@ -4569,7 +4569,7 @@ $LANG = array(
'quotes_backup_subject' => 'Your quotes are ready for download',
'credits_backup_subject' => 'Your credits are ready for download',
'document_download_subject' => 'Your documents are ready for download',
'reminder_message' => 'Reminder for invoice :number for :balance',
);
return $LANG;

View File

@ -53,7 +53,7 @@
#header, #header-spacer {
height: 160px;
padding: 3rem;
margin-bottom: 3rem;
margin-bottom: 1rem;
}
.company-logo {
height: 100%;
@ -232,7 +232,7 @@
#footer, #footer-spacer {
height: 160px;
padding: 1rem 3rem;
margin-top: 3rem;
margin-top: 1rem;
}
[data-ref="total_table-footer"] {

View File

@ -16,7 +16,10 @@
}
@page {
margin: $global_margin;
margin-left: $global_margin;
margin-right: $global_margin;
margin-top: 0;
margin-bottom: 0;
size: $page_size $page_layout;
}
@ -96,7 +99,7 @@
}
[data-ref="table"] {
margin-top: 3.5rem;
margin-top: 0.5rem;
/* margin-bottom: 200px; */
min-width: 100%;
table-layout: fixed;
@ -153,10 +156,6 @@
font-weight: bold !important;
}
#table-totals {
page-break-inside: avoid;
}
#table-totals > *:last-child {
border-bottom-left-radius: 1rem;
border-bottom-right-radius: 1rem;
@ -171,6 +170,8 @@
padding-top: 0.5rem;
padding-bottom: 0.8rem;
margin-right: .5rem;
page-break-inside:auto;
overflow: visible !important;
}
#table-totals .totals-table-right-side>* {
@ -349,7 +350,7 @@
$entity_images
<div class="repeating-footer" id="footer">
<div class="repeating-footerx" id="footer">
<p data-ref="total_table-footer">$entity_footer</p>

View File

@ -16,7 +16,10 @@
}
@page {
margin: $global_margin;
margin-left: $global_margin;
margin-right: $global_margin;
margin-top: 0;
margin-bottom: 0;
size: $page_size $page_layout;
}
@ -61,7 +64,7 @@
.entity-label-wrapper {
display: grid;
grid-template-columns: 2fr 1fr;
margin-top: 3rem;
margin-top: 1rem;
}
.entity-label-wrapper .entity-label > * {
@ -130,16 +133,14 @@
}
#table-totals {
page-break-inside: avoid;
}
#table-totals {
margin-top: 1rem;
margin-top: 0rem;
display: grid;
grid-template-columns: 2fr 1fr;
padding-top: 1rem;
margin-right: .75rem;
gap: 80px;
page-break-inside:auto;
overflow: visible !important;
}
#table-totals .totals-table-right-side>* {
@ -306,7 +307,7 @@
$entity_images
<div class="repeating-footer" id="footer">
<div class="repeating-footerx" id="footer">
<p data-ref="total_table-footer">$entity_footer</p>

View File

@ -43,7 +43,7 @@
.client-entity-wrapper {
display: flex;
margin-top: 3rem;
margin-top: 1rem;
gap: 20px;
margin-left: 10px;
line-height: var(--line-height);
@ -133,17 +133,15 @@
}
#table-totals {
page-break-inside: avoid;
}
#table-totals {
margin-top: 1rem;
margin-top: 0.5rem;
display: grid;
grid-template-columns: 2fr 1fr;
padding-top: 0.5rem;
padding-left: 1rem;
margin-right: .75rem;
gap: 80px;
page-break-inside:auto;
overflow: visible !important;
}
#table-totals .totals-table-right-side>* {
@ -316,7 +314,7 @@
$entity_images
<div class="repeating-footer" id="footer">
<div class="repeating-footerx" id="footer">
<p data-ref="total_table-footer">$entity_footer</p>
<script>

View File

@ -140,10 +140,6 @@
text-align: right;
}
#table-totals {
page-break-inside: avoid;
}
#table-totals {
margin-top: 1rem;
display: grid;
@ -151,6 +147,8 @@
padding-top: 0.5rem;
margin-right: .75rem;
gap: 80px;
page-break-inside:auto;
overflow: visible !important;
}
#table-totals .totals-table-right-side>* {
@ -231,7 +229,7 @@
.repeating-header-space, **/
.repeating-footer,
.repeating-footer-space {
height: 160px;
height: 0;
}
.repeating-header {
position: fixed;
@ -357,7 +355,7 @@
$entity_images
<div class="repeating-footer" id="footer">
<div class="repeating-footerx" id="footer">
<p data-ref="total_table-footer">$entity_footer</p>
<script>

View File

@ -11,7 +11,7 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: $font_name, Helvetica, sans-serif;
font-size: $font_size;
font-size: "$font_size";
zoom: 80%;
}
@ -102,7 +102,7 @@
[data-ref="table"] {
padding-left: 3rem;
padding-right: 3rem;
margin-top: 3rem;
margin-top: 1rem;
/* margin-bottom: 200px; */
min-width: 100%;
table-layout: fixed;
@ -154,10 +154,6 @@
text-align: right;
}
#table-totals {
page-break-inside: avoid;
}
#table-totals {
margin-top: 1rem;
display: grid;
@ -166,6 +162,8 @@
padding-left: 3rem;
padding-right: 3rem;
margin-right: .75rem;
page-break-inside:auto;
overflow: visible !important;
}
#table-totals .totals-table-right-side>* {