mock->invitation);
$pdf_config = (new PdfConfiguration($pdf_service));
$pdf_config->entity = $this->mock;
$pdf_config->entity_string = $this->request['entity_type'];
$pdf_config->setTaxMap($this->mock->tax_map);
$pdf_config->setTotalTaxMap($this->mock->total_tax_map);
$pdf_config->client = $this->mock->client;
$pdf_config->settings_object = $this->mock->client;
$pdf_config->settings = $this->getMergedSettings();
$this->settings = $pdf_config->settings;
$pdf_config->entity_design_id = $pdf_config->settings->{"{$pdf_config->entity_string}_design_id"};
$pdf_config->setPdfVariables();
$pdf_config->setCurrency(Currency::find($this->settings->currency_id));
$pdf_config->setCountry(Country::find($this->settings->country_id));
$pdf_config->design = Design::find($this->decodePrimaryKey($pdf_config->entity_design_id));
$pdf_config->currency_entity = $this->mock->client;
$pdf_service->config = $pdf_config;
$pdf_designer = (new PdfDesigner($pdf_service))->build();
$pdf_service->designer = $pdf_designer;
$pdf_service->html_variables = $this->getStubVariables();
$pdf_builder = (new PdfBuilder($pdf_service))->build();
$pdf_service->builder = $pdf_builder;
$html = $pdf_service->getHtml();
return $pdf_service->resolvePdfEngine($html);
}
public function build(): self
{
$this->mock = $this->initEntity();
return $this;
}
public function initEntity(): mixed
{
$settings = new \stdClass;
$settings->entity = Client::class;
$settings->currency_id = '1';
$settings->industry_id = '';
$settings->size_id = '';
switch ($this->request['entity_type']) {
case 'invoice':
$entity = Invoice::factory()->make();
$entity->client = Client::factory()->make(['settings' => $settings]);
$entity->invitation = InvoiceInvitation::factory()->make();
break;
case 'quote':
$entity = Quote::factory()->make();
$entity->client = Client::factory()->make(['settings' => $settings]);
$entity->invitation = QuoteInvitation::factory()->make();
break;
case 'credit':
$entity = Credit::factory()->make();
$entity->client = Client::factory()->make(['settings' => $settings]);
$entity->invitation = CreditInvitation::factory()->make();
break;
case 'purchase_order':
$entity = PurchaseOrder::factory()->make();
$entity->client = Client::factory()->make(['settings' => $settings]);
$entity->invitation = PurchaseOrderInvitation::factory()->make();
break;
case PurchaseOrder::class:
$entity = PurchaseOrder::factory()->make();
$entity->invitation = PurchaseOrderInvitation::factory()->make();
$entity->vendor = Vendor::factory()->make();
break;
default:
# code...
break;
}
$entity->tax_map = $this->getTaxMap();
$entity->total_tax_map = $this->getTotalTaxMap();
$entity->invitation->company = $this->company;
return $entity;
}
/**
* getMergedSettings
*
* @return object
*/
public function getMergedSettings() :object
{
match ($this->request['settings_type']) {
'group' => $settings = ClientSettings::buildClientSettings($this->company->settings, $this->request['settings']),
'client' => $settings = ClientSettings::buildClientSettings($this->company->settings, $this->request['settings']),
'company' => $settings = (object)$this->request['settings'],
default => $settings = $this->company->settings,
};
return $settings;
}
/**
* getTaxMap
*
* @return void
*/
private function getTaxMap()
{
return collect([['name' => 'GST', 'total' => 10]]);
}
/**
* getTotalTaxMap
*
* @return void
*/
private function getTotalTaxMap()
{
return [['name' => 'GST', 'total' => 10]];
}
/**
* getStubVariables
*
* @return void
*/
public function getStubVariables()
{
return ['values' =>
[
'$client.shipping_postal_code' => '46420',
'$client.billing_postal_code' => '11243',
'$company.city_state_postal' => 'Beveley Hills, CA, 90210',
'$company.postal_city_state' => 'CA',
'$company.postal_city' => '90210, CA',
'$product.gross_line_total' => '100',
'$client.postal_city_state' => '11243 Aufderharchester, North Carolina',
'$client.postal_city' => '11243 Aufderharchester, North Carolina',
'$client.shipping_address1' => '453',
'$client.shipping_address2' => '66327 Waters Trail',
'$client.city_state_postal' => 'Aufderharchester, North Carolina 11243',
'$client.shipping_address' => '453
66327 Waters Trail
Aufderharchester, North Carolina 11243
Afghanistan
',
'$client.billing_address2' => '63993 Aiyana View',
'$client.billing_address1' => '8447',
'$client.shipping_country' => 'USA',
'$invoiceninja.whitelabel' => 'https://raw.githubusercontent.com/invoiceninja/invoiceninja/v5-develop/public/images/new_logo.png',
'$client.billing_address' => '8447
63993 Aiyana View
Aufderharchester, North Carolina 11243
Afghanistan
',
'$client.billing_country' => 'USA',
'$task.gross_line_total' => '100',
'$contact.portal_button' => 'View client portal',
'$client.shipping_state' => 'Delaware',
'$invoice.public_notes' => 'These are some public notes for your document',
'$client.shipping_city' => 'Kesslerport',
'$client.billing_state' => 'North Carolina',
'$product.description' => 'A Product Description',
'$product.product_key' => 'A Product Key',
'$entity.public_notes' => 'Entity Public notes',
'$invoice.balance_due' => '$0.00',
'$client.public_notes' => ' ',
'$company.postal_code' => $this->settings->postal_code,
'$client.billing_city' => 'Aufderharchester',
'$secondary_font_name' => isset($this->settings?->secondary_font) ? $this->settings->secondary_font : 'Roboto',
'$product.line_total' => '',
'$product.tax_amount' => '',
'$company.vat_number' => $this->settings->vat_number,
'$invoice.invoice_no' => '0029',
'$quote.quote_number' => '0029',
'$client.postal_code' => '11243',
'$contact.first_name' => 'Benedict',
'$secondary_font_url' => 'https://fonts.googleapis.com/css2?family=Roboto&display=swap',
'$contact.signature' => '',
'$company_logo_size' => $this->settings->company_logo_size ?: '65%',
'$product.tax_name1' => '',
'$product.tax_name2' => '',
'$product.tax_name3' => '',
'$product.unit_cost' => '',
'$quote.valid_until' => '2023-10-24',
'$custom_surcharge1' => '$0.00',
'$custom_surcharge2' => '$0.00',
'$custom_surcharge3' => '$0.00',
'$custom_surcharge4' => '$0.00',
'$quote.balance_due' => '$0.00',
'$company.id_number' => $this->settings->id_number,
'$invoice.po_number' => 'PO12345',
'$invoice_total_raw' => 0.0,
'$postal_city_state' => '11243 Aufderharchester, North Carolina',
'$client.vat_number' => '975977515',
'$city_state_postal' => 'Aufderharchester, North Carolina 11243',
'$contact.full_name' => 'Benedict Eichmann',
'$contact.last_name' => 'Eichmann',
'$company.country_2' => 'US',
'$product.product1' => '',
'$product.product2' => '',
'$product.product3' => '',
'$product.product4' => '',
'$statement_amount' => '',
'$task.description' => '',
'$product.discount' => '',
'$entity_issued_to' => 'Bob JOnes',
'$assigned_to_user' => '',
'$product.quantity' => '',
'$total_tax_labels' => '',
'$total_tax_values' => '',
'$invoice.discount' => '$0.00',
'$invoice.subtotal' => '$0.00',
'$company.address2' => $this->settings->address2,
'$partial_due_date' => ' ',
'$invoice.due_date' => '2023-10-24',
'$client.id_number' => 'CLI-2023-1234',
'$credit.po_number' => 'PO12345',
'$company.address1' => $this->settings->address1,
'$credit.credit_no' => '0029',
'$invoice.datetime' => '25/Feb/2023 1:10 am',
'$contact.custom1' => null,
'$contact.custom2' => null,
'$contact.custom3' => null,
'$contact.custom4' => null,
'$task.line_total' => '',
'$line_tax_labels' => '',
'$line_tax_values' => '',
'$secondary_color' => isset($this->settings->secondary_color) ? $this->settings->secondary_color : '#3d3d3d;',
'$invoice.balance' => '$0.00',
'$invoice.custom1' => 'custom value',
'$invoice.custom2' => 'custom value',
'$invoice.custom3' => 'custom value',
'$invoice.custom4' => 'custom value',
'$company.custom1' => 'custom value',
'$company.custom2' => 'custom value',
'$company.custom3' => 'custom value',
'$company.custom4' => 'custom value',
'$quote.po_number' => 'PO12345',
'$company.website' => $this->settings->website,
'$balance_due_raw' => '0.00',
'$entity.datetime' => '25/Feb/2023 1:10 am',
'$credit.datetime' => '25/Feb/2023 1:10 am',
'$client.address2' => '63993 Aiyana View',
'$client.address1' => '8447',
'$user.first_name' => 'Derrick Monahan DDS',
'$created_by_user' => 'Derrick Monahan DDS Erna Wunsch',
'$client.currency' => 'USD',
'$company.country' => 'United States',
'$company.address' => 'United States
',
'$tech_hero_image' => 'http://ninja.test:8000/images/pdf-designs/tech-hero-image.jpg',
'$task.tax_name1' => '',
'$task.tax_name2' => '',
'$task.tax_name3' => '',
'$client.balance' => '$0.00',
'$client_balance' => '$0.00',
'$credit.balance' => '$0.00',
'$credit_balance' => '$0.00',
'$gross_subtotal' => '$0.00',
'$invoice.amount' => '$0.00',
'$client.custom1' => 'custom value',
'$client.custom2' => 'custom value',
'$client.custom3' => 'custom value',
'$client.custom4' => 'custom value',
'$emailSignature' => 'A email signature.',
'$invoice.number' => '0029',
'$quote.quote_no' => '0029',
'$quote.datetime' => '25/Feb/2023 1:10 am',
'$client_address' => '8447
63993 Aiyana View
Aufderharchester, North Carolina 11243
Afghanistan
',
'$client.address' => '8447
63993 Aiyana View
Aufderharchester, North Carolina 11243
Afghanistan
',
'$payment_button' => 'Pay Now',
'$payment_qrcode' => '',
'$client.country' => 'Afghanistan',
'$user.last_name' => 'Erna Wunsch',
'$client.website' => 'http://www.parisian.org/',
'$dir_text_align' => 'left',
'$entity_images' => '',
'$task.discount' => '',
'$contact.email' => 'bob@gmail.com',
'$primary_color' => isset($this->settings->primary_color) ? $this->settings->primary_color : '#4e4e4e',
'$credit_amount' => '$0.00',
'$invoice.total' => '$0.00',
'$invoice.taxes' => '$0.00',
'$quote.custom1' => 'custom value',
'$quote.custom2' => 'custom value',
'$quote.custom3' => 'custom value',
'$quote.custom4' => 'custom value',
'$company.email' => $this->settings->email,
'$client.number' => '12345',
'$company.phone' => $this->settings->phone,
'$company.state' => $this->settings->state,
'$credit.number' => '0029',
'$entity_number' => '0029',
'$credit_number' => '0029',
'$global_margin' => '6.35mm',
'$contact.phone' => '681-480-9828',
'$portal_button' => 'View client portal',
'$paymentButton' => 'Pay Now',
'$entity_footer' => 'Default invoice footer',
'$client.lang_2' => 'en',
'$product.date' => '',
'$client.email' => 'client@gmail.com',
'$product.item' => '',
'$public_notes' => 'These are very public notes',
'$task.service' => '',
'$credit.total' => '$0.00',
'$net_subtotal' => '$0.00',
'$paid_to_date' => '$0.00',
'$quote.amount' => '$0.00',
'$company.city' => $this->settings->city,
'$payment.date' => '2022-10-10',
'$client.phone' => '555-123-3212',
'$number_short' => '0029',
'$quote.number' => '0029',
'$invoice.date' => '25/Feb/2023',
'$company.name' => $this->settings->name,
'$portalButton' => 'View client portal',
'$contact.name' => 'Benedict Eichmann',
'$entity.terms' => 'Default company invoice terms',
'$client.state' => 'North Carolina',
'$company.logo' => $this->settings->company_logo,
'$company_logo' => $this->settings->company_logo,
'$payment_link' => 'http://ninja.test:8000/client/pay/UAUY8vIPuno72igmXbbpldwo5BDDKIqs',
'$status_logo' => '',
'$description' => '',
'$product.tax' => '',
'$valid_until' => '',
'$your_entity' => '',
'$shipping' => '',
'$balance_due' => '$0.00',
'$outstanding' => '$0.00',
'$partial_due' => '$0.00',
'$quote.total' => '$0.00',
'$payment_due' => ' ',
'$credit.date' => '25/Feb/2023',
'$invoiceDate' => '25/Feb/2023',
'$view_button' => 'View Invoice',
'$client.city' => 'Aufderharchester',
'$spc_qr_code' => 'SPC
0200
1
K
434343
CH
0.000000
USD
NON
0029
EPD
',
'$client_name' => 'A Client Called Bob',
'$client.name' => 'A Client Called Bob',
'$paymentLink' => 'http://ninja.test:8000/client/pay/UAUY8vIPuno72igmXbbpldwo5BDDKIqs',
'$payment_url' => 'http://ninja.test:8000/client/pay/UAUY8vIPuno72igmXbbpldwo5BDDKIqs',
'$page_layout' => $this->settings->page_layout,
'$task.task1' => '',
'$task.task2' => '',
'$task.task3' => '',
'$task.task4' => '',
'$task.hours' => '',
'$amount_due' => '$0.00',
'$amount_raw' => '0.00',
'$invoice_no' => '0029',
'$quote.date' => '25/Feb/2023',
'$vat_number' => '975977515',
'$viewButton' => 'View Invoice',
'$portal_url' => 'http://ninja.test:8000/client/',
'$task.date' => '',
'$task.rate' => '',
'$task.cost' => '',
'$statement' => '',
'$user_iban' => ' ',
'$signature' => ' ',
'$id_number' => 'ID Number',
'$credit_no' => '0029',
'$font_size' => $this->settings->font_size,
'$view_link' => 'View Invoice',
'$page_size' => $this->settings->page_size,
'$country_2' => 'AF',
'$firstName' => 'Benedict',
'$user.name' => 'Derrick Monahan DDS Erna Wunsch',
'$font_name' => $this->settings?->primary_font ?: 'Roboto',
'$auto_bill' => 'This invoice will automatically be billed to your credit card on file on the due date.',
'$payments' => '',
'$task.tax' => '',
'$discount' => '$0.00',
'$subtotal' => '$0.00',
'$company1' => 'custom value',
'$company2' => 'custom value',
'$company3' => 'custom value',
'$company4' => 'custom value',
'$due_date' => '2022-01-01',
'$poNumber' => 'PO-123456',
'$quote_no' => '0029',
'$address2' => '63993 Aiyana View',
'$address1' => '8447',
'$viewLink' => 'View Invoice',
'$autoBill' => 'This invoice will automatically be billed to your credit card on file on the due date.',
'$view_url' => 'http://ninja.test:8000/client/invoice/UAUY8vIPuno72igmXbbpldwo5BDDKIqs',
'$font_url' => 'https://fonts.googleapis.com/css2?family=Roboto&display=swap',
'$details' => '',
'$balance' => '$0.00',
'$partial' => '$0.00',
'$client1' => 'custom value',
'$client2' => 'custom value',
'$client3' => 'custom value',
'$client4' => 'custom value',
'$dueDate' => '2022-01-01',
'$invoice' => '0029',
'$account' => '434343',
'$country' => 'United States',
'$contact' => 'Benedict Eichmann',
'$app_url' => 'http://ninja.test:8000',
'$website' => 'http://www.parisian.org/',
'$entity' => '',
'$thanks' => 'Thanks!',
'$amount' => '$0.00',
'$method' => ' ',
'$number' => '0029',
'$footer' => 'Default invoice footer',
'$client' => 'The Client Name',
'$email' => 'email@invoiceninja.net',
'$notes' => '',
'_rate1' => '',
'_rate2' => '',
'_rate3' => '',
'$taxes' => '$0.00',
'$total' => '$0.00',
'$phone' => ' ',
'$terms' => 'Default company invoice terms',
'$from' => 'Bob Jones',
'$item' => '',
'$date' => '25/Feb/2023',
'$tax' => '',
'$dir' => 'ltr',
'$to' => 'Jimmy Giggles',
'$show_paid_stamp' => $this->settings->show_paid_stamp ? 'flex' : 'none',
'$status_logo' => '
' . ctrans('texts.paid') .'
',
'$show_shipping_address' => $this->settings->show_shipping_address ? 'flex' : 'none',
'$show_shipping_address_block' => $this->settings->show_shipping_address ? 'block' : 'none',
'$show_shipping_address_visibility' => $this->settings->show_shipping_address ? 'visible' : 'hidden',
],
'labels' =>
[
'$client.shipping_postal_code_label' => 'Shipping Postal Code',
'$client.billing_postal_code_label' => 'Postal Code',
'$company.city_state_postal_label' => 'City/State/Postal',
'$company.postal_city_state_label' => 'Postal/City/State',
'$company.postal_city_label' => 'Postal/City',
'$product.gross_line_total_label' => 'Gross line total',
'$client.postal_city_state_label' => 'Postal/City/State',
'$client.postal_city_label' => 'Postal/City',
'$client.shipping_address1_label' => 'Shipping Street',
'$client.shipping_address2_label' => 'Shipping Apt/Suite',
'$client.city_state_postal_label' => 'City/State/Postal',
'$client.shipping_address_label' => 'Shipping Address',
'$client.billing_address2_label' => 'Apt/Suite',
'$client.billing_address1_label' => 'Street',
'$client.shipping_country_label' => 'Shipping Country',
'$invoiceninja.whitelabel_label' => '',
'$client.billing_address_label' => 'Address',
'$client.billing_country_label' => 'Country',
'$task.gross_line_total_label' => 'Gross line total',
'$contact.portal_button_label' => 'view_client_portal',
'$client.shipping_state_label' => 'Shipping State/Province',
'$invoice.public_notes_label' => 'Public Notes',
'$client.shipping_city_label' => 'Shipping City',
'$client.billing_state_label' => 'State/Province',
'$product.description_label' => 'Description',
'$product.product_key_label' => 'Product',
'$entity.public_notes_label' => 'Public Notes',
'$invoice.balance_due_label' => 'Balance Due',
'$client.public_notes_label' => 'Notes',
'$company.postal_code_label' => 'Postal Code',
'$client.billing_city_label' => 'City',
'$secondary_font_name_label' => '',
'$product.line_total_label' => 'Line Total',
'$product.tax_amount_label' => 'Tax',
'$company.vat_number_label' => 'VAT Number',
'$invoice.invoice_no_label' => 'Invoice Number',
'$quote.quote_number_label' => 'Quote Number',
'$client.postal_code_label' => 'Postal Code',
'$contact.first_name_label' => 'First Name',
'$secondary_font_url_label' => '',
'$contact.signature_label' => '',
'$company_logo_size_label' => '',
'$product.tax_name1_label' => 'Tax',
'$product.tax_name2_label' => 'Tax',
'$product.tax_name3_label' => 'Tax',
'$product.unit_cost_label' => 'Unit Cost',
'$quote.valid_until_label' => 'Valid Until',
'$custom_surcharge1_label' => '',
'$custom_surcharge2_label' => '',
'$custom_surcharge3_label' => '',
'$custom_surcharge4_label' => '',
'$quote.balance_due_label' => 'Balance Due',
'$company.id_number_label' => 'ID Number',
'$invoice.po_number_label' => 'PO Number',
'$invoice_total_raw_label' => 'Invoice Total',
'$postal_city_state_label' => 'Postal/City/State',
'$client.vat_number_label' => 'VAT Number',
'$city_state_postal_label' => 'City/State/Postal',
'$contact.full_name_label' => 'Name',
'$contact.last_name_label' => 'Last Name',
'$company.country_2_label' => 'Country',
'$product.product1_label' => '',
'$product.product2_label' => '',
'$product.product3_label' => '',
'$product.product4_label' => '',
'$statement_amount_label' => 'Amount',
'$task.description_label' => 'Description',
'$product.discount_label' => 'Discount',
'$entity_issued_to_label' => 'Invoice issued to',
'$assigned_to_user_label' => 'Name',
'$product.quantity_label' => 'Quantity',
'$total_tax_labels_label' => 'Taxes',
'$total_tax_values_label' => 'Taxes',
'$invoice.discount_label' => 'Discount',
'$invoice.subtotal_label' => 'Subtotal',
'$company.address2_label' => 'Apt/Suite',
'$partial_due_date_label' => 'Due Date',
'$invoice.due_date_label' => 'Due Date',
'$client.id_number_label' => 'ID Number',
'$credit.po_number_label' => 'PO Number',
'$company.address1_label' => 'Street',
'$credit.credit_no_label' => 'Invoice Number',
'$invoice.datetime_label' => 'Date',
'$contact.custom1_label' => '',
'$contact.custom2_label' => '',
'$contact.custom3_label' => '',
'$contact.custom4_label' => '',
'$task.line_total_label' => 'Line Total',
'$line_tax_labels_label' => 'Taxes',
'$line_tax_values_label' => 'Taxes',
'$secondary_color_label' => '',
'$invoice.balance_label' => 'Balance',
'$invoice.custom1_label' => '',
'$invoice.custom2_label' => '',
'$invoice.custom3_label' => '',
'$invoice.custom4_label' => '',
'$company.custom1_label' => '',
'$company.custom2_label' => '',
'$company.custom3_label' => '',
'$company.custom4_label' => '',
'$quote.po_number_label' => 'PO Number',
'$company.website_label' => 'Website',
'$balance_due_raw_label' => 'Balance Due',
'$entity.datetime_label' => 'Date',
'$credit.datetime_label' => 'Date',
'$client.address2_label' => 'Apt/Suite',
'$client.address1_label' => 'Street',
'$user.first_name_label' => 'First Name',
'$created_by_user_label' => 'Name',
'$client.currency_label' => '',
'$company.country_label' => 'Country',
'$company.address_label' => 'Address',
'$tech_hero_image_label' => '',
'$task.tax_name1_label' => 'Tax',
'$task.tax_name2_label' => 'Tax',
'$task.tax_name3_label' => 'Tax',
'$client.balance_label' => 'Account balance',
'$client_balance_label' => 'Account balance',
'$credit.balance_label' => 'Balance',
'$credit_balance_label' => 'Credit Balance',
'$gross_subtotal_label' => 'Subtotal',
'$invoice.amount_label' => 'Total',
'$client.custom1_label' => '',
'$client.custom2_label' => '',
'$client.custom3_label' => '',
'$client.custom4_label' => '',
'$emailSignature_label' => '',
'$invoice.number_label' => 'Invoice Number',
'$quote.quote_no_label' => 'Quote Number',
'$quote.datetime_label' => 'Date',
'$client_address_label' => 'Address',
'$client.address_label' => 'Address',
'$payment_button_label' => 'Pay Now',
'$payment_qrcode_label' => 'Pay Now',
'$client.country_label' => 'Country',
'$user.last_name_label' => 'Last Name',
'$client.website_label' => 'Website',
'$dir_text_align_label' => '',
'$entity_images_label' => '',
'$task.discount_label' => 'Discount',
'$contact.email_label' => 'Email',
'$primary_color_label' => '',
'$credit_amount_label' => 'Credit Amount',
'$invoice.total_label' => 'Invoice Total',
'$invoice.taxes_label' => 'Taxes',
'$quote.custom1_label' => '',
'$quote.custom2_label' => '',
'$quote.custom3_label' => '',
'$quote.custom4_label' => '',
'$company.email_label' => 'Email',
'$client.number_label' => 'Number',
'$company.phone_label' => 'Phone',
'$company.state_label' => 'State/Province',
'$credit.number_label' => 'Credit Number',
'$entity_number_label' => 'Invoice Number',
'$credit_number_label' => 'Invoice Number',
'$global_margin_label' => '',
'$contact.phone_label' => 'Phone',
'$portal_button_label' => 'view_client_portal',
'$paymentButton_label' => 'Pay Now',
'$entity_footer_label' => '',
'$client.lang_2_label' => '',
'$product.date_label' => 'Date',
'$client.email_label' => 'Email',
'$product.item_label' => 'Item',
'$public_notes_label' => 'Public Notes',
'$task.service_label' => 'Service',
'$credit.total_label' => 'Credit Total',
'$net_subtotal_label' => 'Net',
'$paid_to_date_label' => 'Paid to Date',
'$quote.amount_label' => 'Quote Total',
'$company.city_label' => 'City',
'$payment.date_label' => 'Payment Date',
'$client.phone_label' => 'Phone',
'$number_short_label' => 'Invoice #',
'$quote.number_label' => 'Quote Number',
'$invoice.date_label' => 'Invoice Date',
'$company.name_label' => 'Company Name',
'$portalButton_label' => 'view_client_portal',
'$contact.name_label' => 'Contact Name',
'$entity.terms_label' => 'Invoice Terms',
'$client.state_label' => 'State/Province',
'$company.logo_label' => 'Logo',
'$company_logo_label' => 'Logo',
'$payment_link_label' => 'Pay Now',
'$status_logo_label' => '',
'$description_label' => 'Description',
'$product.tax_label' => 'Tax',
'$valid_until_label' => 'Valid Until',
'$your_entity_label' => 'Your Invoice',
'$shipping_label' => 'Shipping',
'$balance_due_label' => 'Balance Due',
'$outstanding_label' => 'Balance Due',
'$partial_due_label' => 'Partial Due',
'$quote.total_label' => 'Total',
'$payment_due_label' => 'Payment due',
'$credit.date_label' => 'Credit Date',
'$invoiceDate_label' => 'Invoice Date',
'$view_button_label' => 'View Invoice',
'$client.city_label' => 'City',
'$spc_qr_code_label' => '',
'$client_name_label' => 'Client Name',
'$client.name_label' => 'Client Name',
'$paymentLink_label' => 'Pay Now',
'$payment_url_label' => 'Pay Now',
'$page_layout_label' => '',
'$task.task1_label' => '',
'$task.task2_label' => '',
'$task.task3_label' => '',
'$task.task4_label' => '',
'$task.hours_label' => 'Hours',
'$amount_due_label' => 'Amount due',
'$amount_raw_label' => 'Amount',
'$invoice_no_label' => 'Invoice Number',
'$quote.date_label' => 'Quote Date',
'$vat_number_label' => 'VAT Number',
'$viewButton_label' => 'View Invoice',
'$portal_url_label' => '',
'$task.date_label' => 'Date',
'$task.rate_label' => 'Rate',
'$task.cost_label' => 'Rate',
'$statement_label' => 'Statement',
'$user_iban_label' => '',
'$signature_label' => '',
'$id_number_label' => 'ID Number',
'$credit_no_label' => 'Invoice Number',
'$font_size_label' => '',
'$view_link_label' => 'View Invoice',
'$page_size_label' => '',
'$country_2_label' => 'Country',
'$firstName_label' => 'First Name',
'$user.name_label' => 'Name',
'$font_name_label' => '',
'$auto_bill_label' => '',
'$payments_label' => 'Payments',
'$task.tax_label' => 'Tax',
'$discount_label' => 'Discount',
'$subtotal_label' => 'Subtotal',
'$company1_label' => '',
'$company2_label' => '',
'$company3_label' => '',
'$company4_label' => '',
'$due_date_label' => 'Due Date',
'$poNumber_label' => 'PO Number',
'$quote_no_label' => 'Quote Number',
'$address2_label' => 'Apt/Suite',
'$address1_label' => 'Street',
'$viewLink_label' => 'View Invoice',
'$autoBill_label' => '',
'$view_url_label' => 'View Invoice',
'$font_url_label' => '',
'$details_label' => 'Details',
'$balance_label' => 'Balance',
'$partial_label' => 'Partial Due',
'$client1_label' => '',
'$client2_label' => '',
'$client3_label' => '',
'$client4_label' => '',
'$dueDate_label' => 'Due Date',
'$invoice_label' => 'Invoice Number',
'$account_label' => 'Company Name',
'$country_label' => 'Country',
'$contact_label' => 'Name',
'$app_url_label' => '',
'$website_label' => 'Website',
'$entity_label' => 'Invoice',
'$thanks_label' => 'Thanks',
'$amount_label' => 'Total',
'$method_label' => 'Method',
'$number_label' => 'Invoice Number',
'$footer_label' => '',
'$client_label' => 'Client Name',
'$email_label' => 'Email',
'$notes_label' => 'Public Notes',
'_rate1_label' => 'Tax',
'_rate2_label' => 'Tax',
'_rate3_label' => 'Tax',
'$taxes_label' => 'Taxes',
'$total_label' => 'Total',
'$phone_label' => 'Phone',
'$terms_label' => 'Invoice Terms',
'$from_label' => 'From',
'$item_label' => 'Item',
'$date_label' => 'Invoice Date',
'$tax_label' => 'Tax',
'$dir_label' => '',
'$to_label' => 'To',
'$show_paid_stamp_label' => '',
'$status_logo_label' => '',
'$show_shipping_address_label' => '',
'$show_shipping_address_block_label' => '',
'$show_shipping_address_visibility_label' => '',
],
];
}
private function mockTranslatedLabels()
{
return [
'$show_shipping_address_visibility_label' => ctrans('texts.shipping_address'),
'$client.shipping_postal_code_label' => ctrans('texts.shipping_postal_code'),
'$show_shipping_address_block_label' => ctrans('texts.shipping_address'),
'$client.billing_postal_code_label' => ctrans('texts.billing_postal_code'),
'$company.postal_city_state_label' => ctrans('texts.postal_city_state'),
'$company.city_state_postal_label' => ctrans('texts.city_state_postal'),
'$product.gross_line_total_label' => ctrans('texts.gross_line_total'),
'$client.shipping_address1_label' => ctrans('texts.shipping_address1'),
'$client.postal_city_state_label' => ctrans('texts.postal_city_state'),
'$client.shipping_address2_label' => ctrans('texts.shipping_address2'),
'$client.city_state_postal_label' => ctrans('texts.city_state_postal'),
'$client.billing_address2_label' => ctrans('texts.billing_address2'),
'$client.shipping_address_label' => ctrans('texts.shipping_address'),
'$client.billing_address1_label' => ctrans('texts.billing_address1'),
'$client.shipping_country_label' => ctrans('texts.shipping_country'),
'$invoiceninja.whitelabel_label' => ctrans('texts.white_label_link'),
'$client.billing_country_label' => ctrans('texts.billing_country'),
'$client.billing_address_label' => ctrans('texts.billing_address'),
'$task.gross_line_total_label' => ctrans('texts.gross_line_total'),
'$contact.portal_button_label' => ctrans('texts.button'),
'$client.shipping_state_label' => ctrans('texts.shipping_state'),
'$show_shipping_address_label' => ctrans('texts.show_shipping_address'),
'$invoice.public_notes_label' => ctrans('texts.public_notes'),
'$client.billing_state_label' => ctrans('texts.billing_state'),
'$client.shipping_city_label' => ctrans('texts.shipping_city'),
'$product.description_label' => ctrans('texts.description'),
'$product.product_key_label' => ctrans('texts.product_key'),
'$entity.public_notes_label' => ctrans('texts.public_notes'),
'$client.public_notes_label' => ctrans('texts.public_notes'),
'$company.postal_code_label' => ctrans('texts.postal_code'),
'$company.postal_city_label' => ctrans('texts.postal_city'),
'$secondary_font_name_label' => ctrans('texts.secondary_font'),
'$client.billing_city_label' => ctrans('texts.billing_city'),
'$invoice.balance_due_label' => ctrans('texts.balance_due'),
'$product.line_total_label' => ctrans('texts.line_total'),
'$product.tax_amount_label' => ctrans('texts.tax_amount'),
'$client.postal_code_label' => ctrans('texts.postal_code'),
'$company.vat_number_label' => ctrans('texts.vat_number'),
'$client.postal_city_label' => ctrans('texts.postal_city'),
'$quote.quote_number_label' => ctrans('texts.quote_number'),
'$invoice.invoice_no_label' => ctrans('texts.invoice_no'),
'$contact.first_name_label' => ctrans('texts.first_name'),
'$secondary_font_url_label' => ctrans('texts.secondary_font'),
'$contact.signature_label' => ctrans('texts.signature'),
'$product.tax_name1_label' => ctrans('texts.tax_name1'),
'$product.tax_name2_label' => ctrans('texts.tax_name2'),
'$product.tax_name3_label' => ctrans('texts.tax_name3'),
'$product.unit_cost_label' => ctrans('texts.unit_cost'),
'$company.id_number_label' => ctrans('texts.id_number'),
'$quote.valid_until_label' => ctrans('texts.valid_until'),
'$invoice_total_raw_label' => ctrans('texts.invoice_total'),
'$client.vat_number_label' => ctrans('texts.vat_number'),
'$company_logo_size_label' => ctrans('texts.logo'),
'$postal_city_state_label' => ctrans('texts.postal_city_state'),
'$invoice.po_number_label' => ctrans('texts.po_number'),
'$contact.last_name_label' => ctrans('texts.last_name'),
'$contact.full_name_label' => ctrans('texts.full_name'),
'$city_state_postal_label' => ctrans('texts.city_state_postal'),
'$company.country_2_label' => ctrans('texts.country'),
'$custom_surcharge1_label' => ctrans('texts.custom_surcharge1'),
'$custom_surcharge2_label' => ctrans('texts.custom_surcharge2'),
'$custom_surcharge3_label' => ctrans('texts.custom_surcharge3'),
'$custom_surcharge4_label' => ctrans('texts.custom_surcharge4'),
'$quote.balance_due_label' => ctrans('texts.balance_due'),
'$product.product1_label' => ctrans('texts.product1'),
'$product.product2_label' => ctrans('texts.product2'),
'$product.product3_label' => ctrans('texts.product3'),
'$product.product4_label' => ctrans('texts.product4'),
'$statement_amount_label' => ctrans('texts.amount'),
'$task.description_label' => ctrans('texts.description'),
'$product.discount_label' => ctrans('texts.discount'),
'$product.quantity_label' => ctrans('texts.quantity'),
'$entity_issued_to_label' => ctrans('texts.quote_issued_to'),
'$partial_due_date_label' => ctrans('texts.partial_due_date'),
'$invoice.datetime_label' => ctrans('texts.datetime_format_id'),
'$invoice.due_date_label' => ctrans('texts.due_date'),
'$company.address1_label' => ctrans('texts.address1'),
'$company.address2_label' => ctrans('texts.address2'),
'$total_tax_labels_label' => ctrans('texts.total_taxes'),
'$total_tax_values_label' => ctrans('texts.total_taxes'),
'$credit.po_number_label' => ctrans('texts.po_number'),
'$client.id_number_label' => ctrans('texts.id_number'),
'$credit.credit_note_label' => ctrans('texts.credit_note'),
'$assigned_to_user_label' => ctrans('texts.assigned_to'),
'$invoice.discount_label' => ctrans('texts.discount'),
'$invoice.subtotal_label' => ctrans('texts.subtotal'),
'$contact.custom1_label' => ctrans('texts.custom1'),
'$contact.custom2_label' => ctrans('texts.custom2'),
'$contact.custom3_label' => ctrans('texts.custom3'),
'$contact.custom4_label' => ctrans('texts.custom4'),
'$task.line_total_label' => ctrans('texts.line_total'),
'$task.tax_amount_label' => ctrans('texts.tax_amount'),
'$line_tax_labels_label' => ctrans('texts.line_taxes'),
'$line_tax_values_label' => ctrans('texts.line_taxes'),
'$invoice.custom1_label' => ctrans('texts.custom1'),
'$invoice.custom2_label' => ctrans('texts.custom2'),
'$invoice.custom3_label' => ctrans('texts.custom3'),
'$invoice.custom4_label' => ctrans('texts.custom4'),
'$company.custom1_label' => ctrans('texts.custom1'),
'$company.custom2_label' => ctrans('texts.custom2'),
'$company.custom3_label' => ctrans('texts.custom3'),
'$company.custom4_label' => ctrans('texts.custom4'),
'$secondary_color_label' => ctrans('texts.secondary_color'),
'$balance_due_raw_label' => ctrans('texts.balance_due'),
'$entity.datetime_label' => ctrans('texts.datetime_format_id'),
'$credit.datetime_label' => ctrans('texts.datetime_format_id'),
'$client.address2_label' => ctrans('texts.address2'),
'$company.address_label' => ctrans('texts.address'),
'$client.address1_label' => ctrans('texts.address1'),
'$quote.po_number_label' => ctrans('texts.po_number'),
'$client.currency_label' => ctrans('texts.currency'),
'$user.first_name_label' => ctrans('texts.first_name'),
'$created_by_user_label' => ctrans('texts.created_by'),
'$company.country_label' => ctrans('texts.country'),
'$tech_hero_image_label' => '',
'$company.website_label' => ctrans('texts.website'),
'$invoice.balance_label' => ctrans('texts.balance'),
'$client.country_label' => ctrans('texts.country'),
'$task.tax_name1_label' => ctrans('texts.tax_name1'),
'$task.tax_name2_label' => ctrans('texts.tax_name2'),
'$task.tax_name3_label' => ctrans('texts.tax_name3'),
'$payment_button_label' => '',
'$credit.custom1_label' => ctrans('texts.custom1'),
'$credit.custom2_label' => ctrans('texts.custom2'),
'$credit.custom3_label' => ctrans('texts.custom3'),
'$credit.custom4_label' => ctrans('texts.custom4'),
'$emailSignature_label' => ctrans('texts.email_signature'),
'$quote.datetime_label' => ctrans('texts.datetime_format_id'),
'$client.custom1_label' => ctrans('texts.custom1'),
'$client_address_label' => ctrans('texts.address'),
'$client.address_label' => ctrans('texts.address'),
'$payment_qrcode_label' => '',
'$client.custom2_label' => ctrans('texts.custom2'),
'$invoice.number_label' => ctrans('texts.number'),
'$quote.quote_no_label' => ctrans('texts.quote_no'),
'$user.last_name_label' => ctrans('texts.last_name'),
'$client.custom3_label' => ctrans('texts.custom3'),
'$client.website_label' => ctrans('texts.website'),
'$dir_text_align_label' => '',
'$client.custom4_label' => ctrans('texts.custom4'),
'$client.balance_label' => ctrans('texts.balance'),
'$client_balance_label' => ctrans('texts.client_balance'),
'$credit.balance_label' => ctrans('texts.balance'),
'$credit_balance_label' => ctrans('texts.credit_balance'),
'$gross_subtotal_label' => ctrans('texts.subtotal'),
'$invoice.amount_label' => ctrans('texts.amount'),
'$entity_footer_label' => ctrans('texts.footer'),
'$entity_images_label' => '',
'$task.discount_label' => ctrans('texts.discount'),
'$portal_button_label' => '',
'$approveButton_label' => ctrans('texts.approve'),
'$quote.custom1_label' => ctrans('texts.custom1'),
'$quote.custom2_label' => ctrans('texts.custom2'),
'$quote.custom3_label' => ctrans('texts.custom3'),
'$quote.custom4_label' => ctrans('texts.custom4'),
'$company.email_label' => ctrans('texts.email'),
'$primary_color_label' => ctrans('texts.primary_color'),
'$company.phone_label' => ctrans('texts.phone'),
'$exchange_rate_label' => ctrans('texts.exchange_rate'),
'$client.number_label' => ctrans('texts.number'),
'$global_margin_label' => '',
'$contact.phone_label' => ctrans('texts.phone'),
'$company.state_label' => ctrans('texts.state'),
'$credit.number_label' => ctrans('texts.number'),
'$entity_number_label' => ctrans('texts.quote_number'),
'$credit_number_label' => ctrans('texts.credit_number'),
'$client.lang_2_label' => ctrans('texts.language'),
'$contact.email_label' => ctrans('texts.email'),
'$invoice.taxes_label' => ctrans('texts.taxes'),
'$credit_amount_label' => ctrans('texts.credit_amount'),
'$invoice.total_label' => ctrans('texts.total'),
'$product.date_label' => ctrans('texts.date'),
'$product.item_label' => ctrans('texts.item'),
'$public_notes_label' => ctrans('texts.public_notes'),
'$entity.terms_label' => ctrans('texts.terms'),
'$task.service_label' => ctrans('texts.service'),
'$portalButton_label' => '',
'$payment.date_label' => ctrans('texts.date'),
'$client.phone_label' => ctrans('texts.phone'),
'$invoice.date_label' => ctrans('texts.date'),
'$client.state_label' => ctrans('texts.state'),
'$number_short_label' => '',
'$quote.number_label' => ctrans('texts.number'),
'$contact.name_label' => ctrans('texts.name'),
'$company.city_label' => ctrans('texts.city'),
'$company.name_label' => ctrans('texts.name'),
'$company.logo_label' => ctrans('texts.logo'),
'$company_logo_label' => ctrans('texts.logo'),
'$payment_link_label' => ctrans('texts.link'),
'$client.email_label' => ctrans('texts.email'),
'$paid_to_date_label' => ctrans('texts.paid_to_date'),
'$net_subtotal_label' => ctrans('texts.net_subtotal'),
'$credit.total_label' => ctrans('texts.total'),
'$quote.amount_label' => ctrans('texts.amount'),
'$description_label' => ctrans('texts.description'),
'$product.tax_label' => ctrans('texts.tax'),
'$your_entity_label' => ctrans('texts.your_quote'),
'$view_button_label' => ctrans('texts.view'),
'$status_logo_label' => ctrans('texts.logo'),
'$credit.date_label' => ctrans('texts.date'),
'$payment_due_label' => ctrans('texts.payment_due'),
'$invoiceDate_label' => ctrans('texts.date'),
'$valid_until_label' => ctrans('texts.valid_until'),
'$postal_city_label' => ctrans('texts.postal_city'),
'$client_name_label' => ctrans('texts.client_name'),
'$client.name_label' => ctrans('texts.name'),
'$spc_qr_code_label' => '',
'$client.city_label' => ctrans('texts.city'),
'$paymentLink_label' => ctrans('texts.link'),
'$payment_url_label' => ctrans('texts.url'),
'$page_layout_label' => ctrans('texts.page_layout'),
'$balance_due_label' => ctrans('texts.balance_due'),
'$outstanding_label' => ctrans('texts.outstanding'),
'$partial_due_label' => ctrans('texts.partial_due'),
'$quote.total_label' => ctrans('texts.total'),
'$task.task1_label' => ctrans('texts.task1'),
'$task.task2_label' => ctrans('texts.task2'),
'$task.task3_label' => ctrans('texts.task3'),
'$task.task4_label' => ctrans('texts.task4'),
'$task.hours_label' => ctrans('texts.hours'),
'$viewButton_label' => ctrans('texts.view'),
'$quote.date_label' => ctrans('texts.date'),
'$amount_raw_label' => ctrans('texts.amount'),
'$vat_number_label' => ctrans('texts.vat_number'),
'$invoice_no_label' => ctrans('texts.invoice_no'),
'$portal_url_label' => ctrans('texts.url'),
'$amount_due_label' => ctrans('texts.amount_due'),
'$country_2_label' => ctrans('texts.country'),
'$task.date_label' => ctrans('texts.date'),
'$task.rate_label' => ctrans('texts.rate'),
'$task.cost_label' => ctrans('texts.cost'),
'$statement_label' => ctrans('texts.statement'),
'$view_link_label' => ctrans('texts.link'),
'$user_iban_label' => ctrans('texts.iban'),
'$signature_label' => ctrans('texts.signature'),
'$font_size_label' => ctrans('texts.font_size'),
'$po_number_label' => ctrans('texts.po_number'),
'$page_size_label' => ctrans('texts.page_size'),
'$user.name_label' => ctrans('texts.name'),
'$id_number_label' => ctrans('texts.id_number'),
'$credit_no_label' => ctrans('texts.credit_note'),
'$firstName_label' => ctrans('texts.first_name'),
'$font_name_label' => '',
'$auto_bill_label' => ctrans('texts.auto_bill'),
'$payments_label' => ctrans('texts.payments'),
'$shipping_label' => '',
'$task.tax_label' => ctrans('texts.tax'),
'$viewLink_label' => ctrans('texts.link'),
'$company1_label' => ctrans('texts.company1'),
'$company2_label' => ctrans('texts.company2'),
'$company3_label' => ctrans('texts.company3'),
'$company4_label' => ctrans('texts.company4'),
'$due_date_label' => ctrans('texts.due_date'),
'$address2_label' => ctrans('texts.address2'),
'$address1_label' => ctrans('texts.address1'),
'$poNumber_label' => ctrans('texts.po_number'),
'$quote_no_label' => ctrans('texts.quote_no'),
'$autoBill_label' => ctrans('texts.auto_bill'),
'$view_url_label' => ctrans('texts.url'),
'$font_url_label' => '',
'$discount_label' => ctrans('texts.discount'),
'$subtotal_label' => ctrans('texts.subtotal'),
'$country_label' => ctrans('texts.country'),
'$details_label' => ctrans('texts.details'),
'$custom1_label' => ctrans('texts.custom1'),
'$custom2_label' => ctrans('texts.custom2'),
'$custom3_label' => ctrans('texts.custom3'),
'$custom4_label' => ctrans('texts.custom4'),
'$dueDate_label' => ctrans('texts.due_date'),
'$client1_label' => ctrans('texts.client1'),
'$client2_label' => ctrans('texts.client2'),
'$contact_label' => ctrans('texts.contact'),
'$account_label' => '',
'$client3_label' => ctrans('texts.client3'),
'$app_url_label' => ctrans('texts.url'),
'$website_label' => ctrans('texts.website'),
'$client4_label' => ctrans('texts.client4'),
'$balance_label' => ctrans('texts.balance'),
'$partial_label' => ctrans('texts.partial'),
'$footer_label' => ctrans('texts.footer'),
'$entity_label' => ctrans('texts.quote'),
'$thanks_label' => ctrans('texts.thanks'),
'$method_label' => ctrans('texts.method'),
'$client_label' => ctrans('texts.client'),
'$number_label' => ctrans('texts.number'),
'$amount_label' => ctrans('texts.amount'),
'$notes_label' => ctrans('texts.notes'),
'$terms_label' => ctrans('texts.terms'),
'tax_rate1_label' => ctrans('texts.tax_rate1'),
'tax_rate2_label' => ctrans('texts.tax_rate2'),
'tax_rate3_label' => ctrans('texts.tax_rate3'),
'$phone_label' => ctrans('texts.phone'),
'$email_label' => ctrans('texts.email'),
'$taxes_label' => ctrans('texts.taxes'),
'$total_label' => ctrans('texts.total'),
'$from_label' => ctrans('texts.from'),
'$item_label' => ctrans('texts.item'),
'$date_label' => ctrans('texts.date'),
'$tax_label' => ctrans('texts.tax'),
'$dir_label' => '',
'$to_label' => ctrans('texts.to'),
];
}
}