applied new features of money package

This commit is contained in:
Denis Duliçi
2023-07-11 12:03:14 +03:00
parent 20e5b57562
commit bfb37c62c6
51 changed files with 110 additions and 105 deletions

View File

@ -62,7 +62,7 @@
<span>
<x-date :date="$transaction->paid_at" />
- {!! trans('documents.transaction', [
'amount' => '<span class="font-medium">' . money($transaction->amount, $transaction->currency_code, true) . '</span>',
'amount' => '<span class="font-medium">' . money($transaction->amount, $transaction->currency_code) . '</span>',
'account' => '<span class="font-medium">' . $transaction->account->name . '</span>',
]) !!}
</span>
@ -103,7 +103,7 @@
@php
$message = trans('general.delete_confirm', [
'name' => '<strong>' . Date::parse($transaction->paid_at)->format(company_date_format()) . ' - ' . money($transaction->amount, $transaction->currency_code, true) . ' - ' . $transaction->account->name . '</strong>',
'name' => '<strong>' . Date::parse($transaction->paid_at)->format(company_date_format()) . ' - ' . money($transaction->amount, $transaction->currency_code) . ' - ' . $transaction->account->name . '</strong>',
'type' => strtolower(trans_choice('general.transactions', 1))
]);
@endphp

View File

@ -45,7 +45,7 @@
<span>
<x-date :date="$transaction->paid_at" />
- {!! trans('documents.transaction', [
'amount' => '<span class="font-medium">' . money($transaction->amount, $transaction->currency_code, true) . '</span>',
'amount' => '<span class="font-medium">' . money($transaction->amount, $transaction->currency_code) . '</span>',
'account' => '<span class="font-medium">' . $transaction->account->name . '</span>',
]) !!}
</span>
@ -86,7 +86,7 @@
@php
$message = trans('general.delete_confirm', [
'name' => '<strong>' . Date::parse($transaction->paid_at)->format(company_date_format()) . ' - ' . money($transaction->amount, $transaction->currency_code, true) . ' - ' . $transaction->account->name . '</strong>',
'name' => '<strong>' . Date::parse($transaction->paid_at)->format(company_date_format()) . ' - ' . money($transaction->amount, $transaction->currency_code) . ' - ' . $transaction->account->name . '</strong>',
'type' => strtolower(trans_choice('general.transactions', 1))
]);
@endphp

View File

@ -4,8 +4,8 @@
<tr class="px-3">
<th class="{{ $class->column_name_width }} text-uppercase text-left">{{ trans_choice('general.totals', 1) }}</th>
@foreach($class->footer_totals[$table_key] as $total)
<th class="{{ $class->column_value_width }} text-right px-0">{{ $class->has_money ? money($total, default_currency(), true) : $total }}</th>
<th class="{{ $class->column_value_width }} text-right px-0">{{ $class->has_money ? money($total) : $total }}</th>
@endforeach
<th class="{{ $class->column_name_width }} text-right pl-0 pr-4">{{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }}</th>
<th class="{{ $class->column_name_width }} text-right pl-0 pr-4">{{ $class->has_money ? money($grand_total) : $grand_total }}</th>
</tr>
</tfoot>

View File

@ -14,9 +14,9 @@
@endif
@foreach($rows as $row)
<td class="{{ $class->column_value_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs">{{ $class->has_money ? money($row, default_currency(), true) : $row }}</td>
<td class="{{ $class->column_value_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs">{{ $class->has_money ? money($row) : $row }}</td>
@endforeach
<td class="{{ $class->column_name_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs uppercase">{{ $class->has_money ? money($row_total, default_currency(), true) : $row }}</td>
<td class="{{ $class->column_name_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs uppercase">{{ $class->has_money ? money($row_total) : $row }}</td>
</tr>
@endif
@endif
@ -57,9 +57,9 @@
</div>
</td>
@foreach($parent_row_values as $row)
<td class="{{ $class->column_value_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs">{{ $class->has_money ? money($row, default_currency(), true) : $row }}</td>
<td class="{{ $class->column_value_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs">{{ $class->has_money ? money($row) : $row }}</td>
@endforeach
<td class="{{ $class->column_name_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs uppercase">{{ $class->has_money ? money($row_total, default_currency(), true) : $row }}</td>
<td class="{{ $class->column_name_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs uppercase">{{ $class->has_money ? money($row_total) : $row }}</td>
</tr>
@endif
@ -69,9 +69,9 @@
<tr class="hover:bg-gray-100 border-b collapse-sub collapse-sub-report" data-collapse="child-{{ $id }}">
<td class="{{ $class->column_name_width }} py-2 text-left text-black-400" style="padding-left: {{ ($tree_level + 1) * 20 }}px;" title="{{ $class->row_names[$table_key][$id] }}">{{ $class->row_names[$table_key][$id] }}</td>
@foreach($rows as $row)
<td class="{{ $class->column_value_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs">{{ $class->has_money ? money($row, default_currency(), true) : $row }}</td>
<td class="{{ $class->column_value_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs">{{ $class->has_money ? money($row) : $row }}</td>
@endforeach
<td class="{{ $class->column_name_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs uppercase">{{ $class->has_money ? money($row_total, default_currency(), true) : $row }}</td>
<td class="{{ $class->column_name_width }} py-2 ltr:text-right rtl:text-left text-alignment-right text-black-400 text-xs uppercase">{{ $class->has_money ? money($row_total) : $row }}</td>
</tr>
@endif

View File

@ -1,12 +1,12 @@
<div>
<div
<div
@class([
'd-flex align-items-center justify-content-between rp-border-bottom-1 text' => $is_print,
'flex items-center justify-between text-xl text-black-400 border-b pb-2' => !$is_print
])
>
<h2>{{ $table_name }}</h2>
<span>{{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }}</span>
<span>{{ $class->has_money ? money($grand_total) : $grand_total }}</span>
</div>
@if (!empty($class->row_values[$table_key]))
<ul

View File

@ -28,7 +28,7 @@
@endif
<span>{{ $class->row_names[$table_key][$id] }}</span>
</div>
<span>{{ $class->has_money ? money($row_total, default_currency(), true) : $row_total }}</span>
<span>{{ $class->has_money ? money($row_total) : $row_total }}</span>
</div>
</li>
@endif
@ -73,7 +73,7 @@
@endif
@endif
</div>
<span>{{ $class->has_money ? money($row_total, default_currency(), true) : $row_total }}</span>
<span>{{ $class->has_money ? money($row_total) : $row_total }}</span>
</div>
</li>
@endif
@ -91,7 +91,7 @@
<div style="display:flex; align-items: center; padding-left: {{ ($tree_level + 1) * 20 }}px;">
<span>{{ $class->row_names[$table_key][$id] }}</span>
</div>
<span>{{ $class->has_money ? money($row_total, default_currency(), true) : $row_total }}</span>
<span>{{ $class->has_money ? money($row_total) : $row_total }}</span>
</div>
</li>
@endif

View File

@ -7,9 +7,9 @@
@foreach ($payments as $item)
<span class="text-xs mb-3">
@if (! $item->document)
{{ trans('portal.payment_history.description', ['date' => company_date($item->created_at), 'amount' => money($item->amount, $item->currency_code, true)]) }}
{{ trans('portal.payment_history.description', ['date' => company_date($item->created_at), 'amount' => money($item->amount, $item->currency_code)]) }}
@else
{{ trans('portal.payment_history.invoice_description', ['date' => company_date($item->created_at), 'amount' => money($item->amount, $item->currency_code, true), 'invoice_nember' => $item->document->document_number]) }}
{{ trans('portal.payment_history.invoice_description', ['date' => company_date($item->created_at), 'amount' => money($item->amount, $item->currency_code), 'invoice_nember' => $item->document->document_number]) }}
@endif
</span>
@endforeach