Merge branch 'master' into title-subheading
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
<thead class="border-b">
|
||||
<tr>
|
||||
@stack('move_th_start')
|
||||
|
||||
<th class="w-6 block text-left border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
|
||||
@if (! $hideEditItemColumns)
|
||||
<x-documents.form.item-columns :type="$type" />
|
||||
@ -29,53 +30,85 @@
|
||||
<th class="px-3 py-1 ltr:pl-2 rtl:pr-2 ltr:text-left rtl:text-right text-xs font-normal border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
|
||||
@if (! $hideItemName)
|
||||
{{ (trans_choice($textItemName, 2) != $textItemName) ? trans_choice($textItemName, 2) : trans($textItemName) }}
|
||||
|
||||
@if ($hideSettingItemName)
|
||||
|
||||
<x-tooltip id="tooltip-item-price" placement="top" message="{{ trans('documents.item_price_hidden', ['type' => config('type.document.' . $type . '.translation.prefix')]) }}">
|
||||
<x-icon icon="visibility_off" class="text-sm font-normal"></x-icon>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
@endif
|
||||
</th>
|
||||
|
||||
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('move_th_start')
|
||||
@stack('description_th_start')
|
||||
|
||||
<th class="px-3 py-1 text-left text-xs font-normal border-t-0 border-r-0 border-b-0" style=" vertical-align:bottom;">
|
||||
@if (! $hideItemDescription)
|
||||
{{ trans($textItemDescription) }}
|
||||
|
||||
@if ($hideSettingItemDescription)
|
||||
|
||||
<x-tooltip id="tooltip-item-price" placement="top" message="{{ trans('documents.item_price_hidden', ['type' => config('type.document.' . $type . '.translation.prefix')]) }}">
|
||||
<x-icon icon="visibility_off" class="text-sm font-normal"></x-icon>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
@endif
|
||||
</th>
|
||||
|
||||
|
||||
@stack('move_th_end')
|
||||
@stack('description_th_end')
|
||||
@endif
|
||||
|
||||
@stack('quantity_th_start')
|
||||
|
||||
<th class="px-3 py-1 ltr:text-left rtl:text-right text-xs font-normal border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
|
||||
@if (! $hideItemQuantity)
|
||||
@if (! $hideItemQuantity)
|
||||
{{ trans($textItemQuantity) }}
|
||||
|
||||
@if ($hideSettingItemQuantity)
|
||||
|
||||
<x-tooltip id="tooltip-item-price" placement="top" message="{{ trans('documents.item_price_hidden', ['type' => config('type.document.' . $type . '.translation.prefix')]) }}">
|
||||
<x-icon icon="visibility_off" class="text-sm font-normal"></x-icon>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
@endif
|
||||
</th>
|
||||
|
||||
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
|
||||
<th class="px-3 py-1 ltr:text-left rtl:text-right text-xs font-normal border-t-0 border-r-0 border-b-0 pr-1" style="vertical-align:bottom;">
|
||||
@if (! $hideItemPrice)
|
||||
@if (! $hideItemPrice)
|
||||
{{ trans($textItemPrice) }}
|
||||
|
||||
@if ($hideSettingItemPrice)
|
||||
|
||||
<x-tooltip id="tooltip-item-price" placement="top" message="{{ trans('documents.item_price_hidden', ['type' => config('type.document.' . $type . '.translation.prefix')]) }}">
|
||||
<x-icon icon="visibility_off" class="text-sm font-normal"></x-icon>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
@endif
|
||||
</th>
|
||||
|
||||
|
||||
@stack('price_th_end')
|
||||
|
||||
@stack('total_th_start')
|
||||
|
||||
<th class="px-3 py-1 ltr:text-right rtl:text-left text-xs font-normal border-t-0 border-b-0 item-total" style="vertical-align:bottom;">
|
||||
@if (! $hideItemAmount)
|
||||
@if (! $hideItemAmount)
|
||||
{{ trans($textItemAmount) }}
|
||||
|
||||
@if ($hideSettingItemAmount)
|
||||
|
||||
<x-tooltip id="tooltip-item-price" placement="top" message="{{ trans('documents.item_price_hidden', ['type' => config('type.document.' . $type . '.translation.prefix')]) }}">
|
||||
<x-icon icon="visibility_off" class="text-sm font-normal"></x-icon>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
@endif
|
||||
</th>
|
||||
|
||||
|
||||
@stack('total_th_end')
|
||||
|
||||
@stack('remove_th_start')
|
||||
@ -109,4 +142,4 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,17 +19,20 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
@stack('move_td_start')
|
||||
|
||||
<td class="align-middle border-b-0 flex items-center justify-center" style="width:24px; height:100px; color: #8898aa;">
|
||||
<div class="handle mt-2 hidden lg:block cursor-move">
|
||||
<span class="w-6 material-icons">list</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@stack('move_td_end')
|
||||
|
||||
@stack('items_td_start')
|
||||
|
||||
@if (! $hideItems || (! $hideItemName && ! $hideItemDescription))
|
||||
@stack('name_td_start')
|
||||
|
||||
<td class="px-3 py-3 ltr:pl-2 rtl:pr-2 ltr:text-left rtl:text-right align-middle border-b-0 name">
|
||||
@if (! $hideItemName)
|
||||
<span class="flex items-center text-sm" tabindex="0" v-if="row.item_id">
|
||||
@ -123,28 +126,26 @@
|
||||
@stack('price_td_start')
|
||||
|
||||
<td class="px-3 py-3 pr-1 border-b-0 price">
|
||||
@if (! $hideItemPrice)
|
||||
<div>
|
||||
@stack('price_input_start')
|
||||
<div>
|
||||
@stack('price_input_start')
|
||||
|
||||
<x-form.input.money
|
||||
name="price"
|
||||
value="0"
|
||||
row-input
|
||||
data-item="price"
|
||||
v-model="row.price"
|
||||
v-error="form.errors.get('items.' + index + '.price')"
|
||||
v-error-message="form.errors.get('items.' + index + '.price')"
|
||||
change="row.price = $event; form.errors.clear('items.' + index + '.price'); onCalculateTotal"
|
||||
:currency="$currency"
|
||||
dynamicCurrency="currency"
|
||||
money-class="text-right mt-0"
|
||||
form-group-class="text-right"
|
||||
/>
|
||||
<x-form.input.money
|
||||
name="price"
|
||||
value="0"
|
||||
row-input
|
||||
data-item="price"
|
||||
v-model="row.price"
|
||||
v-error="form.errors.get('items.' + index + '.price')"
|
||||
v-error-message="form.errors.get('items.' + index + '.price')"
|
||||
change="row.price = $event; form.errors.clear('items.' + index + '.price'); onCalculateTotal"
|
||||
:currency="$currency"
|
||||
dynamicCurrency="currency"
|
||||
money-class="text-right mt-0"
|
||||
form-group-class="text-right"
|
||||
/>
|
||||
|
||||
@stack('price_input_end')
|
||||
</div>
|
||||
@endif
|
||||
@stack('price_input_end')
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@stack('price_td_end')
|
||||
@ -230,7 +231,7 @@
|
||||
:class="[{'btn-outline-primary' : row.discount_type !== 'fixed'}, {'bg-white rounded-lg' : row.discount_type === 'fixed'}]"
|
||||
@click="onChangeLineDiscountType(index, 'fixed')"
|
||||
>
|
||||
<span class="text-base">{{ $currency->symbol }}</span>
|
||||
<span class="text-base">{{ ($currency) ? $currency->symbol : '$' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -272,7 +273,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="pl-2 group">
|
||||
<div class="ltr:pl-2 rtl:pr-2 group">
|
||||
<button type="button" @click="onDeleteDiscount(index)" class="w-6 h-7 flex items-center rounded-lg p-0 group-hover:bg-gray-100">
|
||||
<span class="w-full material-icons-outlined text-lg text-gray-300 group-hover:text-gray-500">delete</span>
|
||||
</button>
|
||||
@ -283,7 +284,7 @@
|
||||
<div class="flex items-center justify-between h-10 ml-3 my-3" v-for="(row_tax, row_tax_index) in row.tax_ids"
|
||||
:index="row_tax_index"
|
||||
>
|
||||
<span class="absolute text-sm ltr:-ml-7 rtl:-mr-7">{{ trans_choice('general.taxes', 1) }}</span>
|
||||
<span class="absolute text-sm ltr:right-1/2 rtl:left-1/2 ltr:-ml-7 rtl:-mr-7">{{ trans_choice('general.taxes', 1) }}</span>
|
||||
|
||||
<div class="lg:w-1/4 lg:absolute">
|
||||
@stack('taxes_input_start')
|
||||
@ -347,7 +348,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="pl-2 group">
|
||||
<div class="ltr:pl-2 rtl:pr-2 group">
|
||||
<button type="button" @click="onDeleteTax(index, row_tax_index)" class="w-6 h-7 flex items-center rounded-lg p-0 group-hover:bg-gray-100">
|
||||
<span class="w-full material-icons-outlined text-lg text-gray-300 group-hover:text-gray-500">delete</span>
|
||||
</button>
|
||||
@ -356,7 +357,7 @@
|
||||
</div>
|
||||
|
||||
<div v-if="row.add_tax" class="flex items-center justify-between h-10 ml-3 my-3" :class="{'pt-2' : row.add_discount}">
|
||||
<span class="absolute text-sm ltr:-ml-7 rtl:-mr-7">{{ trans_choice('general.taxes', 1) }}</span>
|
||||
<span class="absolute text-sm ltr:right-1/2 rtl:left-1/2 ltr:-ml-7 rtl:-mr-7">{{ trans_choice('general.taxes', 1) }}</span>
|
||||
|
||||
<div class="lg:w-1/4 lg:absolute">
|
||||
@stack('taxes_input_start')
|
||||
@ -412,7 +413,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pl-2 group">
|
||||
<div class="ltr:pl-2 rtl:pr-2 group">
|
||||
<button type="button" @click="onDeleteTax(index, 999)" class="w-6 h-7 flex items-center rounded-lg p-0 group-hover:bg-gray-100">
|
||||
<span class="w-full material-icons-outlined text-lg text-gray-300 group-hover:text-gray-500">delete</span>
|
||||
</button>
|
||||
|
@ -163,7 +163,7 @@
|
||||
@if (! $hideAmount)
|
||||
<x-table.td class="{{ $classAmount }}" kind="amount">
|
||||
@stack('amount_td_inside_start')
|
||||
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
|
||||
<x-money :amount="$item->amount" :currency="$item->currency_code" />
|
||||
@stack('amount_td_inside_end')
|
||||
</x-table.td>
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
||||
</div>
|
||||
|
||||
<span class="font-normal">
|
||||
<x-money :amount="$document_item->price" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$document_item->price" :currency="$document->currency_code" />
|
||||
</span>
|
||||
|
||||
<div class="w-40 font-normal text-sm truncate">
|
||||
@ -100,7 +100,7 @@
|
||||
|
||||
@if ($document->paid)
|
||||
<span>
|
||||
<x-money :amount="$document->paid" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$document->paid" :currency="$document->currency_code" />
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
@ -111,7 +111,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<x-money :amount="$document->amount" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$document->amount" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -97,7 +97,7 @@
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-4/12 sm:w-2/12" kind="amount">
|
||||
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
|
||||
<x-money :amount="$item->amount" :currency="$item->currency_code" />
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td kind="action">
|
||||
|
@ -34,6 +34,10 @@
|
||||
@if ($document->status == 'draft')
|
||||
<x-documents.show.message type="status" background-color="bg-red-100" text-color="text-red-600" message="{!! trans($textStatusMessage) !!}" />
|
||||
@endif
|
||||
|
||||
@if (! $document->totals->count())
|
||||
<x-documents.show.message type="status" background-color="bg-red-100" text-color="text-red-600" message="{!! trans('invoices.messages.totals_required', ['type' => $type]) !!}" />
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('status_message_end')
|
||||
|
@ -11,9 +11,13 @@
|
||||
|
||||
<x-slot name="body">
|
||||
<div class="flex">
|
||||
<x-link href="{{ route($editRoute, $document->id) }}" id="show-slider-actions-edit-{{ $document->type }}" @click="e => e.target.classList.add('disabled')">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
@if (! $hideEdit)
|
||||
@can($permissionUpdate)
|
||||
<x-link href="{{ route($editRoute, $document->id) }}" id="show-slider-actions-edit-{{ $document->type }}" @click="e => e.target.classList.add('disabled')">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
@endcan
|
||||
@endif
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-show.accordion>
|
||||
|
@ -11,15 +11,23 @@
|
||||
@stack('timeline_get_paid_body_button_payment_start')
|
||||
|
||||
@if (! $hideAddPayment)
|
||||
@if ($document->status != 'paid' && (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)))
|
||||
<x-button
|
||||
@click="onAddPayment('{{ route('modals.documents.document.transactions.create', $document->id) }}')"
|
||||
id="show-slider-actions-payment-{{ $document->type }}"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
|
||||
override="class"
|
||||
>
|
||||
{{ trans('invoices.add_payment') }}
|
||||
</x-button>
|
||||
@if ($document->totals->count())
|
||||
@if ($document->status != 'paid' && (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)))
|
||||
<x-button
|
||||
@click="onAddPayment('{{ route('modals.documents.document.transactions.create', $document->id) }}')"
|
||||
id="show-slider-actions-payment-{{ $document->type }}"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
|
||||
override="class"
|
||||
>
|
||||
{{ trans('invoices.add_payment') }}
|
||||
</x-button>
|
||||
@endif
|
||||
@else
|
||||
<x-tooltip message="{{ trans('invoices.messages.totals_required', ['type' => $type]) }}" placement="top">
|
||||
<x-dropdown.button disabled="disabled">
|
||||
{{ trans('invoices.add_payment') }}
|
||||
</x-dropdown.button>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@ -45,7 +53,7 @@
|
||||
|
||||
<div class="text-xs mt-6" style="margin-left: 0 !important;">
|
||||
<span class="font-medium">
|
||||
{{ trans('invoices.payment_received') }} :
|
||||
{{ trans('invoices.payments_received') }}:
|
||||
</span>
|
||||
|
||||
@if ($transactions->count())
|
||||
@ -54,61 +62,63 @@
|
||||
<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>
|
||||
|
||||
</br>
|
||||
|
||||
@if (! empty($transaction->contact) && $transaction->contact->email)
|
||||
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
@else
|
||||
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
|
||||
<x-button class="text-purple mt-1" override="class" disabled="disabled">
|
||||
<div class="flex flex-row">
|
||||
@if (! empty($transaction->contact) && $transaction->contact->email)
|
||||
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
@else
|
||||
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
|
||||
<x-button class="text-purple mt-1" override="class" disabled="disabled">
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
|
||||
<span> - </span>
|
||||
<span class="mt-1 mr-2 ml-2"> - </span>
|
||||
|
||||
<x-button
|
||||
@click="onEditPayment('{{ route('modals.documents.document.transactions.edit', ['document' => $document->id, 'transaction' => $transaction->id]) }}')"
|
||||
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
|
||||
class="text-purple mt-1"
|
||||
override="class"
|
||||
>
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
<x-button
|
||||
@click="onEditPayment('{{ route('modals.documents.document.transactions.edit', ['document' => $document->id, 'transaction' => $transaction->id]) }}')"
|
||||
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
|
||||
class="text-purple mt-1"
|
||||
override="class"
|
||||
>
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
|
||||
<span> - </span>
|
||||
<span class="mt-1 mr-2 ml-2"> - </span>
|
||||
|
||||
@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>',
|
||||
'type' => strtolower(trans_choice('general.transactions', 1))
|
||||
]);
|
||||
@endphp
|
||||
@php
|
||||
$message = trans('general.delete_confirm', [
|
||||
'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
|
||||
|
||||
<x-delete-link
|
||||
:model="$transaction"
|
||||
:route="'transactions.destroy'"
|
||||
:title="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
:message="$message"
|
||||
:label="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
class="text-purple mt-1"
|
||||
text-class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize"
|
||||
override="class"
|
||||
/>
|
||||
<x-delete-link
|
||||
:model="$transaction"
|
||||
:route="'transactions.destroy'"
|
||||
:title="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
:message="$message"
|
||||
:label="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
class="text-purple mt-1"
|
||||
text-class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize"
|
||||
override="class"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
|
@ -11,15 +11,23 @@
|
||||
@stack('timeline_get_paid_body_button_payment_start')
|
||||
|
||||
@if (! $hideAddPayment)
|
||||
@if ($document->status != 'paid' && (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)) )
|
||||
<x-button
|
||||
@click="onAddPayment('{{ route('modals.documents.document.transactions.create', $document->id) }}')"
|
||||
id="show-slider-actions-payment-{{ $document->type }}"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
|
||||
override="class"
|
||||
>
|
||||
{{ trans('invoices.add_payment') }}
|
||||
</x-button>
|
||||
@if ($document->totals->count())
|
||||
@if ($document->status != 'paid' && (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)) )
|
||||
<x-button
|
||||
@click="onAddPayment('{{ route('modals.documents.document.transactions.create', $document->id) }}')"
|
||||
id="show-slider-actions-payment-{{ $document->type }}"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
|
||||
override="class"
|
||||
>
|
||||
{{ trans('invoices.add_payment') }}
|
||||
</x-button>
|
||||
@endif
|
||||
@else
|
||||
<x-tooltip message="{{ trans('invoices.messages.totals_required', ['type' => $type]) }}" placement="top">
|
||||
<x-button disabled="disabled">
|
||||
{{ trans('invoices.add_payment') }}
|
||||
</x-button>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@ -37,61 +45,63 @@
|
||||
<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>
|
||||
|
||||
</br>
|
||||
|
||||
@if (! empty($transaction->contact) && $transaction->contact->email)
|
||||
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
@else
|
||||
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
|
||||
<x-button class="text-purple mt-1" override="class" disabled="disabled">
|
||||
<div class="flex flex-row">
|
||||
@if (! empty($transaction->contact) && $transaction->contact->email)
|
||||
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
@else
|
||||
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
|
||||
<x-button class="text-purple mt-1" override="class" disabled="disabled">
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
|
||||
<span> - </span>
|
||||
<span class="mt-1 mr-2 ml-2"> - </span>
|
||||
|
||||
<x-button
|
||||
@click="onEditPayment('{{ route('modals.documents.document.transactions.edit', ['document' => $document->id, 'transaction' => $transaction->id]) }}')"
|
||||
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
|
||||
class="text-purple mt-1"
|
||||
override="class"
|
||||
>
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
<x-button
|
||||
@click="onEditPayment('{{ route('modals.documents.document.transactions.edit', ['document' => $document->id, 'transaction' => $transaction->id]) }}')"
|
||||
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
|
||||
class="text-purple mt-1"
|
||||
override="class"
|
||||
>
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
|
||||
</x-button.hover>
|
||||
</x-button>
|
||||
|
||||
<span> - </span>
|
||||
<span class="mt-1 mr-2 ml-2"> - </span>
|
||||
|
||||
@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>',
|
||||
'type' => strtolower(trans_choice('general.transactions', 1))
|
||||
]);
|
||||
@endphp
|
||||
@php
|
||||
$message = trans('general.delete_confirm', [
|
||||
'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
|
||||
|
||||
<x-delete-link
|
||||
:model="$transaction"
|
||||
:route="'transactions.destroy'"
|
||||
:title="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
:message="$message"
|
||||
:label="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
class="text-purple mt-1"
|
||||
text-class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize"
|
||||
override="class"
|
||||
/>
|
||||
<x-delete-link
|
||||
:model="$transaction"
|
||||
:route="'transactions.destroy'"
|
||||
:title="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
:message="$message"
|
||||
:label="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
class="text-purple mt-1"
|
||||
text-class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize"
|
||||
override="class"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
|
@ -108,15 +108,13 @@
|
||||
|
||||
@stack('button_cancelled_start')
|
||||
|
||||
@if (! $hideCancel)
|
||||
@if (! $hideCancel && ! in_array($document->status, ['cancelled', 'draft']))
|
||||
@can($permissionUpdate)
|
||||
<x-dropdown.divider />
|
||||
|
||||
@if ($document->status != 'cancelled')
|
||||
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
|
||||
{{ trans('general.cancel') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
|
||||
{{ trans('documents.actions.cancel') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
||||
@stack('company_logo_input_start')
|
||||
@if (! $hideCompanyLogo)
|
||||
@if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
|
||||
<img class="c-logo w-image" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
|
||||
<img class="c-logo" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
|
||||
@else
|
||||
<img class="c-logo w-image" src="{{ $logo }}" alt="{{ setting('company.name') }}" />
|
||||
<img class="c-logo" src="{{ $logo }}" alt="{{ setting('company.name') }}" />
|
||||
@endif
|
||||
@endif
|
||||
@stack('company_logo_input_end')
|
||||
@ -52,7 +52,7 @@
|
||||
@if (! $hideCompanyTaxNumber)
|
||||
@if (setting('company.tax_number'))
|
||||
<p>
|
||||
<span class="text-medium text-default">
|
||||
<span class="font-semibold">
|
||||
{{ trans('general.tax_number') }}:
|
||||
</span>
|
||||
{{ setting('company.tax_number') }}
|
||||
@ -113,7 +113,7 @@
|
||||
|
||||
<div class="row top-spacing">
|
||||
<div class="col-60">
|
||||
<div class="text p-index-left">
|
||||
<div class="text p-index-left break-words">
|
||||
@if (! $hideContactInfo)
|
||||
<p class="font-semibold mb-0">
|
||||
{{ trans($textContactInfo) }}
|
||||
@ -153,7 +153,7 @@
|
||||
@if (! $hideContactTaxNumber)
|
||||
@if ($document->contact_tax_number)
|
||||
<p>
|
||||
<span class="text-medium text-default">
|
||||
<span class="font-semibold">
|
||||
{{ trans('general.tax_number') }}:
|
||||
</span>
|
||||
{{ $document->contact_tax_number }}
|
||||
@ -236,7 +236,7 @@
|
||||
</span>
|
||||
|
||||
<span class="float-right spacing">
|
||||
<x-money :amount="$total->amount - $document->paid" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$total->amount - $document->paid" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</p>
|
||||
@endif
|
||||
@ -328,7 +328,7 @@
|
||||
|
||||
<div class="row mt-4 clearfix">
|
||||
<div class="col-60">
|
||||
<div class="text p-index-right">
|
||||
<div class="text p-index-right break-words">
|
||||
@stack('notes_input_start')
|
||||
@if ($hideNote)
|
||||
@if ($document->notes)
|
||||
@ -353,7 +353,7 @@
|
||||
</strong>
|
||||
|
||||
<span>
|
||||
<x-money :amount="$total->amount" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$total->amount" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
@stack($total->code . '_total_tr_end')
|
||||
@ -366,7 +366,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
- <x-money :amount="$document->paid" :currency="$document->currency_code" convert />
|
||||
- <x-money :amount="$document->paid" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
@stack('paid_total_tr_end')
|
||||
@ -379,7 +379,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<x-money :amount="$document->amount_due" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$document->amount_due" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
@stack('grand_total_tr_end')
|
||||
|
@ -17,9 +17,9 @@
|
||||
@stack('company_logo_input_start')
|
||||
@if (! $hideCompanyLogo)
|
||||
@if (! empty($document->contact->logo) && ! empty($document->contact->logo->id))
|
||||
<img class="d-logo w-image" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
|
||||
<img class="d-logo" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
|
||||
@else
|
||||
<img class="d-logo w-image" src="{{ $logo }}" alt="{{ setting('company.name') }}"/>
|
||||
<img class="d-logo" src="{{ $logo }}" alt="{{ setting('company.name') }}"/>
|
||||
@endif
|
||||
@endif
|
||||
@stack('company_logo_input_end')
|
||||
@ -48,13 +48,13 @@
|
||||
@endif
|
||||
|
||||
@if (! $hideCompanyTaxNumber)
|
||||
|
||||
|
||||
@if (setting('company.tax_number'))
|
||||
<p>
|
||||
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
@if (! $hideCompanyPhone)
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
<div class="row top-spacing">
|
||||
<div class="col-60">
|
||||
<div class="text p-index-left">
|
||||
<div class="text p-index-left break-words">
|
||||
@if (! $hideContactInfo)
|
||||
<p class="font-semibold mb-0">
|
||||
{{ trans($textContactInfo) }}
|
||||
@ -116,7 +116,7 @@
|
||||
@if (! $hideContactTaxNumber)
|
||||
@if ($document->contact_tax_number)
|
||||
<p>
|
||||
<span class="text-medium text-default">
|
||||
<span class="font-semibold">
|
||||
{{ trans('general.tax_number') }}:
|
||||
</span>
|
||||
{{ $document->contact_tax_number }}
|
||||
@ -301,7 +301,7 @@
|
||||
|
||||
<div class="row mt-9 clearfix">
|
||||
<div class="col-60">
|
||||
<div class="text p-index-left">
|
||||
<div class="text p-index-left break-words">
|
||||
@stack('notes_input_start')
|
||||
@if ($document->notes)
|
||||
<p class="font-semibold">
|
||||
@ -324,7 +324,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<x-money :amount="$total->amount" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$total->amount" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
@stack($total->code . '_total_tr_end')
|
||||
@ -337,7 +337,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
- <x-money :amount="$document->paid" :currency="$document->currency_code" convert />
|
||||
- <x-money :amount="$document->paid" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
@stack('paid_total_tr_end')
|
||||
@ -350,7 +350,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<x-money :amount="$document->amount_due" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$document->amount_due" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
@stack('grand_total_tr_end')
|
||||
|
@ -1,16 +1,16 @@
|
||||
<tr>
|
||||
@stack('name_td_start')
|
||||
@if (! $hideItems || (! $hideName && ! $hideDescription))
|
||||
<td class="item text text-alignment-left text-left">
|
||||
<td class="item text text-alignment-left text-left max-w-0">
|
||||
@if (! $hideName)
|
||||
{{ $item->name }} <br/>
|
||||
@endif
|
||||
|
||||
@if (! $hideDescription)
|
||||
@if (! empty($item->description))
|
||||
<span class="small-text">
|
||||
<div class="small-text break-words">
|
||||
{!! \Illuminate\Support\Str::limit(nl2br($item->description), 500) !!}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
@stack('price_td_start')
|
||||
@if (! $hidePrice)
|
||||
<td class="price text text-alignment-right text-right">
|
||||
<x-money :amount="$item->price" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$item->price" :currency="$document->currency_code" />
|
||||
</td>
|
||||
@endif
|
||||
@stack('price_td_end')
|
||||
@ -59,7 +59,7 @@
|
||||
</td>
|
||||
@else
|
||||
<td class="discount text text-alignment-right text-right">
|
||||
<x-money :amount="$item->discount" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$item->discount" :currency="$document->currency_code" />
|
||||
</td>
|
||||
@endif
|
||||
@stack('discount_td_end')
|
||||
@ -69,7 +69,7 @@
|
||||
@stack('total_td_start')
|
||||
@if (! $hideAmount)
|
||||
<td class="total text text-alignment-right text-right">
|
||||
<x-money :amount="$item->total" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$item->total" :currency="$document->currency_code" />
|
||||
</td>
|
||||
@endif
|
||||
@stack('total_td_end')
|
||||
|
@ -17,9 +17,9 @@
|
||||
@stack('company_logo_input_start')
|
||||
@if (! $hideCompanyLogo)
|
||||
@if (! empty($document->contact->logo) && ! empty($document->contact->logo->id))
|
||||
<img class="w-image radius-circle" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
|
||||
<img class="radius-circle" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
|
||||
@else
|
||||
<img class="w-image radius-circle" src="{{ $logo }}" alt="{{ setting('company.name') }}" />
|
||||
<img class="radius-circle" src="{{ $logo }}" alt="{{ setting('company.name') }}" />
|
||||
@endif
|
||||
@endif
|
||||
@stack('company_logo_input_end')
|
||||
@ -52,7 +52,7 @@
|
||||
@if (! $hideCompanyTaxNumber)
|
||||
<p class="text-white">
|
||||
@if (setting('company.tax_number'))
|
||||
<span class="text-medium text-default">
|
||||
<span class="font-semibold">
|
||||
{{ trans('general.tax_number') }}:
|
||||
</span>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
@if (! $hideContactTaxNumber)
|
||||
@if ($document->contact_tax_number)
|
||||
<p>
|
||||
<span class="text-medium text-default">
|
||||
<span class="font-semibold">
|
||||
{{ trans('general.tax_number') }}:
|
||||
</span>
|
||||
|
||||
@ -298,7 +298,7 @@
|
||||
|
||||
<div class="row mt-7 clearfix">
|
||||
<div class="col-60">
|
||||
<div class="text p-index-right p-modern">
|
||||
<div class="text p-index-right p-modern break-words">
|
||||
@stack('notes_input_start')
|
||||
@if ($document->notes)
|
||||
<p class="font-semibold">
|
||||
@ -321,7 +321,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<x-money :amount="$total->amount" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$total->amount" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
@stack($total->code . '_total_tr_end')
|
||||
@ -334,7 +334,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
- <x-money :amount="$document->paid" :currency="$document->currency_code" convert />
|
||||
- <x-money :amount="$document->paid" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
@stack('paid_total_tr_end')
|
||||
@ -347,7 +347,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<x-money :amount="$document->amount_due" :currency="$document->currency_code" convert />
|
||||
<x-money :amount="$document->amount_due" :currency="$document->currency_code" />
|
||||
</span>
|
||||
</div>
|
||||
@stack('grand_total_tr_end')
|
||||
|
Reference in New Issue
Block a user