diff --git a/app/Designs/Bold.php b/app/Designs/Bold.php
index cd587cb024f6..9b0dc83c37a7 100644
--- a/app/Designs/Bold.php
+++ b/app/Designs/Bold.php
@@ -9,32 +9,131 @@
* @license https://opensource.org/licenses/AAL
*/
-namespace App\Designs\Bold;
+namespace App\Designs;
-class Bold
+class Bold extends AbstractDesign
{
- public function __construct()
- {
- }
-
- public function header()
- {
-
+ public function __construct() {
}
- public function body()
- {
+ public function header() {
+
+ return '
+
+
+
+ $number
+
+
+
+
+
+
+
+
+
+
+
+ $company_details
+
+
+ $company_address
+
+
+
+ ';
}
- public function table()
- {
+ public function body() {
+
+ return '
+
+
+
$your_invoice
$client_details
+
+
+
+
+ $invoice_details_labels
+
+
+ $invoice_details
+
+
+
+
+ ';
}
- public function footer()
- {
+ public function table_styles() {
+ return [
+ 'table_header_thead_class' => "text-left",
+ 'table_header_td_class' => "px-12 text-2xl px-4 py-2",
+ 'table_body_td_class' => "bg-gray-200 py-5 pl-12",
+ ];
+ }
+
+ public function table() {
+
+ return '
+
+
+
+ $table_header
+
+
+
+ $table_body
+
+
+
+
+
+ $invoice.public_notes
+
+
+
+ $total_tax_labels $line_tax_labels
+
+
+ $total_tax_values $line_tax_values
+
+
+
+
+
+
+
$terms_label
+ $terms
+
+
+
+ $balance_due_label
+
+
+ $balance_due
+
+
+
+ ';
+ }
+
+ public function footer() {
+
+ return '
+
+
+ ';
}
diff --git a/app/Designs/Business.php b/app/Designs/Business.php
new file mode 100644
index 000000000000..c0939701e6a0
--- /dev/null
+++ b/app/Designs/Business.php
@@ -0,0 +1,154 @@
+
+
+
+ $number
+
+
+
+
+
+
+
+
+
+
+ $company_logo
+
+
+
+ $company_details
+
+
+ $company_address
+
+
+
+ ';
+
+ }
+
+ public function body() {
+
+ return '
+
+
+ $invoice_issued_to_label
+
+
+
+
+
+ $invoice_number_label
+ $invoice_number
+
+
+ $po_number_label
+ $po_number
+
+
+
+ $due_date
+ $due_date_label
+
+
+ $balance_due_label
+ $balance_due
+
+
+
+
+ ';
+
+ }
+
+ public function table_styles() {
+ return [
+ 'table_header_thead_class' => "text-left bg-blue-900 rounded-lg",
+ 'table_header_td_class' => "font-semibold text-white px-4 py-5",
+ 'table_body_td_class' => "border-4 border-white text-orange-700 px-4 py-4",
+ ];
+ }
+
+ public function table() {
+
+ return '
+
+
+
+ $table_header
+
+
+
+ $table_body
+
+ $invoice.public_notes |
+
+ $total_tax_labels
+ $line_tax_labels
+ |
+
+ $total_tax_values
+ $line_tax_values
+ |
+
+
+
+ $terms_label
+ $terms
+ |
+
+
+ |
+
+ $balance_due_label
+ |
+
+ $balance_due
+ |
+
+
+
+ ';
+ }
+
+ public function footer() {
+
+ return '
+
+
+
+ ';
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/Designs/Clean.php b/app/Designs/Clean.php
new file mode 100644
index 000000000000..49d6f7b3d835
--- /dev/null
+++ b/app/Designs/Clean.php
@@ -0,0 +1,147 @@
+
+
+
+ $number
+
+
+
+
+
+
+
+
+
+
+ $company_logo
+
+
+
+ $company_details
+
+
+ $company_address
+
+
+
+
+ ';
+
+ }
+
+ public function body() {
+
+ return '
+
+ $invoice_label
+
+
+
+
+
+
+
+ $invoice_details_labels
+
+
+ $invoice_details
+
+
+ $client_details
+
+
+
+
+
+ ';
+
+ }
+
+ public function table_styles() {
+ return [
+ 'table_header_thead_class' => "text-left",
+ 'table_header_td_class' => "px-4 py-2",
+ 'table_body_td_class' => "text-blue-600 border-t border-b border-gray-400 px-4 py-4",
+ ];
+ }
+
+ public function table() {
+
+ return '
+
+
+
+ $table_header
+
+
+
+ $table_body
+
+
+
+
+
+ $invoice.public_notes
+
+
+
+ $total_tax_labels
+ $line_tax_labels
+
+
+ $total_tax_values
+ $line_tax_values
+
+
+
+
+
+
+
$terms_label
+ $terms
+
+
+
+ $balance_due_label
+
+
+ $balance_due
+
+
+
';
+ }
+
+ public function footer() {
+
+ return '
+
+
+ ';
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/Designs/Creative.php b/app/Designs/Creative.php
new file mode 100644
index 000000000000..0d1f43520ff6
--- /dev/null
+++ b/app/Designs/Creative.php
@@ -0,0 +1,157 @@
+
+
+
+ $number
+
+
+
+
+
+
+
+
+
+ $company_logo
+
+
+
+ ';
+
+ }
+
+ public function body() {
+
+ return '
+
+
+
$balance_due_label
+
+
+ $client_details
+
+
+
+ $company_details
+
+
+ $company_address
+
+
+
+
+
+
$details_label:
+
+
+ $invoice_number_label
+ $invoice_number
+
+
+
+ $due_date_label
+ $due_date
+
+
+ $balance_due_label
+ $balance_due
+
+
+
+
+ ';
+
+ }
+
+ public function table_styles() {
+ return [
+ 'table_header_thead_class' => "text-left border-dashed border-b border-black",
+ 'table_header_td_class' => "font-normal text-green-700 px-4 py-2",
+ 'table_body_td_class' => "px-4 py-4",
+ ];
+ }
+
+ public function table() {
+
+ return '
+
+
+
+ $table_header
+
+
+
+ $table_body
+
+ $invoice.public_notes |
+
+ $total_tax_labels
+ $line_tax_labels
+ |
+
+ $total_tax_values
+ $line_tax_values
+ |
+
+
+
+ $terms_label
+ $terms
+ |
+
+
+ |
+
+ $balance_due_label
+ |
+
+ $balance_due
+ |
+
+
+
';
+ }
+
+ public function footer() {
+
+ return '
+
+
Thanks
+
+
+
+
+
+
+ ';
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/Designs/CreativeRed.php b/app/Designs/CreativeRed.php
new file mode 100644
index 000000000000..96584078c777
--- /dev/null
+++ b/app/Designs/CreativeRed.php
@@ -0,0 +1,150 @@
+
+
+
+ $number
+
+
+
+
+
+
+
+
+
+
+
+ $client_details
+
+
+ $company_details
+
+
+ $company_address
+
+
+
+ $company_logo
+
+
+ ';
+
+ }
+
+ public function body() {
+
+ return '
+
+
+
$invoice_label
+ #$invoice_number
+
+
+
+
+ $invoice_number_label
+ $invoice_number
+
+
+ $po_number_label
+ $po_number
+
+
+
+ $due_date_label
+ $due_date
+
+
+ $balance_due_label
+ $balance_due
+
+
+
+
+ ';
+
+ }
+
+ public function table_styles() {
+ return [
+ 'table_header_thead_class' => "text-left rounded-lg",
+ 'table_header_td_class' => "font-medium uppercase text-pink-700 text-xl px-4 py-5",
+ 'table_body_td_class' => "px-4 py-4",
+ ];
+ }
+
+ public function table() {
+
+ return '
+
+
+
+ $table_header
+
+
+
+ $table_body
+
+ $invoice.public_notes |
+
+ $total_tax_labels
+ $line_tax_labels
+ |
+
+ $total_tax_values
+ $line_tax_values
+ |
+
+
+
+ $terms_label
+ $terms
+ |
+
+
+
';
+ }
+
+ public function footer() {
+
+ return '
+
+
$balance_due_label
+
$balance_due
+
+
+
+
+
+ ';
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/Designs/Hipster.php b/app/Designs/Hipster.php
new file mode 100644
index 000000000000..12dd215ba7b2
--- /dev/null
+++ b/app/Designs/Hipster.php
@@ -0,0 +1,144 @@
+
+
+
+ $number
+
+
+
+
+
+
+
+
+
+
+
From:
+
+
+ $company_details
+
+
+ $company_address
+
+
+
+
+
To:
+ $client_details
+
+
+ $company_logo
+
+
+ ';
+
+ }
+
+ public function body() {
+
+ return '
+
+
$invoice_label
+
+
$invoice_number
+
+ $date_label
+ $date
+
+
+ $balance_due_label
+ $due_date
+
+
+ $balance_due_label
+ $balance_due
+
+
+
+ ';
+
+ }
+
+ public function table_styles() {
+ return [
+ 'table_header_thead_class' => "text-left",
+ 'table_header_td_class' => "px-4 py-2 uppercase font-semibold border-l-2 border-black",
+ 'table_body_td_class' => "border-l-2 border-black px-4 py-4",
+ ];
+ }
+
+ public function table() {
+
+ return '
+
+
+
+ $table_header
+
+
+
+ $table_body
+
+
+ $invoice.public_notes
+ |
+
+ $total_tax_labels
+ $line_tax_labels
+ |
+
+ $total_tax_values
+ $line_tax_values
+ |
+
+
+
+ $terms_label
+ $terms
+ |
+
+ $balance_due_label
+ |
+
+ $balance_due
+ |
+
+
+
';
+ }
+
+ public function footer() {
+
+ return '
+
+
+ ';
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/Designs/Photo.php b/app/Designs/Photo.php
new file mode 100644
index 000000000000..68a9e79185c1
--- /dev/null
+++ b/app/Designs/Photo.php
@@ -0,0 +1,146 @@
+
+
+
+ $number
+
+
+
+
+
+
+ ';
+
+ }
+
+ public function body() {
+
+ return '
+
+
+
+
+ $invoice_number_label
+ $invoice_number
+
+
+
+ $company_logo
+
+
+ $due_date_label
+ $due_date
+ $balance_due_label
+ $balance_due
+
+
+
+
+
+
+
To:
+
+ $client_details
+
+
+
+
From:
+
+ $company_details
+
+
+
+
+ ';
+
+ }
+
+ public function table_styles() {
+ return [
+ 'table_header_thead_class' => "text-left border-b-4 border-black",
+ 'table_header_td_class' => "font-normal px-4 py-2 uppercase",
+ 'table_body_td_class' => "text-orange-700 px-4 py-4",
+ ];
+ }
+
+ public function table() {
+
+ return '
+
+
+
+
+ $table_header
+
+
+
+ $table_body
+
+ $invoice.public_notes |
+
+ $total_tax_labels
+ $line_tax_labels
+ |
+
+ $total_tax_values
+ $line_tax_values
+ |
+
+
+
+ $terms_label
+ $terms
+ |
+
+
+ |
+
+ $balance_due_label
+ |
+
+ $balance_due
+ |
+
+
+
';
+ }
+
+ public function footer() {
+
+ return '
+
+
+ ';
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/Designs/Plain.php b/app/Designs/Plain.php
new file mode 100644
index 000000000000..e2546c27d5ed
--- /dev/null
+++ b/app/Designs/Plain.php
@@ -0,0 +1,135 @@
+
+
+
+ $number
+
+
+
+
+
+
+
+
+
+
+
+ $invoice_label
+
+
+ $company_address
+
+
+
$company_logo
+
+
+ $invoice_details_labels
+
+
+
+
+ $balance_due_label
+ $balance_due
+
+
+
+ ';
+
+ }
+
+ public function body() {
+
+ return '
+
+ $client_details
+
+ ';
+
+ }
+
+ public function table_styles() {
+ return [
+ 'table_header_thead_class' => "text-left bg-gray-300",
+ 'table_header_td_class' => "px-4 py-2",
+ 'table_body_td_class' => "border-t-2 border-b border-gray-300 px-4 py-4",
+ ];
+ }
+
+ public function table() {
+
+ return '
+
+
+
+ $table_header
+
+
+
+ $table_body
+
+
+
+
+
+
+
$invoice.public_notes
+
+
$terms_label
+
$terms
+
+
+
+
+
+
+ $total_tax_labels
+ $line_tax_labels
+
+
+ $total_tax_values
+ $line_tax_values
+
+
+
+ $balance_due_label
+ $balance_due
+
+
';
+ }
+
+ public function footer() {
+
+ return '
+
+
+ ';
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php
index b735681fc4ab..9f680211d4ea 100644
--- a/app/Utils/Traits/MakesInvoiceValues.php
+++ b/app/Utils/Traits/MakesInvoiceValues.php
@@ -47,6 +47,7 @@ trait MakesInvoiceValues
* @var array
*/
private static $labels = [
+ 'invoice',
'date',
'due_date',
'invoice_number',
@@ -250,7 +251,7 @@ trait MakesInvoiceValues
public function makeValues($contact = null) :array
{
if (!$this->client->currency() || !$this->client) {
- throw new Exception(debug_backtrace()[1]['function'], 1);
+ throw new \Exception(debug_backtrace()[1]['function'], 1);
exit;
}