diff --git a/app/Designs/AbstractDesign.php b/app/Designs/AbstractDesign.php deleted file mode 100644 index 1f56ae3343..0000000000 --- a/app/Designs/AbstractDesign.php +++ /dev/null @@ -1,27 +0,0 @@ -$number - - - - -'; - } - - public function header() - { - return '
$terms_label
- $terms -$entity.public_notes
-$terms_label
-$terms
-$balance_due_label
-$balance_due
-$terms_label
- $terms -#$entity_number
-$entity.public_notes
-$terms_label
-N21
-$balance_due_label
-$balance
-$client.name
', - '$client.id_number' => '$client.id_number
', - '$client.vat_number' => '$client.vat_number
', - '$client.address1' => '$client.address1
', - '$client.address2' => '$client.address2
', - '$client.city_state_postal' => '$client.city_state_postal
', - '$client.postal_city_state' => '$client.postal_city_state
', - '$client.country' => '$client.country
', - '$contact.email' => '$client.email
', - '$client.custom1' => '$client.custom1
', - '$client.custom2' => '$client.custom2
', - '$client.custom3' => '$client.custom3
', - '$client.custom4' => '$client.custom4
', - '$contact.contact1' => '$contact.custom1
', - '$contact.contact2' => '$contact.custom2
', - '$contact.contact3' => '$contact.custom3
', - '$contact.contact4' => '$contact.custom4
', - ]; - - return $this->processCustomFields($company, $data); - } - - private function companyDetails(Company $company) - { - $data = [ - '$company.name' => '$company.name', - '$company.id_number' => '$company.id_number', - '$company.vat_number' => '$company.vat_number', - '$company.website' => '$company.website', - '$company.email' => '$company.email', - '$company.phone' => '$company.phone', - '$company.company1' => '$company1', - '$company.company2' => '$company2', - '$company.company3' => '$company3', - '$company.company4' => '$company4', - ]; - - return $this->processCustomFields($company, $data); - } - - private function companyAddress(Company $company) - { - $data = [ - '$company.address1' => '$company.address1', - '$company.address2' => '$company.address2', - '$company.city_state_postal' => '$company.city_state_postal', - '$company.postal_city_state' => '$company.postal_city_state', - '$company.country' => '$company.country', - '$company.company1' => '$company1', - '$company.company2' => '$company2', - '$company.company3' => '$company3', - '$company.company4' => '$company4', - ]; - - return $this->processCustomFields($company, $data); - } - - private function invoiceDetails(Company $company) - { - $data = [ - '$invoice.number' => '$invoice.number_label: $invoice.number', - '$invoice.po_number' => '$invoice.po_number_label: $invoice.po_number', - '$invoice.date' => '$invoice.date_label: $invoice.date', - '$invoice.due_date' => '$invoice.due_date_label: $invoice.due_date', - '$invoice.balance_due' => '$invoice.balance_due_label: $invoice.balance_due', - '$invoice.total' => '$invoice.total_label: $invoice.total', - '$invoice.partial_due' => '$invoice.partial_due_label: $invoice.partial_due', - '$invoice.custom1' => '$invoice1_label: $invoice.custom1', - '$invoice.custom2' => '$invoice2_label: $invoice.custom2', - '$invoice.custom3' => '$invoice3_label: $invoice.custom3', - '$invoice.custom4' => '$invoice4_label: $invoice.custom4', - '$surcharge1' => '$surcharge1_label: $surcharge1', - '$surcharge2' => '$surcharge2_label: $surcharge2', - '$surcharge3' => '$surcharge3_label: $surcharge3', - '$surcharge4' => '$surcharge4_label: $surcharge4', - - ]; - - return $this->processCustomFields($company, $data); - } - - private function quoteDetails(Company $company) - { - $data = [ - '$quote.quote_number' => '$quote.number_label: $quote.number', - '$quote.po_number' => '$quote.po_number_label: $quote.po_number', - '$quote.quote_date' => '$quote.date_label: $quote.date', - '$quote.valid_until' => '$quote.valid_until_label: $quote.valid_until', - '$quote.balance_due' => '$quote.balance_due_label: $quote.balance_due', - '$quote.quote_total' => '$quote.total_label: $quote.total', - '$quote.partial_due' => '$quote.partial_due_label: $quote.partial_due', - '$quote.custom1' => '$quote.custom1_label: $quote.custom1', - '$quote.custom2' => '$quote.custom2_label: $quote.custom2', - '$quote.custom3' => '$quote.custom3_label: $quote.custom3', - '$quote.custom4' => '$quote.custom4_label: $quote.custom4', - '$quote.surcharge1' => '$surcharge1_label: $surcharge1', - '$quote.surcharge2' => '$surcharge2_label: $surcharge2', - '$quote.surcharge3' => '$surcharge3_label: $surcharge3', - '$quote.surcharge4' => '$surcharge4_label: $surcharge4', - - ]; - - return $this->processCustomFields($company, $data); - } - - private function creditDetails(Company $company) - { - $data = [ - '$credit.number' => '$credit.number_label$credit.number', - '$credit.po_number' => '$credit.po_number_label$credit.po_number', - '$credit.date' => '$credit.date_label$credit.date', - '$credit.balance' => '$credit.balance_label$credit.balance', - '$credit.total' => '$credit.total_label$credit.total', - '$credit.partial_due' => '$credit.partial_due_label$credit.partial_due', - '$credit.custom1' => '$credit.custom1_label$credit.custom1', - '$credit.custom2' => '$credit.custom2_label$credit.custom2', - '$credit.custom3' => '$credit.custom3_label$credit.custom3', - '$credit.custom4' => '$credit.custom4_label$credit.custom4', - '$credit.surcharge1' => '$surcharge1_label$surcharge1_label: $surcharge1', - '$credit.surcharge2' => '$surcharge2_label$surcharge2_label: $surcharge2', - '$credit.surcharge3' => '$surcharge3_label$surcharge3_label: $surcharge3', - '$credit.surcharge4' => '$surcharge4_label$surcharge4_label: $surcharge4', - - ]; - - return $this->processCustomFields($company, $data); - } - - private function processCustomFields(Company $company, $data) - { - $custom_fields = $company->custom_fields; - - if (! $custom_fields) { - return $data; - } - - foreach (self::$custom_fields as $cf) { - if (! property_exists($custom_fields, $cf) || (strlen($custom_fields->{$cf}) == 0)) { - unset($data[$cf]); - } - } - - return $data; - } - - // private function processInputVariables($company, $variables) - // { - // if(is_object($variables)) - // $variables = json_decode(json_encode($variables),true); - - // $custom_fields = $company->custom_fields; - - // $matches = array_intersect(self::$custom_fields, $variables); - - // foreach ($matches as $match) { - - // if (!property_exists($custom_fields, $match) || (strlen($custom_fields->{$match}) == 0)) { - // foreach ($variables as $key => $value) { - // if ($value == $match) { - // unset($variables[$key]); - // } - // } - // } - - // } - - // return $variables; - - // } -} diff --git a/app/Designs/Elegant.php b/app/Designs/Elegant.php deleted file mode 100644 index d2b3e18a78..0000000000 --- a/app/Designs/Elegant.php +++ /dev/null @@ -1,144 +0,0 @@ -$number - - - - -'; - } - - public function header() - { - return '$entity.public_notes
-$terms_label
-$terms
-$balance_due_label
-$balance
-From:
-To:
- $client_details -$entity.public_notes
-$terms_label
-$terms
-$balance_due_label
-$balance_due
-
-
-
-
-
- $company_logo
-
-
- $client_details
-
-
-
-
-
-
- $entity.public_notes
-
-
-
-
- $discount_label
- $total_tax_labels
- $line_tax_labels
-
-
- $discount
- $total_tax_values
- $line_tax_values
-
-
-
-
-
-
-
-
- $terms_label - $terms -
-
-
-
-
-
-
- $balance_due_label -$balance_due - |
$to_label:
-$from_label:
-$entity.public_notes
-$terms_label
-$terms
-$balance_due_label
-$balance_due
-$entity.public_notes
-$terms_label
-$terms
-$to_label:
-$from_label:
-$terms_label
-$terms
-$balance_due_label
-$balance_due
-