akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@ -0,0 +1,3 @@
<button type="{{ $type }}" class="{{ $class }}" {{ $attributes }}>
{{ $slot }}
</button>

View File

@ -0,0 +1,30 @@
<x-form.section>
<x-slot name="head">
<x-form.section.head
title="{{ trans($textSectionAddressTitle) }}"
description="{{ trans($textSectionAddressDescription) }}"
/>
</x-slot>
<x-slot name="body">
@if (! $hideAddress)
<x-form.group.textarea name="address" label="{{ trans($textAddress) }}" not-required v-model="form.address" />
@endif
@if (! $hideCity)
<x-form.group.text name="city" label="{{ trans_choice($textCity, 1) }}" not-required />
@endif
@if (! $hideZipCode)
<x-form.group.text name="zip_code" label="{{ trans($textZipCode) }}" not-required />
@endif
@if (! $hideState)
<x-form.group.text name="state" label="{{ trans($textState) }}" not-required />
@endif
@if (! $hideCountry)
<x-form.group.country form-group-class="sm:col-span-3 el-select-tags-pl-38" />
@endif
</x-slot>
</x-form.section>

View File

@ -0,0 +1,18 @@
<x-form.section>
<x-slot name="head">
<x-form.section.head
title="{{ trans($textSectionBillingTitle) }}"
description="{{ trans($textSectionBillingDescription) }}"
/>
</x-slot>
<x-slot name="body">
@if (! $hideTaxNumber)
<x-form.group.text name="tax_number" label="{{ trans($textTaxNumber) }}" not-required />
@endif
@if (! $hideCurrency)
<x-form.group.currency />
@endif
</x-slot>
</x-form.section>

View File

@ -0,0 +1,5 @@
<x-form.section>
<x-slot name="foot">
<x-form.buttons cancel-route="{{ $cancelRoute }}" />
</x-slot>
</x-form.section>

View File

@ -0,0 +1,28 @@
<x-form.container>
<x-form
id="{{ $formId }}"
:route="$formRoute"
method="{{ $formMethod }}"
:model="$contact"
>
@if (! $hideSectionGeneral)
<x-contacts.form.general type="{{ $type }}" />
@endif
@if (! $hideSectionBilling)
<x-contacts.form.billing type="{{ $type }}" />
@endif
@if (! $hideSectionAddress)
<x-contacts.form.address type="{{ $type }}" />
@endif
<x-form.input.hidden name="type" value="{{ $type }}" />
@if (! empty($contact))
<x-form.group.switch name="enabled" label="{{ trans('general.enabled') }}" />
@endif
<x-contacts.form.buttons type="{{ $type }}" />
</x-form>
</x-form.container>

View File

@ -0,0 +1,70 @@
<x-form.section>
<x-slot name="head">
<x-form.section.head
title="{{ trans($textSectionGeneralTitle) }}"
description="{{ trans($textSectionGeneralDescription) }}"
/>
</x-slot>
<x-slot name="body">
@if (! $hideName)
<x-form.group.text name="name" label="{{ trans($textName) }}" form-group-class="{{ $classNameFromGroupClass }}" />
@endif
<div class="sm:col-span-3 grid gap-x-8 gap-y-6">
@if (! $hideEmail)
<x-form.group.text name="email" label="{{ trans($textEmail) }}" not-required />
@endif
@if (! $hidePhone)
<x-form.group.text name="phone" label="{{ trans($textPhone) }}" not-required />
@endif
@if (! $hideWebsite)
<x-form.group.text name="website" label="{{ trans($textWebsite) }}" not-required />
@endif
@if (! $hideReference)
<x-form.group.text name="reference" label="{{ trans($textReference) }}" not-required />
@endif
</div>
<div class="sm:col-span-3">
@if (! $hideCanLogin)
<div class="mt-5.5">
@if (empty($contact))
<x-tooltip id="tooltip-client_portal-text" placement="bottom" message="{{ trans('customers.can_login_description') }}">
<x-form.group.checkbox
name="create_user"
:options="['1' => trans('customers.can_login')]"
@input="onCanLogin($event)"
checkbox-class="sm:col-span-6" />
</x-tooltip>
@else
@if ($contact->user_id)
<x-form.group.checkbox
name="create_user"
:options="['1' => trans('customers.user_created')]"
checkbox-class="sm:col-span-6"
checked
/>
@else
<x-tooltip id="tooltip-client_portal-text" placement="bottom" message="{{ trans('customers.can_login_description') }}">
<x-form.group.checkbox
name="create_user"
:options="['1' => trans('customers.can_login')]"
checkbox-class="sm:col-span-6"
@input="onCanLogin($event)"
/>
</x-tooltip>
@endif
@endif
</div>
@endif
@if (! $hideLogo)
<x-form.group.file name="logo" label="{{ trans_choice('general.pictures', 1) }}" not-required />
@endif
</div>
</x-slot>
</x-form.section>

View File

@ -0,0 +1,15 @@
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif
@endcan
@else
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif
@endif

View File

@ -0,0 +1,268 @@
@if ($hideEmptyPage || ($contacts->count() || request()->get('search', false)))
@if (! $hideSummary)
<x-index.summary :items="$summaryItems" />
@endif
<x-index.container>
@if ((! $hideSearchString) && (! $hideBulkAction))
<x-index.search
search-string="{{ $searchStringModel }}"
bulk-action="{{ $bulkActionClass }}"
route="{{ $searchRoute }}"
/>
@elseif ((! $hideSearchString) && $hideBulkAction)
<x-index.search
search-string="{{ $searchStringModel }}"
route="{{ $searchRoute }}"
/>
@elseif ($hideSearchString && (! $hideBulkAction))
<x-index.search
bulk-action="{{ $bulkActionClass }}"
route="{{ $searchRoute }}"
/>
@endif
<x-table>
<x-table.thead>
<x-table.tr class="flex items-center px-1">
@if (! $hideBulkAction)
<x-table.th class="{{ $classBulkAction }}" override="class">
<x-index.bulkaction.all />
</x-table.th>
@endif
@stack('name_and_tax_number_th_start')
@if ((! $hideName) || (! $hideTaxNumber))
<x-table.th class="{{ $classNameAndTaxNumber }}">
@stack('name_th_start')
@if (! $hideName)
<x-slot name="first">
<x-sortablelink column="name" title="{{ trans($textName) }}" />
</x-slot>
@endif
@stack('name_th_end')
@stack('tax_number_th_start')
@if (! $hideTaxNumber)
<x-slot name="second">
<x-sortablelink column="tax_number" title="{{ trans($textTaxNumber) }}" />
</x-slot>
@endif
@stack('tax_number_th_end')
</x-table.th>
@endif
@stack('name_and_tax_number_th_end')
@stack('email_and_phone_th_start')
@if ((! $hideEmail) || (! $hidePhone))
<x-table.th class="{{ $classEmailAndPhone }}">
@stack('email_th_start')
@if (! $hideEmail)
<x-slot name="first">
<x-sortablelink column="email" title="{{ trans($textEmail) }}" />
</x-slot>
@endif
@stack('email_th_end')
@stack('phone_th_start')
@if (! $hidePhone)
<x-slot name="second">
<x-sortablelink column="phone" title="{{ trans($textPhone) }}" />
</x-slot>
@endif
@stack('phone_th_end')
</x-table.th>
@endif
@stack('email_and_phone_th_end')
@stack('country_and_currency_code_th_start')
@if ((! $hideCountry) || (! $hideCurrencyCode))
<x-table.th class="{{ $classCountryAndCurrencyCode }}">
@stack('country_th_start')
@if (! $hideCountry)
<x-slot name="first">
<x-sortablelink column="country" title="{{ trans_choice($textCountry, 1) }}" />
</x-slot>
@endif
@stack('country_th_end')
@stack('currency_code_th_start')
@if (! $hideCurrencyCode)
<x-slot name="second">
<x-sortablelink column="currency_code" title="{{ trans_choice($textCurrencyCode, 1) }}" />
</x-slot>
@endif
@stack('currency_code_th_end')
</x-table.th>
@endif
@stack('country_and_currency_code_th_end')
@stack('open_and_overdue_th_start')
@if ((! $hideOpen) || (! $hideOverdue))
<x-table.th class="{{ $classOpenAndOverdue }}" kind="amount">
@stack('open_th_start')
@if (! $hideOpen)
<x-slot name="first">
{{ trans($textOpen) }}
</x-slot>
@endif
@stack('open_th_end')
@stack('overdue_th_start')
@if (! $hideOverdue)
<x-slot name="second">
{{ trans($textOverdue) }}
</x-slot>
@endif
@stack('overdue_th_end')
</x-table.th>
@endif
@stack('open_and_overdue_th_end')
</x-table.tr>
</x-table.thead>
<x-table.tbody>
@foreach($contacts as $item)
<x-table.tr href="{{ route($routeButtonShow, $item->id) }}">
@if (! $hideBulkAction)
<x-table.td class="{{ $classBulkAction }}" override="class">
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->name }}" />
</x-table.td>
@endif
@stack('name_and_tax_number_td_start')
@if ((! $hideName) || (! $hideTaxNumber))
<x-table.td class="{{ $classNameAndTaxNumber }}">
@stack('name_td_start')
@if (! $hideName)
<x-slot name="first" class="flex items-center font-medium">
@if ($showPicture)
@if (is_object($item->picture))
<img src="{{ Storage::url($item->picture->id) }}" class="absolute w-6 h-6 bottom-6 rounded-full mr-2 hidden lg:block" alt="{{ $item->name }}" title="{{ $item->name }}">
@else
<img src="{{ asset('public/img/user.svg') }}" class="absolute w-6 h-6 bottom-6 rounded-full mr-2 hidden lg:block" alt="{{ $item->name }}"/>
@endif
@endif
<div class="truncate {{ $showPicture ? ' ltr:pl-8 rtl:pr-8' : '' }}">
{{ $item->name }}
</div>
@if (! $item->enabled)
<x-index.disable text="{{ trans_choice($textPage, 1) }}" />
@endif
</x-slot>
@endif
@stack('name_td_end')
@stack('tax_number_td_start')
@if (! $hideTaxNumber)
<x-slot name="second" class="w-32 font-normal truncate {{ $showPicture ? ' ltr:pl-8 rtl:pr-8' : '' }}">
{{ $item->tax_number }}
</x-slot>
@endif
@stack('tax_number_td_end')
</x-table.td>
@endif
@stack('name_and_tax_number_td_end')
@stack('email_and_phone_td_start')
@if ((! $hideEmail) || (! $hidePhone))
<x-table.td class="{{ $classEmailAndPhone }}">
@stack('email_td_start')
@if (! $hideEmail)
<x-slot name="first">
@if ($item->email)
{{ $item->email }}
@else
<x-empty-data />
@endif
</x-slot>
@endif
@stack('email_td_end')
@stack('phone_td_start')
@if (! $hidePhone)
<x-slot name="second">
{{ $item->phone }}
</x-slot>
@endif
@stack('phone_td_end')
</x-table.td>
@endif
@stack('email_and_phone_td_end')
@stack('country_and_currency_code_td_start')
@if ((! $hideCountry) || (! $hideCurrencyCode))
<x-table.td class="{{ $classCountryAndCurrencyCode }}">
@stack('country_td_start')
@if (! $hideCountry)
<x-slot name="first">
<x-index.country code="{{ $item->country }}" />
</x-slot>
@endif
@stack('country_td_end')
@stack('currency_code_td_start')
@if (! $hideCurrencyCode)
<x-slot name="second">
<x-index.currency code="{{ $item->currency_code }}" />
</x-slot>
@endif
@stack('currency_code_td_end')
</x-table.td>
@endif
@stack('country_and_currency_code_td_end')
@stack('open_and_overdue_td_start')
@if ((! $hideOpen) || (! $hideOverdue))
<x-table.td class="{{ $classOpenAndOverdue }}" kind="amount">
@stack('open_td_start')
@if (! $hideOpen)
<x-slot name="first">
@if ($item->open)
<x-money :amount="$item->open" :currency="setting('default.currency')" convert />
@else
<x-empty-data />
@endif
</x-slot>
@endif
@stack('open_td_end')
@stack('overdue_td_start')
@if (! $hideOverdue)
<x-slot name="second">
@if ($item->overdue)
<x-money :amount="$item->overdue" :currency="setting('default.currency')" convert />
@else
<x-empty-data />
@endif
</x-slot>
@endif
@stack('overdue_td_end')
</x-table.td>
@endif
@stack('open_and_overdue_td_end')
<x-table.td kind="action">
<x-table.actions :model="$item" />
</x-table.td>
</x-table.tr>
@endforeach
</x-table.tbody>
</x-table>
<x-pagination :items="$contacts" />
</x-index.container>
@else
<x-empty-page
group="{{ $group }}"
page="{{ $page }}"
image-empty-page="{{ $imageEmptyPage }}"
text-empty-page="{{ $textEmptyPage }}"
url-docs-path="{{ $urlDocsPath }}"
create-route="{{ $createRoute }}"
check-permission-create="{{ $checkPermissionCreate }}"
permission-create="{{ $permissionCreate }}"
/>
@endif

View File

@ -0,0 +1,27 @@
<x-dropdown id="dropdown-more-actions">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endcan
@else
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endif
@if (! $hideExport)
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}">
{{ trans('general.export') }}
</x-dropdown.link>
@endif
</x-dropdown>

View File

@ -0,0 +1,13 @@
@push('scripts_start')
<script type="text/javascript">
var contact_default_currency = '{{ $currency_code }}';
var contact_currencies = {!! $currencies !!};
var can_login_errors = {
valid: '{!! trans("validation.required", ["attribute" => "email"]) !!}',
email: '{!! trans("customers.error.email") !!}'
};
</script>
@endpush
<x-script :alias="$alias" :folder="$folder" :file="$file" />

View File

@ -0,0 +1,44 @@
@stack('new_button_start')
@if (! $hideNewDropdown)
<x-dropdown id="customer-new">
<x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class">
{{ trans('general.new_more') }}
<span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span>
</x-slot>
@stack('document_button_start')
@if (! $hideButtonDocument)
@can($permissionCreateDocument)
<x-dropdown.link href="{{ route($routeButtonDocument, $contact->id) }}">
{{ trans_choice($textDocument, 1) }}
</x-dropdown.link>
@endcan
@endif
@stack('transaction_button_start')
@if (! $hideButtonTransaction)
@can($permissionCreateTransaction)
<x-dropdown.link href="{{ route($routeButtonTransaction, $contact->id) }}">
{{ trans_choice($textTransaction, 1) }}
</x-dropdown.link>
@endcan
@endif
@stack('transaction_button_end')
</x-dropdown>
@endif
@stack('edit_button_start')
@if (! $hideButtonEdit)
@can($permissionUpdate)
<x-link href="{{ route($routeButtonEdit, $contact->id) }}">
{{ trans('general.edit') }}
</x-link>
@endcan
@endif
@stack('edit_button_end')

View File

@ -0,0 +1,355 @@
<x-show.container>
<x-show.summary>
@stack('profile_start')
@if (! $hideTopLeft)
<x-show.summary.left>
@if (! $hideAvatar)
<x-slot name="avatar">
{{ $contact->initials }}
</x-slot>
@endif
@stack('contact_email_start')
@if (! $hideEmail)
<span>{{ $contact->email }}</span>
@endif
@stack('contact_email_end')
@stack('contact_phone_start')
@if (! $hidePhone)
<span>{{ $contact->phone }}</span>
@endif
@stack('contact_phone_end')
</x-show.summary.left>
@endif
@stack('profile_end')
@if (! $hideTopRight)
<x-show.summary.right>
@stack('summary_overdue_start')
@if (! $hideOverdue)
<x-slot name="first" amount="{{ money($totals['overdue'], setting('default.currency'), true) }}" title="{{ trans('general.overdue') }}"></x-slot>
@endif
@stack('summary_overdue_end')
@stack('summary_open_start')
@if (! $hideOpen)
<x-slot name="second" amount="{{ money($totals['open'], setting('default.currency'), true) }}" title="{{ trans('general.open') }}"></x-slot>
@endif
@stack('summary_open_end')
@stack('summary_paid_start')
@if (! $hidePaid)
<x-slot name="third" amount="{{ money($totals['paid'], setting('default.currency'), true) }}" title="{{ trans('general.paid') }}"></x-slot>
@endif
@stack('summary_paid_end')
</x-show.summary.right>
@endif
</x-show.summary>
<x-show.content>
@if (! $hideBottomLeft)
<x-show.content.left>
@stack('customer_address_start')
@if (! $hideAddress)
<div class="flex flex-col text-sm mb-5">
<div class="font-medium">{{ trans('general.address') }}</div>
<span>{{ $contact->address }}<br>{{ $contact->location }}</span>
</div>
@endif
@stack('customer_address_end')
@stack('customer_tax_number_start')
@if (! $hideTaxNumber)
@if ($contact->tax_number)
<div class="flex flex-col text-sm mb-5">
<div class="font-medium">{{ trans('general.tax_number') }}</div>
<span>{{ $contact->tax_number }}</span>
</div>
@endif
@endif
@stack('customer_tax_number_end')
@stack('customer_website_start')
@if (! $hideWebsite)
@if ($contact->website)
<div class="flex flex-col text-sm mb-5">
<div class="font-medium">{{ trans('general.website') }}</div>
<span>{{ $contact->website }}</span>
</div>
@endif
@endif
@stack('customer_website_end')
@stack('customer_reference_start')
@if (! $hideReference)
@if ($contact->reference)
<div class="flex flex-col text-sm mb-5">
<div class="font-medium">{{ trans('general.reference') }}</div>
<span>{{ $contact->reference }}</span>
</div>
@endif
@endif
@stack('customer_reference_end')
@stack('customer_client_portal_start')
@if (! $hideUser)
<div class="flex flex-col text-sm mb-5">
<div class="flex items-center font-medium">
<div class="flex items-center cursor-default">
<div data-tooltip-target="tooltip-client-describe" data-tooltip-placement="bottom">
{{ trans('general.client_portal') }}
</div>
@if ($contact->user)
<span data-tooltip-target="tooltip-client-permission" data-tooltip-placement="bottom" class="material-icons text-green text-base ltr:ml-1 rtl:mr-1">check</span>
@else
<span data-tooltip-target="tooltip-client-permission" data-tooltip-placement="bottom" class="material-icons-round text-red text-sm ltr:ml-1 rtl:mr-1">hide_source</span>
@endif
<div id="tooltip-client-describe" role="tooltip" class="w-2/12 inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm opacity-0 whitespace-normal tooltip-content">
{{ trans('customers.client_portal_description') }}
<div class="absolute w-2 h-2 -top-1 -left-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div>
</div>
<div id="tooltip-client-permission" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm opacity-0 whitespace-nowrap tooltip-content">
@if ($contact->user)
{{ trans('customers.client_portal_text.can') }}
@else
{{ trans('customers.client_portal_text.cant') }}
@endif
<div class="absolute w-2 h-2 -top-1 -left-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div>
</div>
</div>
</div>
</div>
@endif
@stack('customer_client_portal_end')
</x-show.content.left>
@endif
@if (! $hideBottomRight)
<x-show.content.right>
<x-tabs active="documents">
<x-slot name="navs">
@stack('documents_nav_start')
<x-tabs.nav
id="documents"
name="{{ trans_choice($textDocument, 2) }}"
active
class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link"
/>
@stack('transactions_nav_start')
<x-tabs.nav
id="transactions"
name="{{ trans_choice('general.transactions', 2) }}"
class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link"
/>
@stack('transactions_nav_end')
</x-slot>
<x-slot name="content">
@stack('documents_tab_start')
<x-tabs.tab id="documents">
@if ($documents->count())
<x-table>
<x-table.thead>
<x-table.tr class="flex items-center px-1">
<x-table.th class="w-4/12 table-title hidden sm:table-cell">
<x-slot name="first">
<x-sortablelink column="due_at" title="{{ trans('invoices.due_date') }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="issued_at" title="{{ trans('invoices.invoice_date') }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-3/12 table-title hidden sm:table-cell">
<x-sortablelink column="status" title="{{ trans_choice('general.statuses', 1) }}" />
</x-table.th>
<x-table.th class="w-6/12 sm:w-3/12 table-title'">
<x-slot name="first">
<x-sortablelink column="contact_name" title="{{ trans_choice('general.customers', 1) }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="document_number" title="{{ trans_choice('general.numbers', 1) }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-6/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-sm font-medium text-black tracking-wider" override="class">
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
</x-table.th>
</x-table.tr>
</x-table.thead>
<x-table.tbody>
@foreach($documents as $item)
@php $paid = $item->paid; @endphp
<x-table.tr href="{{ route(config('type.document.' . $item->type . '.route.prefix', 'invoices') . '.show', $item->id) }}">
<x-table.td class="w-4/12 table-title hidden sm:table-cell">
<x-slot name="first" class="font-bold truncate" override="class">
{{ \Date::parse($item->due_at)->diffForHumans() }}
</x-slot>
<x-slot name="second">
<x-date date="{{ $item->issued_at }}" />
</x-slot>
</x-table.td>
<x-table.td class="w-3/12 table-title hidden sm:table-cell">
<x-show.status status="{{ $item->status }}" background-color="bg-{{ $item->status_label }}" text-color="text-text-{{ $item->status_label }}" />
</x-table.td>
<x-table.td class="w-6/12 sm:w-3/12 table-title'">
<x-slot name="first">
{{ $item->contact_name }}
</x-slot>
<x-slot name="second" class="relative w-20 font-normal group" data-tooltip-target="tooltip-information-{{ $item->id }}" data-tooltip-placement="left" override="class,data-tooltip-target,data-tooltip-placement">
<span class="border-black border-b border-dashed">
{{ $item->document_number }}
</span>
<div class="w-full absolute h-10 -left-10 -mt-6"></div>
<x-documents.index.information :document="$item" />
</x-slot>
</x-table.td>
<x-table.td class="w-6/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-sm font-medium text-black tracking-wider" override="class">
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
</x-table.td>
<x-table.td kind="action">
<x-table.actions :model="$item" />
</x-table.td>
</x-table.tr>
@endforeach
</x-table.tbody>
</x-table>
<x-pagination :items="$documents" />
@else
<x-show.no-records type="{{ $type }}" :model="$contact" :group="config('type.contact.' . $type . '.group')" :page="\Str::plural(config('type.contact.' . $type . '.document_type'))" />
@endif
</x-tabs.tab>
@stack('transactions_tab_start')
<x-tabs.tab id="transactions">
@if ($transactions->count())
<x-table>
<x-table.thead>
<x-table.tr class="flex items-center px-1">
<x-table.th class="w-4/12 sm:w-3/12">
<x-slot name="first">
<x-sortablelink column="paid_at" title="{{ trans('general.date') }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="number" title="{{ trans_choice('general.numbers', 1) }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
<x-sortablelink column="type" title="{{ trans_choice('general.types', 1) }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="category.name" title="{{ trans_choice('general.categories', 1) }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-4/12 sm:w-3/12">
<x-sortablelink column="account.name" title="{{ trans_choice('general.accounts', 1) }}" />
</x-table.th>
<x-table.th class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
<x-sortablelink column="contact.name" title="{{ trans_choice('general.contacts', 1) }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="document.document_number" title="{{ trans_choice('general.documents', 1) }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-4/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-xs font-medium text-black tracking-wider" override="class">
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
</x-table.th>
</x-table.tr>
</x-table.thead>
<x-table.tbody>
@foreach($transactions as $item)
<x-table.tr href="{{ route('transactions.show', $item->id) }}">
<x-table.td class="w-4/12 sm:w-3/12">
<x-slot name="first" class="font-bold truncate" override="class">
<x-date date="{{ $item->paid_at }}" />
</x-slot>
<x-slot name="second">
{{ $item->number }}
</x-slot>
</x-table.td>
<x-table.td class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
{{ $item->type_title }}
</x-slot>
<x-slot name="second" class="flex items-center">
<x-index.category :model="$item->category" />
</x-slot>
</x-table.td>
<x-table.td class="w-4/12 sm:w-3/12">
{{ $item->account->name }}
</x-table.td>
<x-table.td class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
{{ $item->contact->name }}
</x-slot>
<x-slot name="second">
@if ($item->document)
<a href="{{ route($item->route_name, $item->route_id) }}" class="font-normal truncate border-b border-black border-dashed">
{{ $item->document->document_number }}
</a>
@else
<x-empty-data />
@endif
</x-slot>
</x-table.td>
<x-table.td class="relative w-4/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-sm font-normal text-black tracking-wider" override="class">
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
</x-table.td>
<x-table.td kind="action">
<x-table.actions :model="$item" />
</x-table.td>
</x-table.tr>
@endforeach
</x-table.tbody>
</x-table>
<x-pagination :items="$transactions" />
@else
<x-show.no-records type="{{ $type }}" :model="$contact" group="banking" page="transactions" />
@endif
</x-tabs.tab>
@stack('transactions_tab_end')
</x-slot>
</x-tabs>
</x-show.content.right>
@endif
</x-show.content>
</x-show.container>

View File

@ -0,0 +1,33 @@
@stack('button_group_start')
@if (! $hideActionsDropdown)
<x-dropdown id="dropdown-more-actions">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@stack('delete_button_start')
@if (! $hideButtonDuplicate)
@can($permissionCreate)
<x-dropdown.link href="{{ route($routeButtonDuplicate, $contact->id) }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@endif
<x-dropdown.divider />
@stack('delete_button_start')
@if (! $hideButtonDelete)
@can($permissionDelete)
<x-delete-link :model="$contact" :route="$routeButtonDelete" :text="$textDeleteModal" />
@endcan
@endif
@stack('delete_button_end')
</x-dropdown>
@endif
@stack('button_group_end')

View File

@ -0,0 +1 @@
{!! $date !!}

View File

@ -0,0 +1,27 @@
<x-button
type="button"
class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions"
@click="onDeleteViaConfirmation('delete-{{ $modelTable }}-{{ $id }}')"
override="class"
>
@if ($slot->isNotEmpty())
{!! $slot !!}
@else
<span class="material-icons-outlined text-purple text-lg">delete</span>
<div class="inline-block absolute invisible z-10 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm opacity-0 whitespace-nowrap tooltip-content -top-10 -left-2" data-tooltip-placement="top">
<span>{!! $label !!}</span>
<div class="absolute w-2 h-2 -bottom-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0" data-popper-arrow></div>
</div>
@endif
<x-form.input.hidden
name="delete-{{ $modelTable }}-{{ $id }}"
id="delete-{{ $modelTable }}-{{ $id }}"
data-field="delete"
data-action="{{ $action }}"
data-title="{!! $title !!}"
data-message="{!! $message !!}"
data-cancel="{!! $cancelText !!}"
data-delete="{!! $deleteText !!}"
/>
</x-button>

View File

@ -0,0 +1,25 @@
<x-button
type="button"
class="{{ $class }}"
@click="onDeleteViaConfirmation('delete-{{ $modelTable }}-{{ $id }}')"
override="class"
>
<span class="{{ $textClass }}">
@if ($slot->isNotEmpty())
{!! $slot !!}
@else
{!! $label !!}
@endif
</span>
<x-form.input.hidden
name="delete-{{ $modelTable }}-{{ $id }}"
id="delete-{{ $modelTable }}-{{ $id }}"
data-field="delete"
data-action="{{ $action }}"
data-title="{!! $title !!}"
data-message="{!! $message !!}"
data-cancel="{!! $cancelText !!}"
data-delete="{!! $deleteText !!}"
/>
</x-button>

View File

@ -1,43 +1,38 @@
<div class="accordion">
<div class="card border-1 box-shadow-none">
<div class="card-header background-none collapsed" id="accordion-recurring-and-more-header" data-toggle="collapse" data-target="#accordion-recurring-and-more-body" aria-expanded="false" aria-controls="accordion-recurring-and-more-body">
<h4 class="mb-0">{{ trans($textAdvancedAccordion) }}</h4>
</div>
<x-form.accordion type="advanced">
<x-slot name="head">
<x-form.accordion.head
title="{{ trans_choice($textSectionAdvancedTitle, 1) }}"
description="{{ trans($textSectionAdvancedDescription, ['type' => $type]) }}"
/>
</x-slot>
<div id="accordion-recurring-and-more-body" class="collapse hide" aria-labelledby="accordion-recurring-and-more-header">
<div class="card-body">
<div class="row">
@stack('recurring_row_start')
@if (!$hideRecurring)
<div class="{{ $recurring_class }}">
@if (!empty($document))
{{ Form::recurring('edit', $document, 'col-md-12') }}
@else
{{ Form::recurring('create', null, 'col-md-12') }}
@endif
</div>
@endif
@stack('recurring_row_end')
<x-slot name="body">
@stack('footer_start')
@stack('more_row_start')
@if (!$hideCategory)
<div class="{{ $more_class }}">
@if (!$hideCategory)
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $document->category_id ?? setting('default.' . $categoryType . '_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=' . $categoryType, 'remote_action' => route('categories.index'). '?search=type:' . $categoryType . ' enabled:1'], $more_form_class) }}
@endif
</div>
@else
{{ Form::hidden('category_id', $document->category_id ?? setting('default.' . $categoryType . '_category')) }}
@endif
@stack('more_row_end')
@if (!$hideAttachment)
<div class="col-md-12">
{{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], !empty($document) ? $document->attachment : null , 'col-md-12') }}
</div>
@endif
</div>
@if (! $hideFooter)
<div class="{{ $classFooter }}">
<x-form.group.textarea name="footer" label="{{ trans('general.footer') }}" :value="$footer" not-required rows="7" />
</div>
@endif
<div class="sm:col-span-4 grid gap-x-8 gap-y-1">
@stack('category_start')
@if (! $hideCategory)
<div class="{{ $classCategory }}">
<x-form.group.category :type="$typeCategory" :selected="$categoryId" />
</div>
@else
<x-form.input.hidden name="category_id" :value="$categoryId" />
@endif
@stack('attachment_end')
@if (! $hideAttachment)
<div class="{{ $classAttachment }}">
<x-form.group.attachment />
</div>
@endif
</div>
</div>
</div>
</x-slot>
</x-form.accordion>

View File

@ -1,7 +1,16 @@
<div class="card">
<div class="card-footer">
<div class="row save-buttons">
{{ Form::saveButtons($routeCancel) }}
</div>
<x-form.section>
<x-slot name="foot">
<div class="flex justify-end">
<x-form.buttons cancel-route="{{ $cancelRoute }}" />
@if (! $hideSendTo)
<x-button
class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 ltr:ml-2 rtl:mr-2 text-base rounded-lg disabled:bg-green-100"
override="class"
>
{{ trans('general.send_to') }}
</x-button>
@endif
</div>
</div>
</x-slot>
</x-form.section>

View File

@ -1,51 +1,53 @@
<div class="accordion">
<div class="card border-1 box-shadow-none">
<div class="card-header background-none collapsed" id="accordion-company-header" data-toggle="collapse" data-target="#accordion-company-body" aria-expanded="false" aria-controls="accordion-company-body">
<h4 class="mb-0">{{ trans_choice('general.companies', 1) }}</h4>
<x-form.accordion type="company">
<x-slot name="head">
<x-form.accordion.head
title="{{ trans_choice($textSectionCompaniesTitle, 1) }}"
description="{{ trans($textSectionCompaniesDescription) }}"
/>
</x-slot>
<x-slot name="body">
<div class="sm:col-span-2 grid gap-x-8 gap-y-6">
@if (! $hideDocumentTitle)
<x-form.group.text name="title" label="{{ trans('settings.invoice.title') }}" value="{{ $titleSetting }}" not-required data-field="setting" />
@endif
@if (! $hideDocumentSubheading)
<x-form.group.text name="subheading" label="{{ trans('settings.invoice.subheading') }}" value="{{ $subheadingSetting }}" not-required data-field="setting" />
@endif
</div>
<div id="accordion-company-body" class="collapse hide" aria-labelledby="accordion-company-header">
<div class="card-body">
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
@if (!$hideLogo)
{{ Form::fileGroup('company_logo', trans('settings.company.logo'), 'file-image-o', ['data-field' => 'setting'], setting('company.logo')) }}
@endif
</div>
<div class="sm:col-span-1"></div>
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
@if (!$hideDocumentTitle)
{{ Form::textGroup('title', trans('settings.invoice.title'), 'font', ['data-field' => 'setting'], $titleSetting, 'col-md-12') }}
@endif
@if (!$hideDocumentSubheading)
{{ Form::textGroup('subheading', trans('settings.invoice.subheading'), 'font', ['data-field' => 'setting'], $subheadingSetting, 'col-md-12') }}
@endif
@if (!$hideCompanyEdit)
<akaunting-company-edit company-id="{{ company_id() }}"
button-text="{{ trans('settings.company.edit_your_business_address') }}"
tax-number-text="{{ trans('general.tax_number') }}"
:company="{{ json_encode($company) }}"
:company-form="{{ json_encode([
'show' => true,
'text' => trans('settings.company.edit_your_business_address'),
'buttons' => [
'cancel' => [
'text' => trans('general.cancel'),
'class' => 'btn-outline-secondary'
],
'confirm' => [
'text' => trans('general.save'),
'class' => 'btn-success'
]
]
])}}"
></akaunting-company-edit>
@endif
</div>
</div>
</div>
<div class="sm:col-span-2">
@if (! $hideLogo)
<x-form.group.file name="company_logo" label="{{ trans('settings.company.logo') }}" :value="setting('company.logo')" not-required data-field="setting" />
@endif
</div>
</div>
</div>
<div class="sm:col-span-2 relative">
@if (! $hideCompanyEdit)
<akaunting-company-edit
company-id="{{ company_id() }}"
button-text="{{ trans('settings.company.edit_your_business_address') }}"
tax-number-text="{{ trans('general.tax_number') }}"
:company="{{ json_encode($company) }}"
:company-form="{{ json_encode([
'show' => true,
'text' => trans('settings.company.edit_your_business_address'),
'buttons' => [
'cancel' => [
'text' => trans('general.cancel'),
'class' => 'btn-outline-secondary'
],
'confirm' => [
'text' => trans('general.save'),
'class' => 'disabled:bg-green-100'
]
]
])}}"
></akaunting-company-edit>
@endif
</div>
</x-slot>
</x-form.accordion>

View File

@ -23,7 +23,7 @@
],
'confirm' => [
'text' => trans('general.save'),
'class' => 'btn-success'
'class' => 'disabled:bg-green-100'
]
]
])}}"

View File

@ -1,105 +1,31 @@
@if (empty($document))
{!! Form::open([
'route' => $routeStore,
'id' => $formId,
'@submit.prevent' => $formSubmit,
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
@else
{!! Form::model($document, [
'route' => [$routeUpdate, $document->id],
'id' => $formId,
'method' => 'PATCH',
'@submit.prevent' => $formSubmit,
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
@endif
@if (!$hideCompany)
<x-documents.form.company
type="{{ $type }}"
hide-logo="{{ $hideLogo }}"
hide-document-title="{{ $hideDocumentTitle }}"
hide-document-subheading="{{ $hideDocumentSubheading }}"
hide-company-edit="{{ $hideCompanyEdit }}"
title-setting="{{ $titleSetting }}"
/>
<x-loading.content />
<div class="relative mt-4">
<x-form
id="{{ $formId }}"
:route="$formRoute"
method="{{ $formMethod }}"
:model="$contact"
>
@if (! $hideCompany)
<x-documents.form.company :type="$type" />
@endif
<x-documents.form.main
type="{{ $type }}"
:document="$document"
hide-contact="{{ $hideContact }}"
contact-type="{{ $contactType }}"
:contact="$contact"
:contacts="$contacts"
:search-route="$contactSearchRoute"
:create-route="$contactCreateRoute"
hide-issued-at="{{ $hideIssuedAt }}"
text-issued-at="{{ $textIssuedAt }}"
issued-at="{{ $issuedAt }}"
hide-document-number="{{ $hideDocumentNumber }}"
text-document-number="{{ $textDocumentNumber }}"
document-number="{{ $documentNumber }}"
hide-due-at="{{ $hideDueAt }}"
text-due-at="{{ $textDueAt }}"
due-at="{{ $dueAt }}"
hide-order-number="{{ $hideOrderNumber }}"
text-order-number="{{ $textOrderNumber }}"
order-number="{{ $orderNumber }}"
hide-edit-item-columns="{{ $hideEditItemColumns }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
text-items="{{ $textItems }}"
hide-quantity="{{ $hideQuantity }}"
text-quantity="{{ $textQuantity }}"
hide-price="{{ $hidePrice }}"
text-price="{{ $textPrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
text-amount="{{ $textAmount }}"
is-sale-price="{{ $isSalePrice }}"
is-purchase-price="{{ $isPurchasePrice }}"
search-char-limit="{{ $searchCharLimit }}"
notes-setting="{{ $notesSetting }}"
/>
<x-documents.form.main type="{{ $type }}" />
@if (!$hideFooter)
<x-documents.form.footer
type="{{ $type }}"
:document="$document"
footer-setting="{{ $footerSetting }}"
/>
@if ($showRecurring)
<x-documents.form.recurring type="{{ $type }}" />
@endif
@if (!$hideAdvanced)
<x-documents.form.advanced
type="{{ $type }}"
:document="$document"
category-type="{{ $categoryType }}"
hide-recurring="{{ $hideRecurring }}"
hide-category="{{ $hideCategory }}"
hide-attachment="{{ $hideAttachment }}"
/>
@if (! $hideAdvanced)
<x-documents.form.advanced type="{{ $type }}" />
@endif
@if (!$hideButtons)
<x-documents.form.buttons
type="{{ $type }}"
:document="$document"
route-cancel="{{ $routeCancel }}"
/>
@endif
<x-form.input.hidden name="type" :value="old('type', $type)" v-model="form.type" />
<x-form.input.hidden name="status" :value="old('status', $status)" v-model="form.status" />
<x-form.input.hidden name="amount" :value="old('amount', '0')" v-model="form.amount" />
{{ Form::hidden('type', old('type', $type), ['id' => 'type', 'v-model' => 'form.type']) }}
{{ Form::hidden('status', old('status', $status), ['id' => 'status', 'v-model' => 'form.status']) }}
{{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
{!! Form::close() !!}
@if (! $hideButtons)
<x-documents.form.buttons :type="$type" />
@endif
</x-form>
</div>

View File

@ -1,12 +0,0 @@
<div class="accordion">
<div class="card border-1 box-shadow-none">
<div class="card-header background-none collapsed" id="accordion-footer-header" data-toggle="collapse" data-target="#accordion-footer-body" aria-expanded="false" aria-controls="accordion-footer-body">
<h4 class="mb-0">{{ trans('general.footer') }}</h4>
</div>
<div id="accordion-footer-body" class="collapse hide" aria-labelledby="accordion-footer-header">
{{ Form::textareaGroup('footer', '', '', $footerSetting, ['rows' => '3'], 'embed-acoordion-textarea') }}
</div>
</div>
</div>

View File

@ -7,12 +7,12 @@
'buttons' => [
'cancel' => [
'text' => trans('general.cancel'),
'class' => 'btn-outline-secondary'
'class' => 'btn-outline-secondary',
],
'confirm' => [
'text' => trans('general.save'),
'class' => 'btn-success'
'class' => 'disabled:bg-green-100',
]
]
])}}"
></akaunting-edit-item-columns>
]) }}"
></akaunting-edit-item-columns>

View File

@ -1,86 +1,106 @@
<div class="row document-item-body">
<div class="col-sm-12 p-0" style="table-layout: fixed;">
@if (!$hideEditItemColumns)
<x-edit-item-columns :type="$type" />
@endif
<div class="table-responsive overflow-x-scroll overflow-y-hidden">
<table class="table" id="items" style="table-layout: fixed">
<div class="relative sm:col-span-6">
<div style="table-layout: fixed;">
<div class="overflow-x-visible overflow-y-hidden">
<table class="small-table-width" id="items">
<colgroup>
<col class="document-item-40-px">
<col class="document-item-25">
<col class="document-item-30 description">
<col class="document-item-10">
<col class="document-item-10">
<col class="document-item-20">
<col class="document-item-40-px">
<col class="small-col" style="width: 24px;">
<col class="small-col" style="width: 20%;">
<col class="small-col" style="width: 30%;">
<col class="small-col" style="width: 12%;">
<col class="small-col" style="width: 15%;">
<col class="small-col" style="width: 20%;">
<col class="small-col" style="width: 24px;">
</colgroup>
<thead class="thead-light">
<thead class="border-b">
<tr>
@stack('move_th_start')
<th class="border-top-0 border-right-0 border-bottom-0" style="max-width: 40px">
<div></div>
</th>
<th class="text-left border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
@if (! $hideEditItemColumns)
<x-documents.form.item-columns :type="$type" />
@endif
</th>
@stack('move_th_end')
@if (!$hideItems)
@if (! $hideItems)
@stack('name_th_start')
<th class="text-left border-top-0 border-right-0 border-bottom-0">
{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}
@if (! $hideItemName)
<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;">
{{ (trans_choice($textItemName, 2) != $textItemName) ? trans_choice($textItemName, 2) : trans($textItemName) }}
</th>
@endif
@stack('name_th_end')
@stack('move_th_start')
<th class="text-left border-top-0 border-right-0 border-bottom-0"></th>
@if (! $hideItemDescription)
<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;">
{{ trans($textItemDescription) }}
</th>
@endif
@stack('move_th_end')
@endif
@stack('quantity_th_start')
<th class="text-center pl-2 border-top-0 border-right-0 border-bottom-0">
@if (!$hideQuantity)
{{ trans($textQuantity) }}
@endif
@if (! $hideItemQuantity)
<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;">
{{ trans($textItemQuantity) }}
</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
<th class="text-right border-top-0 border-right-0 border-bottom-0 pr-1" style="padding-left: 5px;">
@if (!$hidePrice)
{{ trans($textPrice) }}
@endif
@if (! $hideItemPrice)
<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;">
{{ trans($textItemPrice) }}
</th>
@endif
@stack('price_th_end')
@stack('total_th_start')
<th class="text-right border-top-0 border-bottom-0 item-total">
@if (!$hideAmount)
{{ trans($textAmount) }}
@endif
@if (! $hideItemAmount)
<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;">
{{ trans($textItemAmount) }}
</th>
@endif
@stack('total_th_end')
@stack('remove_th_start')
<th class="border-top-0 border-right-0 border-bottom-0" style="max-width: 40px">
<div></div>
</th>
<th class="border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
<div></div>
</th>
@stack('remove_th_end')
</tr>
</thead>
<tbody id="{{ (!$hideDiscount && in_array(setting('localisation.discount_location', 'total'), ['item', 'both'])) ? 'invoice-item-discount-rows' : 'invoice-item-rows' }}" class="table-padding-05">
@include('components.documents.form.line-item')
<tbody id="{{ (! $hideDiscount && in_array(setting('localisation.discount_location', 'total'), ['item', 'both'])) ? 'invoice-item-discount-rows' : 'invoice-item-rows' }}" class="table-padding-05">
<x-documents.form.line-item :type="$type" />
@stack('add_item_td_start')
<tr id="addItem">
<td class="text-right border-bottom-0 p-0" colspan="7">
<x-select-item-button
type="{{ $type }}"
is-sale="{{ $isSalePrice }}"
is-purchase="{{ $isPurchasePrice }}"
search-char-limit="{{ $searchCharLimit }}"
/>
</td>
</tr>
<tr id="addItem">
<td colspan="7">
<x-documents.form.item-button
type="{{ $type }}"
is-sale="{{ $isSalePrice }}"
is-purchase="{{ $isPurchasePrice }}"
search-char-limit="{{ $searchCharLimit }}"
/>
</td>
</tr>
@stack('add_item_td_end')
</tbody>
</table>

View File

@ -1,320 +1,404 @@
<tr v-for="(row, index) in items"
:index="index">
<tr v-for="(row, index) in items" :index="index">
@stack('name_td_start')
<td class="border-right-0 border-bottom-0 p-0"
:class="[{'has-error': form.errors.has('items.' + index + '.name') }]"
colspan="7">
<table class="w-100">
<colgroup>
<col class="document-item-40-px">
<col class="document-item-25">
<col class="document-item-30 description">
<col class="document-item-10">
<col class="document-item-10">
<col class="document-item-20">
<col class="document-item-40-px">
</colgroup>
<tbody>
<tr>
@stack('move_td_start')
<td class="pl-3 pb-3 align-middle border-bottom-0 move" style="max-width: 40px;" style="color: #8898aa;">
<div>
<i class="fas fa-grip-vertical"></i>
<td class="border-r-0 border-b-0 p-0"
:class="[{'has-error': form.errors.has('items.' + index + '.name') }]"
colspan="7">
<table class="w-full border-b pb-3">
<colgroup>
<col class="small-col" style="width: 24px;">
<col class="small-col" style="width: 20%;">
<col class="small-col" style="width: 30%;">
<col class="small-col" style="width: 12%;">
<col class="small-col" style="width: 15%;">
<col class="small-col" style="width: 20%;">
<col class="small-col" style="width: 24px;">
</colgroup>
<tbody>
<tr>
@stack('move_td_start')
<td class="align-middle border-b-0 move flex items-center justify-center" style="width:24px; height:100px; color: #8898aa;">
<span class="w-6 material-icons">list</span>
</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-html="row.name" v-if="row.item_id"></span>
<div v-else>
@stack('name_input_start')
<input
type="text"
:ref="'items-' + index + '-name'"
class="form-element mt-0"
:name="'items.' + index + '.name'"
autocomplete="off"
required="required"
data-item="name"
v-model="row.name"
@input="onBindingItemField(index, 'name')"
@change="form.errors.clear('items.' + index + '.name')"
/>
<div class="text-red text-sm mt-1 block"
v-if="form.errors.has('items.' + index + '.name')"
v-html="form.errors.get('items.' + index + '.name')"
></div>
@stack('name_input_end')
</div>
</td>
@stack('move_td_end')
@stack('items_td_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
@stack('name_td_start')
<td class="pb-3 align-middle border-bottom-0 name">
@if (!$hideName)
<span class="aka-text aka-text--body" tabindex="0" v-html="row.name" v-if="row.item_id"></span>
<div v-else>
@stack('name_input_start')
<input
type="text"
:ref="'items-' + index + '-name'"
class="form-control"
:name="'items.' + index + '.name'"
autocomplete="off"
required="required"
data-item="name"
v-model="row.name"
@input="onBindingItemField(index, 'name')"
@change="form.errors.clear('items.' + index + '.name')"/>
<div class="invalid-feedback d-block"
v-if="form.errors.has('items.' + index + '.name')"
v-html="form.errors.get('items.' + index + '.name')">
</div>
@stack('name_input_end')
</div>
@endif
</td>
@stack('name_td_end')
@stack('description_td_start')
<td class="pb-3 border-bottom-0 description">
@if (!$hideDescription)
<textarea
class="form-control"
:ref="'items-' + index + '-description'"
placeholder="{{ trans('items.enter_item_description') }}"
style="height: 46px; overflow: hidden;"
:name="'items.' + index + '.description'"
v-model="row.description"
data-item="description"
resize="none"
@input="onBindingItemField(index, 'description')"
></textarea>
@endif
</td>
@stack('description_td_end')
@endif
@stack('items_td_end')
</td>
@stack('quantity_td_start')
<td class="pb-3 pl-0 pr-2 border-bottom-0 quantity">
@if (!$hideQuantity)
<div>
@stack('quantity_input_start')
<input
type="number"
min="0"
:ref="'items-' + index + '-quantity'"
class="form-control text-center p-0 input-number-disabled"
:name="'items.' + index + '.quantity'"
autocomplete="off"
required="required"
data-item="quantity"
v-model="row.quantity"
@input="onCalculateTotal"
@change="form.errors.clear('items.' + index + '.quantity')">
<div class="invalid-feedback d-block"
v-if="form.errors.has('items.' + index + '.quantity')"
v-html="form.errors.get('items.' + index + '.quantity')">
</div>
@stack('quantity_input_end')
@stack('name_td_end')
@stack('description_td_start')
<td class="px-3 py-3 border-b-0 description">
@if (! $hideItemDescription)
<textarea
class="form-element mt-1.5 resize-none"
style="height:42px;"
:ref="'items-' + index + '-description'"
placeholder="{{ trans('items.enter_item_description') }}"
:name="'items.' + index + '.description'"
v-model="row.description"
data-item="description"
resize="none"
@input="onBindingItemField(index, 'description')"
></textarea>
@endif
</td>
@stack('description_td_end')
@endif
@stack('items_td_end')
@stack('quantity_td_start')
<td class="px-3 py-3 border-b-0 quantity">
@if (! $hideItemQuantity)
<div>
@stack('quantity_input_start')
<input
type="number"
min="0"
:ref="'items-' + index + '-quantity'"
class="form-element mt-0 text-right input-number-disabled"
:name="'items.' + index + '.quantity'"
autocomplete="off"
required="required"
data-item="quantity"
v-model="row.quantity"
@input="onCalculateTotal"
@change="form.errors.clear('items.' + index + '.quantity')"
/>
<div class="text-red text-sm mt-1 block"
v-if="form.errors.has('items.' + index + '.quantity')"
v-html="form.errors.get('items.' + index + '.quantity')">
</div>
@stack('quantity_input_end')
</div>
@endif
</td>
@stack('quantity_td_end')
@stack('price_td_start')
<td class="px-3 py-3 pr-1 border-b-0 price">
@if (! $hideItemPrice)
<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"
/>
@stack('price_input_end')
</div>
@endif
</td>
@stack('price_td_end')
@stack('total_td_start')
<td class="px-3 py-3 text-right border-b-0 total">
@if (! $hideItemAmount)
<div>
<x-form.input.money
name="total"
value="0"
disabled
row-input
data-item="total"
v-model="row.total"
:currency="$currency"
dynamicCurrency="currency"
money-class="text-right mt-0 disabled-money px-0"
form-group-class="text-right disabled-money"
/>
</div>
@endif
</td>
@stack('total_td_end')
@stack('delete_td_start')
<td class="text-right group">
<button type="button" @click="onDeleteItem(index)" class="btn btn-link btn-delete 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>
</td>
@stack('delete_td_end')
</tr>
<tr>
<td colspan="3">
@stack('item_custom_fields')
</td>
<td colspan="4" class="px-0 pb-3">
<div class="relative">
<div class="absolute -top-6 left-3 flex items-center">
@if (! $hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
<div class="text-left border-0 p-0 mr-16" v-if="!row.add_discount">
<button type="button" class="text-xs text-purple" @click="onAddLineDiscount(index)">
<span class="border-b border-transparent transition-all hover:border-purple">
{{ trans('general.title.add', ['type' => trans('invoices.discount')]) }}
</span>
</button>
</div>
@endif
</td>
@stack('quantity_td_end')
@stack('price_td_start')
<td class="pb-3 pl-0 pr-0 border-bottom-0 price" style="padding-right: 5px; padding-left: 5px;">
@if (!$hidePrice)
<div>
@stack('price_input_start')
{{ Form::moneyGroup('price', '', '', ['required' => 'required', 'row-input' => 'true', 'v-model' => 'row.price', 'v-error' => 'form.errors.get(\'items.\' + index + \'.price\')', 'v-error-message' => 'form.errors.get(\'items.\' + index + \'.price\')' , 'data-item' => 'price', 'currency' => $currency, 'dynamic-currency' => 'currency', 'change' => 'row.price = $event; form.errors.clear(\'items.\' + index + \'.price\'); onCalculateTotal'], 0.00, 'text-right input-price p-0') }}
@stack('price_input_end')
</div>
@endif
</td>
@stack('price_td_end')
@stack('total_td_start')
<td class="text-right long-texts pb-3 border-bottom-0 total">
@if (!$hideAmount)
<div>
{{ Form::moneyGroup('total', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row.total', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
</div>
@endif
</td>
@stack('total_td_end')
@stack('delete_td_start')
<td class="pb-3 pl-2 align-middle border-bottom-0 delete" style="max-width: 40px;" >
<div>
<button type="button" @click="onDeleteItem(index)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i>
<div class="text-right border-0 p-0 pr-4">
<button type="button" class="text-xs text-purple" @click="onAddTax(index)">
<span class="border-b border-transparent transition-all hover:border-purple">
{{ trans('general.title.add', ['type' => trans_choice('general.taxes', 1)]) }}
</span>
</button>
</div>
</td>
@stack('delete_td_end')
</tr>
<tr>
<td class="border-top-0" colspan="3">
@stack('item_custom_fields')
</td>
<td class="border-top-0 p-0" colspan="4">
@if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
<div v-if="!row.add_tax || !row.add_discount" class="line-item-link-container position-relative">
<div v-if="!row.add_tax || !row.add_discount" class="line-item-link position-absolute">
<div class="text-left border-0 p-0 mr-5">
<div>
<button type="button" class="btn btn-link btn-sm p-0" @click="onAddLineDiscount(index)" v-if="!row.add_discount">
{{ trans('general.title.add', ['type' => trans('invoices.discount')]) }}
</div>
</div>
<div v-if="row.add_discount" class="flex items-center justify-between pb-3 ml-2">
@stack('discount_input_start')
<div class="form-group mb-0 w-100" style="display: inline-block; position: relative;">
<div class="flex items-center">
<div class="w-16 flex items-center bg-gray-200 p-1 ltr:mr-2 rtl:ml-2 rounded-lg">
<button type="button"
class="w-7 flex justify-center px-2"
:class="[{'btn-outline-primary' : row.discount_type !== 'percentage'}, {'bg-white rounded-lg' : row.discount_type === 'percentage'}]"
@click="onChangeLineDiscountType(index, 'percentage')"
>
<span class="material-icons text-lg">percent</span>
</button>
<button type="button"
class="w-7 px-2"
: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>
</button>
</div>
</div>
<div class="text-right border-0 p-0 pr-4">
<div style="float:left;">
<button type="button" class="btn btn-link btn-sm p-0" @click="onAddTax(index)" v-if="!row.add_tax">
{{ trans('general.title.add', ['type' => trans_choice('general.taxes', 1)]) }}
</button>
<input type="number"
min="0"
placeholder="Discount"
class="form-element text-center mt-0"
:name="'items.' + index + '.discount'"
autocomplete="off"
required="required"
data-item="discount"
v-model="row.discount"
@input="onCalculateTotal"
@change="form.errors.clear('items.' + index + '.discount')"
/>
<div class="text-red text-sm mt-1 block"
v-if="form.errors.has('items.' + index + '.discount')"
v-html="form.errors.get('items.' + index + '.discount')">
</div>
</div>
</div>
</div>
<div v-if="row.add_discount" class="line-item-area pb-3">
<div class="line-item-content">
<div class="long-texts line-item-text" style="float: left; margin-top: 15px; position: absolute; left: -65px;">
{{ trans('invoices.discount') }}
</div>
@stack('discount_input_start')
<div class="form-group mb-0 w-100" style="display: inline-block; position: relative;">
<div class="input-group mb-0 select-tax">
<div class="input-group-prepend">
<button class="btn btn-sm" :class="[{'btn-outline-primary' : row.discount_type !== 'percentage'}, {'btn-primary' : row.discount_type === 'percentage'}]"
@click="onChangeLineDiscountType(index, 'percentage')" type="button">
<i class="fa fa-percent fa-sm"></i>
</button>
<button class="btn btn-sm" :class="[{'btn-outline-primary' : row.discount_type !== 'fixed'}, {'btn-primary' : row.discount_type === 'fixed'}]"
@click="onChangeLineDiscountType(index, 'fixed')" type="button">{{ $currency->symbol }}
</button>
</div>
<input type="number"
max="100"
min="0"
class="form-control text-center"
:name="'items.' + index + '.discount'"
autocomplete="off"
required="required"
data-item="discount"
v-model="row.discount"
@input="onCalculateTotal"
@change="form.errors.clear('items.' + index + '.discount')">
<div class="invalid-feedback d-block"
v-if="form.errors.has('items.' + index + '.discount')"
v-html="form.errors.get('items.' + index + '.discount')">
</div>
</div>
</div>
@stack('discount_input_end')
</div>
<div class="line-item-content-right">
<div class="line-item-content-right-price long-texts text-right">
{{ Form::moneyGroup('discount_amount', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row.discount_amount', 'data-item' => 'discount_amount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
</div>
<div class="line-item-content-right-delete pl-2">
<button type="button" @click="onDeleteDiscount(index)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i>
</button>
</div>
</div>
</div>
@endif
<div class="line-item-area pb-3" v-for="(row_tax, row_tax_index) in row.tax_ids"
:index="row_tax_index">
<div class="line-item-content">
<div class="long-texts line-item-text" style="float: left; margin-top: 15px; margin-right:2px; position: absolute; left: -63px;">
{{ trans_choice('general.taxes', 1) }}
</div>
@stack('discount_input_end')
@stack('taxes_input_start')
<akaunting-select
class="mb-0 select-tax"
:form-classes="[{'has-error': form.errors.has('items.' + index + '.taxes') }]"
:icon="''"
:title="''"
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}'"
:name="'items.' + index + '.taxes.' + row_tax_index"
:options="{{ json_encode($taxes->pluck('title', 'id')) }}"
:dynamic-options="dynamic_taxes"
:disabled-options="form.items[index].tax_ids"
:value="row_tax.id"
@interface="row_tax.id = $event"
@change="onCalculateTotal()"
@new="dynamic_taxes.push($event)"
:form-error="form.errors.get('items.' + index + '.taxes')"
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
></akaunting-select>
@stack('taxes_input_end')
<div class="flex items-center lg:absolute right-0">
<div class="text-right">
<x-form.input.money
name="discount_amount"
value="0"
disabled
row-input
data-item="discount_amount"
v-model="row.discount_amount"
:currency="$currency"
dynamicCurrency="currency"
money-class="text-right disabled-money px-0"
form-group-class="text-right disabled-money"
/>
</div>
<div class="line-item-content-right">
<div class="line-item-content-right-price long-texts text-right">
{{ Form::moneyGroup('tax', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row_tax.price', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
</div>
<div class="line-item-content-right-delete pl-2">
<button type="button" @click="onDeleteTax(index, row_tax_index)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i>
</button>
</div>
<div class="pl-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>
</div>
</div>
<div v-if="row.add_tax" class="line-item-area pb-3" :class="{'pt-2' : row.add_discount}">
<div class="line-item-content">
<div class="long-texts line-item-text" style="float: left; margin-top: 15px; margin-right:2px; position: absolute; left: -63px;">
{{ trans_choice('general.taxes', 1) }}
</div>
</div>
@stack('taxes_input_start')
<akaunting-select
class="mb-0 select-tax"
style="margin-left: 1px; margin-right: -2px;"
:form-classes="[{'has-error': form.errors.has('items.' + index + '.taxes') }]"
:icon="''"
:title="''"
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}'"
:name="'items.' + index + '.taxes.999'"
:options="{{ json_encode($taxes->pluck('title', 'id')) }}"
:dynamic-options="dynamic_taxes"
:disabled-options="form.items[index].tax_ids"
:value="tax_id"
:add-new="{{ json_encode([
'status' => true,
'text' => trans('general.add_new'),
'path' => route('modals.taxes.create'),
'type' => 'modal',
'field' => [
'key' => 'id',
'value' => 'title'
<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>
<div class="lg:w-1/4 lg:absolute">
@stack('taxes_input_start')
<akaunting-select
class="mb-0 select-tax"
:form-classes="[{'has-error': form.errors.has('items.' + index + '.taxes') }]"
:icon="''"
:title="''"
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}'"
:name="'items.' + index + '.taxes.' + row_tax_index"
:options="{{ json_encode($taxes->pluck('title', 'id')) }}"
:dynamic-options="dynamic_taxes"
:disabled-options="form.items[index].tax_ids"
:value="row_tax.id"
@interface="row_tax.id = $event"
@change="onCalculateTotal()"
@new="dynamic_taxes.push($event)"
:form-error="form.errors.get('items.' + index + '.taxes')"
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
></akaunting-select>
@stack('taxes_input_end')
</div>
<div class="flex items-center lg:absolute right-0">
<div class="text-right">
<x-form.input.money
name="tax"
value="0"
disabled
row-input
data-item="total"
v-model="row_tax.price"
:currency="$currency"
dynamicCurrency="currency"
money-class="text-right disabled-money px-0"
form-group-class="text-right disabled-money"
/>
</div>
<div class="pl-2 group">
<button type="button" @click="onDeleteTax(index, row_tax_index)" class="btn btn-link btn-delete 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>
</div>
</div>
</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>
<div class="lg:w-1/4 lg:absolute">
@stack('taxes_input_start')
<akaunting-select
class="mb-0 select-tax"
style="margin-left: 1px; margin-right: -2px;"
:form-classes="[{'has-error': form.errors.has('items.' + index + '.taxes') }]"
:icon="''"
:title="''"
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}'"
:name="'items.' + index + '.taxes.999'"
:options="{{ json_encode($taxes->pluck('title', 'id')) }}"
:dynamic-options="dynamic_taxes"
:disabled-options="form.items[index].tax_ids"
:value="tax_id"
:add-new="{{ json_encode([
'status' => true,
'text' => trans('general.add_new'),
'path' => route('modals.taxes.create'),
'type' => 'modal',
'field' => [
'key' => 'id',
'value' => 'title'
],
'new_text' => trans('modules.new'),
'buttons' => [
'cancel' => [
'text' => trans('general.cancel'),
'class' => 'btn-outline-secondary'
],
'new_text' => trans('modules.new'),
'buttons' => [
'cancel' => [
'text' => trans('general.cancel'),
'class' => 'btn-outline-secondary'
],
'confirm' => [
'text' => trans('general.save'),
'class' => 'btn-success'
]
'confirm' => [
'text' => trans('general.save'),
'class' => 'disabled:bg-green-100'
]
])}}"
@interface="tax_id = $event"
@visible-change="onSelectedTax(index)"
@new="dynamic_taxes.push($event)"
:form-error="form.errors.get('items.' + index + '.taxes')"
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
></akaunting-select>
@stack('taxes_input_end')
]
])}}"
@interface="tax_id = $event"
@visible-change="onSelectedTax(index)"
@new="dynamic_taxes.push($event)"
:form-error="form.errors.get('items.' + index + '.taxes')"
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
></akaunting-select>
@stack('taxes_input_end')
</div>
<div class="flex items-center lg:absolute right-0">
<div class="text-right">
<div class="required disabled text-right input-price disabled-money">
<input type="tel" class="v-money form-control text-right" name="discount_amount" disabled="disabled" value="__">
</div>
</div>
<div class="line-item-content-right">
<div class="line-item-content-right-price long-texts text-right">
<div>
<div class="required disabled text-right input-price disabled-money">
<input type="tel" class="v-money form-control text-right" name="discount_amount" disabled="disabled" value="__">
</div>
</div>
</div>
<div class="line-item-content-right-delete pl-2">
@if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
<button type="button" @click="onDeleteTax(index, 999)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i>
</button>
@endif
</div>
<div class="pl-2 group">
<button type="button" @click="onDeleteTax(index, 999)" class="btn btn-link btn-delete 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>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</div>
</td>
</tr>
</tbody>
</table>
</td>
@stack('name_td_end')
</tr>

View File

@ -1,61 +1,15 @@
<div class="card">
<div class="document-loading" v-if="!page_loaded">
<div><i class="fas fa-spinner fa-pulse fa-7x"></i></div>
</div>
<x-form.section>
<x-slot name="head">
<x-form.section.head title="{{ trans($textSectionMainTitle) }}" description="{{ trans($textSectionMainDescription) }}" />
</x-slot>
<div class="card-body">
<x-documents.form.metadata
type="{{ $type }}"
:document="$document"
hide-contact="{{ $hideContact }}"
contact-type="{{ $contactType }}"
:contact="$contact"
:contacts="$contacts"
:search-route="$contactSearchRoute"
:create-route="$contactCreateRoute"
hide-issued-at="{{ $hideIssuedAt }}"
text-issued-at="{{ $textIssuedAt }}"
issued-at="{{ $issuedAt }}"
hide-document-number="{{ $hideDocumentNumber }}"
text-document-number="{{ $textDocumentNumber }}"
document-number="{{ $documentNumber }}"
hide-due-at="{{ $hideDueAt }}"
text-due-at="{{ $textDueAt }}"
due-at="{{ $dueAt }}"
hide-order-number="{{ $hideOrderNumber }}"
text-order-number="{{ $textOrderNumber }}"
order-number="{{ $orderNumber }}"
/>
<x-slot name="body">
<x-documents.form.metadata type="{{ $type }}" />
<x-documents.form.items
type="{{ $type }}"
:document="$document"
hide-edit-item-columns="{{ $hideEditItemColumns }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
text-items="{{ $textItems }}"
hide-quantity="{{ $hideQuantity }}"
text-quantity="{{ $textQuantity }}"
hide-price="{{ $hidePrice }}"
text-price="{{ $textPrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
text-amount="{{ $textAmount }}"
is-sale-price="{{ $isSalePrice }}"
is-purchase-price="{{ $isPurchasePrice }}"
search-char-limit="{{ $searchCharLimit }}"
/>
<x-documents.form.items type="{{ $type }}" />
<x-documents.form.totals
type="{{ $type }}"
:document="$document"
/>
<x-documents.form.totals type="{{ $type }}" />
<x-documents.form.note
type="{{ $type }}"
:document="$document"
notes-setting="{{ $notesSetting }}"
/>
</div>
</div>
<x-documents.form.note type="{{ $type }}" />
</x-slot>
</x-form.section>

View File

@ -1,47 +1,90 @@
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
@if (!$hideContact)
<div class="row">
<x-select-contact-card
type="{{ $contactType }}"
:contact="$contact"
:contacts="$contacts"
:search-route="$contactSearchRoute"
:create-route="$contactCreateRoute"
error="form.errors.get('contact_name')"
:text-add-contact="$textAddContact"
:text-create-new-contact="$textCreateNewContact"
:text-edit-contact="$textEditContact"
:text-contact-info="$textContactInfo"
:text-choose-different-contact="$textChooseDifferentContact"
<div class="grid sm:grid-cols-7 sm:col-span-6 gap-x-8 gap-y-6 my-3.5">
<div class="sm:col-span-2 required">
<label for="contact" class="form-control-label">
{{ trans_choice($textContact, 1) }}
</label>
<x-documents.form.contact
type="{{ $typeContact }}"
:contact="$contact"
:contacts="$contacts"
:search-route="$searchContactRoute"
:create-route="$createContactRoute"
error="form.errors.get('contact_name')"
:text-add-contact="$textAddContact"
:text-create-new-contact="$textCreateNewContact"
:text-edit-contact="$textEditContact"
:text-contact-info="$textContactInfo"
:text-choose-different-contact="$textChooseDifferentContact"
/>
</div>
<div class="sm:col-span-1"></div>
<div class="sm:col-span-4 grid sm:grid-cols-4 gap-x-8 gap-y-6">
@stack('issue_start')
@if (! $hideIssuedAt)
<x-form.group.date
name="issued_at"
label="{{ trans($textIssuedAt) }}"
icon="calendar_today"
value="{{ $issuedAt }}"
show-date-format="{{ company_date_format() }}"
date-format="Y-m-d"
autocomplete="off"
change="setDueMinDate"
form-group-class="sm:col-span-2"
/>
@endif
@stack('document_number_start')
@if (! $hideDocumentNumber)
<x-form.group.text
name="document_number"
label="{{ trans($textDocumentNumber) }}"
value="{{ $documentNumber }}"
form-group-class="sm:col-span-2"
/>
@endif
@stack('due_start')
@if (! $hideDueAt)
<x-form.group.date
name="due_at"
label="{{ trans($textDueAt) }}"
icon="calendar_today"
value="{{ $dueAt }}"
show-date-format="{{ company_date_format() }}"
date-format="Y-m-d"
autocomplete="off"
period="{{ $periodDueAt }}"
min-date="form.issued_at"
min-date-dynamic="min_due_date"
data-value-min
form-group-class="sm:col-span-2"
/>
@else
<x-form.input.hidden
name="due_at"
:value="old('issued_at', $issuedAt)"
v-model="form.issued_at"
form-group-class="sm:col-span-2"
/>
@endif
@stack('order_number_start')
@if (! $hideOrderNumber)
<x-form.group.text
name="order_number"
label="{{ trans($textOrderNumber) }}"
value="{{ $orderNumber }}"
form-group-class="sm:col-span-2"
not-required
/>
</div>
@endif
</div>
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
<div class="row">
@if (!$hideIssuedAt)
{{ Form::dateGroup('issued_at', trans($textIssuedAt), 'calendar', ['id' => 'issued_at', 'class' => 'form-control datepicker', 'required' => 'required', 'show-date-format' => company_date_format(), 'date-format' => 'Y-m-d', 'autocomplete' => 'off', 'change' => 'setDueMinDate'], $issuedAt) }}
@endif
@if (!$hideDocumentNumber)
{{ Form::textGroup('document_number', trans($textDocumentNumber), 'file', ['required' => 'required'], $documentNumber) }}
@endif
@if (!$hideDueAt)
@if ($type == 'invoice')
{{ Form::dateGroup('due_at', trans($textDueAt), 'calendar', ['id' => 'due_at', 'class' => 'form-control datepicker', 'required' => 'required', 'show-date-format' => company_date_format(), 'period' => setting('invoice.payment_terms'), 'date-format' => 'Y-m-d', 'autocomplete' => 'off', 'min-date' => 'form.issued_at', 'min-date-dynamic' => 'min_due_date', 'data-value-min' => true], $dueAt) }}
@else
{{ Form::dateGroup('due_at', trans($textDueAt), 'calendar', ['id' => 'due_at', 'class' => 'form-control datepicker', 'required' => 'required', 'show-date-format' => company_date_format(), 'date-format' => 'Y-m-d', 'autocomplete' => 'off', 'min-date' => 'form.issued_at', 'min-date-dynamic' => 'min_due_date', 'data-value-min' => true], $dueAt) }}
@endif
@else
{{ Form::hidden('due_at', old('issued_at', $issuedAt), ['id' => 'due_at', 'v-model' => 'form.issued_at']) }}
@endif
@if (!$hideOrderNumber)
{{ Form::textGroup('order_number', trans($textOrderNumber), 'shopping-cart', [], $orderNumber) }}
@endif
</div>
</div>
</div>

View File

@ -1,3 +1,12 @@
<div class="row embed-card-body-footer">
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2), '', $notesSetting, ['rows' => '3', 'class' => 'form-control embed-card-body-footer-textarea'], 'col-md-12 embed-acoordion-textarea') }}
<div class="sm:col-span-6 mb-8">
<x-form.group.textarea
name="notes"
label="{{ trans_choice('general.notes', 2) }}"
:value="$note"
not-required
class="form-element border-0 bg-transparent px-0 rounded-none resize-none"
form-label-class="lg:text-lg"
form-group-class="border-b pb-2 mb-3.5"
rows="1"
/>
</div>

View File

@ -0,0 +1,18 @@
<x-form.section class="-mt-10 mb-14" override="class">
<x-slot name="head">
<x-form.section.head title="{{ trans_choice('general.schedules', 1) }}" description="{{ trans('recurring.form_description.schedule', ['type' => Str::lower(trans_choice('general.invoices', 1))]) }}" />
</x-slot>
<x-slot name="body">
<x-form.group.recurring
:type="$type"
@started="onChangeRecurringDate"
:frequency="$document ? $document->recurring->frequency : null"
:custom-frequency="$document ? $document->recurring->custom_frequency : null"
:limit="$document ? $document->recurring->limit_by : null"
:started-value="$document ? $document->recurring->started_at : null"
:limit-count="$document ? $document->recurring->limit_count : null"
:limit-date-value="$document ? $document->recurring->limit_date : null"
/>
</x-slot>
</x-form.section>

View File

@ -0,0 +1,85 @@
<div class="grid sm:grid-cols-7 sm:col-span-6 gap-x-8 gap-y-6 my-3.5">
<div class="sm:col-span-2 required">
<label for="contact" class="form-control-label">
{{ trans_choice($textContact, 1) }}
</label>
<x-documents.form.contact
type="{{ $typeContact }}"
:contact="$contact"
:contacts="$contacts"
:search-route="$searchContactRoute"
:create-route="$createContactRoute"
error="form.errors.get('contact_name')"
:text-add-contact="$textAddContact"
:text-create-new-contact="$textCreateNewContact"
:text-edit-contact="$textEditContact"
:text-contact-info="$textContactInfo"
:text-choose-different-contact="$textChooseDifferentContact"
/>
</div>
<div class="sm:col-span-1"></div>
<div class="sm:col-span-2 grid gap-x-8 gap-y-6">
@stack('issue_start')
@if (! $hideIssuedAt)
<div class="form-group form-group relative sm:col-span-3">
<label class="form-control-label">
{{ trans($textIssuedAt) }}
</label>
<x-tooltip id="tooltip-issued" placement="bottom" message="{{ trans('documents.recurring.tooltip.document_date', ['type' => config('type.document.' . $type . '.setting.prefix', 'invoice')]) }}">
<div class="relative focused has-label">
<x-form.input.text name="disabled_document_date" value="{{ trans('documents.recurring.auto_generated') }}" class="form-element" disabled />
</div>
</x-tooltip>
<x-form.input.hidden name="issued_at" value="{{ $issuedAt }}" />
</div>
@endif
@stack('due_start')
@if (! $hideDueAt)
<x-form.group.select
name="payment_terms"
label="{{ trans('invoices.payment_due') }}"
:options="$payment_terms"
:selected="($document) ? (string) \Date::parse($document->due_at)->diffInDays(\Date::parse($document->issued_at)) : setting($type . '.payment_terms', 0)"
visible-change="onChangeRecurringDate"
/>
<x-form.input.hidden name="due_at" :value="old('due_at', $dueAt)" v-model="form.due_at" />
@else
<x-form.input.hidden name="due_at" :value="old('due_at', $dueAt)" v-model="form.due_at" />
@endif
</div>
<div class="sm:col-span-2 grid gap-x-8 gap-y-6">
@stack('document_number_start')
@if (! $hideDocumentNumber)
<div class="form-group form-group relative sm:col-span-3">
<label class="form-control-label">
{{ trans($textDocumentNumber) }}
</label>
<x-tooltip id="tooltip-number" placement="bottom" message="{{ trans('documents.recurring.tooltip.document_number', ['type' => config('type.document.' . $type . '.setting.prefix', 'invoice')]) }}">
<div class="relative focused has-label">
<x-form.input.text name="disabled_document_number" value="{{ trans('documents.recurring.auto_generated') }}" class="form-element" disabled />
</div>
</x-tooltip>
<x-form.input.hidden name="document_number" value="{{ $documentNumber }}" />
</div>
@endif
@stack('order_number_start')
@if (! $hideOrderNumber)
<x-form.group.text name="order_number" label="{{ trans($textOrderNumber) }}" value="{{ $orderNumber }}" not-required />
@endif
</div>
</div>

View File

@ -1,156 +1,237 @@
<div class="row document-item-body">
<div class="col-sm-12 mb-4 p-0">
<div class="table-responsive overflow-x-scroll overflow-y-hidden">
<table class="table" id="totals">
<div class="sm:col-span-6">
<div class="mb-4 p-0">
<div class="overflow-y-hidden py-6">
<table id="totals" class="float-right">
<colgroup>
<col class="document-total-50">
<col class="document-total-30">
<col class="document-total-25">
<col class="document-total-50-px">
<col style="width: 47.5%;">
<col style="width: 30%;">
<col style="width: 18%;">
<col style="width: 50px;">
</colgroup>
<tbody id="invoice-total-rows" class="table-padding-05">
<tbody id="invoice-total-rows">
@stack('sub_total_td_start')
<tr id="tr-subtotal">
<td class="border-bottom-0 pb-0"></td>
<td class="text-right border-right-0 border-bottom-0 align-middle pb-0 pr-0">
<strong>{{ trans('invoices.sub_total') }}</strong>
<td class="border-b-0 py-0"></td>
<td class="font-medium text-right border-r-0 border-b-0 align-middle pb-0 pr-0">
{{ trans('invoices.sub_total') }}
</td>
<td class="text-right border-bottom-0 long-texts pb-0 pr-3">
<td class="text-right border-b-0 long-texts py-0">
<div>
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
<x-form.input.money
name="sub_total"
value="0"
disabled
row-input
v-model="totals.sub"
:currency="$currency"
dynamicCurrency="currency"
money-class="text-right disabled-money px-0"
form-group-class="text-right disabled-money"
/>
</div>
</td>
<td class="border-bottom-0 pb-0" style="max-width: 50px"></td>
<td class="border-b-0 pb-0" style="width: 40px"></td>
</tr>
@stack('sub_total_td_end')
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('item_discount_td_start')
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('item_discount_td_start')
<tr id="tr-line-discount" v-if="totals.item_discount">
<td class="border-top-0 pt-0 pb-0"></td>
<td class="text-right border-top-0 border-right-0 border-bottom-0 align-middle pt-0 pb-0 pr-0">
<strong>{{ trans('invoices.item_discount') }}</strong>
<td class="border-t-0 py-0"></td>
<td class="text-right border-t-0 border-r-0 border-b-0 align-middle py-0 pr-0">
<span class="font-medium">{{ trans('invoices.item_discount') }}</span>
</td>
<td class="text-right border-top-0 border-bottom-0 long-texts pt-0 pb-0 pr-3">
<td class="text-right border-t-0 border-b-0 long-texts py-0 pr-0">
<div>
{{ Form::moneyGroup('item_discount', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.item_discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
<x-form.input.money
name="item_discount"
value="0"
disabled
row-input
v-model="totals.item_discount"
:currency="$currency"
dynamicCurrency="currency"
money-class="text-right disabled-money px-0"
form-group-class="text-right disabled-money"
/>
</div>
</td>
<td class="border-top-0 pt-0 pb-0" style="max-width: 50px"></td>
</tr>
@stack('item_discount_td_end')
@endif
@if (in_array(setting('localisation.discount_location', 'total'), ['total', 'both']))
@stack('add_discount_td_start')
<td class="border-t-0 py-0" style="max-width: 24px"></td>
</tr>
@stack('item_discount_td_end')
@endif
@if (in_array(setting('localisation.discount_location', 'total'), ['total', 'both']))
@stack('add_discount_td_start')
<tr id="tr-discount">
<td class="border-top-0 pt-0 pb-0"></td>
<td class="text-right border-top-0 border-right-0 border-bottom-0 align-middle pt-0 pb-0 pr-0">
<el-popover
popper-class="p-0 h-0"
placement="bottom"
width="350"
v-model="discount">
<div class="card d-none" :class="[{'show' : discount}]">
<div class="discount card-body">
<div class="row align-items-center">
<div class="col-sm-8">
<div class="input-group">
<div class="input-group-prepend">
<button class="btn btn-sm" :class="[{'btn-outline-primary' : form.discount_type !== 'percentage'}, {'btn-primary' : form.discount_type === 'percentage'}]"
@click="onChangeDiscountType('percentage')" type="button">
<i class="fa fa-percent fa-sm"></i>
</button>
<button class="btn btn-sm" :class="[{'btn-outline-primary' : form.discount_type !== 'fixed'}, {'btn-primary' : form.discount_type === 'fixed'}]"
@click="onChangeDiscountType('fixed')" type="button">{{ $currency->symbol }}
</button>
</div>
{!! Form::number('pre_discount', null, ['id' => 'pre-discount', 'class' => 'form-control', 'v-model' => 'form.discount']) !!}
</div>
</div>
<div class="col-sm-4">
<div class="discount-description">
<strong>{{ trans('invoices.discount_desc') }}</strong>
</div>
</div>
</div>
</div>
<div class="discount card-footer py-3">
<div class="row float-right">
<div class="col-xs-12 col-sm-12">
<a href="javascript:void(0)" @click="discount = false" class="btn btn-outline-secondary" @click="closePayment">
{{ trans('general.cancel') }}
</a>
{!! Form::button(trans('general.save'), ['type' => 'button', 'id' => 'save-discount', '@click' => 'onAddTotalDiscount', 'class' => 'btn btn-success']) !!}
</div>
</div>
</div>
</div>
</div>
<el-link class="cursor-pointer text-info" slot="reference" type="primary" v-if="!totals.discount_text">{{ trans('invoices.add_discount') }}</el-link>
<el-link slot="reference" type="primary" v-if="totals.discount_text" v-html="totals.discount_text"></el-link>
</el-popover>
</td>
<td class="text-right border-top-0 border-bottom-0 pt-0 pb-0 pr-3">
<div>
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
<td class="border-t-0 py-0"></td>
<td class="text-right border-t-0 border-r-0 border-b-0 align-middle py-0 pr-0">
<div v-if="show_discount_text">
<span class="border-b border-transparent transition-all text-sm text-purple cursor-pointer hover:border-purple" v-if="!totals.discount_text" @click="onAddDiscount()">
{{ trans('invoices.add_discount') }}
</span>
</div>
<span v-if="totals.discount_text" v-html="totals.discount_text"></span>
<div class="flex items-center justify-end" v-if="show_discount">
<div class="w-16 flex items-center bg-gray-200 p-1 ltr:mr-2 rtl:ml-2 rounded-lg">
<button type="button"
class="w-7 flex justify-center px-2"
:class="[{'btn-outline-primary' : form.discount_type !== 'percentage'}, {'bg-white rounded-lg' : form.discount_type === 'percentage'}]"
@click="onChangeDiscountType('percentage')"
>
<span class="material-icons text-lg">percent</span>
</button>
<button type="button"
class="w-7 flex text-lg justify-center px-2"
:class="[{'btn-outline-primary' : form.discount_type !== 'fixed'}, {'bg-white rounded-lg' : form.discount_type === 'fixed'}]"
@click="onChangeDiscountType('fixed')"
>
{{ $currency->symbol }}
</button>
</div>
<x-form.group.number name="pre_discount" id="pre-discount" form-group-class="-mt-1" v-model="form.discount" @input="onAddTotalDiscount" />
</div>
{!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!}
</td>
<td class="border-top-0 pt-0 pb-0" style="max-width: 50px"></td>
<td class="relative text-right border-t-0 border-b-0 py-0 pr-0">
<div>
<x-form.input.money
name="discount_total"
value="0"
disabled
row-input
v-model="totals.discount"
:currency="$currency"
dynamicCurrency="currency"
money-class="text-right disabled-money px-0"
form-group-class="text-right disabled-money"
/>
</div>
<x-form.input.hidden name="discount" v-model="form.discount" />
<span v-if="delete_discount" @click="onRemoveDiscountArea()" class="material-icons-outlined absolute w-6 h-7 flex justify-center -right-10 top-2 text-lg text-gray-300 rounded-lg cursor-pointer hover:bg-gray-100 hover:text-gray-500">delete</span>
</td>
<td class="border-t-0 py-0" style="max-width: 50px"></td>
</tr>
@stack('add_discount_td_end')
@endif
@stack('tax_total_td_start')
<tr v-for="(tax, tax_index) in totals.taxes"
:index="tax_index">
<td class="border-top-0 pt-0 pb-0"></td>
<td class="text-right border-top-0 border-right-0 border-bottom-0 align-middle pt-0 pb-0 pr-0">
<strong v-html="tax.name"></strong>
@stack('add_discount_td_end')
@endif
@stack('tax_total_td_start')
<tr v-for="(tax, tax_index) in totals.taxes" :index="tax_index">
<td class="border-t-0 pt-5 pb-0"></td>
<td class="text-right border-t-0 border-r-0 border-b-0 align-middle pt-5 pb-0 pr-0">
<span class="font-medium" v-html="tax.name"></span>
</td>
<td class="text-right border-top-0 border-bottom-0 long-texts pb-0 pr-3">
<td class="text-right border-t-0 border-b-0 long-texts pt-5 pb-0 pl-3">
<div>
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'tax.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
<x-form.input.money
name="tax_total"
value="0"
disabled
row-input
v-model="tax.total"
:currency="$currency"
dynamicCurrency="currency"
money-class="text-right disabled-money px-0"
form-group-class="text-right disabled-money"
/>
</div>
</td>
<td class="border-top-0 pt-0 pb-0" style="max-width: 50px"></td>
</tr>
@stack('tax_total_td_end')
@stack('grand_total_td_start')
<td class="border-t-0 pt-5 pb-0" style="max-width: 50px"></td>
</tr>
@stack('tax_total_td_end')
@stack('grand_total_td_start')
<tr id="tr-total">
<td class="border-top-0 pt-0 pb-0"></td>
<td class="text-right border-top-0 border-right-0 align-middle pt-0 pb-0 pr-0">
<strong class="document-total-span">{{ trans('invoices.total') }}</strong>
{{ Form::selectGroup('currency_code', '', 'exchange-alt', $currencies, $currency->code, ['required' => 'required', 'model' => 'form.currency_code', 'change' => 'onChangeCurrency'], 'document-total-currency') }}
{!! Form::hidden('currency_rate', (!empty($document)) ? $document->currency_rate : $currency->rate, ['id' => 'currency_rate', 'class' => 'form-control', 'required' => 'required']) !!}
<td class="border-t-0 pt-5 pb-0"></td>
<td class="flex items-center justify-end pt-5 pb-0">
<span class="w-16 text-right font-medium mt-2 ltr:mr-2 rtl:ml-2">
{{ trans('invoices.total') }}
</span>
<x-form.group.select
name="currency_code"
:options="$currencies"
selected="{{ $currency->code }}"
change="onChangeCurrency"
model="form.currency_code"
form-group-class="h-8 -mt-2"
/>
<x-form.input.hidden name="currency_rate" :value="(!empty($document)) ? $document->currency_rate : $currency->rate" />
</td>
<td class="text-right border-top-0 long-texts pt-0 pb-0 pr-3">
<td class="text-right border-t-0 long-texts pt-5 pb-0 pr-0">
<div>
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
<x-form.input.money
name="grand_total"
value="0"
disabled
row-input
v-model="totals.total"
:currency="$currency"
dynamicCurrency="currency"
money-class="text-right disabled-money px-0"
form-group-class="text-right disabled-money"
/>
</div>
</td>
<td class="border-top-0 pt-0 pb-0" style="max-width: 50px"></td>
<td class="border-t-0 pt-5 pb-0" style="max-width: 50px"></td>
</tr>
@stack('grand_total_td_end')
@stack('currency_conversion_td_start')
<tr id="tr-currency-conversion" class="d-none" :class="[{'d-table-row': (('{{ $currency->code }}' != form.currency_code) && totals.total || dropdown_visible)}]">
<td class="border-top-0 pb-0"></td>
<td class="text-right border-top-0 border-right-0 align-middle pb-0 pr-3 pr-0" colspan="2">
<akaunting-currency-conversion
currency-conversion-text="{{ trans('currencies.conversion') }}"
:price="(totals.total / form.currency_rate).toFixed(2)"
:currecy-code="form.currency_code"
:currency-rate="form.currency_rate"
:currency-symbol="currency_symbol"
@change="form.currency_rate = $event"
></akaunting-currency-conversion>
</td>
<td class="border-top-0 pt-0 pb-0" style="max-width: 50px"></td>
</tr>
@stack('currency_conversion_td_end')
<tr id="tr-currency-conversion" :class="[
{'hidden': ! (('{{ $currency->code }}' != form.currency_code) && totals.total || dropdown_visible)},
{'contents': (('{{ $currency->code }}' != form.currency_code) && totals.total || dropdown_visible)}
]">
<td class="border-t-0 pt-5 pb-0"></td>
<td colspan="2" class="text-right border-t-0 border-r-0 align-middle pt-5 pb-0 pr-0">
<akaunting-currency-conversion
currency-conversion-text="{{ trans('currencies.conversion') }}"
:price="(totals.total / form.currency_rate).toFixed(2)"
:currecy-code="form.currency_code"
:currency-rate="form.currency_rate"
:currency-symbol="currency_symbol"
@change="form.currency_rate = $event"
></akaunting-currency-conversion>
</td>
<td class="border-t-0 pt-5 pb-0" style="max-width: 50px"></td>
</tr>
@stack('currency_conversion_td_end')
</tbody>
</table>
</div>

View File

@ -0,0 +1,15 @@
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif
@endcan
@else
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif
@endif

View File

@ -1,101 +0,0 @@
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
<tr class="row table-head-line">
@if (!$hideBulkAction)
<th class="{{ $classBulkAction }}">
{{ Form::bulkActionAllGroup() }}
</th>
@endif
@stack('document_number_th_start')
@if (!$hideDocumentNumber)
<th class="{{ $classDocumentNumber }}">
@stack('document_number_th_inside_start')
@if (!$hideBulkAction)
@sortablelink('document_number', trans_choice($textDocumentNumber, 1), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])
@else
@sortablelink('document_number', trans_choice($textDocumentNumber, 1), ['filter' => 'active, visible'], ['rel' => 'nofollow'])
@endif
@stack('document_number_th_inside_end')
</th>
@endif
@stack('document_number_th_end')
@stack('contact_name_th_start')
@if (!$hideContactName)
<th class="{{ $classContactName }}">
@stack('contact_name_th_inside_start')
@sortablelink('contact_name', trans_choice($textContactName, 1))
@stack('contact_name_th_inside_end')
</th>
@endif
@stack('contact_name_th_end')
@stack('amount_th_start')
@if (!$hideAmount)
<th class="{{ $classAmount }}">
@stack('amount_th_inside_start')
@sortablelink('amount', trans('general.amount'))
@stack('amount_th_inside_end')
</th>
@endif
@stack('amount_th_end')
@stack('issued_at_th_start')
@if (!$hideIssuedAt)
<th class="{{ $classIssuedAt }}">
@stack('issued_at_th_inside_start')
@sortablelink('issued_at', trans($textIssuedAt))
@stack('issued_at_th_inside_end')
</th>
@endif
@stack('issued_at_th_end')
@stack('due_at_th_start')
@if (!$hideDueAt)
<th class="{{ $classDueAt }}">
@stack('due_at_th_inside_start')
@sortablelink('due_at', trans($textDueAt))
@stack('due_at_th_inside_end')
</th>
@endif
@stack('due_at_th_end')
@stack('status_th_start')
@if (!$hideStatus)
<th class="{{ $classStatus }}">
@stack('status_th_inside_start')
@sortablelink('status', trans_choice('general.statuses', 1))
@stack('status_th_inside_end')
</th>
@endif
@stack('status_th_end')
@if (!$hideActions)
<th class="{{ $classActions }}">
<a>{{ trans('general.actions') }}</a>
</th>
@endif
</tr>
</thead>
<tbody>
@foreach($documents as $item)
@include('partials.documents.index.card-table-row')
@endforeach
</tbody>
</table>
</div>

View File

@ -1,5 +0,0 @@
<div class="card-footer table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $documents])
</div>
</div>

View File

@ -1,33 +0,0 @@
@if (!$hideBulkAction)
<div class="card-header border-bottom-0" :class="[{'bg-gradient-primary': bulk_action.show}]">
{!! Form::open([
'method' => 'GET',
'route' => $formCardHeaderRoute,
'role' => 'form',
'class' => 'mb-0'
]) !!}
@if (!$hideSearchString)
<div class="align-items-center" v-if="!bulk_action.show">
<x-search-string model="{{ $searchStringModel }}" />
</div>
@endif
{{ Form::bulkActionRowGroup($textBulkAction, $bulkActions, $bulkActionRouteParameters) }}
{!! Form::close() !!}
</div>
@else
@if (!$hideSearchString)
<div class="card-header border-bottom-0">
{!! Form::open([
'method' => 'GET',
'route' => $formCardHeaderRoute,
'role' => 'form',
'class' => 'mb-0'
]) !!}
<div class="align-items-center">
<x-search-string model="{{ $searchStringModel }}" />
</div>
{!! Form::close() !!}
</div>
@endif
@endif

View File

@ -1,73 +1,110 @@
@if ($hideEmptyPage || ($documents->count() || request()->get('search', false)))
<div class="card">
<x-documents.index.card-header
type="{{ $type }}"
hide-bulk-action="{{ $hideBulkAction }}"
:form-card-header-route="$formCardHeaderRoute"
hide-search-string="{{ $hideSearchString }}"
search-string-model="{{ $searchStringModel }}"
text-bulk-action="{{ $textBulkAction }}"
bulk-action-class="{{ $bulkActionClass }}"
:bulk-actions="$bulkActions"
:bulk-action-route-parameters="$bulkActionRouteParameters"
/>
@if (! $hideSummary)
<x-index.summary :items="$summaryItems" />
@endif
<x-documents.index.card-body
type="{{ $type }}"
:documents="$documents"
hide-bulk-action="{{ $hideBulkAction }}"
class-bulk-action="{{ $classBulkAction }}"
hide-document-number="{{ $hideDocumentNumber }}"
text-document-number="{{ $textDocumentNumber }}"
class-document-number="{{ $classDocumentNumber }}"
hide-contact-name="{{ $hideContactName }}"
text-contact-name="{{ $textContactName }}"
class-contact-name="{{ $classContactName }}"
hide-amount="{{ $hideAmount }}"
class-amount="{{ $classAmount }}"
hide-issued-at="{{ $hideIssuedAt }}"
text-issued-at="{{ $textIssuedAt }}"
class-issued-at="{{ $classIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
class-due-at="{{ $classDueAt }}"
text-due-at="{{ $textDueAt }}"
hide-status="{{ $hideStatus }}"
class-status="{{ $classStatus }}"
hide-actions="{{ $hideActions }}"
class-actions="{{ $classActions }}"
text-document-status="{{ $textDocumentStatus }}"
hide-button-show="{{ $hideButtonShow }}"
route-button-show="{{ $routeButtonShow }}"
hide-button-edit="{{ $hideButtonEdit }}"
check-button-reconciled="{{ $checkButtonReconciled }}"
route-button-edit="{{ $routeButtonEdit }}"
check-button-cancelled="{{ $checkButtonCancelled }}"
hide-button-duplicate="{{ $hideButtonDuplicate }}"
permission-create="{{ $permissionCreate }}"
route-button-duplicate="{{ $routeButtonDuplicate }}"
hide-button-cancel="{{ $hideButtonCancel }}"
permission-update="{{ $permissionUpdate }}"
route-button-cancelled="{{ $routeButtonCancelled }}"
hide-button-delete="{{ $hideButtonDelete }}"
permission-delete="{{ $permissionDelete }}"
route-button-delete="{{ $routeButtonDelete }}"
text-modal-delete="{{ $textModalDelete }}"
value-modal-delete="{{ $valueModalDelete }}"
/>
<x-index.container>
@if (! $withoutTabs)
<x-tabs active="{{ $tabActive }}">
<x-slot name="navs">
@stack('document_nav_start')
<x-documents.index.card-footer
type="{{ $type }}"
:documents="$documents"
/>
</div>
@if ($tabActive == $type)
<x-tabs.nav id="{{ $type }}" name="{{ trans_choice($textTabDocument, 2) }}" active />
@else
<x-tabs.nav-link id="{{ $type }}" name="{{ trans_choice($textTabDocument, 2) }}" href="{{ route($routeTabDocument) }}" />
@endif
@stack('document_nav_end')
@if ($tabActive == 'recurring-templates')
@if (! $hideRecurringTemplates)
<x-tabs.nav id="recurring-templates" name="{{ trans_choice('general.recurring_templates', 2) }}" active />
@endif
@else
@if (! $hideRecurringTemplates)
<x-tabs.nav-link id="recurring-templates" name="{{ trans_choice('general.recurring_templates', 2) }}" href="{{ route($routeTabRecurring) }}" />
@endif
@endif
@stack('recurring_nav_end')
</x-slot>
<x-slot name="content">
@if ((! $hideSearchString) && (! $hideBulkAction))
<x-index.search
search-string="{{ $searchStringModel }}"
bulk-action="{{ $bulkActionClass }}"
route="{{ $searchRoute }}"
/>
@elseif ((! $hideSearchString) && $hideBulkAction)
<x-index.search
search-string="{{ $searchStringModel }}"
route="{{ $searchRoute }}"
/>
@elseif ($hideSearchString && (! $hideBulkAction))
<x-index.search
bulk-action="{{ $bulkActionClass }}"
route="{{ $searchRoute }}"
/>
@endif
@stack('document_tab_start')
@if ($tabActive == $type)
<x-tabs.tab id="{{ $type }}">
<x-documents.index.document :type="$type" :documents="$documents" />
</x-tabs.tab>
@endif
@stack('document_tab_end')
@if ($tabActive == 'recurring-templates')
@if (! $hideRecurringTemplates)
<x-tabs.tab id="recurring-templates">
<x-documents.index.recurring-templates :type="$type" :documents="$documents" />
</x-tabs.tab>
@endif
@endif
@stack('recurring_tab_end')
</x-slot>
</x-tabs>
@else
@if ((! $hideSearchString) && (! $hideBulkAction))
<x-index.search
search-string="{{ $searchStringModel }}"
bulk-action="{{ $bulkActionClass }}"
route="{{ $searchRoute }}"
/>
@elseif ((! $hideSearchString) && $hideBulkAction)
<x-index.search
search-string="{{ $searchStringModel }}"
route="{{ $searchRoute }}"
/>
@elseif ($hideSearchString && (! $hideBulkAction))
<x-index.search
bulk-action="{{ $bulkActionClass }}"
route="{{ $searchRoute }}"
/>
@endif
@stack('document_start')
<x-documents.index.document :type="$type" :documents="$documents" />
@stack('document_end')
@endif
</x-index.container>
@else
<x-documents.index.empty-page
type="{{ $type }}"
<x-empty-page
group="{{ $group }}"
page="{{ $page }}"
alias="{{ $alias }}"
:buttons="$emptyPageButtons"
image-empty-page="{{ $imageEmptyPage }}"
text-empty-page="{{ $textEmptyPage }}"
url-docs-path="{{ $urlDocsPath }}"
create-route="{{ $createRoute }}"
check-permission-create="{{ $checkPermissionCreate }}"
permission-create="{{ $permissionCreate }}"
/>
@endif

View File

@ -0,0 +1,182 @@
<x-table>
<x-table.thead>
<x-table.tr class="flex items-center px-1">
@if (! $hideBulkAction)
<x-table.th class="{{ $classBulkAction }}" override="class">
<x-index.bulkaction.all />
</x-table.th>
@endif
@stack('due_at_and_issued_at_th_start')
@if (! $hideDueAt || ! $hideIssuedAt)
<x-table.th class="{{ $classDueAtAndIssueAt }}">
@stack('due_at_th_start')
@if (! $hideDueAt)
<x-slot name="first">
@stack('due_at_th_inside_start')
<x-sortablelink column="due_at" title="{{ trans($textDueAt) }}" />
@stack('due_at_th_inside_end')
</x-slot>
@endif
@stack('due_at_th_end')
@stack('issued_at_th_start')
@if (! $hideIssuedAt)
<x-slot name="second">
@stack('issued_at_th_inside_start')
<x-sortablelink column="issued_at" title="{{ trans($textIssuedAt) }}" />
@stack('issued_at_th_inside_end')
</x-slot>
@endif
@stack('issued_at_th_end')
</x-table.th>
@endif
@stack('due_at_and_issued_at_th_end')
@stack('status_th_start')
@if (! $hideStatus)
<x-table.th class="{{ $classStatus }}">
@stack('status_th_inside_start')
<x-sortablelink column="status" title="{{ trans_choice('general.statuses', 1) }}" />
@stack('status_th_inside_end')
</x-table.th>
@endif
@stack('status_th_end')
@stack('contact_name_ane_document_number_th_start')
@if (! $hideContactName || ! $hideDocumentNumber)
<x-table.th class="{{ $classContactNameAndDocumentNumber }}">
@stack('contact_name_th_start')
@if (! $hideContactName)
<x-slot name="first">
@stack('contact_name_th_inside_start')
<x-sortablelink column="contact_name" title="{{ trans_choice($textContactName, 1) }}" />
@stack('contact_name_th_inside_end')
</x-slot>
@endif
@stack('contact_name_th_end')
@stack('document_number_th_start')
@if (! $hideDocumentNumber)
<x-slot name="second">
@stack('document_number_th_inside_start')
<x-sortablelink column="document_number" title="{{ trans_choice($textDocumentNumber, 1) }}" />
@stack('document_number_th_inside_end')
</x-slot>
@endif
@stack('document_number_th_end')
</x-table.th>
@endif
@stack('contact_name_ane_document_number_th_end')
@stack('amount_th_start')
@if (! $hideAmount)
<x-table.th class="{{ $classAmount }}" kind="amount">
@stack('amount_th_inside_start')
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
@stack('amount_th_inside_end')
</x-table.th>
@endif
@stack('amount_th_end')
</x-table.tr>
</x-table.thead>
<x-table.tbody>
@foreach($documents as $item)
@php $paid = $item->paid; @endphp
<x-table.tr href="{{ route($showRoute, $item->id) }}">
@if (! $hideBulkAction)
<x-table.td class="{{ $classBulkAction }}" override="class">
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->document_number }}" />
</x-table.td>
@endif
@stack('due_at_and_issued_at_td_start')
@if (! $hideDueAt || ! $hideIssuedAt)
<x-table.td class="{{ $classDueAtAndIssueAt }}">
@stack('due_at_td_start')
@if (! $hideDueAt)
<x-slot name="first" class="font-bold truncate" override="class">
@stack('due_at_td_inside_start')
<x-date :date="$item->due_at" function="diffForHumans" />
@stack('due_at_td_inside_end')
</x-slot>
@endif
@stack('due_at_td_end')
@stack('issued_at_td_start')
@if (! $hideIssuedAt)
<x-slot name="second">
@stack('issued_at_td_inside_start')
<x-date date="{{ $item->issued_at }}" />
@stack('issued_at_td_inside_end')
</x-slot>
@endif
@stack('issued_at_td_end')
</x-table.td>
@endif
@stack('due_at_and_issued_at_td_end')
@stack('status_td_start')
@if (!$hideStatus)
<x-table.td class="{{ $classStatus }}">
@stack('status_td_inside_start')
<span class="px-2.5 py-1 text-xs font-medium rounded-xl bg-{{ $item->status_label }} text-text-{{ $item->status_label }}">
{{ trans($textDocumentStatus . $item->status) }}
</span>
@stack('status_td_inside_end')
</x-table.td>
@endif
@stack('status_td_end')
@stack('contact_name_and_document_number_td_start')
@if (! $hideContactName || ! $hideDocumentNumber)
<x-table.td class="{{ $classContactNameAndDocumentNumber }}">
@stack('contact_name_td_start')
@if (! $hideContactName)
<x-slot name="first">
@stack('contact_name_td_inside_start')
{{ $item->contact_name }}
@stack('contact_name_td_inside_end')
</x-slot>
@endif
@stack('contact_name_td_end')
@stack('document_number_td_start')
@if (! $hideDocumentNumber)
<x-slot name="second" class="w-20 font-normal group" data-tooltip-target="tooltip-information-{{ $item->id }}" data-tooltip-placement="left" override="class">
@stack('document_number_td_inside_start')
<span class="border-black border-b border-dashed">
{{ $item->document_number }}
</span>
<div class="w-28 absolute h-10 -ml-12 -mt-6"></div>
@stack('document_number_td_inside_end')
<x-documents.index.information :document="$item" :hide-show="$hideShow" :show-route="$showContactRoute" />
</x-slot>
@endif
@stack('document_number_td_end')
</x-table.td>
@endif
@stack('contact_name_and_document_number_td_end')
@stack('amount_td_start')
@if (! $hideAmount)
<x-table.td class="{{ $classAmount }}" kind="amount">
@stack('amount_td_inside_start')
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
@stack('amount_td_inside_end')
</x-table.td>
<x-table.td kind="action">
<x-table.actions :model="$item" />
</x-table.td>
@endif
@stack('amount_td_end')
</x-table.tr>
@endforeach
</x-table.tbody>
</x-table>
<x-pagination :items="$documents" />

View File

@ -1,26 +0,0 @@
<div class="card">
<div class="row align-items-center">
<div class="col-xs-12 col-sm-6 text-center p-5">
<img class="blank-image" src="{{ asset($imageEmptyPage) }}" alt="@yield('title')"/>
</div>
<div class="col-xs-12 col-sm-6 text-center p-5">
<p class="text-justify description">
{!! trans($textEmptyPage) !!} {!! trans('general.empty.documentation', ['url' => $urlDocsPath]) !!}
</p>
@if ($checkPermissionCreate)
@can($permissionCreate)
<a href="{{ route($createRoute) }}" class="btn btn-success float-right mt-4">
<span class="btn-inner--text">{{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }}</span>
</a>
@endcan
@else
<a href="{{ route($createRoute) }}" class="btn btn-success float-right mt-4">
<span class="btn-inner--text">{{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }}</span>
</a>
@endif
</div>
</div>
</div>

View File

@ -0,0 +1,124 @@
<div id="tooltip-information-{{ $document->id }}" role="tooltip" class="w-96 inline-block absolute z-10 text-sm font-medium rounded-lg border border-gray-200 shadow-sm whitespace-nowrap tooltip-content transition-visible bg-lilac-900 border-none text-black p-6 cursor-auto opacity-0 invisible">
<div class="absolute w-2 h-2 inset-y-1/2 -right-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-lilac-900 before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0 data-popper-arrow"></div>
<ul>
<li class="relative flex items-center text-sm mb-7">
<div class="flex flex-col items-center mr-2">
<span class="material-icons-outlined text-black-300">person</span>
</div>
<div class="flex flex-col items-start">
<div class="font-bold">
{{ $document->document_number }}
</div>
<div class="absolute ltr:right-0 rtl:left-0">
<x-index.status status="{{ $document->status }}" background-color="bg-{{ $document->status_label }}" text-color="text-text-{{ $document->status_label }}" />
</div>
@if (! $hideShow)
<a href="{{ route($showRoute, $document->contact_id) }}" class="font-medium border-b border-black">
{{ $document->contact_name }}
</a>
@else
<div class="font-medium border-b border-black">
{{ $document->contact_name }}
</div>
@endif
</div>
</li>
<li class="relative flex items-center text-sm mb-7">
<div class="flex flex-col items-center mr-2">
<span class="material-icons-outlined text-black-300">bookmark_border</span>
</div>
<div class="flex flex-col">
<div class="flex items-center">
@php $history = $document->last_history; @endphp
<span class="font-medium mr-2">
{{ $history->description }}
</span>
<span class="flex items-center font-normal">
{{ \Date::parse($history->created_at)->diffForHumans() }}
</span>
</div>
</div>
</li>
@if ($document->items->count())
@foreach ($document->items as $document_item)
<li class="relative flex items-center text-sm mb-7">
<div class="flex flex-col items-center mr-2">
<span class="material-icons-outlined text-black-300">sell</span>
</div>
<div class="w-full flex flex-col">
<div class="flex items-center justify-between">
<div class="w-60 font-medium truncate">
{{ $document_item->name }}
</div>
<span class="font-normal">
<x-money :amount="$document_item->price" :currency="$document->currency_code" convert />
</span>
</div>
<div class="w-40 font-normal text-sm truncate">
{{ $document_item->description }}
</div>
</div>
</li>
@if ($loop->index >= 2)
@break
@endif
@endforeach
@endif
@if ($document->items->count() > 2)
<li class="ml-10 mb-10">
@if (! $hideShow)
<a href="{{ route($showRoute, $document->id) }}" class="border-b">
{{ trans('documents.invoice_detail.more_item', ['count' => $document->items->count() - 2]) }}
</a>
@else
<div class="border-b">
{{ trans('documents.invoice_detail.more_item', ['count' => $document->items->count() - 2]) }}
</div>
@endif
</li>
@endif
<li class="relative flex items-center text-sm">
<div class="flex flex-col items-center mr-2">
<span class="material-icons-outlined text-black-300">attach_money</span>
</div>
<div class="w-full flex flex-col">
<div class="flex items-center justify-between font-medium">
<span>
{{ trans('general.paid') }}
</span>
@if ($document->paid)
<span>
<x-money :amount="$document->paid" :currency="$document->currency_code" convert />
</span>
@endif
</div>
<div class="flex items-center justify-between font-medium">
<span>
{{ trans('general.due') }}
</span>
<span>
<x-money :amount="$document->amount" :currency="$document->currency_code" convert />
</span>
</div>
</div>
</li>
</ul>
</div>

View File

@ -0,0 +1,27 @@
<x-dropdown id="dropdown-more-actions">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endcan
@else
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endif
@if (! $hideExport)
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}">
{{ trans('general.export') }}
</x-dropdown.link>
@endif
</x-dropdown>

View File

@ -0,0 +1,101 @@
<x-table>
<x-table.thead>
<x-table.tr class="flex items-center px-1">
@if (! $hideBulkAction)
<x-table.th class="{{ $classBulkAction }}" override="class">
<x-index.bulkaction.all />
</x-table.th>
@endif
<x-table.th class="w-4/12 sm:w-3/12">
<x-slot name="first">
<x-sortablelink column="recurring.started_at" title="{{ trans('general.start_date') }}" />
</x-slot>
<x-slot name="second">
{{ trans('recurring.last_issued') }}
</x-slot>
</x-table.th>
<x-table.th class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider hidden sm:table-cell">
<x-sortablelink column="category.name" title="{{ trans_choice('general.categories', 1) }}" />
</x-table.th>
<x-table.th class="w-4/12 sm:w-3/12">
<x-sortablelink column="recurring.status" title="{{ trans_choice('general.statuses', 1) }}" />
</x-table.th>
<x-table.th class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
{{ trans('recurring.frequency') }}
</x-slot>
<x-slot name="second">
{{ trans('recurring.duration') }}
</x-slot>
</x-table.th>
<x-table.th class="w-4/12 sm:w-2/12 text-right pl-6 pr-0">
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
</x-table.th>
</x-table.tr>
</x-table.thead>
<x-table.tbody>
@foreach($documents as $item)
<x-table.tr href="{{ route('recurring-transactions.show', $item->id) }}">
@if (! $hideBulkAction)
<x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->contact->name }}" />
</x-table.td>
@endif
<x-table.td class="w-4/12 sm:w-3/12">
<x-slot name="first">
<x-date date="{{ $item->recurring->started_at }}" />
</x-slot>
<x-slot name="second">
@if ($last = $item->recurring->getLastRecurring())
{{ $last->format(company_date_format()) }}
@endif
</x-slot>
</x-table.td>
<x-table.td class="w-2/12 hidden sm:table-cell">
<div class="flex items-center">
<x-index.category :model="$item->category" />
</div>
</x-table.td>
<x-table.td class="w-4/12 sm:w-3/12">
<x-index.status status="{{ $item->recurring->status }}" background-color="bg-{{ $item->recurring_status_label }}" text-color="text-text-{{ $item->recurring_status_label }}" />
</x-table.td>
<x-table.td class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
{{ trans('recurring.' . $item->recurring->frequency) }}
</x-slot>
<x-slot name="second">
@if ($item->recurring->limit_by == 'count')
@if ($item->recurring->limit_count == 0)
{{ trans('recurring.ends_never') }}
@else
{{ trans('recurring.ends_after', ['times' => $item->recurring->limit_count]) }}
@endif
@else
{{ trans('recurring.ends_date', ['date' => company_date($item->recurring->limit_date)]) }}
@endif
</x-slot>
</x-table.td>
<x-table.td class="relative w-4/12 sm:w-2/12 text-right pl-6 pr-0">
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
</x-table.td>
<x-table.td kind="action">
<x-table.actions :model="$item" />
</x-table.td>
</x-table.tr>
@endforeach
</x-table.tbody>
</x-table>
<x-pagination :items="$documents" />

View File

@ -1,23 +0,0 @@
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (!$hideCreate)
<a href="{{ route($createRoute) }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a>
@endif
@if (!$hideImport)
<a href="{{ route($importRoute, $importRouteParameters) }}" class="btn btn-white btn-sm">{{ trans('import.import') }}</a>
@endif
@endcan
@else
@if (!$hideCreate)
<a href="{{ route($createRoute) }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a>
@endif
@if (!$hideImport)
<a href="{{ route($importRoute, $importRouteParameters) }}" class="btn btn-white btn-sm">{{ trans('import.import') }}</a>
@endif
@endif
@if (!$hideExport)
<a href="{{ route($exportRoute, request()->input()) }}" class="btn btn-white btn-sm">{{ trans('general.export') }}</a>
@endif

View File

@ -1,18 +1,22 @@
@php
$document_items = 'false';
@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
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 !!};
</script>
<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 }}';
</script>
@endpush
<script src="{{ asset( $scriptFile . '?v=' . $version) }}"></script>
<x-script :alias="$alias" :folder="$folder" :file="$file" />

View File

@ -1,9 +1,17 @@
@if ($attachment)
<div class="row align-items-center">
@foreach ($attachment as $file)
<div class="col-xs-12 col-sm-4 mb-4">
@include('partials.media.file')
</div>
@endforeach
</div>
<x-show.accordion type="attachment" :open="($accordionActive == 'attachment')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans_choice('general.attachments', 2) }}"
description="{{ trans('documents.form_description.attachment', ['type' => $type]) }}"
/>
</x-slot>
<x-slot name="body">
@foreach ($attachment as $file)
<x-media.file :file="$file" />
@endforeach
</x-slot>
</x-show.accordion>
@endif

View File

@ -0,0 +1,23 @@
@stack('add_new_button_start')
@if (! $hideCreate)
@can($permissionCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
{{ trans($textCreate) }}
</x-link>
@endcan
@endif
@stack('edit_button_start')
@if (! in_array($document->status, $hideButtonStatuses))
@if (! $hideEdit)
@can($permissionUpdate)
<x-link href="{{ route($editRoute, $document->id) }}">
{{ trans('general.edit') }}
</x-link>
@endcan
@endif
@endif
@stack('edit_button_end')

View File

@ -0,0 +1,24 @@
<x-show.accordion type="children" :open="($accordionActive == 'children')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans_choice('general.invoices', 2) }}"
description="{!! trans('invoices.slider.children', ['count' => $document->children()->count()]) !!}"
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
@if ($document->children()->count())
@foreach ($document->children() as $child)
@php $url = '<a href="' . route('transactions.show', $child->id) . '" class="text-purple" @click="e => e.target.classList.add(\'disabled\')">' . $child->number . '</a>' @endphp
<div class="my-2">
{{ trans('recurring.child', ['url' => $url, 'date' => company_date($child->due_at)]) }}
</div>
@endforeach
@else
{{ trans('general.none') }}
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,157 +1,120 @@
@stack('content_header_start')
@if (!$hideHeader)
<x-documents.show.header
type="{{ $type }}"
:document="$document"
hide-header-status="{{ $hideHeaderStatus }}"
text-history-status="{{ $textHistoryStatus }}"
class-header-status="{{ $classHeaderStatus }}"
hide-header-contact="{{ $hideHeaderContact }}"
text-header-contact="{{ $textHeaderContact }}"
class-header-contact="{{ $classHeaderContact }}"
route-contact-show="{{ $routeContactShow }}"
hide-header-amount="{{ $hideHeaderAmount }}"
text-header-amount="{{ $textHeaderAmount }}"
class-header-amount="{{ $classHeaderAmount }}"
hide-header-due-at="{{ $hideHeaderDueAt }}"
text-header-due-at="{{ $textHeaderDueAt }}"
class-header-due-at="{{ $classHeaderDueAt }}"
/>
@endif
@stack('content_header_end')
<div class="flex flex-col lg:flex-row my-10 lg:space-x-24 rtl:space-x-reverse space-y-12 lg:space-y-0">
<div class="w-full lg:w-5/12 space-y-12">
@stack('recurring_message_start')
@stack('recurring_message_start')
@if (!$hideRecurringMessage)
<x-documents.show.recurring-message
type="{{ $type }}"
:document="$document"
text-recurring-type="{{ $textRecurringType }}"
/>
@endif
@stack('recurring_message_end')
@if (! $hideRecurringMessage)
@if (($recurring = $document->recurring) && ($next = $recurring->getNextRecurring()))
@php
$recurring_message = trans('recurring.message', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
'date' => $next->format(company_date_format())
]);
@endphp
@stack('status_message_start')
@if (!$hideStatusMessage)
<x-documents.show.status-message
type="{{ $type }}"
:document="$document"
text-status-message="{{ $textStatusMessage }}"
/>
@endif
@stack('status_message_end')
<x-documents.show.message type="recurring" background-color="bg-blue-100" text-color="text-blue-600" message="{{ $recurring_message }}" />
@endif
@stack('timeline_start')
@if (!$hideTimeline)
<x-documents.show.timeline
type="{{ $type }}"
:document="$document"
:hide-timeline-statuses="$hideTimelineStatuses"
hide-timeline-create="{{ $hideTimelineCreate }}"
text-timeline-create-title="{{ $textTimelineCreateTitle }}"
text-timeline-create-message="{{ $textTimelineCreateMessage }}"
hide-button-edit="{{ $hideButtonEdit }}"
permission-update="{{ $permissionUpdate }}"
route-button-edit="{{ $routeButtonEdit }}"
hide-timeline-sent="{{ $hideTimelineSent }}"
text-timeline-sent-title="{{ $textTimelineSentTitle }}"
text-timeline-sent-status-draft="{{ $textTimelineSentStatusDraft }}"
hide-button-sent="{{ $hideButtonSent }}"
route-button-sent="{{ $routeButtonSent }}"
text-timeline-sent-status-mark-sent="{{ $textTimelineSentStatusMarkSent }}"
hide-button-received="{{ $hideButtonReceived }}"
route-button-received="{{ $routeButtonReceived }}"
text-timeline-sent-status-received="{{ $textTimelineSentStatusReceived }}"
hide-button-email="{{ $hideButtonEmail }}"
route-button-email="{{ $routeButtonEmail }}"
text-timeline-send-status-mail="{{ $textTimelineSendStatusMail }}"
hide-button-share="{{ $hideButtonShare }}"
:signed-url="$signedUrl"
hide-timeline-paid="{{ $hideTimelinePaid }}"
text-timeline-get-paid-title="{{ $textTimelineGetPaidTitle }}"
text-timeline-get-paid-status-await="{{ $textTimelineGetPaidStatusAwait }}"
text-timeline-get-paid-status-partially-paid="{{ $textTimelineGetPaidStatusPartiallyPaid }}"
hide-button-paid="{{ $hideButtonPaid }}"
route-button-paid="{{ $routeButtonPaid }}"
text-timeline-get-paid-mark-paid="{{ $textTimelineGetPaidMarkPaid }}"
hide-button-add-payment="{{ $hideButtonAddPayment }}"
text-timeline-get-paid-add-payment="{{ $textTimelineGetPaidAddPayment }}"
/>
@endif
@stack('timeline_end')
@if (($parent = $document->parent))
@php
$recurring_message = trans('recurring.message_parent', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
'link' => '<a href="' . route(config('type.document.' . $document->paten->type . '.route.prefix', 'invoices') . '.show', $parent->id) . '"><u>' . $parent->id . '</u></a>'
]);
@endphp
@stack('document_start')
<x-documents.show.document
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@stack('document_end')
<x-documents.show.message type="recurring" background-color="bg-blue-100" text-color="text-blue-600" message="{{ $recurring_message }}" />
@endif
@endif
@stack('attachment_start')
@if (!$hideAttachment)
<x-documents.show.attachment
type="{{ $type }}"
:document="$document"
:attachment="$attachment"
/>
@endif
@stack('attachment_end')
@stack('recurring_message_end')
@stack('row_footer_start')
@if (!$hideFooter)
<x-documents.show.footer
type="{{ $type }}"
:document="$document"
:histories="$histories"
:transactions="$transactions"
class-footer-histories="{{ $classFooterHistories }}"
hide-footer-histories="{{ $hideFooterHistories }}"
text-histories="{{ $textHistories }}"
text-history-status="{{ $textHistoryStatus }}"
hide-footer-transactions="{{ $hideFooterTransactions }}"
class-footer-transactions="{{ $classFooterTransactions }}"
/>
@endif
@stack('row_footer_end')
@stack('status_message_start')
{{ Form::hidden('document_id', $document->id, ['id' => 'document_id']) }}
{{ Form::hidden($type . '_id', $document->id, ['id' => $type . '_id']) }}
@if (! $hideStatusMessage)
@if ($document->status == 'draft')
<x-documents.show.message type="status" background-color="bg-red-100" text-color="text-red-600" message="{!! trans($textStatusMessage) !!}" />
@endif
@endif
@stack('status_message_end')
@stack('create_start')
@if (! $hideCreated)
<x-documents.show.create type="{{ $type }}" :document="$document" />
@endif
@stack('create_end')
@stack('send_start')
@if (! $hideSend)
<x-documents.show.send type="{{ $type }}" :document="$document" />
@endif
@stack('send_end')
@stack('receive_start')
@if (! $hideReceive)
<x-documents.show.receive type="{{ $type }}" :document="$document" />
@endif
@stack('receive_end')
@stack('get_paid_start')
@if (! $hideGetPaid)
<x-documents.show.get-paid type="{{ $type }}" :document="$document" />
@endif
@stack('get_paid_end')
@stack('make_paid_start')
@if (! $hideMakePayment)
<x-documents.show.make-payment type="{{ $type }}" :document="$document" />
@endif
@stack('make_paid_end')
@stack('restore_start')
@if (! $hideRestore)
<x-documents.show.restore type="{{ $type }}" :document="$document" />
@endif
@stack('restore_end')
@stack('schedule_start')
@if (! $hideSchedule)
<x-documents.show.schedule type="{{ $type }}" :document="$document" />
@endif
@stack('schedule_end')
@stack('children_start')
@if (! $hideChildren)
<x-documents.show.children type="{{ $type }}" :document="$document" />
@endif
@stack('children_end')
@stack('attachment_start')
@if (! $hideAttachment)
<x-documents.show.attachment type="{{ $type }}" :document="$document" :attachment="$attachment" />
@endif
@stack('attachment_end')
</div>
<div class="w-full lg:w-7/12">
@stack('document_start')
<x-documents.show.template type="{{ $type }}" :document="$document" />
@stack('document_end')
</div>
<x-form.input.hidden name="document_id" :value="$document->id" />
<x-form.input.hidden name="{{ $type . '_id' }}" :value="$document->id" />
</div>

View File

@ -0,0 +1,19 @@
<x-show.accordion type="create" :open="($accordionActive == 'create')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('general.create') }}"
description="{!! trans($description, [
'user' => $document->owner->name,
'date' => $created_date,
]) !!}"
/>
</x-slot>
<x-slot name="body">
<div class="flex">
<x-link href="{{ route($editRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
{{ trans('general.edit') }}
</x-link>
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,147 +0,0 @@
<div class="card" style="padding: 0; padding-left: 15px; padding-right: 15px; border-radius: 0; box-shadow: 0 4px 16px rgba(0,0,0,.2);">
<div class="card-body">
@if ($documentTemplate)
@switch($documentTemplate)
@case('classic')
<x-documents.template.classic
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@break
@case('modern')
<x-documents.template.modern
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@break
@default
<x-documents.template.ddefault
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-discount="{{ $hideDiscount }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@endswitch
@else
@include($documentTemplate)
@endif
</div>
</div>

View File

@ -1,27 +0,0 @@
<div class="row">
@stack('row_footer_histories_start')
@if (!$hideFooterHistories)
<div class="{{ $classFooterHistories }}">
<x-documents.show.histories
type="{{ $type }}"
:document="$document"
:histories="$histories"
text-histories="{{ $textHistories }}"
text-history-status="{{ $textHistoryStatus }}"
/>
</div>
@endif
@stack('row_footer_histories_end')
@stack('row_footer_transactions_start')
@if (!$hideFooterTransactions)
<div class="{{ $classFooterTransactions }}">
<x-documents.show.transactions
type="{{ $type }}"
:document="$document"
:transactions="$transactions"
/>
</div>
@endif
@stack('row_footer_transactions_end')
</div>

View File

@ -0,0 +1,120 @@
<x-show.accordion type="get_paid" :open="($accordionActive == 'get-paid')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('invoices.get_paid') }}"
description="{!! $description !!}"
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
@stack('timeline_get_paid_body_button_payment_start')
@if (! $hideAddPayment)
@if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
<x-button
@click="onPayment"
id="button-payment"
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
@endif
@stack('timeline_get_paid_body_button_payment_end')
@if (! $hideAcceptPayment)
<x-link href="{{ route('apps.categories.show', [
'alias' => 'payment-method',
'utm_source' => $type,
'utm_medium' => 'app',
'utm_campaign' => trans('documents.accept_payment_online'),
]) }}"
override="class"
class="py-1.5 mb-3 sm:mb-0 text-xs bg-transparent hover:bg-transparent font-medium leading-6"
>
<span class="border-b border-transparent transition-all hover:border-black">
{{ trans('documents.accept_payment_online') }}
</span>
</x-link>
@endif
</div>
<div class="text-xs mt-4" style="margin-left: 0 !important;">
<span class="font-medium">
{{ trans('invoices.payment_received') }} :
</span>
@if ($transactions->count())
@foreach ($transactions as $transaction)
<div class="my-2">
<span>
<x-date :date="$transaction->paid_at" />
- {!! trans('documents.transaction', [
'amount' => '<span class="font-medium">' . money($transaction->amount, $transaction->currency_code, true) . '</span>',
'account' => '<span class="font-medium">' . $transaction->account->name . '</span>',
]) !!}
</span>
</br>
@if (! empty($transaction->contact) && $transaction->contact->email)
<x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmail('{{ route($transactionEmailRoute, $transaction->id) }}')">
<span class="border-b border-transparent transition-all hover:border-purple">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</span>
</x-button>
@else
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
<x-button class="text-purple mt-1" override="class" disabled="disabled">
<span class="border-b border-transparent transition-all hover:border-purple">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</span>
</x-button>
</x-tooltip>
@endif
<span> - </span>
<x-button
@click="onEditPayment('{{ $transaction->id }}')"
id="button-edit-payment"
class="text-purple mt-1"
override="class"
>
<span class="border-b border-transparent transition-all hover:border-purple">
{{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
<span class="border-b border-transparent transition-all hover:border-purple">
</x-button>
<span> - </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
<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="border-b border-transparent transition-all hover:border-purple"
override="class"
/>
</div>
@endforeach
@else
<div class="my-2">
<span>{{ trans('general.no_records') }}</span>
</div>
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,69 +0,0 @@
<div class="row" style="font-size: inherit !important">
@stack('header_status_start')
@if (!$hideHeaderStatus)
<div class="{{ $classHeaderStatus }}">
{{ trans_choice('general.statuses', 1) }}
<br>
<strong>
<span class="float-left">
<span class="badge badge-{{ $document->status_label }}">
{{ trans($textHistoryStatus . $document->status) }}
</span>
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_status_end')
@stack('header_contact_start')
@if (!$hideHeaderContact)
<div class="{{ $classHeaderContact }}">
{{ trans_choice($textHeaderContact, 1) }}
<br>
<strong>
<span class="float-left">
<a href="{{ route($routeContactShow, $document->contact_id) }}">
{{ $document->contact_name }}
</a>
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_contact_end')
@stack('header_amount_start')
@if (!$hideHeaderAmount)
<div class="{{ $classHeaderAmount }}">
{{ trans($textHeaderAmount) }}
<br>
<strong>
<span class="float-left">
@money($document->amount_due, $document->currency_code, true)
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_amount_end')
@stack('header_due_at_start')
@if (!$hideHeaderDueAt)
<div class="{{ $classHeaderDueAt }}">
{{ trans($textHeaderDueAt) }}
<br>
<strong>
<span class="float-left">
@date($document->due_at)
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_due_at_end')
</div>

View File

@ -1,51 +0,0 @@
<div class="accordion">
<div class="card">
<div class="card-header" id="accordion-histories-header" data-toggle="collapse" data-target="#accordion-histories-body" aria-expanded="false" aria-controls="accordion-histories-body">
<h4 class="mb-0">{{ trans($textHistories) }}</h4>
</div>
<div id="accordion-histories-body" class="collapse hide" aria-labelledby="accordion-histories-header">
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
@stack('row_footer_histories_head_tr_start')
<tr class="row table-head-line">
@stack('row_footer_histories_head_start')
<th class="col-xs-4 col-sm-3">
{{ trans('general.date') }}
</th>
<th class="col-xs-4 col-sm-3 text-left">
{{ trans_choice('general.statuses', 1) }}
</th>
<th class="col-xs-4 col-sm-6 text-left long-texts">
{{ trans('general.description') }}
</th>
@stack('row_footer_histories_head_end')
</tr>
@stack('row_footer_histories_head_tr_end')
</thead>
<tbody>
@stack('row_footer_histories_body_tr_start')
@foreach($histories as $history)
<tr class="row align-items-center border-top-1 tr-py">
@stack('row_footer_histories_body_td_start')
<td class="col-xs-4 col-sm-3">
@date($history->created_at)
</td>
<td class="col-xs-4 col-sm-3 text-left">
{{ trans($textHistoryStatus . $history->status) }}
</td>
<td class="col-xs-4 col-sm-6 text-left long-texts">
{{ $history->description }}
</td>
@stack('row_footer_histories_body_td_end')
</tr>
@endforeach
@stack('row_footer_histories_body_tr_end')
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,98 @@
<x-show.accordion type="make_payment" :open="($accordionActive == 'make-payment')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('bills.make_payment') }}"
description="{!! $description !!}"
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
@stack('timeline_get_paid_body_button_payment_start')
@if (! $hideAddPayment)
@if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
<x-button
@click="onPayment"
id="button-payment"
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
@endif
@stack('timeline_get_paid_body_button_payment_end')
</div>
<div class="text-xs mt-1" style="margin-left: 0 !important;">
<span class="font-medium">
{{ trans('bills.payment_made') }} :
</span>
@if ($transactions->count())
@foreach ($transactions as $transaction)
<div class="my-2">
<span>
<x-date :date="$transaction->paid_at" />
- {!! trans('documents.transaction', [
'amount' => '<span class="font-medium">' . money($transaction->amount, $transaction->currency_code, true) . '</span>',
'account' => '<span class="font-medium">' . $transaction->account->name . '</span>',
]) !!}
</span>
</br>
@if (! empty($transaction->contact) && $transaction->contact->email)
<x-button id="button-email-send" class="text-purple" override="class" @click="onEmail('{{ route($transactionEmailRoute, $transaction->id) }}')">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</x-button>
@else
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
<x-button class="text-purple" override="class" disabled="disabled">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</x-button>
</x-tooltip>
@endif
<span> - </span>
<x-button
@click="onEditPayment('{{ $transaction->id }}')"
id="button-edit-payment"
class="text-purple"
override="class"
>
{{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
</x-button>
<span> - </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
<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"
text-class="text-purple"
override="class"
/>
</div>
@endforeach
@else
<div class="my-2">
<span>{{ trans('general.no_records') }}</span>
</div>
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -0,0 +1,17 @@
@stack($type . '_message_start')
<div @class([
'rounded-xl px-5 py-3 mb-5',
$backgroundColor
])
>
<p @class([
'text-sm mb-0',
$textColor
])
>
{!! $message !!}
</p>
</div>
@stack($type . '_message_end')

View File

@ -0,0 +1,163 @@
@stack('button_group_start')
@if (! $hideMoreActions)
<x-dropdown id="dropdown-more-actions">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@stack('button_dropdown_start')
@stack('duplicate_button_start')
@if (! $hideDuplicate)
@can($permissionCreate)
<x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@endif
@stack('duplicate_button_end')
@if (! $hideDivider1)
<x-dropdown.divider />
@endif
@stack('button_print_start')
@if (! $hidePrint)
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@endif
@stack('button_print_end')
@stack('button_pdf_start')
@if (! $hidePdf)
<x-dropdown.link href="{{ route($pdfRoute, $document->id) }}">
{{ trans('general.download_pdf') }}
</x-dropdown.link>
@endif
@stack('button_pdf_end')
@if (! $hideDivider2)
<x-dropdown.divider />
@endif
@stack('share_button_start')
@if (! in_array($document->status, $hideButtonStatuses))
@if (! $hideShare)
@if ($document->status != 'cancelled')
<x-dropdown.button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
{{ trans('general.share_link') }}
</x-dropdown.button>
@endif
@endif
@stack('share_button_end')
@stack('edit_button_start')
@if (! $hideEmail)
@if ($document->contact_email)
<x-dropdown.button @click="onEmail('{{ route($emailRoute, $document->id) }}')">
{{ trans($textEmail) }}
</x-dropdown.button>
@else
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="left">
<x-dropdown.button disabled="disabled">
{{ trans($textEmail) }}
</x-dropdown.button>
</x-tooltip>
@endif
@endif
@endif
@stack('share_button_end')
@stack('button_cancelled_start')
@if (! $hideCancel)
@can($permissionUpdate)
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@endcan
@endif
@stack('button_cancelled_end')
@if (! $hideDivider3)
<x-dropdown.divider />
@endif
@stack('button_customize_start')
@if (! $hideCustomize)
@can($permissionCustomize)
<x-dropdown.link href="{{ route($customizeRoute) }}">
{{ trans('general.customize') }}
</x-dropdown.link>
@endcan
@endif
@stack('button_customize_end')
@stack('end_button_start')
@if (! $hideEnd && $document->recurring)
<x-dropdown.link href="{{ route($endRoute, $document->id) }}">
{{ trans('recurring.end') }}
</x-dropdown.link>
<x-dropdown.divider />
@endif
@stack('end_button_end')
@if (! $hideDivider4)
<x-dropdown.divider />
@endif
@stack('delete_button_start')
@if (! $hideDelete)
@can($permissionDelete)
@if ($checkReconciled)
@if (! $document->reconciled)
<x-delete-link :model="$document" :route="$deleteRoute" :text="$textDeleteModal" model-name="document_number" />
@endif
@else
<x-delete-link :model="$document" :route="$deleteRoute" :text="$textDeleteModal" model-name="document_number" />
@endif
@endcan
@endif
@stack('delete_button_end')
@stack('button_dropdown_end')
</x-dropdown>
@endif
@stack('button_group_end')

View File

@ -0,0 +1,29 @@
<x-show.accordion type="receive" :open="($accordionActive == 'receive')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('general.receive') }}"
description="{!! trans($description, [
'user' => $document->owner->name,
'date' => $sent_date,
]) !!}"
/>
</x-slot>
<x-slot name="body">
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
@if (! $hideMarkReceived)
@can($permissionUpdate)
@if ($document->status == 'draft')
<x-link href="{{ route($markReceivedRoute, $document->id) }}" kind="secondary" @click="e => e.target.classList.add('disabled')">
{{ trans($textMarkReceived) }}
</x-link>
@else
<x-button kind="secondary" disabled="disabled">
{{ trans($textMarkReceived) }}
</x-button>
@endif
@endcan
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,44 +0,0 @@
@stack('recurring_message_start')
@if (($recurring = $document->recurring) && ($next = $recurring->getNextRecurring()))
<div class="row">
<div class="col-sm-12">
<div class="alert alert-info fade show" role="alert">
<div class="d-flex">
@stack('recurring_message_head_start')
<h5 class="mt-0 text-white"><strong>{{ trans('recurring.recurring') }}</strong></h5>
@stack('recurring_message_head_end')
</div>
@stack('recurring_message_body_start')
<p class="text-sm lh-160 mb-0">{{ trans('recurring.message', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
'date' => $next->format($date_format)
]) }}
</p>
@stack('recurring_message_body_end')
</div>
</div>
</div>
@endif
@if ($document->parent)
<div class="row">
<div class="col-sm-12">
<div class="alert alert-info fade show" role="alert">
<div class="d-flex">
@stack('recurring_parent_message_head_start')
<h5 class="mt-0 text-white"><strong>{{ trans('recurring.recurring') }}</strong></h5>
@stack('recurring_parent_message_head_end')
</div>
@stack('recurring_parent_message_body_start')
<p class="text-sm lh-160 mb-0">{!! trans('recurring.message_parent', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
'link' => '<a href="' . route($routePrefix . '.show', $document->parent->id) . '"><u>' . $document->parent->document_number . '</u></a>'
]) !!}
</p>
@stack('recurring_parent_message_body_end')
</div>
</div>
</div>
@endif
@stack('recurring_message_end')

View File

@ -0,0 +1,14 @@
<x-show.accordion type="restore" :open="($accordionActive == 'create')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('general.restore') }}"
description="{!! $description !!}"
/>
</x-slot>
<x-slot name="body">
<x-button>
{{ trans('general.restore') }}
</x-button>
</x-slot>
</x-show.accordion>

View File

@ -0,0 +1,28 @@
<x-show.accordion type="schedule" :open="($accordionActive == 'schedule')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans_choice('general.schedules', 1) }}"
description="{!! $description !!}"
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
@if ($document->recurring && ($next = $document->recurring->getNextRecurring()))
{{ trans('recurring.next_date', ['date' => $next->format(company_date_format())]) }}
<br>
@if (($document->recurring->limit_by == 'count'))
@if ($document->recurring->limit_count == 0)
{{ trans('recurring.ends_never') }}
@else
{{ trans('recurring.ends_after', ['times' => $document->recurring->limit_count]) }}
@endif
@else
{{ trans('recurring.ends_date', ['date' => company_date($document->recurring->limit_date)]) }}
@endif
@else
{{ trans('documents.statuses.ended') }}
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -0,0 +1,51 @@
<x-show.accordion type="send" :open="($accordionActive == 'send')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('general.send') }}"
description="{!! trans($description, [
'user' => $document->owner->name,
'date' => $sent_date,
]) !!}"
/>
</x-slot>
<x-slot name="body">
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
@if (! $hideEmail)
@if ($document->contact_email)
<x-button id="button-email-send" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
{{ trans($textEmail) }}
</x-button>
@else
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
<x-dropdown.button disabled="disabled">
{{ trans($textEmail) }}
</x-dropdown.button>
</x-tooltip>
@endif
@endif
@if (! $hideMarkSent)
@can($permissionUpdate)
@if ($document->status == 'draft')
<x-link href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
{{ trans($textMarkSent) }}
</x-link>
@else
<x-button disabled="disabled">
{{ trans($textMarkSent) }}
</x-button>
@endif
@endcan
@endif
@if (! $hideShare)
@if ($document->status != 'cancelled')
<x-button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
{{ trans('general.share_link') }}
</x-button>
@endif
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,15 +0,0 @@
@stack('status_message_start')
@if ($document->status == 'draft')
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger fade show" role="alert">
@stack('status_message_body_start')
<span class="alert-text">
<strong>{!! trans($textStatusMessage) !!}</strong>
</span>
@stack('status_message_body_end')
</div>
</div>
</div>
@endif
@stack('status_message_end')

View File

@ -0,0 +1,143 @@
<div class="p-7 shadow-2xl rounded-2xl">
@if ($documentTemplate)
@switch($documentTemplate)
@case('classic')
<x-documents.template.classic
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@break
@case('modern')
<x-documents.template.modern
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@break
@default
<x-documents.template.ddefault
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-discount="{{ $hideDiscount }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@endswitch
@else
@include($documentTemplate)
@endif
</div>

View File

@ -1,222 +0,0 @@
@if (!in_array($document->status, $hideTimelineStatuses))
@stack('timeline_body_start')
<div class="card">
<div class="card-body">
<div class="timeline timeline-one-side" data-timeline-content="axis" data-timeline-axis-style="dashed">
@stack('timeline_create_start')
@if (!$hideTimelineCreate)
<div class="timeline-block">
<span class="timeline-step badge-primary">
<i class="fas fa-plus"></i>
</span>
<div class="timeline-content">
@stack('timeline_create_head_start')
<h2 class="font-weight-500">
{{ trans($textTimelineCreateTitle) }}
</h2>
@stack('timeline_create_head_end')
@stack('timeline_create_body_start')
@stack('timeline_create_body_message_start')
<small>
{{ trans_choice('general.statuses', 1) . ':' }}
</small>
<small>
{{ trans($textTimelineCreateMessage, ['date' => Date::parse($document->created_at)->format($date_format)]) }}
</small>
@stack('timeline_create_body_message_end')
<div class="mt-3">
@stack('timeline_create_body_button_edit_start')
@if (!$hideButtonEdit)
@can($permissionUpdate)
<a href="{{ route($routeButtonEdit, $document->id) }}" class="btn btn-primary btn-sm btn-alone header-button-top">
{{ trans('general.edit') }}
</a>
@endcan
@endif
@stack('timeline_create_body_button_edit_end')
</div>
@stack('timeline_create_body_end')
</div>
</div>
@endif
@stack('timeline_create_end')
@stack('timeline_sent_start')
@if (!$hideTimelineSent)
<div class="timeline-block">
<span class="timeline-step badge-danger">
<i class="far fa-envelope"></i>
</span>
<div class="timeline-content">
@stack('timeline_sent_head_start')
<h2 class="font-weight-500">
{{ trans($textTimelineSentTitle) }}
</h2>
@stack('timeline_sent_head_end')
@stack('timeline_sent_body_start')
@if ($document->status != 'sent' && $document->status != 'partial' && $document->status != 'viewed' && $document->status != 'received')
@stack('timeline_sent_body_message_start')
<small>
{{ trans_choice('general.statuses', 1) . ':' }}
</small>
<small>
{{ trans($textTimelineSentStatusDraft) }}
</small>
@stack('timeline_sent_body_message_end')
<div class="mt-3">
@stack('timeline_sent_body_button_sent_start')
@if (!$hideButtonSent)
@can($permissionUpdate)
@if($document->status == 'draft')
<a href="{{ route($routeButtonSent, $document->id) }}" class="btn btn-white btn-sm header-button-top" @click="e => e.target.classList.add('disabled')">
{{ trans($textTimelineSentStatusMarkSent) }}
</a>
@else
<button type="button" class="btn btn-secondary btn-sm header-button-top" disabled="disabled">
{{ trans($textTimelineSentStatusMarkSent) }}
</button>
@endif
@endcan
@endif
@stack('timeline_sent_body_button_sent_end')
@stack('timeline_receive_body_button_received_start')
@if (!$hideButtonReceived)
@can($permissionUpdate)
@if ($document->status == 'draft')
<a href="{{ route($routeButtonReceived, $document->id) }}" class="btn btn-danger btn-sm btn-alone header-button-top" @click="e => e.target.classList.add('disabled')">
{{ trans($textTimelineSentStatusReceived) }}
</a>
@else
<button type="button" class="btn btn-secondary btn-sm header-button-top" disabled="disabled">
{{ trans($textTimelineSentStatusReceived) }}
</button>
@endif
@endcan
@endif
@stack('timeline_receive_body_button_received_end')
@elseif($document->status == 'viewed')
@stack('timeline_viewed_invoice_body_message_start')
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('invoices.messages.status.viewed') }}</small>
@stack('timeline_viewed_invoice_body_message_end')
@elseif($document->status == 'received')
@stack('timeline_receive_bill_body_message_start')
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('bills.messages.status.receive.received', ['date' => Date::parse($document->received_at)->format($date_format)]) }}</small>
@stack('timeline_receive_bill_body_message_end')
@else
@stack('timeline_sent_body_message_start')
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('invoices.messages.status.send.sent', ['date' => Date::parse($document->sent_at)->format($date_format)]) }}</small>
@stack('timeline_sent_body_message_end')
@endif
@if (!($document->status != 'sent' && $document->status != 'partial' && $document->status != 'viewed' && $document->status != 'received'))
<div class="mt-3">
@endif
@stack('timeline_sent_body_button_email_start')
@if (!$hideButtonEmail)
@if($document->contact_email)
<a href="{{ route($routeButtonEmail, $document->id) }}" class="btn btn-danger btn-sm header-button-top" @click="e => e.target.classList.add('disabled')">
{{ trans($textTimelineSendStatusMail) }}
</a>
@else
<el-tooltip content="{{ trans('invoices.messages.email_required') }}" placement="top">
<button type="button" class="btn btn-danger btn-sm btn-tooltip disabled header-button-top">
{{ trans($textTimelineSendStatusMail) }}
</button>
</el-tooltip>
@endif
@endif
@stack('timeline_sent_body_button_email_end')
@stack('timeline_sent_body_button_share_start')
@if (!$hideButtonShare)
@if ($document->status != 'cancelled')
<a href="{{ $signedUrl }}" target="_blank" class="btn btn-white btn-sm header-button-top">
{{ trans('general.share') }}
</a>
@endif
@endif
@stack('timeline_sent_body_button_share_end')
</div>
@stack('timeline_sent_body_end')
</div>
</div>
@endif
@stack('timeline_sent_end')
@stack('timeline_get_paid_start')
@if (!$hideTimelinePaid)
<div class="timeline-block">
<span class="timeline-step badge-success">
<i class="far fa-money-bill-alt"></i>
</span>
<div class="timeline-content">
@stack('timeline_get_paid_head_start')
<h2 class="font-weight-500">
{{ trans($textTimelineGetPaidTitle) }}
</h2>
@stack('timeline_get_paid_head_end')
@stack('timeline_get_paid_body_start')
@stack('timeline_get_paid_body_message_start')
@if($document->status != 'paid' && empty($document->transactions->count()))
<small>
{{ trans_choice('general.statuses', 1) . ':' }}
</small>
<small>
{{ trans($textTimelineGetPaidStatusAwait) }}
</small>
@else
<small>
{{ trans_choice('general.statuses', 1) . ':' }}
</small>
<small>
{{ trans($textTimelineGetPaidStatusPartiallyPaid) }}
</small>
@endif
@stack('timeline_get_paid_body_message_end')
<div class="mt-3">
@stack('timeline_get_paid_body_button_pay_start')
@if (!$hideButtonPaid)
@can($permissionUpdate)
<a href="{{ route($routeButtonPaid, $document->id) }}" class="btn btn-white btn-sm header-button-top" @click="e => e.target.classList.add('disabled')">
{{ trans($textTimelineGetPaidMarkPaid) }}
</a>
@endcan
@endif
@stack('timeline_get_paid_body_button_pay_end')
@stack('timeline_get_paid_body_button_payment_start')
@if (!$hideButtonAddPayment)
@if(empty($document->transactions->count()) || (!empty($document->transactions->count()) && $document->paid != $document->amount))
<button @click="onPayment" id="button-payment" class="btn btn-success btn-sm header-button-bottom">
{{ trans($textTimelineGetPaidAddPayment) }}
</button>
@endif
@endif
@stack('timeline_get_paid_body_button_payment_end')
</div>
@stack('timeline_get_paid_body_end')
</div>
</div>
@endif
@stack('timeline_get_paid_end')
</div>
</div>
</div>
@stack('timeline_body_end')
@endif

View File

@ -1,161 +0,0 @@
@stack('button_group_start')
@if (!$hideButtonMoreActions)
<div class="dropup header-drop-top">
<button type="button" class="btn btn-white btn-sm" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-chevron-down"></i>&nbsp; {{ trans('general.more_actions') }}
</button>
<div class="dropdown-menu" role="menu">
@stack('button_dropdown_start')
@if (in_array($document->status, $hideTimelineStatuses))
@stack('edit_button_start')
@if (!$hideButtonEdit)
@can($permissionUpdate)
<a class="dropdown-item" href="{{ route($routeButtonEdit, $document->id) }}">
{{ trans('general.edit') }}
</a>
@endcan
@endif
@stack('edit_button_end')
@endif
@stack('duplicate_button_start')
@if (!$hideButtonDuplicate)
@can($permissionCreate)
<a class="dropdown-item" href="{{ route($routeButtonDuplicate, $document->id) }}">
{{ trans('general.duplicate') }}
</a>
@endcan
@endif
@stack('duplicate_button_end')
@stack('button_dropdown_divider_1_start')
@if (!$hideButtonGroupDivider1)
<div class="dropdown-divider"></div>
@endif
@stack('button_dropdown_divider_1_end')
@if (!$hideButtonPrint)
@if ($checkButtonCancelled)
@if ($document->status != 'cancelled')
@stack('button_print_start')
<a class="dropdown-item" href="{{ route($routeButtonPrint, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</a>
@stack('button_print_end')
@endif
@else
@stack('button_print_start')
<a class="dropdown-item" href="{{ route($routeButtonPrint, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</a>
@stack('button_print_end')
@endif
@endif
@if (in_array($document->status, $hideTimelineStatuses))
@stack('share_button_start')
@if (!$hideButtonShare)
@if ($document->status != 'cancelled')
<a class="dropdown-item" href="{{ $signedUrl }}" target="_blank">
{{ trans('general.share') }}
</a>
@endif
@endif
@stack('share_button_end')
@stack('edit_button_start')
@if (!$hideButtonEmail)
@if($document->contact_email)
<a class="dropdown-item" href="{{ route($routeButtonEmail, $document->id) }}">
{{ trans($textTimelineSendStatusMail) }}
</a>
@else
<el-tooltip content="{{ trans('invoices.messages.email_required') }}" placement="right">
<button type="button" class="dropdown-item btn-tooltip">
<span class="text-disabled">{{ trans($textTimelineSendStatusMail) }}</span>
</button>
</el-tooltip>
@endif
@endif
@stack('edit_button_end')
@endif
@stack('button_pdf_start')
@if (!$hideButtonPdf)
<a class="dropdown-item" href="{{ route($routeButtonPdf, $document->id) }}">
{{ trans('general.download_pdf') }}
</a>
@endif
@stack('button_pdf_end')
@if (!$hideButtonCancel)
@can($permissionUpdate)
@if ($checkButtonCancelled)
@if ($document->status != 'cancelled')
@stack('button_cancelled_start')
<a class="dropdown-item" href="{{ route($routeButtonCancelled, $document->id) }}">
{{ trans('general.cancel') }}
</a>
@stack('button_cancelled_end')
@endif
@else
@stack('button_cancelled_start')
<a class="dropdown-item" href="{{ route($routeButtonCancelled, $document->id) }}">
{{ trans('general.cancel') }}
</a>
@stack('button_cancelled_end')
@endif
@endcan
@endif
@stack('button_dropdown_divider_2_start')
@if (!$hideButtonGroupDivider2)
<div class="dropdown-divider"></div>
@endif
@stack('button_dropdown_divider_2_end')
@if (!$hideButtonCustomize)
@can($permissionButtonCustomize)
@stack('button_customize_start')
<a class="dropdown-item" href="{{ route($routeButtonCustomize) }}">
{{ trans('general.customize') }}
</a>
@stack('button_customize_end')
@endcan
@endif
@stack('button_dropdown_divider_3_start')
@if (!$hideButtonGroupDivider3)
<div class="dropdown-divider"></div>
@endif
@stack('button_dropdown_divider_3_end')
@stack('delete_button_start')
@if (!$hideButtonDelete)
@can($permissionDelete)
@if ($checkButtonReconciled)
@if (!$document->reconciled)
{!! Form::deleteLink($document, $routeButtonDelete, $textDeleteModal, 'document_number') !!}
@endif
@else
{!! Form::deleteLink($document, $routeButtonDelete, $textDeleteModal, 'document_number') !!}
@endif
@endcan
@endif
@stack('delete_button_end')
@stack('button_dropdown_end')
</div>
</div>
@endif
@stack('button_group_end')
@stack('add_new_button_start')
@if (!$hideButtonAddNew)
@can($permissionCreate)
<a href="{{ route($routeButtonAddNew) }}" class="btn btn-white btn-sm">
{{ trans('general.add_new') }}
</a>
@endcan
@endif
@stack('add_new_button_end')

View File

@ -1,99 +0,0 @@
<div class="accordion">
<div class="card">
<div class="card-header" id="accordion-transactions-header" data-toggle="collapse" data-target="#accordion-transactions-body" aria-expanded="false" aria-controls="accordion-transactions-body">
<h4 class="mb-0">{{ trans_choice('general.transactions', 2) }}</h4>
</div>
<div id="accordion-transactions-body" class="collapse hide" aria-labelledby="accordion-transactions-header">
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
@stack('row_footer_transactions_head_tr_start')
<tr class="row table-head-line">
@stack('row_footer_transactions_head_td_start')
@php $class = 'col-sm-3'; @endphp
@cannot($permissionTransactionDelete)
@php $class = 'col-sm-4'; @endphp
@endcan
<th class="col-xs-4 {{ $class }}">
{{ trans('general.date') }}
</th>
<th class="col-xs-4 {{ $class }}">
{{ trans('general.amount') }}
</th>
<th class="{{ $class }} d-none d-sm-block">
{{ trans_choice('general.accounts', 1) }}
</th>
@can($permissionTransactionDelete)
<th class="col-xs-4 col-sm-3">
{{ trans('general.actions') }}
</th>
@endcan
@stack('row_footer_transactions_head_td_end')
</tr>
@stack('row_footer_transactions_head_tr_end')
</thead>
<tbody>
@stack('row_footer_transactions_body_tr_start')
@if ($transactions->count())
@foreach($transactions as $transaction)
<tr class="row align-items-center border-top-1 tr-py">
@stack('row_footer_transactions_body_td_start')
<td class="col-xs-4 {{ $class }}">
@date($transaction->paid_at)
</td>
<td class="col-xs-4 {{ $class }}">
@money($transaction->amount, $transaction->currency_code, true)
</td>
<td class="{{ $class }} d-none d-sm-block">
{{ $transaction->account->name }}
</td>
@can($permissionTransactionDelete)
<td class="col-xs-4 col-sm-3 py-0">
@if ($transaction->reconciled)
<button type="button" class="btn btn-default btn-sm">
{{ trans('reconciliations.reconciled') }}
</button>
@else
@php $message = trans('general.delete_confirm', [
'name' => '<strong>' . Date::parse($transaction->paid_at)->format($date_format) . ' - ' . money($transaction->amount, $transaction->currency_code, true) . ' - ' . $transaction->account->name . '</strong>',
'type' => strtolower(trans_choice('general.transactions', 1))
]);
@endphp
{!! Form::button(trans('general.delete'), array(
'type' => 'button',
'class' => 'btn btn-danger btn-sm',
'title' => trans('general.delete'),
'@click' => 'confirmDelete("' . route('transactions.destroy', $transaction->id) . '", "' . trans_choice('general.transactions', 2) . '", "' . $message. '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
)) !!}
@endif
</td>
@endcan
@stack('row_footer_transactions_body_td_end')
</tr>
@endforeach
@else
<tr>
<td colspan="4">
<div class="text-muted nr-py" id="datatable-basic_info" role="status" aria-live="polite">
{{ trans('general.no_records') }}
</div>
</td>
</tr>
@endif
@stack('row_footer_transactions_body_tr_end')
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@ -1,28 +1,22 @@
<div class="row">
<div class="col-100">
<div class="text">
<div class="text text-dark">
<h3>
{{ $textDocumentTitle }}
</h3>
@if ($textDocumentSubheading)
<h5>
{{ $textDocumentSubheading }}
</h5>
@endif
</div>
</div>
</div>
<div class="row">
<div class="col-58">
<div class="text company">
<div class="text">
@stack('company_logo_start')
@if (!$hideCompanyLogo)
@if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
<img class="c-logo" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
<img class="c-logo w-image" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
@else
<img class="c-logo" src="{{ $logo }}" alt="{{ setting('company.name') }}" />
<img class="c-logo w-image" src="{{ $logo }}" alt="{{ setting('company.name') }}" />
@endif
@endif
@stack('company_logo_end')
@ -30,39 +24,46 @@
</div>
<div class="col-42">
<div class="text company">
<div class="text right-column">
@stack('company_details_start')
@if ($textDocumentSubheading)
<p class="text-normal font-semibold">
{{ $textDocumentSubheading }}
</p>
@endif
@if (!$hideCompanyDetails)
@if (!$hideCompanyName)
<strong>{{ setting('company.name') }}</strong><br>
<p>{{ setting('company.name') }}</p>
@endif
@if (!$hideCompanyAddress)
<p>
{!! nl2br(setting('company.address')) !!}
<br>
{!! $document->contact_location !!}
{!! $document->company->location !!}
</p>
@endif
@if (!$hideCompanyTaxNumber)
<p>
@if (setting('company.tax_number'))
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
@endif
</p>
@if (setting('company.tax_number'))
<p>
<span class="text-medium text-default">
{{ trans('general.tax_number') }}:
</span>
{{ setting('company.tax_number') }}
</p>
@endif
@endif
@if (!$hideCompanyPhone)
<p>
@if (setting('company.phone'))
@if (setting('company.phone'))
<p>
{{ setting('company.phone') }}
@endif
</p>
</p>
@endif
@endif
@if (!$hideCompanyEmail)
<p>{{ setting('company.email') }}</p>
<p class="small-text">{{ setting('company.email') }}</p>
@endif
@endif
@stack('company_details_end')
@ -72,17 +73,17 @@
<div class="row mt-2">
<div class="col-33">
<hr class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }};">
<hr class="invoice-classic-line" style="background-color:{{ $backgroundColor }};">
<div class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }};"></div>
<div class="invoice-classic-line" style="background-color:{{ $backgroundColor }};"></div>
</div>
<div class="col-33">
<div class="invoice-classic-frame ml-1">
<div class="invoice-classic-inline-frame text-center">
<div class="invoice-classic-frame ml-1 mt-1" style="border: 1px solid {{ $backgroundColor }}">
<div class="invoice-classic-inline-frame text-center" style="border: 1px solid {{ $backgroundColor }}">
@stack('invoice_number_input_start')
@if (!$hideDocumentNumber)
<div class="text company">
<strong>{{ trans($textDocumentNumber) }}:</strong><br>
<div class="text small-text text-semibold mt-classic">
<span>{{ trans($textDocumentNumber) }}:</span><br>
{{ $document->document_number }}
</div>
@endif
@ -92,21 +93,21 @@
</div>
<div class="col-33">
<hr class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }};">
<hr class="invoice-classic-line" style="background-color:{{ $backgroundColor }};">
<div class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backgroundColor }};"></div>
<div class="invoice-classic-line" style="background-color:{{ $backgroundColor }};"></div>
</div>
</div>
<div class="row mt-2">
<div class="col-58">
<div class="text company">
@if (!$hideContactInfo)
<strong>{{ trans($textContactInfo) }}</strong><br>
<div class="row top-spacing">
<div class="col-60">
<div class="text p-index-left">
@if (! $hideContactInfo)
<p class="text-semibold mb-0">{{ trans($textContactInfo) }}</p>
@endif
@stack('name_input_start')
@if (!$hideContactName)
<strong>{{ $document->contact_name }}</strong><br>
<p>{{ $document->contact_name }}</p>
@endif
@stack('name_input_end')
@ -115,70 +116,81 @@
<p>
{!! nl2br($document->contact_address) !!}
<br>
{!! $document->contact->location !!}
{!! $document->contact_location !!}
</p>
@endif
@stack('address_input_end')
@stack('tax_number_input_start')
@if (!$hideContactTaxNumber)
<p>
@if ($document->contact_tax_number)
{{ trans('general.tax_number') }}: {{ $document->contact_tax_number }}
@endif
</p>
@if ($document->contact_tax_number)
<p>
<span class="text-medium text-default">
{{ trans('general.tax_number') }}:
</span>
{{ $document->contact_tax_number }}
</p>
@endif
@endif
@stack('tax_number_input_end')
@stack('phone_input_start')
@if (!$hideContactPhone)
<p>
@if ($document->contact_phone)
@if ($document->contact_phone)
<p>
{{ $document->contact_phone }}
@endif
</p>
</p>
@endif
@endif
@stack('phone_input_end')
@stack('email_start')
@if (!$hideContactEmail)
<p>{{ $document->contact_email }}</p>
<p class="small-text">{{ $document->contact_email }}</p>
@endif
@stack('email_input_end')
</div>
</div>
<div class="col-42">
<div class="text company">
<div class="col-40">
<div class="text p-index-right">
@stack('order_number_input_start')
@if (!$hideOrderNumber)
@if ($document->order_number)
<strong>{{ trans($textOrderNumber) }}:</strong>
<span class="float-right">{{ $document->order_number }}</span><br><br>
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textOrderNumber) }}:</span>
<span class="float-right spacing">{{ $document->order_number }}</span>
</p>
@endif
@endif
@stack('order_number_input_end')
@stack('issued_at_input_start')
@if (!$hideIssuedAt)
<strong>{{ trans($textIssuedAt) }}:</strong>
<span class="float-right">@date($document->issued_at)</span><br><br>
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textIssuedAt) }}:</span>
<span class="float-right spacing">@date($document->issued_at)</span>
</p>
@endif
@stack('issued_at_input_end')
@stack('due_at_input_start')
@if (!$hideDueAt)
<strong>{{ trans($textDueAt) }}:</strong>
<span class="float-right">@date($document->due_at)</span><br><br>
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textDueAt) }}:</span>
<span class="float-right spacing">@date($document->due_at)</span>
</p>
@endif
@stack('due_at_input_end')
@foreach ($document->totals_sorted as $total)
@if ($total->code == 'total')
<strong>{{ trans($total->name) }}:</strong>
<span class="float-right">@money($total->amount - $document->paid, $document->currency_code, true)</span><br><br>
@endif
@endforeach
@foreach ($document->totals_sorted as $total)
@if ($total->code == 'total')
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($total->name) }}:</span>
<span class="float-right spacing">@money($total->amount - $document->paid, $document->currency_code, true)</span>
</p>
@endif
@endforeach
</div>
</div>
</div>
@ -186,39 +198,39 @@
@if (!$hideItems)
<div class="row">
<div class="col-100">
<div class="text">
<div class="text extra-spacing">
<table class="c-lines">
<thead>
<tr>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="text-left item">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
<th class="item text text-semibold text-alignment-left">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@endif
@stack('name_th_end')
@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity">{{ trans($textQuantity) }}</th>
<th class="quantity text text-semibold text-alignment-right">{{ trans($textQuantity) }}</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
@if (!$hidePrice)
<th class="price">{{ trans($textPrice) }}</th>
<th class="price text text-semibold text-alignment-right">{{ trans($textPrice) }}</th>
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount">{{ trans('invoices.discount') }}</th>
<th class="discount text text-semibold text-alignment-right">{{ trans('invoices.discount') }}</th>
@stack('discount_td_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="total">{{ trans($textAmount) }}</th>
<th class="total text text-semibold text-alignment-right">{{ trans($textAmount) }}</th>
@endif
@stack('total_th_end')
</tr>
@ -242,7 +254,7 @@
@endforeach
@else
<tr>
<td colspan="5" class="text-center empty-items">
<td colspan="5" class="text-center text empty-items">
{{ trans('documents.empty_items') }}
</td>
</tr>
@ -255,12 +267,12 @@
@endif
<div class="row mt-4 clearfix">
<div class="col-58">
<div class="text company">
<div class="col-60">
<div class="text p-index-right">
@stack('notes_input_start')
@if($hideNote)
@if ($document->notes)
<strong>{{ trans_choice('general.notes', 2) }}</strong><br><br>
<strong>{{ trans_choice('general.notes', 2) }}</strong>
{!! nl2br($document->notes) !!}
@endif
@endif
@ -268,34 +280,32 @@
</div>
</div>
<div class="col-42 float-right text-right">
<div class="text company pr-2">
@foreach ($document->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_total_tr_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $document->currency_code, true)</span>
<div class="col-40 float-right text-right">
@foreach ($document->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_total_tr_start')
<div class="text border-bottom-dashed py-1">
<strong class="float-left text-semibold">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $document->currency_code, true)</span>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($document->paid)
@stack('paid_total_tr_start')
<div class="text border-bottom-dashed py-1">
<span class="float-left text-semibold">{{ trans('invoices.paid') }}:</span>
<span>- @money($document->paid, $document->currency_code, true)</span>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($document->paid)
@stack('paid_total_tr_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
<span>- @money($document->paid, $document->currency_code, true)</span>
</div>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_tr_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($document->amount_due, $document->currency_code, true)</span>
</div>
@stack('grand_total_tr_end')
@stack('paid_total_tr_end')
@endif
@endforeach
</div>
@stack('grand_total_tr_start')
<div class="text border-bottom-dashed py-1">
<span class="float-left text-semibold">{{ trans($total->name) }}:</span>
<span>@money($document->amount_due, $document->currency_code, true)</span>
</div>
@stack('grand_total_tr_end')
@endif
@endforeach
</div>
</div>

View File

@ -1,28 +1,22 @@
<div class="row">
<div class="col-100">
<div class="text">
<div class="text text-dark">
<h3>
{{ $textDocumentTitle }}
</h3>
@if ($textDocumentSubheading)
<h5>
{{ $textDocumentSubheading }}
</h5>
@endif
</div>
</div>
</div>
<div class="row border-bottom-1">
<div class="col-58">
<div class="text company">
<div class="text">
@stack('company_logo_start')
@if (!$hideCompanyLogo)
@if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
<img class="d-logo" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
<img class="d-logo w-image" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
@else
<img class="d-logo" src="{{ $logo }}" alt="{{ setting('company.name') }}"/>
<img class="d-logo w-image" src="{{ $logo }}" alt="{{ setting('company.name') }}"/>
@endif
@endif
@stack('company_logo_end')
@ -30,39 +24,47 @@
</div>
<div class="col-42">
<div class="text company">
<div class="text right-column">
@stack('company_details_start')
@if ($textDocumentSubheading)
<p class="text-normal font-semibold">
{{ $textDocumentSubheading }}
</p>
@endif
@if (!$hideCompanyDetails)
@if (!$hideCompanyName)
<strong>{{ setting('company.name') }}</strong><br>
<p>{{ setting('company.name') }}</p>
@endif
@if (!$hideCompanyAddress)
<p>
{!! nl2br(setting('company.address')) !!}
<br>
{!! $document->company->location !!}
</p>
@endif
@if (!$hideCompanyTaxNumber)
<p>
@if (setting('company.tax_number'))
@if (setting('company.tax_number'))
<p>
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
@endif
</p>
</p>
@endif
@endif
@if (!$hideCompanyPhone)
<p>
@if (setting('company.phone'))
@if (setting('company.phone'))
<p>
{{ setting('company.phone') }}
@endif
</p>
</p>
@endif
@endif
@if (!$hideCompanyEmail)
<p>{{ setting('company.email') }}</p>
<p class="small-text">{{ setting('company.email') }}</p>
@endif
@endif
@stack('company_details_end')
@ -70,17 +72,16 @@
</div>
</div>
<div class="row">
<div class="col-58">
<div class="text company">
<br>
@if (!$hideContactInfo)
<strong>{{ trans($textContactInfo) }}</strong><br>
<div class="row top-spacing">
<div class="col-60">
<div class="text p-index-left">
@if (! $hideContactInfo)
<p class="text-semibold mb-0">{{ trans($textContactInfo) }}</p>
@endif
@stack('name_input_start')
@if (!$hideContactName)
<strong>{{ $document->contact_name }}</strong><br>
<p>{{ $document->contact_name }}</p>
@endif
@stack('name_input_end')
@ -96,27 +97,30 @@
@stack('tax_number_input_start')
@if (!$hideContactTaxNumber)
<p>
@if ($document->contact_tax_number)
{{ trans('general.tax_number') }}: {{ $document->contact_tax_number }}
@endif
</p>
@if ($document->contact_tax_number)
<p>
<span class="text-medium text-default">
{{ trans('general.tax_number') }}:
</span>
{{ $document->contact_tax_number }}
</p>
@endif
@endif
@stack('tax_number_input_end')
@stack('phone_input_start')
@if (!$hideContactPhone)
<p>
@if ($document->contact_phone)
@if ($document->contact_phone)
<p>
{{ $document->contact_phone }}
@endif
</p>
</p>
@endif
@endif
@stack('phone_input_end')
@stack('email_start')
@if (!$hideContactEmail)
<p>
<p class="small-text">
{{ $document->contact_email }}
</p>
@endif
@ -124,44 +128,52 @@
</div>
</div>
<div class="col-42">
<div class="text company">
<br>
<div class="col-40">
<div class="text p-index-right">
@stack('document_number_input_start')
@if (!$hideDocumentNumber)
<strong>
{{ trans($textDocumentNumber) }}:
</strong>
<span class="float-right">{{ $document->document_number }}</span><br><br>
<p class="mb-0">
<span class="font-semibold spacing w-numbers">
{{ trans($textDocumentNumber) }}:
</span>
<span class="float-right spacing">{{ $document->document_number }}</span>
</p>
@endif
@stack('document_number_input_end')
@stack('order_number_input_start')
@if (!$hideOrderNumber)
@if ($document->order_number)
<strong>
{{ trans($textOrderNumber) }}:
</strong>
<span class="float-right">{{ $document->order_number }}</span><br><br>
<p class="mb-0">
<span class="font-semibold spacing w-numbers">
{{ trans($textOrderNumber) }}:
</span>
<span class="float-right spacing">{{ $document->order_number }}</span>
</p>
@endif
@endif
@stack('order_number_input_end')
@stack('issued_at_input_start')
@if (!$hideIssuedAt)
<strong>
{{ trans($textIssuedAt) }}:
</strong>
<span class="float-right">@date($document->issued_at)</span><br><br>
<p class="mb-0">
<span class="font-semibold spacing w-numbers">
{{ trans($textIssuedAt) }}:
</span>
<span class="float-right spacing">@date($document->issued_at)</span>
</p>
@endif
@stack('issued_at_input_end')
@stack('due_at_input_start')
@if (!$hideDueAt)
<strong>
{{ trans($textDueAt) }}:
</strong>
<span class="float-right">@date($document->due_at)</span><br><br>
<p class="mb-0">
<span class="font-semibold spacing w-numbers">
{{ trans($textDueAt) }}:
</span>
<span class="float-right spacing">@date($document->due_at)</span>
</p>
@endif
@stack('due_at_input_end')
</div>
@ -171,39 +183,39 @@
@if (!$hideItems)
<div class="row">
<div class="col-100">
<div class="text">
<div class="text extra-spacing">
<table class="lines">
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<thead class="bg-{{ $backgroundColor }}" style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<tr>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
<th class="item text text-semibold text-alignment-left text-white border-radius-first">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@endif
@stack('name_th_end')
@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
<th class="quantity text text-semibold text-alignment-right text-white">{{ trans($textQuantity) }}</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
@if (!$hidePrice)
<th class="price text-white">{{ trans($textPrice) }}</th>
<th class="price text text-semibold text-alignment-right text-white">{{ trans($textPrice) }}</th>
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
<th class="discount text text-semibold text-alignment-right text-white">{{ trans('invoices.discount') }}</th>
@stack('discount_td_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="total text-white">{{ trans($textAmount) }}</th>
<th class="total text text-semibold text-white text-alignment-right border-radius-last">{{ trans($textAmount) }}</th>
@endif
@stack('total_th_end')
</tr>
@ -226,7 +238,7 @@
@endforeach
@else
<tr>
<td colspan="5" class="text-center empty-items">
<td colspan="5" class="text text-center empty-items">
{{ trans('documents.empty_items') }}
</td>
</tr>
@ -239,46 +251,43 @@
@endif
<div class="row mt-9 clearfix">
<div class="col-58">
<div class="text company">
<div class="col-60">
<div class="text p-index-left">
@stack('notes_input_start')
@if ($document->notes)
<br>
<strong>{{ trans_choice('general.notes', 2) }}</strong><br><br>
<p class="text-semibold">{{ trans_choice('general.notes', 2) }}</p>
{!! nl2br($document->notes) !!}
@endif
@stack('notes_input_end')
</div>
</div>
<div class="col-42 float-right text-right">
<div class="text company">
@foreach ($document->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_total_tr_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $document->currency_code, true)</span><br>
<div class="col-40 float-right text-right">
@foreach ($document->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_total_tr_start')
<div class="text border-bottom-1 py-1">
<span class="float-left text-semibold">{{ trans($total->title) }}:</span>
<span>@money($total->amount, $document->currency_code, true)</span>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($document->paid)
@stack('paid_total_tr_start')
<div class="text border-bottom-1 py-1">
<span class="float-left text-semibold">{{ trans('invoices.paid') }}:</span>
<span>- @money($document->paid, $document->currency_code, true)</span>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($document->paid)
@stack('paid_total_tr_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
<span>- @money($document->paid, $document->currency_code, true)</span><br>
</div>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_tr_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($document->amount_due, $document->currency_code, true)</span>
</div>
@stack('grand_total_tr_end')
@stack('paid_total_tr_end')
@endif
@endforeach
</div>
@stack('grand_total_tr_start')
<div class="text border-bottom-1 py-1">
<span class="float-left text-semibold">{{ trans($total->name) }}:</span>
<span>@money($document->amount_due, $document->currency_code, true)</span>
</div>
@stack('grand_total_tr_end')
@endif
@endforeach
</div>
</div>
@ -286,7 +295,7 @@
@if ($document->footer)
<div class="row mt-4">
<div class="col-100 text-left">
<div class="text company">
<div class="text">
<strong>{!! nl2br($document->footer) !!}<strong>
</div>
</div>

View File

@ -1,14 +1,16 @@
<tr>
@stack('name_td_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<td class="item">
@if (!$hideName)
{{ $item->name }}
@if (! $hideItems || (! $hideName && ! $hideDescription))
<td class="item text text-alignment-left">
@if (! $hideName)
{{ $item->name }} <br/>
@endif
@if (!$hideDescription)
@if (!empty($item->description))
<br><small>{!! \Illuminate\Support\Str::limit($item->description, 500) !!}</small>
@if (! $hideDescription)
@if (! empty($item->description))
<span class="small-text">
{!! \Illuminate\Support\Str::limit($item->description, 500) !!}
</span>
@endif
@endif
@ -19,32 +21,32 @@
@stack('name_td_end')
@stack('quantity_td_start')
@if (!$hideQuantity)
<td class="quantity">{{ $item->quantity }}</td>
@if (! $hideQuantity)
<td class="quantity text text-alignment-right">{{ $item->quantity }}</td>
@endif
@stack('quantity_td_end')
@stack('price_td_start')
@if (!$hidePrice)
<td class="price">@money($item->price, $document->currency_code, true)</td>
@if (! $hidePrice)
<td class="price text text-alignment-right">@money($item->price, $document->currency_code, true)</td>
@endif
@stack('price_td_end')
@if (!$hideDiscount)
@if (! $hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
@if ($item->discount_type === 'percentage')
<td class="discount">{{ $item->discount }}</td>
<td class="discount text text-alignment-right">{{ $item->discount }}</td>
@else
<td class="discount">@money($item->discount, $document->currency_code, true)</td>
<td class="discount text text-alignment-right">@money($item->discount, $document->currency_code, true)</td>
@endif
@stack('discount_td_end')
@endif
@endif
@stack('total_td_start')
@if (!$hideAmount)
<td class="total">@money($item->total, $document->currency_code, true)</td>
@if (! $hideAmount)
<td class="total text text-alignment-right">@money($item->total, $document->currency_code, true)</td>
@endif
@stack('total_td_end')
</tr>

View File

@ -1,32 +1,22 @@
<div class="row">
<div class="col-100">
<div class="text">
<div class="text text-dark">
<h3>
{{ $textDocumentTitle }}
</h3>
@if ($textDocumentSubheading)
<h5>
{{ $textDocumentSubheading }}
</h5>
@endif
</div>
</div>
</div>
<div class="row" style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<div class="row modern-head pt-2 pb-2 mt-1 bg-{{ $backgroundColor }}" style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<div class="col-58">
<div class="text company pl-2 mb-1 d-flex align-items-center">
<div class="text p-modern">
@stack('company_logo_start')
@if (!$hideCompanyLogo)
@if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
<img src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
<img class="w-image radius-circle" src="{{ $logo }}" alt="{{ $document->contact_name }}"/>
@else
<img src="{{ $logo }}" alt="{{ setting('company.name') }}" />
@endif
@if (!$hideCompanyName)
<strong class="pl-2 text-white">{{ setting('company.name') }}</strong>
<img class="w-image radius-circle" src="{{ $logo }}" alt="{{ setting('company.name') }}" />
@endif
@endif
@stack('company_logo_end')
@ -34,35 +24,45 @@
</div>
<div class="col-42">
<div class="text company">
<div class="text p-modern right-column">
@stack('company_details_start')
@if ($textDocumentSubheading)
<p class="text-normal font-semibold">
{{ $textDocumentSubheading }}
</p>
@endif
@if (!$hideCompanyName)
<p class="text-white">{{ setting('company.name') }}</p>
@endif
@if (!$hideCompanyDetails)
@if (!$hideCompanyAddress)
<strong class="text-white">
<p class="text-white">
{!! nl2br(setting('company.address')) !!}
<br>
{!! $document->company->location !!}
</strong><br><br>
</p>
@endif
@if (!$hideCompanyTaxNumber)
<strong class="text-white">
<p class="text-white">
@if (setting('company.tax_number'))
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
<span class="text-medium text-default">
{{ trans('general.tax_number') }}:
</span>
{{ setting('company.tax_number') }}
@endif
</strong><br><br>
</p>
@endif
@if (!$hideCompanyPhone)
<strong class="text-white">
<p class="text-white">
@if (setting('company.phone'))
{{ setting('company.phone') }}
@endif
</strong><br><br>
</p>
@endif
@if (!$hideCompanyEmail)
<strong class="text-white">{{ setting('company.email') }}</strong><br><br>
<p class="small-text text-white">{{ setting('company.email') }}</p>
@endif
@endif
@stack('company_details_end')
@ -70,35 +70,37 @@
</div>
</div>
<div class="row mt-2">
<div class="col-58">
<div class="text company">
@if (!$hideContactInfo)
<strong>{{ trans($textContactInfo) }}</strong>
<br>
<div class="row top-spacing">
<div class="col-50">
<div class="text p-modern">
@if (! $hideContactInfo)
<p class="text-semibold mb-0">{{ trans($textContactInfo) }}</p>
@endif
@stack('name_input_start')
@if (!$hideContactName)
<strong>{{ $document->contact_name }}</strong>
<br><br>
<p>{{ $document->contact_name }}</p>
@endif
@stack('name_input_end')
@stack('address_input_start')
@if (!$hideContactAddress)
{!! nl2br($document->contact_address) !!}
<br>
{!! $document->contact_location !!}
<br><br>
<p>
{!! nl2br($document->contact_address) !!} <br/>
{!! $document->contact_location !!}
</p>
@endif
@stack('address_input_end')
@stack('tax_number_input_start')
@if (!$hideContactTaxNumber)
@if ($document->contact_tax_number)
{{ trans('general.tax_number') }}: {{ $document->contact_tax_number }}
<br><br>
<p>
<span class="text-medium text-default">
{{ trans('general.tax_number') }}:
</span>
{{ $document->contact_tax_number }}
</p>
@endif
@endif
@stack('tax_number_input_end')
@ -106,50 +108,60 @@
@stack('phone_input_start')
@if (!$hideContactPhone)
@if ($document->contact_phone)
{{ $document->contact_phone }}
<br><br>
<p>
{{ $document->contact_phone }}
</p>
@endif
@endif
@stack('phone_input_end')
@stack('email_start')
@if (!$hideContactEmail)
<p>
{{ $document->contact_email }}
<br><br>
</p>
@endif
@stack('email_input_end')
</div>
</div>
<div class="col-42">
<div class="text company">
<div class="col-50">
<div class="text p-modern">
@stack('order_number_input_start')
@if (!$hideOrderNumber)
@if ($document->order_number)
<strong>{{ trans($textOrderNumber) }}:</strong>
<span class="float-right">{{ $document->order_number }}</span><br><br>
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textOrderNumber) }}:</span>
<span class="float-right spacing">{{ $document->order_number }}</span>
</p>
@endif
@endif
@stack('order_number_input_end')
@stack('invoice_number_input_start')
@if (!$hideDocumentNumber)
<strong>{{ trans($textDocumentNumber) }}:</strong>
<span class="float-right">{{ $document->document_number }}</span><br><br>
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textDocumentNumber) }}:</span>
<span class="float-right spacing">{{ $document->document_number }}</span>
</p>
@endif
@stack('invoice_number_input_end')
@stack('issued_at_input_start')
@if (!$hideIssuedAt)
<strong>{{ trans($textIssuedAt) }}:</strong>
<span class="float-right">@date($document->issued_at)</span><br><br>
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textIssuedAt) }}:</span>
<span class="float-right spacing">@date($document->issued_at)</span>
</p>
@endif
@stack('issued_at_input_end')
@stack('due_at_input_start')
@if (!$hideDueAt)
<strong>{{ trans($textDueAt) }}:</strong>
<span class="float-right">@date($document->due_at)</span>
<p class="mb-0">
<span class="text-semibold spacing">{{ trans($textDueAt) }}:</span>
<span class="float-right spacing">@date($document->due_at)</span>
</p>
@endif
@stack('due_at_input_end')
</div>
@ -159,39 +171,39 @@
@if (!$hideItems)
<div class="row">
<div class="col-100">
<div class="text">
<table class="m-lines">
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<div class="text extra-spacing">
<table class="lines modern-lines">
<thead class="bg-{{ $backgroundColor }}" style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<tr>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
<th class="item text text-semibold text-alignment-left text-white border-radius-first">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@endif
@stack('name_th_end')
@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
<th class="quantity text text-semibold text-white text-alignment-right">{{ trans($textQuantity) }}</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
@if (!$hidePrice)
<th class="price text-white">{{ trans($textPrice) }}</th>
<th class="price text text-semibold text-white text-alignment-right">{{ trans($textPrice) }}</th>
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
<th class="discount text text-semibold text-white text-alignment-right">{{ trans('invoices.discount') }}</th>
@stack('discount_td_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="total text-white">{{ trans($textAmount) }}</th>
<th class="total text text-semibold text-white text-alignment-right border-radius-last">{{ trans($textAmount) }}</th>
@endif
@stack('total_th_end')
</tr>
@ -214,7 +226,7 @@
@endforeach
@else
<tr>
<td colspan="5" class="text-center empty-items">
<td colspan="5" class="text text-center empty-items">
{{ trans('documents.empty_items') }}
</td>
</tr>
@ -226,49 +238,51 @@
</div>
@endif
<div class="row mt-7">
<div class="col-58">
<div class="text company">
<div class="row mt-7 clearfix">
<div class="col-60">
<div class="text p-index-right p-modern">
@stack('notes_input_start')
@if($hideNote)
@if ($document->notes)
<strong>{{ trans_choice('general.notes', 2) }}</strong><br><br>
{!! nl2br($document->notes) !!}
@endif
@if ($document->notes)
<p class="text-semibold">{{ trans_choice('general.notes', 2) }}</p>
{!! nl2br($document->notes) !!}
@endif
@stack('notes_input_end')
</div>
</div>
<div class="col-42 float-right text-right">
<div class="text company pr-2">
@foreach ($document->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_total_tr_start')
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $document->currency_code, true)</span><br><br>
@stack($total->code . '_total_tr_end')
@else
@if ($document->paid)
@stack('paid_total_tr_start')
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
<span>- @money($document->paid, $document->currency_code, true)</span><br><br>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_tr_start')
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($document->amount_due, $document->currency_code, true)</span>
@stack('grand_total_tr_end')
<div class="col-40 float-right text-right">
@foreach ($document->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_total_tr_start')
<div class="text">
<span class="float-left text-semibold">{{ trans($total->title) }}:</span>
<span>@money($total->amount, $document->currency_code, true)</span>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($document->paid)
@stack('paid_total_tr_start')
<div class="text">
<span class="float-left text-semibold">{{ trans('invoices.paid') }}:</span>
<span>- @money($document->paid, $document->currency_code, true)</span>
</div>
@stack('paid_total_tr_end')
@endif
@endforeach
</div>
@stack('grand_total_tr_start')
<div class="text">
<span class="float-left text-semibold">{{ trans($total->name) }}:</span>
<span>@money($document->amount_due, $document->currency_code, true)</span>
</div>
@stack('grand_total_tr_end')
@endif
@endforeach
</div>
</div>
@if (!$hideFooter)
@if ($document->footer)
<div class="row mt-7">
<div class="col-100 py-2" style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<div class="col-100 py-top p-modern bg-{{ $backgroundColor }}" style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<div class="text pl-2">
<strong class="text-white">{!! nl2br($document->footer) !!}</strong>
</div>

View File

@ -0,0 +1,5 @@
<button type="button" class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" {{ $attributes }}>
<span class="w-full h-full flex items-center rounded-md px-2 text-sm font-normal hover:bg-lilac-100">
{!! $slot !!}
</span>
</button>

View File

@ -0,0 +1,3 @@
<div class="py-2 px-2">
<div class="w-full border-t border-gray-200"></div>
</div>

View File

@ -0,0 +1,19 @@
<div class="relative">
<button type="button"
@if ($trigger->attributes->has('override') && in_array('class', explode(',', $trigger->attributes->get('override'))))
class="{{ $trigger->attributes->get('class') }}"
@else
class="w-9 h-9 flex items-center justify-center px-2 py-2 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-sm font-medium leading-6"
@endif
data-dropdown-toggle="{{ $id }}"
{{ $trigger->attributes }}
>
{!! $trigger !!}
</button>
<div id="{{ $id }}" class="absolute right-0 mt-3 py-2 bg-white rounded-md border border-gray-200 shadow-xl z-20 hidden" style="left: auto; min-width: 10rem;">
@stack('button_dropdown_start')
{{ $slot }}
</div>
</div>

View File

@ -0,0 +1,5 @@
<a href="{{ $href }}" class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" {{ $attributes }}>
<span class="w-full h-full flex items-center rounded-md px-2 text-sm font-normal hover:bg-lilac-100">
{!! $slot !!}
</span>
</a>

View File

@ -0,0 +1 @@
{!! $body !!}

View File

@ -0,0 +1,25 @@
<table border="0" style="width:100%; background-color: #F8F9FE; margin-top: 15px;">
<tbody>
<tr>
<td>
<table border="0" style="text-align: center; margin: 0 auto;">
<tbody>
<tr>
<td align="center" valign="middle" style="text-align: center; padding-top: 5px;">
<a href="{!! $url !!}" style="color: #676ba2; text-decoration: none;">{{ trans('footer.powered_by') }}&nbsp;</a>
</td>
<td align="center" valign="middle" style="text-align: center; padding-top: 5px;">
<a href="{!! $url !!}"><img src="{{ asset('public/img/akaunting-logo-wild-blue.png') }}" style="height:20px;" alt="Akaunting" /></a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="text-align: center; padding: 5px 0 5px 0; color: #595959;">
{!! trans('footer.tag_line', ['get_started_url' => $get_started]) !!}
</td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1 @@
{{ trans('general.na') }}

View File

@ -1,26 +1,72 @@
<div class="flex flex-col lg:flex-row">
<div class="w-full lg:w-1/2">
<div class="border-b px-2 pb-3">
<h1 class="flex items-center text-2xl xl:text-5xl text-black font-light -ml-0.5">
{!! $title !!}
</h1>
<div class="card">
<div class="row align-items-center">
<div class="col-xs-12 col-sm-6 text-center p-5">
<img class="blank-image" src="{{ asset($imageEmptyPage) }}" alt="@yield('title')"/>
</div>
<div class="col-xs-12 col-sm-6 text-center p-5">
<p class="text-justify description">
{!! trans($textEmptyPage) !!} {!! trans('general.empty.documentation', ['url' => $urlDocsPath]) !!}
<p class="mt-6 text-sm">
{!! $description !!}
</p>
@if ($checkPermissionCreate)
@can($permissionCreate)
<a href="{{ route($routeCreate) }}" class="btn btn-success float-right mt-4">
<span class="btn-inner--text">{{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }}</span>
</a>
@endcan
@else
<a href="{{ route($routeCreate) }}" class="btn btn-success float-right mt-4">
<span class="btn-inner--text">{{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }}</span>
</a>
@endif
</div>
<ul>
@foreach ($buttons as $button)
@if ($checkPermissionCreate)
@can ($button['permission'])
@endif
<li class="border-b p-2 hover:bg-gray-100">
<a href="{{ $button['url']}}" class="flex items-center justify-between text-xs">
<div class="truncate">
<div class="flex items-center">
<h2 class="relative">
{{ $button['text'] }}
@if (! empty($button['active_badge']))
<div class="absolute w-7 h-7 opacity-100 z-20 -top-1.5 -right-8">
<div class="absolute w-5 h-5 left-0 top-1 border border-gray-100 rounded-full animate-pulsate_transparent bg-white"></div>
<div class="absolute w-2 h-2 top-2.5 left-1.5 rounded-full bg-green-400"></div>
</div>
@endif
</h2>
</div>
<div class="h-4 overflow-hidden text-black-400 truncate">{{ $button['description'] }}</div>
</div>
<span class="material-icons text-gray-500 transform rtl:rotate-180">chevron_right</span>
</a>
</li>
@if ($checkPermissionCreate)
@endcan
@endif
@endforeach
@if (! empty($suggestion))
<li class="border-b p-2 hover:bg-gray-100">
<a href="{{ url($suggestion->action_url) . '?' . http_build_query((array) $suggestion->action_parameters) }}" class="flex items-center justify-between text-xs">
<div class="truncate">
<h2 class="">{{ $suggestion->name }}</h2>
<div class="h-4 overflow-hidden text-black-400 truncate">Enter details and create your first expense easily</div>
</div>
<span class="material-icons text-gray-500">chevron_right</span>
</a>
</li>
@endif
</ul>
</div>
<div class="w-full lg:w-1/2 flex justify-end lg:mt-60">
<img src="{{ $image }}" alt="{{ $title }}" />
</div>
</div>
@push('css')
<style>
.hide-empty-page {
display: none;
}
</style>
@endpush

View File

@ -0,0 +1,11 @@
<div class="border-b-2 border-gray-200 {{ ! empty($description) ? ' pb-4' : 'pb-2' }}">
<h2 class="lg:text-lg font-medium text-black">
{{ $title }}
</h2>
@if (! empty($description))
<span class="text-sm font-light text-black">
{!! $description !!}
</span>
@endif
</div>

View File

@ -0,0 +1,28 @@
<div {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'mb-14']) : $attributes }}
x-data="{ {{ $type }} : {{ ($open) ? "'open'" : "'close'" }} }"
>
@if (! empty($head) && $head->isNotEmpty())
<div class="relative cursor-pointer" x-on:click="{{ $type }} !== 'open' ? {{ $type }} = 'open' : {{ $type }} = 'close'">
{!! $head !!}
<x-icon filled class="absolute right-0 top-0 transition-all transform" :icon="$icon" x-bind:class="{{ $type }} === 'open' ? 'rotate-180' : ''" />
</div>
@endif
@if (! empty($body) && $body->isNotEmpty())
<div class="overflow-hidden transition-transform origin-top-left ease-linear duration-100"
x-ref="accordion_{{ $type }}"
x-bind:class="{{ $type }} == 'open' ? 'h-auto ' : 'scale-y-0 h-0'"
>
<div class="grid sm:grid-cols-7 gap-x-8 gap-y-6 my-3.5">
{!! $body !!}
</div>
</div>
@endif
@if (! empty($foot) && $foot->isNotEmpty())
<div class="relative__footer">
{!! $foot !!}
</div>
@endif
</div>

View File

@ -0,0 +1,26 @@
@stack('save_buttons_start')
<div
@class([
'flex items-center justify-end',
$groupClass,
])
>
@if (! $withoutCancel)
<x-link href="{{ $cancel }}" class="{{ $cancelClass }}" override="class">
{{ $cancelText }}
</x-link>
@endif
<x-button
type="submit"
class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100"
::disabled="form.loading"
override="class"
>
<i v-if="form.loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:-left-3.5 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:-right-3.5 after:rounded-full after:animate-submit after:delay-[0.42s]"></i>
<span :class="[{'opacity-0': form.loading}]">
{{ trans('general.save') }}
</span>
</x-button>
</div>
@stack('save_buttons_end')

View File

@ -0,0 +1,19 @@
<div class="flex flex-col lg:flex-row">
<div {{ ((! $attributes->has('override')) || ($attributes->has('override') && ! in_array('class', explode(',', $attributes->get('override'))))) ? $attributes->merge(['class' => 'relative lg:w-8/12 z-10']) : $attributes }}>
@if (! empty($head) && $head->isNotEmpty())
{!! $head !!}
@endif
<div class="relative mt-4">
{!! $slot !!}
</div>
@if (!empty($foot) && $foot->isNotEmpty())
{!! $foot !!}
@endif
</div>
<x-tips position="relative" />
</div>
<x-tips position="fixed" />

View File

@ -0,0 +1,4 @@
<div class="text-red text-sm mt-1 block"
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has("' . $name . '")' }}"
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}">
</div>

View File

@ -0,0 +1,24 @@
@if (! $attributes->has('withoutAddNew'))
<x-form.group.select
add-new
:path="$path"
name="{{ $name }}"
label="{{ trans_choice('general.accounts', 1) }}"
:options="$accounts"
:selected="$selected"
change="onChangeAccount"
form-group-class="{{ $formGroupClass }}"
{{ $attributes }}
/>
@else
<x-form.group.select
name="{{ $name }}"
label="{{ trans_choice('general.accounts', 1) }}"
:options="$accounts"
:selected="$selected"
change="onChangeAccount"
form-group-class="{{ $formGroupClass }}"
{{ $attributes }}
/>
@endif

View File

@ -0,0 +1,10 @@
<x-form.group.file
name="attachment"
label="{{ trans('general.attachment') }}"
singleWidthClasses
not-required
dropzone-class="w-100"
multiple="multiple"
:options="['acceptedFiles' => $file_types]"
form-group-class="sm:col-span-6"
/>

View File

@ -0,0 +1,81 @@
@if ((! $attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew')))
<x-form.group.select
remote
remote_action="{{ $remoteAction }}"
add-new
path="{{ $path }}"
name="{{ $name }}"
label="{{ trans_choice('general.categories', 1) }}"
:options="$categories"
:selected="$selected"
sort-options="false"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@elseif (($attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew')))
<x-form.group.select
add-new
path="{{ $path }}"
name="{{ $name }}"
label="{{ trans_choice('general.categories', 1) }}"
:options="$categories"
:selected="$selected"
sort-options="false"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@elseif ((! $attributes->has('withoutRemote')) && ($attributes->has('withoutAddNew')))
<x-form.group.select
remote
remote_action="{{ $remoteAction }}"
name="{{ $name }}"
label="{{ trans_choice('general.categories', 1) }}"
:options="$categories"
:selected="$selected"
sort-options="false"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@else
<x-form.group.select
name="{{ $name }}"
label="{{ trans_choice('general.categories', 1) }}"
:options="$categories"
:selected="$selected"
sort-options="false"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@endif

View File

@ -0,0 +1,72 @@
@stack($name . '_input_start')
<div
@class([
'form-group relative',
$formGroupClass,
'required' => $required,
'readonly' => $readonly,
'disabled' => $disabled,
])
@if (isset($attributes['v-show']))
v-if="{{ $attributes['v-show'] }}"
@endif
@if (isset($attributes['v-disabled']))
:class="[
{'disabled' : {{ $attributes['v-disabled'] }}},
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
]"
@else
:class="[
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
]"
@endif
>
@if (! $attributes->has('label') && ! empty($label->contents))
{!! $label ?? '' !!}
@elseif (! empty($label))
<x-form.label for="{{ $name }}" class="form-control-label">{!! $label !!}</x-form.label>
@endif
<div @class([
'flex items-center justify-center grid sm:grid-cols-6',
$inputGroupClass,
])
>
@php
$option_id = $attributes[':id'];
@endphp
@foreach($options as $option)
@php
if (! empty($attributes[':id'])) {
$attributes[':id'] = str_replace(':item_id', $option->$optionKey, $option_id);
}
@endphp
<div class="{{ ! empty($attributes['checkbox-class']) ? $attributes['checkbox-class'] : 'sm:col-span-3' }}">
<div class="custom-control custom-checkbox">
<x-form.input.checkbox
name="{{ $name }}"
label="{{ $option->$optionValue }}"
id="{{ 'checkbox-' . $name . '-' . $option->$optionKey }}"
:checked="(is_array($checked) && count($checked)) ? (in_array($option->$optionKey, $checked) ? true : 'n/a') : $checked"
value="{{ $option->$optionKey }}"
data-type="{{ (is_array($checked)) ? 'multiple' : 'single' }}"
v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name : 'form.' . $name) }}"
:option="$option"
optionKey="{{ $optionKey }}"
optionValue="{{ $optionValue }}"
{{ $attributes->merge($custom_attributes) }}
/>
</div>
</div>
@endforeach
</div>
@if (! $attributes->has('error') && ! empty($error->contents))
{!! $error ?? '' !!}
@else
<x-form.error name="{{ $name }}" {{ $attributes }} />
@endif
</div>
@stack($name . '_input_end')

View File

@ -0,0 +1,75 @@
@stack($name . '_input_start')
<akaunting-color
@class([
'form-group relative',
$formGroupClass,
'required' => $required,
'readonly' => $readonly,
'disabled' => $disabled,
])
id="form-select-{{ $name }}"
@if (isset($attributes['v-show']))
v-if="{{ $attributes['v-show'] }}"
@endif
@if (! empty($attributes['v-error']))
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
@else
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
@if (! $attributes->has('icon') && ! empty($icon->contents))
{!! $icon ?? '' !!}
@elseif (! empty($icon))
<x-form.icon icon="{{ $icon }}" />
@endif
title="{{ $label }}"
@if (isset($attributes['placeholder']))
placeholder="{{ $attributes['placeholder'] }}"
@else
placeholder="{{ trans('general.form.select.field', ['field' => $label]) }}"
@endif
name="{{ $name }}"
value="{{ $value }}"
@if (! empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
@if (! empty($attributes['small']))
small="{{ $attributes['small'] }}"
@endif
@if (! empty($attributes['v-model']))
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (! empty($attributes['data-field']))
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event;"
@endif
@if (! empty($attributes['change']))
@change="{{ $attributes['change'] }}($event)"
@endif
@if (isset($attributes['readonly']))
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
@endif
></akaunting-color>
@stack($name . '_input_end')

View File

@ -0,0 +1,81 @@
@if ((! $attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew')))
<x-form.group.select
remote
remote_action="{{ $remoteAction }}"
add-new
path="{{ $path }}"
add-new
name="{{ $name }}"
label="{{ $label }}"
:options="$contacts"
:selected="$selected"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@elseif (($attributes->has('withoutRemote')) && (! $attributes->has('withoutAddNew')))
<x-form.group.select
add-new
path="{{ $path }}"
add-new
name="{{ $name }}"
label="{{ $label }}"
:options="$contacts"
:selected="$selected"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@elseif ((!$attributes->has('withoutRemote')) && ($attributes->has('withoutAddNew')))
<x-form.group.select
remote
remote_action="{{ $remoteAction }}"
add-new
name="{{ $name }}"
label="{{ $label }}"
:options="$contacts"
:selected="$selected"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@else
<x-form.group.select
add-new
name="{{ $name }}"
label="{{ $label }}"
:options="$contacts"
:selected="$selected"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@endif

View File

@ -0,0 +1,8 @@
<x-form.group.select
name="country"
label="{{ trans_choice('general.countries', 1) }}"
:options="trans('countries')"
:selected="setting('company.country')"
not-required
model="form.country"
/>

View File

@ -0,0 +1,39 @@
@if (! $attributes->has('withoutAddNew'))
<x-form.group.select
add-new
:path="$path"
:field="$field"
name="{{ $name }}"
label="{{ trans_choice('general.currencies', 1) }}"
:options="$currencies"
:selected="$selected"
change="onChangeCurrency"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@else
<x-form.group.select
name="{{ $name }}"
label="{{ trans_choice('general.currencies', 1) }}"
:options="$currencies"
:selected="$selected"
change="onChangeCurrency"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
{{ $attributes }}
/>
@endif

View File

@ -0,0 +1,4 @@
<x-form.group.contact
type="customer"
{{ $attributes }}
/>

View File

@ -0,0 +1,107 @@
@stack($name . '_input_start')
<akaunting-date
@class([
'form-group relative',
$formGroupClass,
'required' => $required,
'readonly' => $readonly,
'disabled' => $disabled,
])
@if (isset($attributes['v-show']))
v-if="{{ $attributes['v-show'] }}"
@endif
@if ($required)
:required="{{ $required ? 'true' : 'false' }}"
@endif
@if ($readonly)
:readonly="{{ $readonly }}"
@endif
@if ($disabled)
:disabled="{{ $disabled }}"
@endif
@if (!empty($attributes['v-error']))
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
@else
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
@if (! empty($group_class))
group_class="{{ $group_class }}"
@endif
@if (! empty($icon))
icon="{{ $icon }}"
@endif
title="{{ $label }}"
placeholder="{{ $placeholder }}"
name="{{ $name }}"
@if (isset($value) || old($name))
value="{{ old($name, $value) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:date-config="{
wrap: true, // set wrap to true only when using 'input-group'
allowInput: false,
@if (!empty($attributes['show-date-format']))
altInput: true,
altFormat: '{{ $attributes['show-date-format'] }}',
@endif
@if (!empty($attributes['date-format']))
dateFormat: '{{ $attributes['date-format'] }}',
@endif
@if (!empty($attributes['min-date']))
minDate: {{ $attributes['min-date'] }},
@endif
@if (!empty($attributes['max-date']))
maxDate: {{ $attributes['max-date'] }},
@endif
}"
locale="{{ language()->getShortCode() }}"
@if (isset($attributes['period']))
period="{{ $attributes['period'] }}"
@endif
@if (!empty($attributes['v-model']))
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['hidden_year']))
hidden-year
@endif
@if (!empty($attributes['min-date-dynamic']))
:data-value-min="{{ $attributes['min-date-dynamic'] }}"
@endif
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}"
@endif
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
@endif
></akaunting-date>
@stack($name . '_input_end')

View File

@ -0,0 +1,91 @@
@stack($name . '_input_start')
<akaunting-date
@class([
'form-group relative',
$formGroupClass,
'required' => $required,
'readonly' => $readonly,
'disabled' => $disabled,
])
@if (isset($attributes['v-show']))
v-if="{{ $attributes['v-show'] }}"
@endif
@if ($readonly)
:readonly="{{ $readonly }}"
@endif
@if ($disabled)
:disabled="{{ $disabled }}"
@endif
@if (!empty($attributes['v-error']))
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
@else
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
@if (! empty($icon))
icon="{{ $icon }}"
@endif
title="{{ $label }}"
placeholder="{{ $placeholder }}"
name="{{ $name }}"
@if (isset($value) || old($name))
value="{{ old($name, $value) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:date-config="{
allowInput: true,
@if (!empty($attributes['show-date-format']))
altInput: true,
altFormat: '{{ $attributes['show-date-format'] }}',
@endif
@if (!empty($attributes['date-format']))
dateFormat: '{{ $attributes['date-format'] }}',
@endif
wrap: true,
enableTime: true,
@if (!empty($attributes['seconds']))
enableSeconds: true,
@endif
@if (!empty($attributes['min-date']))
minDate: {{ $attributes['min-date'] }},
@endif
@if (!empty($attributes['max-date']))
maxDate: {{ $attributes['max-date'] }},
@endif
}"
locale="{{ language()->getShortCode() }}"
@if (!empty($attributes['v-model']))
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}"
@endif
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
@endif
></akaunting-date>
@stack($name . '_input_end')

View File

@ -0,0 +1,47 @@
@stack($name . '_input_start')
<div
@class([
'form-group relative',
$formGroupClass,
'required' => $required,
'readonly' => $readonly,
'disabled' => $disabled,
])
@if (isset($attributes['v-show']))
v-if="{{ $attributes['v-show'] }}"
@endif
@if (isset($attributes['v-disabled']) || isset($attributes['v-bind:disabled']))
:class="[
{'disabled' : {{ (isset($attributes['v-disabled'])) ? $attributes['v-disabled'] : $attributes['v-bind:disabled'] }}},
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
]"
@else
:class="[
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
]"
@endif
>
@if (! $attributes->has('label') && ! empty($label->contents))
{!! $label ?? '' !!}
@elseif (! empty($label))
<x-form.label for="{{ $name }}" class="form-control-label">{!! $label !!}</x-form.label>
@endif
<x-form.input.editor
name="{{ $name }}"
id="{{ $id }}"
value="{{ $value }}"
placeholder="{{ $placeholder }}"
v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name : 'form.' . $name) }}"
{{ $attributes->merge($custom_attributes) }}
/>
@if (! $attributes->has('error') && ! empty($error->contents))
{!! $error ?? '' !!}
@else
<x-form.error name="{{ $name }}" {{ $attributes }} />
@endif
</div>
@stack($name . '_input_end')

View File

@ -0,0 +1,60 @@
@stack($name . '_input_start')
<div
@class([
'form-group relative',
$formGroupClass,
'required' => $required,
'readonly' => $readonly,
'disabled' => $disabled,
])
@if (isset($attributes['v-show']))
v-if="{{ $attributes['v-show'] }}"
@endif
@if (isset($attributes['v-disabled']))
:class="[
{'disabled' : {{ $attributes['v-disabled'] }}},
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
]"
@else
:class="[
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
]"
@endif
>
@if (! $attributes->has('label') && ! empty($label->contents))
{!! $label ?? '' !!}
@elseif (! empty($label))
<x-form.label for="{{ $name }}" class="form-control-label">{!! $label !!}</x-form.label>
@endif
<div @class([
'input-group input-group-merge',
$inputGroupClass,
])
>
@if (! $attributes->has('icon') && ! empty($icon->contents))
{!! $icon ?? '' !!}
@elseif (! empty($icon))
<x-form.icon icon="{{ $icon }}" />
@endif
<x-form.input.email
name="{{ $name }}"
id="{{ $id }}"
class="form-element"
value="{{ $value }}"
placeholder="{{ $placeholder }}"
v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name : 'form.' . $name) }}"
{{ $attributes->merge($custom_attributes) }}
/>
</div>
@if (! $attributes->has('error') && ! empty($error->contents))
{!! $error ?? '' !!}
@else
<x-form.error name="{{ $name }}" {{ $attributes }} />
@endif
</div>
@stack($name . '_input_end')

View File

@ -0,0 +1,60 @@
@stack($name . '_input_start')
<div
@class([
'form-group relative',
$formGroupClass,
'required' => $required,
'readonly' => $readonly,
'disabled' => $disabled,
])
@if (isset($attributes['v-show']))
v-if="{{ $attributes['v-show'] }}"
@endif
@if (isset($attributes['v-disabled']) || isset($attributes['v-bind:disabled']))
:class="[
{'disabled' : {{ (isset($attributes['v-disabled'])) ? $attributes['v-disabled'] : $attributes['v-bind:disabled'] }}},
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
]"
@else
:class="[
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
]"
@endif
>
@if (! $attributes->has('label') && ! empty($label->contents))
{!! $label ?? '' !!}
@elseif (! empty($label))
<x-form.label for="{{ $name }}" class="form-control-label">{!! $label !!}</x-form.label>
@endif
<div @class([
'input-group input-group-merge',
$inputGroupClass,
])
>
@if (! $attributes->has('icon') && ! empty($icon->contents))
{!! $icon ?? '' !!}
@elseif (! empty($icon))
<x-form.icon icon="{{ $icon }}" />
@endif
<x-form.input.file
name="{{ $name }}"
id="{{ $id }}"
:value="$value"
v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name : 'form.' . $name) }}"
:multiple="$multiple"
:options="$options"
{{ $attributes->merge($custom_attributes) }}
/>
</div>
@if (! $attributes->has('error') && ! empty($error->contents))
{!! $error ?? '' !!}
@else
<x-form.error name="{{ $name }}" {{ $attributes }} />
@endif
</div>
@stack($name . '_input_end')

View File

@ -0,0 +1,173 @@
@stack($name . '_input_start')
<div
@class([
'grid grid-cols-6 gap-8',
$formGroupClass,
'required' => $required,
'readonly' => $readonly,
'disabled' => $disabled,
])
@if (isset($attributes['v-show']))
v-if="{{ $attributes['v-show'] }}"
@endif
:class="[
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }
]"
>
<akaunting-select
@class([
'form-group relative',
$formGroupClass,
'required' => $required,
'readonly' => $readonly,
'disabled' => $disabled,
])
id="form-invoice-{{ $name }}"
@if (isset($attributes['v-show']))
v-if="{{ $attributes['v-show'] }}"
@endif
@if (!empty($attributes['v-error']))
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
@else
:form-classes="[{'has-error': form.errors.has('{{ $name }}') }]"
@endif
@if (! $attributes->has('icon') && ! empty($icon->contents))
{!! $icon ?? '' !!}
@elseif (! empty($icon))
<x-form.icon icon="{{ $icon }}" />
@endif
title="{{ $label }}"
@if (isset($attributes['placeholder']))
placeholder="{{ $attributes['placeholder'] }}"
@else
placeholder="{{ trans('general.form.select.field', ['field' => $label]) }}"
@endif
name="{{ $name }}"
:options="{{ json_encode($options) }}"
@if (isset($attributes['disabledOptions']))
:disabled-options="{{ json_encode($attributes['disabledOptions']) }}"
@endif
@if (isset($attributes['dynamicOptions']))
:dynamic-options="{{ $attributes['dynamicOptions'] }}"
@endif
@if (empty($multiple))
@if (isset($selected) || old($name))
value="{{ old($name, $selected) }}"
@endif
@else
@if (isset($selected) || old($name))
:value="{{ json_encode(old($name, $selected)) }}"
@endif
multiple
@if (! empty($attributes['collapse']))
collapse
@endif
@endif
@if (! empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
@if (! empty($addNew))
:add-new="{{ json_encode([
'status' => true,
'text' => trans('general.add_new'),
'path' => isset($attributes['path']) ? $attributes['path']: false,
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
'field' => [
'key' => isset($attributes['field']['key']) ? $attributes['field']['key'] : 'id',
'value' => isset($attributes['field']['value']) ? $attributes['field']['value'] : 'name'
],
'new_text' => trans('modules.new'),
'buttons' => [
'cancel' => [
'text' => trans('general.cancel'),
'class' => 'btn-outline-secondary'
],
'confirm' => [
'text' => trans('general.save'),
'class' => 'disabled:bg-green-100'
]
]
])}}"
@endif
@if (! empty($group))
group
@endif
@if (! empty($attributes['v-model']))
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (! empty($attributes['data-field']))
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event;"
@endif
@if (! empty($attributes['change']))
@change="{{ $attributes['change'] }}($event)"
@endif
@if (! empty($attributes['visible-change']))
@visible-change="{{ $attributes['visible-change'] }}"
@endif
@if (isset($attributes['readonly']))
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['v-disabled']))
:disabled="{{ $attributes['v-disabled'] }}"
@endif
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
@endif
@if (! empty($remote))
remote-action="{{ $attributes['remote_action'] }}"
@if (! empty($attributes['currecny_code']))
currency-code="{{ $attributes['currecny_code'] }}"
@endif
@endif
loading-text="{{ trans('general.loading') }}"
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
:sort-options="false"
></akaunting-select>
@foreach ($options as $option)
@if ($option->id == 'custom')
<div class="col-span-3 mt-5">
<x-form.group.text name="{{ $attributes['input-name'] }}" value="{{ $attributes['input-value'] }}" v-show="{{ $attributes['input-name'] }}" />
</div>
@endif
@endforeach
</div>
@stack($name . '_input_end')

View File

@ -0,0 +1,6 @@
<x-form.group.select
name="locale"
label="{{ trans_choice('general.languages', 1) }}"
:options="language()->allowed()"
:selected="$selected"
/>

Some files were not shown because too many files have changed in this diff Show More