fix styling issues in PDF invoice (#2097)
This commit is contained in:
@@ -17,12 +17,14 @@ table, tr, td, p {
|
|||||||
}
|
}
|
||||||
th {
|
th {
|
||||||
border: none;
|
border: none;
|
||||||
font-weight: bold;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
td {
|
td {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
p {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
.text-right {
|
.text-right {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
@@ -74,7 +76,7 @@ table.items {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 60px;
|
||||||
}
|
}
|
||||||
table.items thead th,
|
table.items thead th,
|
||||||
table.items tbody td {
|
table.items tbody td {
|
||||||
@@ -99,6 +101,9 @@ table.items tfoot th {
|
|||||||
padding: 20px 0 0 0;
|
padding: 20px 0 0 0;
|
||||||
line-height: 1px;
|
line-height: 1px;
|
||||||
}
|
}
|
||||||
|
table.items tfoot td.last {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
table.items tr.odd {
|
table.items tr.odd {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
"build/invoice-pdf.0efd7a97.js"
|
"build/invoice-pdf.0efd7a97.js"
|
||||||
],
|
],
|
||||||
"css": [
|
"css": [
|
||||||
"build/invoice-pdf.340721a4.css"
|
"build/invoice-pdf.cdf28364.css"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"chart": {
|
"chart": {
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
"build/invoice.74279541.js": "sha384-2BXic5Sgorf2tXai6zSAN4wLY2dbg06L03/xMKW6itMcszvtnRArKzfBh6DNcF3f",
|
"build/invoice.74279541.js": "sha384-2BXic5Sgorf2tXai6zSAN4wLY2dbg06L03/xMKW6itMcszvtnRArKzfBh6DNcF3f",
|
||||||
"build/invoice.13d8ef4e.css": "sha384-B6RN/wZJToSBCZk2JeLokIqWEhbh+Eb9arYbt9dM+YoC2Z6PnCeTwTqSGyexWWJh",
|
"build/invoice.13d8ef4e.css": "sha384-B6RN/wZJToSBCZk2JeLokIqWEhbh+Eb9arYbt9dM+YoC2Z6PnCeTwTqSGyexWWJh",
|
||||||
"build/invoice-pdf.0efd7a97.js": "sha384-bSdIeRCtEJiYYuc2reb0e5CpJ1Kbd1lQNEkElMTiq1SX0IINzdwJJYf6WnCcHrNC",
|
"build/invoice-pdf.0efd7a97.js": "sha384-bSdIeRCtEJiYYuc2reb0e5CpJ1Kbd1lQNEkElMTiq1SX0IINzdwJJYf6WnCcHrNC",
|
||||||
"build/invoice-pdf.340721a4.css": "sha384-+dk8iSafBIWj8bKpeEAkhkOR6G6o2OyL1ZeGuaIHuECtidl5cqoGbLSw+yKfSc0e",
|
"build/invoice-pdf.cdf28364.css": "sha384-DhWomcxV34umbO4PT7u0CJtvH+X3wAYjszoa3tvP1G08QdYkvtwfKhvdnL/Z8f+8",
|
||||||
"build/2.7ab75d0a.js": "sha384-Eb0w73RbUwsfLVRbeGf0Aql77LzAUDrwqY74pyTgwSnf0dsMKwsjlumzhO2JHnVN",
|
"build/2.7ab75d0a.js": "sha384-Eb0w73RbUwsfLVRbeGf0Aql77LzAUDrwqY74pyTgwSnf0dsMKwsjlumzhO2JHnVN",
|
||||||
"build/chart.34d60a88.js": "sha384-I57c9DtU3AOG2kzKqIZkIu0hi1aGYHRZ5QG4LKC9+9slzJnAMttPGXoL2cQG3m6y",
|
"build/chart.34d60a88.js": "sha384-I57c9DtU3AOG2kzKqIZkIu0hi1aGYHRZ5QG4LKC9+9slzJnAMttPGXoL2cQG3m6y",
|
||||||
"build/calendar.541a15eb.js": "sha384-a4HtJGznLY7D1lv25yrokaIVHLY++qak0X2qi83Er1UxWKKLb2Gu6foE+CMA9xhb",
|
"build/calendar.541a15eb.js": "sha384-a4HtJGznLY7D1lv25yrokaIVHLY++qak0X2qi83Er1UxWKKLb2Gu6foE+CMA9xhb",
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
body{font-family:sans-serif;font-size:10pt}body,p,table,td,tr{margin:0;padding:0}th{border:none;font-weight:700;text-align:left}td{vertical-align:top}.text-right{text-align:right}.text-nowrap{white-space:nowrap}.date{color:#666;font-size:80%;text-align:right;padding-top:6px}.wrapper{margin:4px}p,table.addresses{line-height:14pt}table.addresses{width:100%;margin-bottom:30px}table.header{border-spacing:0;padding-bottom:4px;border-bottom:1px solid #ccc;width:100%}table.header .title{font-weight:400;font-size:140%}table.footer{border-spacing:0;border-top:1px solid #ccc;font-size:80%;padding-top:8px;width:100%;line-height:14px}table.footer td{vertical-align:bottom}table.items{width:100%;border-collapse:collapse;margin-top:50px;margin-bottom:50px}table.items tbody td,table.items thead th{border-bottom:1px solid #ccc}table.items tbody td.first,table.items thead th.first{padding-left:0}table.items tbody td.last,table.items tfoot td.last,table.items thead th.last{padding-right:0}table.items td,table.items th{padding:8px 6px}table.items tfoot td,table.items tfoot th{padding:20px 0 0;line-height:1px}table.items tr.odd{background-color:#f5f5f5}
|
|
||||||
1
public/build/invoice-pdf.cdf28364.css
Normal file
1
public/build/invoice-pdf.cdf28364.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
body{font-family:sans-serif;font-size:10pt}body,p,table,td,tr{margin:0;padding:0}th{border:none;text-align:left}td{vertical-align:top}p{margin-bottom:12px}.text-right{text-align:right}.text-nowrap{white-space:nowrap}.date{color:#666;font-size:80%;text-align:right;padding-top:6px}.wrapper{margin:4px}p,table.addresses{line-height:14pt}table.addresses{width:100%;margin-bottom:30px}table.header{border-spacing:0;padding-bottom:4px;border-bottom:1px solid #ccc;width:100%}table.header .title{font-weight:400;font-size:140%}table.footer{border-spacing:0;border-top:1px solid #ccc;font-size:80%;padding-top:8px;width:100%;line-height:14px}table.footer td{vertical-align:bottom}table.items{width:100%;border-collapse:collapse;margin-top:50px;margin-bottom:60px}table.items tbody td,table.items thead th{border-bottom:1px solid #ccc}table.items tbody td.first,table.items thead th.first{padding-left:0}table.items tbody td.last,table.items tfoot td.last,table.items thead th.last{padding-right:0}table.items td,table.items th{padding:8px 6px}table.items tfoot td,table.items tfoot th{padding:20px 0 0;line-height:1px}table.items tfoot td.last{padding-left:10px}table.items tr.odd{background-color:#f5f5f5}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"build/chart.js": "build/chart.34d60a88.js",
|
"build/chart.js": "build/chart.34d60a88.js",
|
||||||
"build/invoice.css": "build/invoice.13d8ef4e.css",
|
"build/invoice.css": "build/invoice.13d8ef4e.css",
|
||||||
"build/invoice.js": "build/invoice.74279541.js",
|
"build/invoice.js": "build/invoice.74279541.js",
|
||||||
"build/invoice-pdf.css": "build/invoice-pdf.340721a4.css",
|
"build/invoice-pdf.css": "build/invoice-pdf.cdf28364.css",
|
||||||
"build/invoice-pdf.js": "build/invoice-pdf.0efd7a97.js",
|
"build/invoice-pdf.js": "build/invoice-pdf.0efd7a97.js",
|
||||||
"build/runtime.js": "build/runtime.098eaae1.js",
|
"build/runtime.js": "build/runtime.098eaae1.js",
|
||||||
"build/fonts/fa-brands-400.ttf": "build/fonts/fa-brands-400.085b1dd8.ttf",
|
"build/fonts/fa-brands-400.ttf": "build/fonts/fa-brands-400.085b1dd8.ttf",
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ class EncoreExtension extends AbstractExtension implements ServiceSubscriberInte
|
|||||||
|
|
||||||
public function getEncoreEntryCssSource(string $packageName): string
|
public function getEncoreEntryCssSource(string $packageName): string
|
||||||
{
|
{
|
||||||
$files = $this->container
|
$lookup = $this->container->get(EntrypointLookupInterface::class);
|
||||||
->get(EntrypointLookupInterface::class)->getCssFiles($packageName);
|
$files = $lookup->getCssFiles($packageName);
|
||||||
|
|
||||||
$source = '';
|
$source = '';
|
||||||
|
|
||||||
@@ -64,6 +64,8 @@ class EncoreExtension extends AbstractExtension implements ServiceSubscriberInte
|
|||||||
$source .= file_get_contents($this->publicDir . '/' . $file);
|
$source .= file_get_contents($this->publicDir . '/' . $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$lookup->reset();
|
||||||
|
|
||||||
return $source;
|
return $source;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,11 +95,11 @@ mpdf-->
|
|||||||
<table class="items">
|
<table class="items">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="first">{{ 'label.date'|trans }}</th>
|
<th class="first"><strong>{{ 'label.date'|trans }}</strong></th>
|
||||||
<th>{{ 'label.description'|trans }}</th>
|
<th><strong>{{ 'label.description'|trans }}</strong></th>
|
||||||
<th class="text-right">{{ 'label.unit_price'|trans }}</th>
|
<th class="text-right"><strong>{{ 'label.unit_price'|trans }}</strong></th>
|
||||||
<th class="text-right">{{ 'label.amount'|trans }}</th>
|
<th class="text-right"><strong>{{ 'label.amount'|trans }}</strong></th>
|
||||||
<th class="last text-right">{{ 'label.total_rate'|trans }}</th>
|
<th class="last text-right"><strong>{{ 'label.total_rate'|trans }}</strong></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user