mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 05:14:30 -04:00
Template previews
This commit is contained in:
parent
fb27bd99e5
commit
a8eee34623
@ -62,7 +62,7 @@ class TemplateAction implements ShouldQueue
|
|||||||
private string $template,
|
private string $template,
|
||||||
private string $entity,
|
private string $entity,
|
||||||
private int $user_id,
|
private int $user_id,
|
||||||
private Company $company,
|
public Company $company,
|
||||||
private string $db,
|
private string $db,
|
||||||
private string $hash,
|
private string $hash,
|
||||||
private bool $send_email = false
|
private bool $send_email = false
|
||||||
@ -109,9 +109,12 @@ class TemplateAction implements ShouldQueue
|
|||||||
$data[$key] = $result;
|
$data[$key] = $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ts = $template_service->build($data);
|
|
||||||
|
|
||||||
// nlog($ts->getHtml());
|
$ts = $template_service
|
||||||
|
->setCompany($this->company)
|
||||||
|
->build($data);
|
||||||
|
|
||||||
|
nlog($ts->getHtml());
|
||||||
|
|
||||||
if($this->send_email) {
|
if($this->send_email) {
|
||||||
$pdf = $ts->getPdf();
|
$pdf = $ts->getPdf();
|
||||||
|
@ -214,7 +214,7 @@ class TemplateService
|
|||||||
{
|
{
|
||||||
|
|
||||||
$this->data = $this->preProcessDataBlocks($data);
|
$this->data = $this->preProcessDataBlocks($data);
|
||||||
|
nlog($this->data);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,7 +596,7 @@ class TemplateService
|
|||||||
'balance_raw' => ($payment->amount - $payment->refunded - $payment->applied),
|
'balance_raw' => ($payment->amount - $payment->refunded - $payment->applied),
|
||||||
'date' => $this->translateDate($payment->date, $payment->client->date_format(), $payment->client->locale()),
|
'date' => $this->translateDate($payment->date, $payment->client->date_format(), $payment->client->locale()),
|
||||||
'method' => $payment->translatedType(),
|
'method' => $payment->translatedType(),
|
||||||
'currency' => $payment->currency->code,
|
'currency' => $payment->currency->code ?? $this->company->currency()->code,
|
||||||
'exchange_rate' => $payment->exchange_rate,
|
'exchange_rate' => $payment->exchange_rate,
|
||||||
'transaction_reference' => $payment->transaction_reference,
|
'transaction_reference' => $payment->transaction_reference,
|
||||||
'is_manual' => $payment->is_manual,
|
'is_manual' => $payment->is_manual,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user