mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for email templates
This commit is contained in:
parent
59dd3d8982
commit
546e1b56dc
@ -1386,18 +1386,17 @@ class AccountController extends BaseController
|
|||||||
public function previewEmail(TemplateService $templateService)
|
public function previewEmail(TemplateService $templateService)
|
||||||
{
|
{
|
||||||
$template = Input::get('template');
|
$template = Input::get('template');
|
||||||
$invoice = Invoice::scope()
|
$invitation = \App\Models\Invitation::scope()
|
||||||
->invoices()
|
->with('invoice.client.contacts')
|
||||||
->withTrashed()
|
->first();
|
||||||
->first();
|
|
||||||
|
|
||||||
if (! $invoice) {
|
if (! $invitation) {
|
||||||
return trans('texts.create_invoice_for_sample');
|
return trans('texts.create_invoice_for_sample');
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var \App\Models\Account $account */
|
/** @var \App\Models\Account $account */
|
||||||
$account = Auth::user()->account;
|
$account = Auth::user()->account;
|
||||||
$invitation = $invoice->invitations->first();
|
$invoice = $invitation->invoice;
|
||||||
|
|
||||||
// replace the variables with sample data
|
// replace the variables with sample data
|
||||||
$data = [
|
$data = [
|
||||||
|
@ -2416,7 +2416,7 @@ $LANG = array(
|
|||||||
'online_payment_surcharge' => 'Online Payment Surcharge',
|
'online_payment_surcharge' => 'Online Payment Surcharge',
|
||||||
'gateway_fees' => 'Gateway Fees',
|
'gateway_fees' => 'Gateway Fees',
|
||||||
'fees_disabled' => 'Fees are disabled',
|
'fees_disabled' => 'Fees are disabled',
|
||||||
'gateway_fees_help' => 'Automatically add an online payment surcharge or line item.<br/>Surcharges aren\'t affected by discounts, line item supports partial payments.',
|
'gateway_fees_help' => 'Automatically add an online payment surcharge or line item.<br/>Surcharges aren\'t affected by discounts, line items support partial payments.',
|
||||||
'gateway' => 'Gateway',
|
'gateway' => 'Gateway',
|
||||||
'gateway_fee_change_warning' => 'If there are unpaid invoices with fees they need to be removed to prevent duplicate fees from being charged.',
|
'gateway_fee_change_warning' => 'If there are unpaid invoices with fees they need to be removed to prevent duplicate fees from being charged.',
|
||||||
'fees_surcharge_help' => 'Customize surcharge :link.',
|
'fees_surcharge_help' => 'Customize surcharge :link.',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user