mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 15:34:37 -04:00
Refactor defaults for invoice PDF
This commit is contained in:
parent
fe5218fd2c
commit
b1591632d8
@ -583,7 +583,6 @@ class CompanySettings extends BaseSettings
|
|||||||
$variables = [
|
$variables = [
|
||||||
'client_details' => [
|
'client_details' => [
|
||||||
'$client.name',
|
'$client.name',
|
||||||
'$client.id_number',
|
|
||||||
'$client.vat_number',
|
'$client.vat_number',
|
||||||
'$client.address1',
|
'$client.address1',
|
||||||
'$client.address2',
|
'$client.address2',
|
||||||
@ -630,19 +629,17 @@ class CompanySettings extends BaseSettings
|
|||||||
],
|
],
|
||||||
'product_columns' => [
|
'product_columns' => [
|
||||||
'$product.product_key',
|
'$product.product_key',
|
||||||
'$product.notes',
|
'$product.description',
|
||||||
'$product.cost',
|
'$product.unit_cost',
|
||||||
'$product.quantity',
|
'$product.quantity',
|
||||||
'$product.discount',
|
|
||||||
'$product.tax',
|
'$product.tax',
|
||||||
'$product.line_total',
|
'$product.line_total',
|
||||||
],
|
],
|
||||||
'task_columns' =>[
|
'task_columns' =>[
|
||||||
'$task.product_key',
|
'$task.product_key',
|
||||||
'$task.notes',
|
'$task.description',
|
||||||
'$task.rate',
|
'$task.rate',
|
||||||
'$task.hours',
|
'$task.hours',
|
||||||
'$task.discount',
|
|
||||||
'$task.tax',
|
'$task.tax',
|
||||||
'$task.line_total',
|
'$task.line_total',
|
||||||
],
|
],
|
||||||
|
@ -421,7 +421,7 @@ class BaseController extends Controller
|
|||||||
$data['report_errors'] = true;
|
$data['report_errors'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['hash'] = md5(public_path('main.dart.js'));
|
// $data['hash'] = md5_file(public_path('main.dart.js'));
|
||||||
|
|
||||||
$this->buildCache();
|
$this->buildCache();
|
||||||
|
|
||||||
|
@ -152,7 +152,12 @@ class HtmlEngine
|
|||||||
$data['$discount'] = &$data['$invoice.discount'];
|
$data['$discount'] = &$data['$invoice.discount'];
|
||||||
$data['$subtotal'] = ['value' => Number::formatMoney($this->entity_calc->getSubTotal(), $this->client) ?: ' ', 'label' => ctrans('texts.subtotal')];
|
$data['$subtotal'] = ['value' => Number::formatMoney($this->entity_calc->getSubTotal(), $this->client) ?: ' ', 'label' => ctrans('texts.subtotal')];
|
||||||
$data['$invoice.subtotal'] = &$data['$subtotal'];
|
$data['$invoice.subtotal'] = &$data['$subtotal'];
|
||||||
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->balance, $this->client) ?: ' ', 'label' => ctrans('texts.balance_due')];
|
|
||||||
|
if($this->entity->partial > 0)
|
||||||
|
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->partial, $this->client) ?: ' ', 'label' => ctrans('texts.balance_due')];
|
||||||
|
else
|
||||||
|
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->balance, $this->client) ?: ' ', 'label' => ctrans('texts.balance_due')];
|
||||||
|
|
||||||
$data['$quote.balance_due'] = &$data['$balance_due'];
|
$data['$quote.balance_due'] = &$data['$balance_due'];
|
||||||
$data['$invoice.balance_due'] = &$data['$balance_due'];
|
$data['$invoice.balance_due'] = &$data['$balance_due'];
|
||||||
$data['$balance_due'] = &$data['$balance_due'];
|
$data['$balance_due'] = &$data['$balance_due'];
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Invoice Ninja</title>
|
<title>Invoice Ninja</title>
|
||||||
<meta name="google-signin-client_id" content="{{ config('services.google.client_id') }}">
|
<meta name="google-signin-client_id" content="{{ config('services.google.client_id') }}">
|
||||||
<link rel="manifest" href="manifest.json?v={{ $hash }}">
|
<link rel="manifest" href="manifest.json?v={{ config('ninja.app_version') }}">
|
||||||
</head>
|
</head>
|
||||||
<body style="background-color:#888888;">
|
<body style="background-color:#888888;">
|
||||||
|
|
||||||
@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
window.addEventListener('load', function () {
|
window.addEventListener('load', function () {
|
||||||
navigator.serviceWorker.register('/flutter_service_worker.js?v={{ $hash }}');
|
navigator.serviceWorker.register('/flutter_service_worker.js?v={{ config('ninja.app_version') }}');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +97,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script defer src="main.dart.js?v={{ $hash }}" type="application/javascript"></script>
|
<script defer src="main.dart.js?v={{ config('ninja.app_version') }}" type="application/javascript"></script>
|
||||||
|
|
||||||
<center style="padding-top: 150px" id="loader">
|
<center style="padding-top: 150px" id="loader">
|
||||||
<div class="loader"></div>
|
<div class="loader"></div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user