Skip to content

Commit

Permalink
Fixed document transaction currency issue..
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Feb 19, 2024
1 parent ab2325d commit 4a5d698
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions resources/views/banking/accounts/create.blade.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions resources/views/banking/accounts/edit.blade.php
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions resources/views/banking/recurring_transactions/edit.blade.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions resources/views/banking/transactions/create.blade.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions resources/views/banking/transactions/edit.blade.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions resources/views/banking/transfers/create.blade.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions resources/views/banking/transfers/edit.blade.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/documents/script.blade.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion resources/views/purchases/bills/show.blade.php
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion resources/views/sales/invoices/show.blade.php
Expand Up @@ -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>

0 comments on commit 4a5d698

Please sign in to comment.