-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
script.blade.php
28 lines (24 loc) · 1004 Bytes
/
script.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@push('scripts_start')
@php
$document_items = 'false';
$document_app_env = env('APP_ENV');
if ($items) {
$document_items = json_encode($items);
} else if (old('items')) {
$document_items = json_encode(old('items'));
}
@endphp
<script type="text/javascript">
var document_items = {!! $document_items !!};
var document_default_currency = '{{ $currency_code }}';
var document_currencies = {!! $currencies !!};
var document_taxes = {!! $taxes !!};
var document_app_env = '{{ $document_app_env }}';
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($document) ? $document->currency : company()->currency) !!};
} else {
var aka_currency = {!! json_encode(! empty($document) ? $document->currency : company()->currency) !!};
}
</script>
@endpush
<x-script :alias="$alias" :folder="$folder" :file="$file" />