cancel invoice/bill
This commit is contained in:
@@ -31,6 +31,7 @@ return [
|
||||
'add_payment' => 'Add Payment',
|
||||
'mark_paid' => 'Mark Paid',
|
||||
'mark_received' => 'Mark Received',
|
||||
'mark_cancelled' => 'Mark Cancelled',
|
||||
'download_pdf' => 'Download PDF',
|
||||
'send_mail' => 'Send Email',
|
||||
'create_bill' => 'Create Bill',
|
||||
@@ -44,11 +45,13 @@ return [
|
||||
'paid' => 'Paid',
|
||||
'overdue' => 'Overdue',
|
||||
'unpaid' => 'Unpaid',
|
||||
'cancelled' => 'Cancelled',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'received' => 'Bill marked as received successfully!',
|
||||
'marked_received' => 'Bill marked as received!',
|
||||
'marked_paid' => 'Bill marked as paid!',
|
||||
'marked_cancelled' => 'Bill marked as cancelled!',
|
||||
'draft' => 'This is a <b>DRAFT</b> bill and will be reflected to charts after it gets received.',
|
||||
|
||||
'status' => [
|
||||
|
||||
@@ -15,6 +15,7 @@ return [
|
||||
'paid' => 'Are you sure you want to mark selected invoice as <b>paid</b>?|Are you sure you want to mark selected invoices as <b>paid</b>?',
|
||||
'sent' => 'Are you sure you want to mark selected invoice as <b>sent</b>?|Are you sure you want to mark selected invoices as <b>sent</b>?',
|
||||
'received' => 'Are you sure you want to mark selected bill as <b>received</b>?|Are you sure you want to mark selected bills as <b>received</b>?',
|
||||
'cancelled' => 'Are you sure you want to <b>cancel</b> selected invoice/bill?|Are you sure you want to <b>cancel</b> selected invoices/bills?',
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
@@ -31,6 +31,7 @@ return [
|
||||
'mark_paid' => 'Mark Paid',
|
||||
'mark_sent' => 'Mark Sent',
|
||||
'mark_viewed' => 'Mark Viewed',
|
||||
'mark_cancelled' => 'Mark Cancelled',
|
||||
'download_pdf' => 'Download PDF',
|
||||
'send_mail' => 'Send Email',
|
||||
'all_invoices' => 'Login to view all invoices',
|
||||
@@ -48,12 +49,15 @@ return [
|
||||
'paid' => 'Paid',
|
||||
'overdue' => 'Overdue',
|
||||
'unpaid' => 'Unpaid',
|
||||
'cancelled' => 'Cancelled',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'email_sent' => 'Invoice email has been sent!',
|
||||
'marked_sent' => 'Invoice marked as sent!',
|
||||
'marked_paid' => 'Invoice marked as paid!',
|
||||
'marked_viewed' => 'Invoice marked as viewed!',
|
||||
'marked_cancelled' => 'Invoice marked as cancelled!',
|
||||
'email_required' => 'No email address for this customer!',
|
||||
'draft' => 'This is a <b>DRAFT</b> invoice and will be reflected to charts after it gets sent.',
|
||||
|
||||
|
||||
@@ -273,8 +273,7 @@
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
@if($invoice->status != 'paid')
|
||||
@if ($payment_methods)
|
||||
@if (!empty($payment_methods) && !in_array($invoice->status, ['paid', 'cancelled']))
|
||||
{!! Form::open([
|
||||
'id' => 'invoice-payment',
|
||||
'role' => 'form',
|
||||
@@ -285,7 +284,6 @@
|
||||
{{ Form::selectGroup('payment_method', '', 'money el-icon-money', $payment_methods, '', ['change' => 'onChangePaymentMethod', 'id' => 'payment-method', 'class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])], 'col-sm-12') }}
|
||||
{!! Form::hidden('invoice_id', $invoice->id, ['v-model' => 'form.invoice_id']) !!}
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 text-right">
|
||||
|
||||
@@ -219,19 +219,17 @@
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
@if($invoice->status != 'paid')
|
||||
@if ($payment_methods)
|
||||
{!! Form::open([
|
||||
'id' => 'invoice-payment',
|
||||
'role' => 'form',
|
||||
'autocomplete' => "off",
|
||||
'novalidate' => 'true',
|
||||
'class' => 'mb-0',
|
||||
]) !!}
|
||||
{{ Form::selectGroup('payment_method', '', 'fas fa-wallet', $payment_methods, '', ['change' => 'onChangePaymentMethodSigned', 'id' => 'payment-method', 'class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])], 'mb-0') }}
|
||||
{!! Form::hidden('invoice_id', $invoice->id, ['v-model' => 'form.invoice_id']) !!}
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
@if (!empty($payment_methods) && !in_array($invoice->status, ['paid', 'cancelled']))
|
||||
{!! Form::open([
|
||||
'id' => 'invoice-payment',
|
||||
'role' => 'form',
|
||||
'autocomplete' => "off",
|
||||
'novalidate' => 'true',
|
||||
'class' => 'mb-0',
|
||||
]) !!}
|
||||
{{ Form::selectGroup('payment_method', '', 'fas fa-wallet', $payment_methods, '', ['change' => 'onChangePaymentMethodSigned', 'id' => 'payment-method', 'class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])], 'mb-0') }}
|
||||
{!! Form::hidden('invoice_id', $invoice->id, ['v-model' => 'form.invoice_id']) !!}
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
@@ -70,9 +70,17 @@
|
||||
<a class="dropdown-item" href="{{ route('bills.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
||||
@endif
|
||||
<div class="dropdown-divider"></div>
|
||||
@permission('create-purchases-bills')
|
||||
<a class="dropdown-item" href="{{ route('bills.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
|
||||
@endpermission
|
||||
|
||||
@if ($item->status != 'cancelled')
|
||||
@permission('create-purchases-bills')
|
||||
<a class="dropdown-item" href="{{ route('bills.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
|
||||
@endpermission
|
||||
|
||||
@permission('update-purchases-bills')
|
||||
<a class="dropdown-item" href="{{ route('bills.cancelled', $item->id) }}">{{ trans('general.cancel') }}</a>
|
||||
@endpermission
|
||||
@endif
|
||||
|
||||
@permission('delete-purchases-bills')
|
||||
<div class="dropdown-divider"></div>
|
||||
@if (!$item->reconciled)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
@stack('status_message_end')
|
||||
|
||||
@stack('timeline_start')
|
||||
@if ($bill->status != 'paid')
|
||||
@if (!in_array($bill->status, ['paid', 'cancelled']))
|
||||
@stack('timeline_body_start')
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -472,40 +472,50 @@
|
||||
<div class="dropup header-drop-top">
|
||||
<button type="button" class="btn btn-primary header-button-top" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-up"></i> {{ trans('general.more_actions') }}</button>
|
||||
<div class="dropdown-menu" role="menu">
|
||||
@stack('button_pay_start')
|
||||
@if($bill->status != 'paid')
|
||||
@if ($bill->status != 'cancelled')
|
||||
@stack('button_pay_start')
|
||||
@if($bill->status != 'paid')
|
||||
@permission('update-purchases-bills')
|
||||
<a class="dropdown-item" href="{{ route('bills.paid', $bill->id) }}">{{ trans('bills.mark_paid') }}</a>
|
||||
@endpermission
|
||||
|
||||
@if(empty($bill->paid) || ($bill->paid != $bill->amount))
|
||||
<button class="dropdown-item" id="button-payment" @click="onPayment">{{ trans('bills.add_payment') }}</button>
|
||||
@endif
|
||||
<div class="dropdown-divider"></div>
|
||||
@endif
|
||||
@stack('button_pay_end')
|
||||
|
||||
@stack('button_received_start')
|
||||
@permission('update-purchases-bills')
|
||||
<a class="dropdown-item" href="{{ route('bills.paid', $bill->id) }}">{{ trans('bills.mark_paid') }}</a>
|
||||
@if($bill->status == 'draft')
|
||||
<a class="dropdown-item" href="{{ route('bills.received', $bill->id) }}">{{ trans('bills.mark_received') }}</a></a>
|
||||
@else
|
||||
<button type="button" class="dropdown-item" disabled="disabled">{{ trans('bills.mark_received') }}</button>
|
||||
@endif
|
||||
@endpermission
|
||||
|
||||
@if(empty($bill->paid) || ($bill->paid != $bill->amount))
|
||||
<button class="dropdown-item" id="button-payment" @click="onPayment">{{ trans('bills.add_payment') }}</button>
|
||||
@endif
|
||||
<div class="dropdown-divider"></div>
|
||||
@endif
|
||||
@stack('button_pay_end')
|
||||
|
||||
@stack('button_received_start')
|
||||
@permission('update-purchases-bills')
|
||||
@if($bill->status == 'draft')
|
||||
<a class="dropdown-item" href="{{ route('bills.received', $bill->id) }}">{{ trans('bills.mark_received') }}</a></a>
|
||||
@else
|
||||
<button type="button" class="dropdown-item" disabled="disabled">{{ trans('bills.mark_received') }}</button>
|
||||
@endif
|
||||
@endpermission
|
||||
@stack('button_received_end')
|
||||
@stack('button_received_end')
|
||||
@endif
|
||||
|
||||
@stack('button_pdf_start')
|
||||
<a class="dropdown-item" href="{{ route('bills.pdf', $bill->id) }}">{{ trans('bills.download_pdf') }}</a>
|
||||
@stack('button_pdf_end')
|
||||
|
||||
@stack('button_delete_start')
|
||||
@permission('delete-purchases-bills')
|
||||
@if(!$bill->reconciled)
|
||||
{!! Form::deleteLink($bill, 'purchases/bills') !!}
|
||||
@endif
|
||||
@endpermission
|
||||
@stack('button_delete_end')
|
||||
@permission('update-purchases-bills')
|
||||
@if ($bill->status != 'cancelled')
|
||||
@stack('button_cancelled_start')
|
||||
<a class="dropdown-item" href="{{ route('bills.cancelled', $bill->id) }}">{{ trans('general.cancel') }}</a>
|
||||
@stack('button_cancelled_end')
|
||||
@endif
|
||||
@endpermission
|
||||
|
||||
@permission('delete-purchases-bills')
|
||||
@if (!$bill->reconciled)
|
||||
@stack('button_delete_start')
|
||||
{!! Form::deleteLink($bill, 'purchases/bills') !!}
|
||||
@stack('button_delete_end')
|
||||
@endif
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
@stack('button_group_end')
|
||||
|
||||
@@ -71,10 +71,16 @@
|
||||
@endif
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
@permission('create-sales-invoices')
|
||||
<a class="dropdown-item" href="{{ route('invoices.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
@endpermission
|
||||
@if ($item->status != 'cancelled')
|
||||
@permission('create-sales-invoices')
|
||||
<a class="dropdown-item" href="{{ route('invoices.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
@endpermission
|
||||
|
||||
@permission('update-sales-invoices')
|
||||
<a class="dropdown-item" href="{{ route('invoices.cancelled', $item->id) }}">{{ trans('general.cancel') }}</a>
|
||||
@endpermission
|
||||
@endif
|
||||
|
||||
@permission('delete-sales-invoices')
|
||||
@if (!$item->reconciled)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
@stack('status_message_end')
|
||||
|
||||
@stack('timeline_start')
|
||||
@if ($invoice->status != 'paid')
|
||||
@if (!in_array($invoice->status, ['paid', 'cancelled']))
|
||||
@stack('timeline_body_start')
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -464,7 +464,7 @@
|
||||
<div class="card-footer">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
@if($invoice->attachment)
|
||||
@if ($invoice->attachment)
|
||||
@php $file = $invoice->attachment; @endphp
|
||||
@include('partials.media.file')
|
||||
@endif
|
||||
@@ -485,60 +485,72 @@
|
||||
</a>
|
||||
@stack('button_print_end')
|
||||
|
||||
@stack('button_share_start')
|
||||
<a href="{{ $signed_url }}" target="_blank" class="btn btn-white header-button-top">
|
||||
<i class="fa fa-share"></i> {{ trans('general.share') }}
|
||||
</a>
|
||||
@stack('button_share_end')
|
||||
@if ($invoice->status != 'cancelled')
|
||||
@stack('button_share_start')
|
||||
<a href="{{ $signed_url }}" target="_blank" class="btn btn-white header-button-top">
|
||||
<i class="fa fa-share"></i> {{ trans('general.share') }}
|
||||
</a>
|
||||
@stack('button_share_end')
|
||||
@endif
|
||||
|
||||
@stack('button_group_start')
|
||||
<div class="dropup header-drop-top">
|
||||
<button type="button" class="btn btn-primary header-button-top" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-up"></i> {{ trans('general.more_actions') }}</button>
|
||||
<div class="dropdown-menu" role="menu">
|
||||
@stack('button_pay_start')
|
||||
@if($invoice->status != 'paid')
|
||||
@if ($invoice->status != 'cancelled')
|
||||
@stack('button_pay_start')
|
||||
@if ($invoice->status != 'paid')
|
||||
@permission('update-sales-invoices')
|
||||
<a class="dropdown-item" href="{{ route('invoices.paid', $invoice->id) }}">{{ trans('invoices.mark_paid') }}</a>
|
||||
@endpermission
|
||||
|
||||
@if(empty($invoice->paid) || ($invoice->paid != $invoice->amount))
|
||||
<button class="dropdown-item" id="button-payment" @click="onPayment">{{ trans('invoices.add_payment') }}</button>
|
||||
@endif
|
||||
<div class="dropdown-divider"></div>
|
||||
@endif
|
||||
@stack('button_pay_end')
|
||||
|
||||
@stack('button_sent_start')
|
||||
@permission('update-sales-invoices')
|
||||
<a class="dropdown-item" href="{{ route('invoices.paid', $invoice->id) }}">{{ trans('invoices.mark_paid') }}</a>
|
||||
@if ($invoice->status == 'draft')
|
||||
<a class="dropdown-item" href="{{ route('invoices.sent', $invoice->id) }}">{{ trans('invoices.mark_sent') }}</a>
|
||||
@else
|
||||
<button type="button" class="dropdown-item" disabled="disabled"><span class="text-disabled">{{ trans('invoices.mark_sent') }}</span></button>
|
||||
@endif
|
||||
@endpermission
|
||||
@stack('button_sent_end')
|
||||
|
||||
@if(empty($invoice->paid) || ($invoice->paid != $invoice->amount))
|
||||
<button class="dropdown-item" id="button-payment" @click="onPayment">{{ trans('invoices.add_payment') }}</button>
|
||||
@endif
|
||||
<div class="dropdown-divider"></div>
|
||||
@endif
|
||||
@stack('button_pay_end')
|
||||
|
||||
@stack('button_sent_start')
|
||||
@permission('update-sales-invoices')
|
||||
@if($invoice->status == 'draft')
|
||||
<a class="dropdown-item" href="{{ route('invoices.sent', $invoice->id) }}">{{ trans('invoices.mark_sent') }}</a>
|
||||
@stack('button_email_start')
|
||||
@if ($invoice->contact_email)
|
||||
<a class="dropdown-item" href="{{ route('invoices.email', $invoice->id) }}">{{ trans('invoices.send_mail') }}</a>
|
||||
@else
|
||||
<button type="button" class="dropdown-item" disabled="disabled"><span class="text-disabled">{{ trans('invoices.mark_sent') }}</span></button>
|
||||
<button type="button" class="dropdown-item" disabled="disabled" data-toggle="tooltip" data-placement="right" title="{{ trans('invoices.messages.email_required') }}">
|
||||
<span class="text-disabled">{{ trans('invoices.send_mail') }}</span>
|
||||
</button>
|
||||
@endif
|
||||
@endpermission
|
||||
@stack('button_sent_end')
|
||||
|
||||
@stack('button_email_start')
|
||||
@if($invoice->contact_email)
|
||||
<a class="dropdown-item" href="{{ route('invoices.email', $invoice->id) }}">{{ trans('invoices.send_mail') }}</a>
|
||||
@else
|
||||
<button type="button" class="dropdown-item" disabled="disabled" data-toggle="tooltip" data-placement="right" title="{{ trans('invoices.messages.email_required') }}">
|
||||
<span class="text-disabled">{{ trans('invoices.send_mail') }}</span>
|
||||
</button>
|
||||
@endif
|
||||
@stack('button_email_end')
|
||||
@stack('button_email_end')
|
||||
@endif
|
||||
|
||||
@stack('button_pdf_start')
|
||||
<a class="dropdown-item" href="{{ route('invoices.pdf', $invoice->id) }}">{{ trans('invoices.download_pdf') }}</a>
|
||||
@stack('button_pdf_end')
|
||||
|
||||
@stack('button_delete_start')
|
||||
@permission('delete-sales-invoices')
|
||||
@if(!$invoice->reconciled)
|
||||
{!! Form::deleteLink($invoice, 'sales/invoices') !!}
|
||||
@endif
|
||||
@endpermission
|
||||
@stack('button_delete_end')
|
||||
@permission('update-sales-invoices')
|
||||
@if ($invoice->status != 'cancelled')
|
||||
@stack('button_cancelled_start')
|
||||
<a class="dropdown-item" href="{{ route('invoices.cancelled', $invoice->id) }}">{{ trans('general.cancel') }}</a>
|
||||
@stack('button_cancelled_end')
|
||||
@endif
|
||||
@endpermission
|
||||
|
||||
@permission('delete-sales-invoices')
|
||||
@if (!$invoice->reconciled)
|
||||
@stack('button_delete_start')
|
||||
{!! Form::deleteLink($invoice, 'sales/invoices') !!}
|
||||
@stack('button_delete_end')
|
||||
@endif
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
@stack('button_group_end')
|
||||
|
||||
Reference in New Issue
Block a user