mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 17:04:45 -04:00
Migrate invoice desings from flex to grid (#3571)
* Refactor Plain - Change company logo sizing from weight% to height% * Fix invoice designs
This commit is contained in:
parent
91cf1cc1f2
commit
a303026b14
@ -28,60 +28,66 @@ class Bold extends AbstractDesign
|
||||
body {font-size:90%}
|
||||
@page: not(:first-of-type) { size: auto; margin-top: 5mm; }
|
||||
.table_header_thead_class {text-align:left;}
|
||||
.table_header_td_class {padding-left:3rem; padding-right:3rem; font-size:1.5rem; padding-left:1rem;padding-right:1rem; padding-top:.5rem;padding-bottom:.5rem}
|
||||
.table_header_td_class {padding-left:3rem; padding-right:3rem; font-size:1rem; padding-left:1rem;padding-right:1rem; padding-top:.5rem;padding-bottom:.5rem}
|
||||
.table_body_td_class {background-color:#edf2f7; adding-top:1.25rem;padding-bottom:1.25rem; padding-left:3rem;}
|
||||
</style>';
|
||||
}
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="flex static bg-gray-800 p-12">
|
||||
<div class="w-1/2">
|
||||
<div class="absolute bg-white pt-10 px-10 pb-4 inline-block align-middle">
|
||||
$company_logo
|
||||
return '<div class="bg-gray-800 p-12">
|
||||
<div class="grid grid-cols-6 gap-1">
|
||||
<div class="col-span-2 p-3">
|
||||
<div class="p-1 rounded-lg">
|
||||
$company_logo
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-2 p-3 text-white flex flex-col flex-wrap">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="col-span-2 p-3 text-white flex flex-col flex-wrap">
|
||||
$company_address
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-1/2 flex">
|
||||
<div class="w-64 flex flex-col text-white">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="flex flex-col text-white">
|
||||
$company_address
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
public function body()
|
||||
{
|
||||
return '<div class="flex mt-32 pl-12">
|
||||
<div class="w-1/2 mr-40 flex flex-col">
|
||||
<h2 class="text-2xl uppercase font-semibold text-teal-600 tracking-tight">$entity_label</h2> $client_details
|
||||
</div>
|
||||
<div class="w-1/2">
|
||||
<div class="w-full bg-teal-600 px-5 py-3 text-white flex">
|
||||
<div class="w-80 flex flex-col text-white">
|
||||
$entity_details
|
||||
return '<div class="bg-white mt-16 pl-10">
|
||||
<div class="grid grid-cols-12 gap-2">
|
||||
<div class="col-span-7">
|
||||
<h2 class="text-2xl uppercase font-semibold text-teal-600 tracking-tight">$entity_label</h2>
|
||||
<div class="flex flex-col flex-wrap">$client_details</div>
|
||||
</div>
|
||||
<div class="col-span-5">
|
||||
<div class="bg-teal-600 px-5 py-3 text-white">
|
||||
<div class="w-80 flex flex-col text-white">
|
||||
$entity_details
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="w-full table-auto mt-8">
|
||||
<thead class="text-left">
|
||||
$product_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
$product_table_body
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="w-full table-auto mt-8">
|
||||
<thead class="text-left">
|
||||
$task_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
$task_table_body
|
||||
</tbody>
|
||||
</table>';
|
||||
|
||||
<div class="mx-10 mt-8">
|
||||
<table class="w-full table-auto mt-8">
|
||||
<thead class="text-left">
|
||||
$product_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
$product_table_body
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="w-full table-auto mt-8">
|
||||
<thead class="text-left">
|
||||
$task_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
$task_table_body
|
||||
</tbody>
|
||||
</table>
|
||||
</div>';
|
||||
}
|
||||
|
||||
public function task()
|
||||
@ -111,16 +117,16 @@ class Bold extends AbstractDesign
|
||||
</div>
|
||||
|
||||
<div class="flex px-4 mt-4 w-full items-end px-12">
|
||||
<div class="w-1/2">
|
||||
<div class="w-1/2 flex flex-col flex-wrap">
|
||||
<p class="font-semibold">$terms_label</p>
|
||||
$terms
|
||||
</div>
|
||||
<div class="w-1/2 flex">
|
||||
<div class="w-1/2 text-right flex flex-col">
|
||||
<span class="text-2xl font-semibold">$balance_due_label</span>
|
||||
<div class="w-1/2 text-right flex flex-col flex-wrap">
|
||||
<span class="text-xl font-semibold">$balance_due_label</span>
|
||||
</div>
|
||||
<div class="w-1/2 text-right flex flex-col">
|
||||
<span class="text-2xl text-teal-600 font-semibold">$balance_due</span>
|
||||
<div class="w-1/2 text-right flex flex-col flex-wrap">
|
||||
<span class="text-xl text-teal-600 font-semibold">$balance_due</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
|
@ -40,54 +40,45 @@ class Business extends AbstractDesign
|
||||
}
|
||||
.table_header_thead_class { border-top-left-radius: .5rem; text-align: left }
|
||||
.table_header_td_class { color: white; padding: .5rem 1rem; font-weight: 800; background-color: #2a4365; }
|
||||
.table_body_td_class { color: #c05621; padding: 1rem; border-width: 4px; border-color: white; background-color: #edf2f7; }
|
||||
.table_body_td_class { color: #c05621; padding: 1rem; border-width: 4px; border-color: white; background-color: white; }
|
||||
|
||||
</style>';
|
||||
}
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="my-16 mx-10">
|
||||
<div class="flex justify-between">
|
||||
<div class="w-1/2">
|
||||
return '<div class="m-10">
|
||||
<div class="grid grid-cols-6 gap-1">
|
||||
<div class="col-span-2 p-3">
|
||||
$company_logo
|
||||
</div>
|
||||
<div class="w-1/2 flex justify-end">
|
||||
<div class="flex flex-col text-gray-600">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="flex flex-col text-gray-600 ml-8">
|
||||
$company_address
|
||||
</div>
|
||||
<div class="col-span-2 p-3 flex flex-col">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="col-span-2 p-3 flex flex-col">
|
||||
$company_address
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
public function body()
|
||||
{
|
||||
return '<div class="flex items-center justify-between mt-20">
|
||||
<div class="w-1/2 flex flex-col">
|
||||
<span>$entity_label</span>
|
||||
<section class="flex flex-col text-orange-600 mt-2">
|
||||
$client_details
|
||||
</section>
|
||||
return '<div class="grid grid-cols-12 gap-1 mt-8">
|
||||
<div class="col-span-7 p-3 flex flex-col">
|
||||
$client_details
|
||||
</div>
|
||||
<div class="w-1/2 ml-40 bg-orange-600 px-4 py-4 h-auto rounded-lg">
|
||||
<div class="flex text-white">
|
||||
<section class="w-1/2 flex flex-col">
|
||||
$entity_labels
|
||||
</section>
|
||||
<section class="flex flex-col">
|
||||
$entity_details
|
||||
</section>
|
||||
<div class="col-span-5 p-3 flex flex-col bg-orange-600 px-4 py-4 h-auto rounded-lg">
|
||||
<div class="flex flex-col text-white">
|
||||
$entity_details
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="w-full table-auto mt-20">
|
||||
<thead class="text-left">
|
||||
$product_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="bg-gray-200">
|
||||
$product_table_body
|
||||
</tbody>
|
||||
</table>
|
||||
@ -95,7 +86,7 @@ class Business extends AbstractDesign
|
||||
<thead class="text-left">
|
||||
$task_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="bg-gray-200">
|
||||
$task_table_body
|
||||
</tbody>
|
||||
</table>';
|
||||
|
@ -36,7 +36,7 @@ size: auto;
|
||||
margin-top: 6mm;
|
||||
}
|
||||
.table_header_thead_class { text-align: left; border-radius: .5rem; }
|
||||
.table_header_td_class { text-transform: uppercase; font-size: 1.25rem; color: #b83280; padding: 1.25rem 1rem; font-weight: 500 }
|
||||
.table_header_td_class { text-transform: uppercase; font-size: 1.25rem; color: #b83280; font-weight: 500 }
|
||||
.table_body_td_class { padding: 1rem;}
|
||||
</style>';
|
||||
}
|
||||
@ -44,55 +44,41 @@ margin-top: 6mm;
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="py-16 mx-16">
|
||||
<div class="flex justify-between">
|
||||
<div class="w-2/3 flex">
|
||||
<div class="flex flex-col">
|
||||
$client_details
|
||||
</div>
|
||||
<div class="ml-6 flex flex-col">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="ml-6 flex flex-col mr-4">
|
||||
$company_address
|
||||
</div>
|
||||
</div>
|
||||
$company_logo
|
||||
return '<div class="m-12">
|
||||
<div class="grid grid-cols-12 gap-4">
|
||||
<div class="col-span-3 flex flex-col flex-wrap break-all">$client_details</div>
|
||||
<div class="col-span-3 flex flex-col flex-wrap break-all">$company_details</div>
|
||||
<div class="col-span-3 flex flex-col flex-wrap break-all">$company_address</div>
|
||||
<div class="col-span-3 flex flex-wrap">$company_logo</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
public function body()
|
||||
{
|
||||
return '<div class="flex justify-between mt-8">
|
||||
<div class="w-2/3 flex flex-col">
|
||||
<h1 class="text-5xl uppercase font-semibold">$entity_label</h1>
|
||||
<i class="ml-4 text-5xl text-pink-700">$entity_number</i>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="flex justify-between flex-col">
|
||||
$entity_labels
|
||||
</div>
|
||||
<div class="flex flex-col text-right">
|
||||
$entity_details
|
||||
return '<div class="grid grid-cols-12 mt-8">
|
||||
<div class="col-span-7">
|
||||
<p class="text-4xl text-pink-700">#$entity_number</p>
|
||||
</div>
|
||||
<div class="col-span-5 flex flex-col">$entity_details</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="w-full table-auto mt-12 border-t-4 border-pink-700 bg-white">
|
||||
<thead class="text-left rounded-lg">
|
||||
$product_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
$product_table_body
|
||||
</tbody>
|
||||
|
||||
<table class="w-full table-auto border-t-4 border-pink-700 bg-white mt-8">
|
||||
<thead class="text-left rounded-lg">
|
||||
$product_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
$product_table_body
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="w-full table-auto mt-12 border-t-4 border-pink-700 bg-white">
|
||||
<table class="w-full table-auto border-t-4 border-pink-700 bg-white">
|
||||
<thead class="text-left rounded-lg">
|
||||
$task_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
$task_table_body
|
||||
</tbody>
|
||||
</table>';
|
||||
</table>
|
||||
';
|
||||
}
|
||||
|
||||
public function task()
|
||||
@ -108,25 +94,17 @@ margin-top: 6mm;
|
||||
|
||||
public function footer()
|
||||
{
|
||||
return '<div class="border-b-4 border-pink-700">
|
||||
<div class="flex items-center justify-between mt-2 px-4 pb-4">
|
||||
<div class="w-1/2">
|
||||
<div class="flex flex-col">
|
||||
<p>$entity.public_notes</p>
|
||||
</div>
|
||||
return '<div class="border-b-4 border-pink-700 mt-8">
|
||||
<div class="grid grid-cols-12 mt-2 px-4 pb-4">
|
||||
<div class="col-span-7 flex flex-col">
|
||||
<p>$entity.public_notes</p>
|
||||
</div>
|
||||
<div class="w-1/3 flex flex-col">
|
||||
<div class="flex px-3 mt-2">
|
||||
<section class="w-1/2 text-right flex flex-col">
|
||||
<span>$subtotal_label</span>
|
||||
<span>$discount_label</span>
|
||||
<span>$paid_to_date_label</span>
|
||||
</section>
|
||||
<section class="w-1/2 text-right flex flex-col">
|
||||
<span>$subtotal</span>
|
||||
<span>$discount</span>
|
||||
<span>$paid_to_date</span>
|
||||
</section>
|
||||
<div class="col-span-5 flex px-3 mt-2">
|
||||
<div class="w-1/2 text-right flex flex-col">
|
||||
$subtotal_label $discount_label $total_tax_labels $line_tax_labels
|
||||
</div>
|
||||
<div class="w-1/2 text-right flex flex-col">
|
||||
$subtotal $discount $total_tax_values $line_tax_values
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -294,21 +294,21 @@ class Designer
|
||||
private function quoteDetails(Company $company)
|
||||
{
|
||||
$data = [
|
||||
'$quote.quote_number' => '<span class="flex justify-between items-center"><span>$quote.number_label:</span><span> $quote.number</span></span>',
|
||||
'$quote.po_number' => '<span class="flex justify-between items-center"><span>$quote.po_number_label:</span><span> $quote.po_number</span></span>',
|
||||
'$quote.quote_date' => '<span class="flex justify-between items-center"><span>$quote.date_label:</span><span> $quote.date</span></span>',
|
||||
'$quote.valid_until' => '<span class="flex justify-between items-center"><span>$quote.valid_until_label:</span><span> $quote.valid_until</span></span>',
|
||||
'$quote.balance_due' => '<span class="flex justify-between items-center"><span>$quote.balance_due_label:</span><span> $quote.balance_due</span></span>',
|
||||
'$quote.quote_total' => '<span class="flex justify-between items-center"><span>$quote.total_label:</span><span> $quote.total</span></span>',
|
||||
'$quote.partial_due' => '<span class="flex justify-between items-center"><span>$quote.partial_due_label:</span><span> $quote.partial_due</span></span>',
|
||||
'$quote.custom1' => '<span class="flex justify-between items-center"><span>$quote.custom1_label:</span><span> $quote.custom1</span></span>',
|
||||
'$quote.custom2' => '<span class="flex justify-between items-center"><span>$quote.custom2_label:</span><span> $quote.custom2</span></span>',
|
||||
'$quote.custom3' => '<span class="flex justify-between items-center"><span>$quote.custom3_label:</span><span> $quote.custom3</span></span>',
|
||||
'$quote.custom4' => '<span class="flex justify-between items-center"><span>$quote.custom4_label:</span><span> $quote.custom4</span></span>',
|
||||
'$quote.surcharge1' => '<span class="flex justify-between items-center"><span>$surcharge1_label:</span><span> $surcharge1</span></span>',
|
||||
'$quote.surcharge2' => '<span class="flex justify-between items-center"><span>$surcharge2_label:</span><span> $surcharge2</span></span>',
|
||||
'$quote.surcharge3' => '<span class="flex justify-between items-center"><span>$surcharge3_label:</span><span> $surcharge3</span></span>',
|
||||
'$quote.surcharge4' => '<span class="flex justify-between items-center"><span>$surcharge4_label:</span><span> $surcharge4</span></span>',
|
||||
'$quote.quote_number' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.number_label:</span><span> $quote.number</span></span>',
|
||||
'$quote.po_number' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.po_number_label:</span><span> $quote.po_number</span></span>',
|
||||
'$quote.quote_date' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.date_label:</span><span> $quote.date</span></span>',
|
||||
'$quote.valid_until' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.valid_until_label:</span><span> $quote.valid_until</span></span>',
|
||||
'$quote.balance_due' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.balance_due_label:</span><span> $quote.balance_due</span></span>',
|
||||
'$quote.quote_total' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.total_label:</span><span> $quote.total</span></span>',
|
||||
'$quote.partial_due' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.partial_due_label:</span><span> $quote.partial_due</span></span>',
|
||||
'$quote.custom1' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.custom1_label:</span><span> $quote.custom1</span></span>',
|
||||
'$quote.custom2' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.custom2_label:</span><span> $quote.custom2</span></span>',
|
||||
'$quote.custom3' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.custom3_label:</span><span> $quote.custom3</span></span>',
|
||||
'$quote.custom4' => '<span class="flex flex-wrap justify-between items-center"><span>$quote.custom4_label:</span><span> $quote.custom4</span></span>',
|
||||
'$quote.surcharge1' => '<span class="flex flex-wrap justify-between items-center"><span>$surcharge1_label:</span><span> $surcharge1</span></span>',
|
||||
'$quote.surcharge2' => '<span class="flex flex-wrap justify-between items-center"><span>$surcharge2_label:</span><span> $surcharge2</span></span>',
|
||||
'$quote.surcharge3' => '<span class="flex flex-wrap justify-between items-center"><span>$surcharge3_label:</span><span> $surcharge3</span></span>',
|
||||
'$quote.surcharge4' => '<span class="flex flex-wrap justify-between items-center"><span>$surcharge4_label:</span><span> $surcharge4</span></span>',
|
||||
|
||||
];
|
||||
|
||||
|
@ -41,18 +41,13 @@ class Elegant extends AbstractDesign
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="py-16 px-8">
|
||||
<div class="flex flex justify-between border-b-4 border-black">
|
||||
<div style="margin-bottom: 15px">
|
||||
return '<div class="m-10">
|
||||
<div class="grid grid-cols-12 border-b-4 border-black pb-6">
|
||||
<div class="col-span-8">
|
||||
$company_logo
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="flex flex-col mr-5">
|
||||
$entity_labels
|
||||
</div>
|
||||
<div class="flex flex-col text-right">
|
||||
$entity_details
|
||||
</div>
|
||||
<div class="col-span-4 flex flex-col">
|
||||
$entity_details
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-px border-b border-black mt-1"></div>';
|
||||
@ -60,14 +55,14 @@ class Elegant extends AbstractDesign
|
||||
|
||||
public function body()
|
||||
{
|
||||
return '<div class="flex mt-8">
|
||||
<div class="w-1/3 mr-6 flex flex-col pr-2 border-r border-dashed border-black">
|
||||
return '<div class="grid grid-cols-12 gap-4 mt-8">
|
||||
<div class="col-span-4 mr-6 flex flex-col pr-2 border-r border-dashed border-black">
|
||||
$client_details
|
||||
</div>
|
||||
<div class="flex flex-col mr-6">
|
||||
<div class="col-span-4 flex flex-col mr-6">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<div class="col-span-4 flex flex-col">
|
||||
$company_address
|
||||
</div>
|
||||
</div>
|
||||
@ -81,10 +76,10 @@ class Elegant extends AbstractDesign
|
||||
</table>
|
||||
<table class="w-full table-auto mb-6 mt-16">
|
||||
<thead class="text-left border-dashed border-b border-black">
|
||||
$product_table_header
|
||||
$task_table_header
|
||||
</thead>
|
||||
<tbody>
|
||||
$product_table_body
|
||||
$task_table_body
|
||||
</tbody>
|
||||
</table>';
|
||||
}
|
||||
|
@ -64,36 +64,33 @@ class Modern extends AbstractDesign
|
||||
public function header()
|
||||
{
|
||||
return '<div class="div_header bg-orange-600 flex justify-between py-12 px-12" style="page-break-inside: avoid;">
|
||||
<div class="w-1/2">
|
||||
<h1 class="text-white font-bold text-5xl">$company.name</h1>
|
||||
</div>
|
||||
<div class="w-1/2 flex justify-end">
|
||||
<div class="w-56 flex flex-col text-white">
|
||||
$entity_labels
|
||||
</div>
|
||||
<div class="w-32 flex flex-col text-left text-white">
|
||||
$entity_details
|
||||
</div>
|
||||
<div class="grid grid-cols-6 gap-1">
|
||||
<div class="col-span-2 p-3">
|
||||
<h1 class="text-white font-bold text-3xl">$company.name</h1>
|
||||
</div>
|
||||
<div class="col-span-2 p-3 flex flex-col text-white">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="col-span-2 p-3 flex flex-col text-white">
|
||||
$entity_details
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>';
|
||||
}
|
||||
|
||||
public function body()
|
||||
{
|
||||
return '<section>
|
||||
<div class="flex justify-between px-12 pt-12">
|
||||
<div class="w-1/2">
|
||||
$company_logo
|
||||
</div>
|
||||
<div class="w-1/2 flex justify-end">
|
||||
<div class="w-56 flex flex-col">
|
||||
$client_details
|
||||
</div>
|
||||
<div class="w-32">
|
||||
<!-- -->
|
||||
</div>
|
||||
return '
|
||||
<div class="grid grid-cols-5 gap-1 px-12 pt-12">
|
||||
<div class="col-span-2 p-3">
|
||||
$company_logo
|
||||
</div>
|
||||
<div class="col-span-3 p-3 flex flex-col">
|
||||
$client_details
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="px-12 pt-5 pb-20">
|
||||
<table class="w-full table-auto mt-8">
|
||||
<thead class="text-left text-white bg-gray-900 display: table-header-group;">
|
||||
@ -165,17 +162,14 @@ class Modern extends AbstractDesign
|
||||
</section>
|
||||
<footer>
|
||||
<div class="div_footer bg-orange-600 flex justify-between py-8 px-12" style="page-break-inside: avoid;">
|
||||
<div class="w-1/2">
|
||||
<!-- // -->
|
||||
</div>
|
||||
<div class="w-1/2 flex justify-end">
|
||||
<div class="w-56 flex flex-col text-white">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="w-32 flex flex-col text-left text-white">
|
||||
$company_address
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-12 gap-4">
|
||||
<div class="col-start-4 col-span-4 p-3 flex flex-col text-white text-right">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="col-span-4 p-3 flex flex-col text-white text-right">
|
||||
$company_address
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</html>
|
||||
|
@ -47,15 +47,12 @@ body {font-size:90%}
|
||||
public function header()
|
||||
{
|
||||
return '<div class="px-16 py-10">
|
||||
<div class="flex items-center justify-between mt-2s">
|
||||
<div ref="logo">
|
||||
<div class="grid grid-cols-12 mt-2">
|
||||
<div class="col-span-7">
|
||||
$company_logo
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="flex flex-col mr-5">
|
||||
$entity_labels
|
||||
</div>
|
||||
<div class="flex flex-col text-right">
|
||||
<div class="col-span-5">
|
||||
<div class="flex flex-col">
|
||||
$entity_details
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,25 +37,18 @@ body {font-size:90%}
|
||||
</style>';
|
||||
}
|
||||
|
||||
|
||||
public function header()
|
||||
{
|
||||
return ' <div class="px-12 py-8">
|
||||
<div class="flex justify-between">
|
||||
$company_logo
|
||||
<div class="flex flex-col">
|
||||
return '<div class="px-12 py-8">
|
||||
<div class="grid grid-cols-6 gap-1">
|
||||
<div class="col-span-2 p-3 bg-red-100">
|
||||
$company_logo
|
||||
</div>
|
||||
<div class="col-span-2 p-3 flex flex-col bg-green-100">
|
||||
$company_details
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<div class="flex px-3">
|
||||
<section class="flex align-end flex-col">
|
||||
$entity_details
|
||||
</section>
|
||||
</div>
|
||||
<section class="flex bg-gray-300 px-3">
|
||||
<p class="w-1/2 mr-4">$balance_due_label</p>
|
||||
<p>$0.00</p>
|
||||
</section>
|
||||
<div class="col-span-2 p-3 flex flex-col bg-blue-100">
|
||||
$entity_details
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
@ -81,35 +74,40 @@ body {font-size:90%}
|
||||
$task_table_body
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="flex justify-between mt-8">
|
||||
<div class="w-1/2">
|
||||
<div class="flex flex-col">
|
||||
<p>$entity.public_notes</p>
|
||||
<div class="pt-4">
|
||||
<p class="font-bold">$terms_label</p>
|
||||
<p>$terms</p>
|
||||
|
||||
<div class="grid grid-cols-12 gap-1">
|
||||
<div class="col-span-6 p-3 bg-red-100">
|
||||
<div class="flex flex-col">
|
||||
<p>$entity.public_notes</p>
|
||||
<div class="pt-4">
|
||||
<p class="font-bold">$terms_label</p>
|
||||
<p>$terms</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-1/3 flex flex-col">
|
||||
<div class="flex px-3 mt-6">
|
||||
<section class="w-1/2 text-right flex flex-col">
|
||||
$discount_label
|
||||
$total_tax_labels
|
||||
$line_tax_labels
|
||||
</section>
|
||||
<section class="w-1/2 text-right flex flex-col">
|
||||
$discount
|
||||
$total_tax_values
|
||||
$line_tax_values
|
||||
</section>
|
||||
<div class="col-span-6 p-3 bg-green-100">
|
||||
<div class="grid grid-cols-2 gap-1">
|
||||
<div class="col-span-1 bg-red-200 text-right flex flex-col">
|
||||
$discount_label
|
||||
$total_tax_labels
|
||||
$line_tax_labels
|
||||
</div>
|
||||
<div class="col-span-1 bg-red-300 text-right flex flex-col">
|
||||
$discount
|
||||
$total_tax_values
|
||||
$line_tax_values
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-1 bg-gray-300">
|
||||
<div class="col-span-1 text-right flex flex-col">
|
||||
$balance_due_label
|
||||
</div>
|
||||
<div class="col-span-1 text-right flex flex-col">
|
||||
$balance_due
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="flex bg-gray-300 px-3 mt-1">
|
||||
<p class="w-1/2 text-right">$balance_due_label</p>
|
||||
<p class="text-right w-1/2">$balance_due</p>
|
||||
</section>
|
||||
</div>
|
||||
</div>';
|
||||
</div';
|
||||
}
|
||||
|
||||
public function task()
|
||||
|
@ -33,8 +33,8 @@ body {font-size:90%}
|
||||
margin-top: 5mm;
|
||||
}
|
||||
.table_header_thead_class { text-align: left; background-color: #319795; border-radius: .5rem; }
|
||||
.table_header_td_class { padding: .75rem 1rem; font-weight: 600; }
|
||||
.table_body_td_class { padding: 1rem; border-bottom-width: 4px; border-style: dashed; border-color: #319795 }
|
||||
.table_header_td_class { padding: .75rem 1rem; font-weight: 600; color: white; }
|
||||
.table_body_td_class { padding: 1rem; border-bottom-width: 4px; border-style: dashed; border-color: #319795; color: black }
|
||||
</style>';
|
||||
}
|
||||
|
||||
@ -42,18 +42,13 @@ body {font-size:90%}
|
||||
public function header()
|
||||
{
|
||||
return '<div class="my-12 mx-16">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="w-1/2">
|
||||
<div class="grid grid-cols-12 items-center justify-between">
|
||||
<div class="col-span-7">
|
||||
$company_logo
|
||||
</div>
|
||||
<div class="bg-teal-600 p-5">
|
||||
<div class="flex">
|
||||
<div class="flex justify-between text-white flex-col mr-8">
|
||||
$entity_labels
|
||||
</div>
|
||||
<div class="flex flex-col text-right text-white">
|
||||
$entity_details
|
||||
</div>
|
||||
<div class="col-span-5 bg-teal-600 p-5 text-white">
|
||||
<div class="flex flex-col">
|
||||
$entity_details
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
@ -64,7 +59,7 @@ body {font-size:90%}
|
||||
return '<div class="flex mt-16">
|
||||
<div class="w-1/2">
|
||||
<div class="flex flex-col">
|
||||
<p class="font-semibold text-teal-600 pl-4">$entity_label</p>
|
||||
<p class="font-semibold text-teal-600 pl-4">$to_label:</p>
|
||||
<div class="flex border-dashed border-t-4 border-b-4 border-teal-600 py-4 mt-4 pl-4">
|
||||
<section class="flex flex-col">
|
||||
$client_details
|
||||
@ -98,40 +93,7 @@ body {font-size:90%}
|
||||
<tbody>
|
||||
$task_table_body
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="flex items-center justify-between mt-2 px-4 pb-4">
|
||||
<div class="w-1/2">
|
||||
<div class="flex flex-col">
|
||||
<p>$entity.public_notes</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-1/3 flex flex-col">
|
||||
<div class="flex px-3 mt-2">
|
||||
<section class="w-1/2 text-right flex flex-col">
|
||||
$discount_label
|
||||
$total_tax_labels
|
||||
$line_tax_labels
|
||||
</section>
|
||||
<section class="w-1/2 text-right flex flex-col">
|
||||
$discount
|
||||
$total_tax_values
|
||||
$line_tax_values
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center justify-between mt-4 pb-4 px-4">
|
||||
<div class="w-1/2">
|
||||
<div class="flex flex-col">
|
||||
<p class="font-semibold">$terms_label</p>
|
||||
<p>$terms</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex w-2/5 flex-col">
|
||||
<section class="flex bg-teal-600 py-3 px-4 text-white">
|
||||
<p class="w-1/2">$balance_due_label</p>
|
||||
<p class="text-right w-1/2">$balance_due</p>
|
||||
</section>
|
||||
</div>';
|
||||
</table>';
|
||||
}
|
||||
|
||||
public function task()
|
||||
@ -146,6 +108,32 @@ body {font-size:90%}
|
||||
|
||||
public function footer()
|
||||
{
|
||||
return '';
|
||||
return '<div class="grid grid-cols-12 gap-4">
|
||||
<div class="col-span-7 flex flex-col">
|
||||
$entity.public_notes
|
||||
</div>
|
||||
<div class="col-span-5 flex">
|
||||
<section class="w-1/2 text-right flex flex-col">
|
||||
$discount_label
|
||||
$total_tax_labels
|
||||
$line_tax_labels
|
||||
</section>
|
||||
<section class="w-1/2 text-right flex flex-col">
|
||||
$discount
|
||||
$total_tax_values
|
||||
$line_tax_values
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-span-7">
|
||||
<p class="font-semibold">$terms_label</p>
|
||||
<p>$terms</p>
|
||||
</div>
|
||||
<div class="col-span-5">
|
||||
<div class="flex bg-teal-600 py-3 px-4 text-white">
|
||||
<p class="w-1/2">$balance_due_label</p>
|
||||
<p class="text-right w-1/2">$balance_due</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>';
|
||||
}
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ trait MakesInvoiceValues
|
||||
|
||||
$logo = $this->company->present()->logo($settings);
|
||||
|
||||
$data['$company.logo'] = ['value' => "<img src='{$logo}' class='w-48' alt='logo'>" ?: ' ', 'label' => ctrans('texts.logo')];
|
||||
$data['$company.logo'] = ['value' => "<img src='{$logo}' class='h-32' alt='logo'>" ?: ' ', 'label' => ctrans('texts.logo')];
|
||||
$data['$company_logo'] = &$data['$company.logo'];
|
||||
$data['$company1'] = ['value' => $settings->custom_value1 ?: ' ', 'label' => $this->makeCustomField('company1')];
|
||||
$data['$company2'] = ['value' => $settings->custom_value2 ?: ' ', 'label' => $this->makeCustomField('company2')];
|
||||
|
Loading…
x
Reference in New Issue
Block a user