Fixed document transaction currency issue..

This commit is contained in:
Cüneyt Şentürk 2024-02-19 13:53:25 +03:00
parent ab2325d43c
commit 4a5d698edb
11 changed files with 20 additions and 20 deletions

View File

@ -66,9 +66,9 @@
@push('scripts_start')
<script type="text/javascript">
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
} else {
var aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
var aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
}
</script>
@endpush

View File

@ -64,9 +64,9 @@
@push('scripts_start')
<script type="text/javascript">
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($account) ? $account->currency : company()->currency) !!};
aka_currency = {!! json_encode(! empty($account) ? $account->currency : config('money.currencies.' . company()->currency)) !!};
} else {
var aka_currency = {!! json_encode(! empty($account) ? $account->currency : company()->currency) !!};
var aka_currency = {!! json_encode(! empty($account) ? $account->currency : config('money.currencies.' . company()->currency)) !!};
}
</script>
@endpush

View File

@ -109,9 +109,9 @@
@push('scripts_start')
<script type="text/javascript">
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
} else {
var aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
var aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
}
</script>
@endpush

View File

@ -114,9 +114,9 @@
@push('scripts_start')
<script type="text/javascript">
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($recurring_transaction) ? $recurring_transaction->currency : company()->currency) !!};
aka_currency = {!! json_encode(! empty($recurring_transaction) ? $recurring_transaction->currency : config('money.currencies.' . company()->currency)) !!};
} else {
var aka_currency = {!! json_encode(! empty($recurring_transaction) ? $recurring_transaction->currency : company()->currency) !!};
var aka_currency = {!! json_encode(! empty($recurring_transaction) ? $recurring_transaction->currency : config('money.currencies.' . company()->currency)) !!};
}
</script>
@endpush

View File

@ -78,9 +78,9 @@
var transaction_taxes = {!! $taxes !!};
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
} else {
var aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
var aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
}
</script>
@endpush

View File

@ -102,9 +102,9 @@
var transaction_taxes = {!! $taxes !!};
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($transaction) ? $transaction->currency : company()->currency) !!};
aka_currency = {!! json_encode(! empty($transaction) ? $transaction->currency : config('money.currencies.' . company()->currency)) !!};
} else {
var aka_currency = {!! json_encode(! empty($transaction) ? $transaction->currency : company()->currency) !!};
var aka_currency = {!! json_encode(! empty($transaction) ? $transaction->currency : config('money.currencies.' . company()->currency)) !!};
}
</script>
@endpush

View File

@ -71,9 +71,9 @@
@push('scripts_start')
<script type="text/javascript">
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
} else {
var aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
var aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
}
</script>
@endpush

View File

@ -83,9 +83,9 @@
var transfer_edit = {{ $transfer->id }};
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
} else {
var aka_currency = {!! json_encode(! empty($currency) ? $currency : company()->currency) !!};
var aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
}
</script>
@endpush

View File

@ -18,9 +18,9 @@
var document_app_env = '{{ $document_app_env }}';
if (typeof aka_currency !== 'undefined') {
aka_currency = {!! json_encode(! empty($document) ? $document->currency : company()->currency) !!};
aka_currency = {!! json_encode(! empty($document) ? $document->currency : config('money.currencies.' . company()->currency)) !!};
} else {
var aka_currency = {!! json_encode(! empty($document) ? $document->currency : company()->currency) !!};
var aka_currency = {!! json_encode(! empty($document) ? $document->currency : config('money.currencies.' . company()->currency)) !!};
}
</script>
@endpush

View File

@ -41,5 +41,5 @@
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
@endpush
<x-documents.script type="bill" />
<x-documents.script type="bill" :document="$bill" />
</x-layouts.admin>

View File

@ -23,5 +23,5 @@
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
@endpush
<x-documents.script type="invoice" />
<x-documents.script type="invoice" :document="$invoice" />
</x-layouts.admin>