mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -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 = [
|
||||
'client_details' => [
|
||||
'$client.name',
|
||||
'$client.id_number',
|
||||
'$client.vat_number',
|
||||
'$client.address1',
|
||||
'$client.address2',
|
||||
@ -630,19 +629,17 @@ class CompanySettings extends BaseSettings
|
||||
],
|
||||
'product_columns' => [
|
||||
'$product.product_key',
|
||||
'$product.notes',
|
||||
'$product.cost',
|
||||
'$product.description',
|
||||
'$product.unit_cost',
|
||||
'$product.quantity',
|
||||
'$product.discount',
|
||||
'$product.tax',
|
||||
'$product.line_total',
|
||||
],
|
||||
'task_columns' =>[
|
||||
'$task.product_key',
|
||||
'$task.notes',
|
||||
'$task.description',
|
||||
'$task.rate',
|
||||
'$task.hours',
|
||||
'$task.discount',
|
||||
'$task.tax',
|
||||
'$task.line_total',
|
||||
],
|
||||
|
@ -421,7 +421,7 @@ class BaseController extends Controller
|
||||
$data['report_errors'] = true;
|
||||
}
|
||||
|
||||
$data['hash'] = md5(public_path('main.dart.js'));
|
||||
// $data['hash'] = md5_file(public_path('main.dart.js'));
|
||||
|
||||
$this->buildCache();
|
||||
|
||||
|
@ -152,7 +152,12 @@ class HtmlEngine
|
||||
$data['$discount'] = &$data['$invoice.discount'];
|
||||
$data['$subtotal'] = ['value' => Number::formatMoney($this->entity_calc->getSubTotal(), $this->client) ?: ' ', 'label' => ctrans('texts.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['$invoice.balance_due'] = &$data['$balance_due'];
|
||||
$data['$balance_due'] = &$data['$balance_due'];
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>Invoice Ninja</title>
|
||||
<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>
|
||||
<body style="background-color:#888888;">
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
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 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">
|
||||
<div class="loader"></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user