salix/modules/invoiceOut/front/descriptor-menu/index.html

251 lines
8.2 KiB
HTML
Raw Normal View History

2023-07-28 13:21:43 +00:00
<vn-crud-model
auto-load="true"
url="CplusRectificationTypes"
data="cplusRectificationTypes"
order="description">
</vn-crud-model>
<vn-crud-model
auto-load="true"
2023-11-14 14:45:52 +00:00
url="SiiTypeInvoiceOuts"
data="siiTypeInvoiceOut">
2023-07-28 13:21:43 +00:00
</vn-crud-model>
<vn-crud-model
auto-load="true"
url="InvoiceCorrectionTypes"
data="invoiceCorrectionTypes">
</vn-crud-model>
2021-11-09 14:10:43 +00:00
<vn-icon-button
2022-02-21 07:53:37 +00:00
icon="more_vert"
vn-popover="menu">
2021-11-09 14:10:43 +00:00
</vn-icon-button>
<vn-menu vn-id="menu">
2022-02-21 07:57:43 +00:00
<vn-list>
2023-07-28 13:21:43 +00:00
<vn-item
vn-acl="administrative"
vn-acl-action="remove"
2023-11-14 14:45:52 +00:00
ng-click="transferInvoice.show()"
2023-07-28 13:21:43 +00:00
translate>
Transfer invoice to...
</vn-item>
2022-02-21 07:57:43 +00:00
<vn-item class="dropdown"
vn-click-stop="showInvoiceMenu.show($event, 'left')"
name="showInvoicePdf"
translate>
Show invoice...
<vn-menu vn-id="showInvoiceMenu">
<vn-list>
<a class="vn-item"
href="api/InvoiceOuts/{{$ctrl.id}}/download?access_token={{$ctrl.vnToken.token}}"
target="_blank"
name="showInvoicePdf"
translate>
as PDF
2022-02-21 07:57:43 +00:00
</a>
<vn-item
ng-click="$ctrl.showCsvInvoice()"
translate>
as CSV
2022-02-21 07:57:43 +00:00
</vn-item>
</vn-list>
</vn-menu>
</vn-item>
<vn-item class="dropdown"
vn-click-stop="sendInvoiceMenu.show($event, 'left')"
name="sendInvoice"
translate>
Send invoice...
<vn-menu vn-id="sendInvoiceMenu">
<vn-list>
<vn-item
ng-click="sendPdfConfirmation.show({email: $ctrl.invoiceOut.client.email})"
translate>
Send PDF
</vn-item>
<vn-item
ng-click="sendCsvConfirmation.show({email: $ctrl.invoiceOut.client.email})"
translate>
Send CSV
</vn-item>
</vn-list>
</vn-menu>
</vn-item>
<vn-item
ng-click="deleteConfirmation.show()"
vn-acl="invoicing"
vn-acl-action="remove"
name="deleteInvoice"
translate>
Delete Invoice
</vn-item>
<vn-item
ng-click="bookConfirmation.show()"
vn-acl="invoicing"
vn-acl-action="remove"
name="bookInvoice"
translate>
Book invoice
</vn-item>
<vn-item
ng-click="createInvoicePdfConfirmation.show()"
ng-show="$ctrl.hasInvoicing || !$ctrl.invoiceOut.hasPdf"
name="regenerateInvoice"
translate>
{{!$ctrl.invoiceOut.hasPdf ? 'Generate PDF invoice': 'Regenerate PDF invoice'}}
</vn-item>
<vn-item
ng-click="$ctrl.showExportationLetter()"
ng-show="$ctrl.invoiceOut.serial == 'E'"
translate>
Show CITES letter
</vn-item>
<vn-item class="dropdown"
vn-click-stop="refundMenu.show($event, 'left')"
2022-04-21 12:59:41 +00:00
vn-tooltip="Create a single ticket with all the content of the current invoice"
vn-acl="invoicing, claimManager, salesAssistant"
vn-acl-action="remove"
2022-04-21 12:59:41 +00:00
translate>
Refund...
<vn-menu vn-id="refundMenu">
<vn-list>
<vn-item
ng-click="$ctrl.refundInvoiceOut(true)"
translate>
with warehouse
</vn-item>
<vn-item
ng-click="$ctrl.refundInvoiceOut(false)"
translate>
without warehouse
</vn-item>
</vn-list>
</vn-menu>
2022-04-21 12:59:41 +00:00
</vn-item>
2022-02-21 07:57:43 +00:00
</vn-list>
2021-11-09 14:10:43 +00:00
</vn-menu>
<vn-confirm
2022-02-21 07:53:37 +00:00
vn-id="deleteConfirmation"
on-accept="$ctrl.deleteInvoiceOut()"
question="Are you sure you want to delete this invoice?">
2021-11-09 14:10:43 +00:00
</vn-confirm>
<vn-confirm
2022-02-21 07:53:37 +00:00
vn-id="bookConfirmation"
on-accept="$ctrl.bookInvoiceOut()"
question="Are you sure you want to book this invoice?">
2021-11-09 14:10:43 +00:00
</vn-confirm>
<vn-client-descriptor-popover
2022-02-21 07:53:37 +00:00
vn-id="clientDescriptor">
2021-11-09 14:10:43 +00:00
</vn-client-descriptor-popover>
<!-- Create invoice PDF confirmation dialog -->
<vn-confirm
2022-02-21 07:53:37 +00:00
vn-id="createInvoicePdfConfirmation"
on-accept="$ctrl.createPdfInvoice()"
question="Are you sure you want to generate/regenerate the PDF invoice?"
message="Generate PDF invoice document">
2021-11-09 14:10:43 +00:00
</vn-confirm>
<!-- Send PDF invoice confirmation popup -->
<vn-dialog
2022-02-21 07:53:37 +00:00
vn-id="sendPdfConfirmation"
on-accept="$ctrl.sendPdfInvoice($data)"
message="Send PDF invoice">
2022-02-21 07:57:43 +00:00
<tpl-body>
<span translate>Are you sure you want to send it?</span>
<vn-textfield vn-one
label="Email"
ng-model="sendPdfConfirmation.data.email">
</vn-textfield>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Confirm</button>
</tpl-buttons>
2021-11-09 14:10:43 +00:00
</vn-dialog>
<!-- Send CSV invoice confirmation popup -->
<vn-dialog
2022-02-21 07:53:37 +00:00
vn-id="sendCsvConfirmation"
on-accept="$ctrl.sendCsvInvoice($data)"
message="Send CSV invoice">
2022-02-21 07:57:43 +00:00
<tpl-body>
<span translate>Are you sure you want to send it?</span>
<vn-textfield vn-one
label="Email"
ng-model="sendCsvConfirmation.data.email">
</vn-textfield>
</tpl-body>
2022-02-21 07:59:42 +00:00
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Confirm</button>
</tpl-buttons>
</vn-dialog>
2023-07-28 13:21:43 +00:00
<vn-dialog
vn-id="transferInvoice"
title="transferInvoice"
on-accept="$ctrl.transferInvoice()">
<tpl-body>
2023-08-24 08:51:34 +00:00
<section class="transferInvoice">
2023-07-28 13:21:43 +00:00
<vn-horizontal>
<vn-autocomplete
vn-one
vn-id="client"
required="true"
url="Clients"
label="Client"
show-field="name"
value-field="id"
search-function="{or: [{id: $search}, {name: {like: '%'+ $search +'%'}}]}"
ng-model="$ctrl.invoiceOut.client.id"
initial-data="$ctrl.invoiceOut.client.id"
order="id">
<tpl-item>
#{{id}} - {{::name}}
</tpl-item>
</vn-autocomplete>
<vn-autocomplete
vn-one
vn-id="cplusRectificationType"
required="true"
data="cplusRectificationTypes"
show-field="description"
value-field="id"
ng-model="$ctrl.cplusRectificationType"
search-function="{or: [{id: $search}, {description: {like: '%'+ $search +'%'}}]}"
label="Cplus Type">
<tpl-item>
{{::description}}
</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one
vn-id="cplusInvoiceType"
2023-11-14 14:45:52 +00:00
data="siiTypeInvoiceOut"
2023-07-28 13:21:43 +00:00
show-field="description"
value-field="id"
required="true"
2023-11-14 14:45:52 +00:00
ng-model="$ctrl.siiTypeInvoiceOut"
search-function="{or: [{id: $search}, {description: {like: '%'+ $search +'%'}}]}"
2023-07-28 13:21:43 +00:00
label="Class">
</vn-autocomplete>
2023-11-14 14:45:52 +00:00
<vn-autocomplete
2023-07-28 13:21:43 +00:00
vn-one
vn-id="invoiceCorrectionType"
data="invoiceCorrectionTypes"
ng-model="$ctrl.invoiceCorrectionType"
show-field="description"
value-field="id"
required="true"
label="Type">
</vn-autocomplete>
</vn-horizontal>
2023-08-24 08:51:34 +00:00
</section>
2023-07-28 13:21:43 +00:00
</tpl-body>
<tpl-buttons>
<button response="accept" translate>Transfer client</button>
</tpl-buttons>
2023-11-14 14:45:52 +00:00
</vn-dialog>