This commit is contained in:
David Bomba 2023-10-30 20:10:19 +11:00
parent 4f5d5ef189
commit 09fecdbfa6
6 changed files with 11 additions and 9 deletions

View File

@ -1 +1 @@
5.7.37 5.7.38

View File

@ -180,7 +180,7 @@ class PreviewInvoiceRequest extends Request
$this->entity_plural = 'credits'; $this->entity_plural = 'credits';
return $this; return $this;
case 'recurring_invoice': case 'recurring_invoice':
$this->entity_plural = 'invoices'; $this->entity_plural = 'recurring_invoices';
return $this; return $this;
default: default:
$this->entity_plural = 'invoices'; $this->entity_plural = 'invoices';

View File

@ -527,8 +527,8 @@ class FacturaEInvoice extends AbstractService
"website" => substr($company->settings->website, 0, 50), "website" => substr($company->settings->website, 0, 50),
// "contactPeople" => substr($company->owner()->present()->name(), 0, 40), // "contactPeople" => substr($company->owner()->present()->name(), 0, 40),
"name" => $company->owner()->present()->firstName(), "name" => $company->owner()->present()->firstName(),
// "firstSurname" => $company->owner()->present()->firstName(), "firstSurname" => $company->owner()->present()->lastName(),
"lastSurname" => $company->owner()->present()->lastName(), // "lastSurname" => $company->owner()->present()->lastName(),
]); ]);
$this->fac->setSeller($seller); $this->fac->setSeller($seller);

View File

@ -1046,6 +1046,8 @@ class PdfBuilder
$variables = $this->service->config->pdf_variables['total_columns']; $variables = $this->service->config->pdf_variables['total_columns'];
nlog($variables);
$elements = [ $elements = [
['element' => 'div', 'properties' => ['style' => 'display: flex; flex-direction: column;'], 'elements' => [ ['element' => 'div', 'properties' => ['style' => 'display: flex; flex-direction: column;'], 'elements' => [
['element' => 'p', 'content' => strtr(str_replace(["labels", "values"], ["",""], $_variables['values']['$entity.public_notes']), $_variables), 'properties' => ['data-ref' => 'total_table-public_notes', 'style' => 'text-align: left;']], ['element' => 'p', 'content' => strtr(str_replace(["labels", "values"], ["",""], $_variables['values']['$entity.public_notes']), $_variables), 'properties' => ['data-ref' => 'total_table-public_notes', 'style' => 'text-align: left;']],
@ -1102,7 +1104,7 @@ class PdfBuilder
foreach ($variables as $variable) { foreach ($variables as $variable) {
if ($variable == '$total_taxes') { if ($variable == '$total_taxes') {
$taxes = $this->service->config->entity->total_tax_map; $taxes = $this->service->config->entity->calc()->getTotalTaxMap();
if (!$taxes) { if (!$taxes) {
continue; continue;
@ -1115,7 +1117,7 @@ class PdfBuilder
]]; ]];
} }
} elseif ($variable == '$line_taxes') { } elseif ($variable == '$line_taxes') {
$taxes = $this->service->config->entity->tax_map; $taxes = $this->service->config->entity->calc()->getTaxMap();
if (!$taxes) { if (!$taxes) {
continue; continue;

View File

@ -85,7 +85,7 @@ class TemplateAction implements ShouldQueue
$template = Design::withTrashed()->find($this->decodePrimaryKey($this->template)); $template = Design::withTrashed()->find($this->decodePrimaryKey($this->template));
$template_service = new TemplateService($template); $template_service = new \App\Services\Template\TemplateService($template);
match($this->entity) { match($this->entity) {
Invoice::class => $resource->with('payments', 'client'), Invoice::class => $resource->with('payments', 'client'),

View File

@ -15,8 +15,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => env('APP_VERSION','5.7.37'), 'app_version' => env('APP_VERSION','5.7.38'),
'app_tag' => env('APP_TAG','5.7.37'), 'app_tag' => env('APP_TAG','5.7.38'),
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''), 'api_secret' => env('API_SECRET', ''),