2020-05-06 12:38:09 +00:00
|
|
|
<vn-descriptor-content
|
|
|
|
module="invoiceOut"
|
|
|
|
description="$ctrl.invoiceOut.ref">
|
2020-04-30 10:48:52 +00:00
|
|
|
<slot-menu>
|
2021-10-01 10:41:31 +00:00
|
|
|
<vn-item class="dropdown"
|
|
|
|
vn-click-stop="showInvoiceMenu.show($event, 'left')"
|
2020-05-06 12:38:09 +00:00
|
|
|
name="showInvoicePdf"
|
|
|
|
translate>
|
2021-10-01 10:41:31 +00:00
|
|
|
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>
|
|
|
|
Show as PDF
|
|
|
|
</a>
|
|
|
|
<vn-item
|
2021-10-07 08:04:50 +00:00
|
|
|
ng-click="$ctrl.showCsvInvoice()"
|
2021-10-01 10:41:31 +00:00
|
|
|
translate>
|
|
|
|
Show as CSV
|
|
|
|
</vn-item>
|
|
|
|
</vn-list>
|
|
|
|
</vn-menu>
|
|
|
|
</vn-item>
|
|
|
|
<vn-item class="dropdown"
|
|
|
|
vn-click-stop="sendInvoiceMenu.show($event, 'left')"
|
2021-07-19 10:31:09 +00:00
|
|
|
name="sendInvoice"
|
|
|
|
translate>
|
2021-10-01 10:41:31 +00:00
|
|
|
Send invoice...
|
|
|
|
|
|
|
|
<vn-menu vn-id="sendInvoiceMenu">
|
|
|
|
<vn-list>
|
|
|
|
<vn-item
|
2021-10-07 08:04:50 +00:00
|
|
|
ng-click="sendPdfConfirmation.show({email: $ctrl.invoiceOut.client.email})"
|
2021-10-01 10:41:31 +00:00
|
|
|
translate>
|
|
|
|
Send PDF
|
|
|
|
</vn-item>
|
|
|
|
<vn-item
|
2021-10-07 08:04:50 +00:00
|
|
|
ng-click="sendCsvConfirmation.show({email: $ctrl.invoiceOut.client.email})"
|
2021-10-01 10:41:31 +00:00
|
|
|
translate>
|
|
|
|
Send CSV
|
|
|
|
</vn-item>
|
|
|
|
</vn-list>
|
|
|
|
</vn-menu>
|
2021-07-19 10:31:09 +00:00
|
|
|
</vn-item>
|
2020-05-06 12:38:09 +00:00
|
|
|
<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>
|
2021-03-15 12:43:22 +00:00
|
|
|
<vn-item
|
|
|
|
ng-click="createInvoicePdfConfirmation.show()"
|
2021-10-01 12:31:42 +00:00
|
|
|
ng-show="$ctrl.hasInvoicing || !$ctrl.invoiceOut.hasPdf"
|
2021-03-15 12:43:22 +00:00
|
|
|
name="regenerateInvoice"
|
|
|
|
translate>
|
2021-10-01 12:31:42 +00:00
|
|
|
{{!$ctrl.invoiceOut.hasPdf ? 'Generate PDF invoice': 'Regenerate PDF invoice'}}
|
2021-03-15 12:43:22 +00:00
|
|
|
</vn-item>
|
2021-10-25 09:58:23 +00:00
|
|
|
<vn-item
|
|
|
|
ng-click="$ctrl.showExportationLetter()"
|
|
|
|
ng-show="$ctrl.invoiceOut.serial == 'E'"
|
|
|
|
translate>
|
|
|
|
Show CIES letter
|
|
|
|
</vn-item>
|
2020-04-30 10:48:52 +00:00
|
|
|
</slot-menu>
|
|
|
|
<slot-body>
|
2019-03-26 13:27:08 +00:00
|
|
|
<div class="attributes">
|
2020-04-30 10:48:52 +00:00
|
|
|
<vn-label-value
|
|
|
|
label="Date"
|
2019-10-18 23:18:25 +00:00
|
|
|
value="{{$ctrl.invoiceOut.issued | date: 'dd/MM/yyyy'}}">
|
2019-03-26 13:27:08 +00:00
|
|
|
</vn-label-value>
|
2020-04-30 10:48:52 +00:00
|
|
|
<vn-label-value
|
|
|
|
label="Import"
|
2019-04-08 14:53:37 +00:00
|
|
|
value="{{$ctrl.invoiceOut.amount | currency: 'EUR': 2}}">
|
2019-03-26 13:27:08 +00:00
|
|
|
</vn-label-value>
|
2020-04-30 10:48:52 +00:00
|
|
|
<vn-label-value
|
2020-09-03 13:11:16 +00:00
|
|
|
label="Client">
|
|
|
|
<span
|
|
|
|
ng-click="clientDescriptor.show($event, $ctrl.invoiceOut.client.id)"
|
|
|
|
class="link">
|
|
|
|
{{$ctrl.invoiceOut.client.name}}
|
|
|
|
</span>
|
2019-03-26 13:27:08 +00:00
|
|
|
</vn-label-value>
|
2020-04-30 10:48:52 +00:00
|
|
|
<vn-label-value
|
|
|
|
label="Company"
|
2019-03-26 13:27:08 +00:00
|
|
|
value="{{$ctrl.invoiceOut.company.code}}">
|
|
|
|
</vn-label-value>
|
|
|
|
</div>
|
2020-04-30 10:48:52 +00:00
|
|
|
<div class="quicklinks">
|
|
|
|
<div ng-transclude="btnOne">
|
|
|
|
<vn-quick-link
|
|
|
|
tooltip="Client card"
|
|
|
|
state="['client.card.summary', {id: $ctrl.invoiceOut.clientFk}]"
|
|
|
|
icon="person">
|
|
|
|
</vn-quick-link>
|
|
|
|
</div>
|
|
|
|
<div ng-transclude="btnTwo">
|
|
|
|
<vn-quick-link
|
|
|
|
tooltip="Invoice ticket list"
|
2020-05-29 09:10:58 +00:00
|
|
|
state="['ticket.index', {q: $ctrl.filter}]"
|
2020-04-30 10:48:52 +00:00
|
|
|
icon="icon-ticket">
|
|
|
|
</vn-quick-link>
|
|
|
|
</div>
|
|
|
|
<div ng-transclude="btnThree">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</slot-body>
|
|
|
|
</vn-descriptor-content>
|
2019-04-26 10:05:49 +00:00
|
|
|
<vn-confirm
|
|
|
|
vn-id="deleteConfirmation"
|
2020-03-31 13:15:16 +00:00
|
|
|
on-accept="$ctrl.deleteInvoiceOut()"
|
2019-04-26 10:05:49 +00:00
|
|
|
question="Are you sure you want to delete this invoice?">
|
2019-04-30 09:03:48 +00:00
|
|
|
</vn-confirm>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="bookConfirmation"
|
2020-03-31 13:15:16 +00:00
|
|
|
on-accept="$ctrl.bookInvoiceOut()"
|
2019-04-30 09:03:48 +00:00
|
|
|
question="Are you sure you want to book this invoice?">
|
2020-09-03 13:11:16 +00:00
|
|
|
</vn-confirm>
|
|
|
|
<vn-client-descriptor-popover
|
|
|
|
vn-id="clientDescriptor">
|
2021-03-15 12:43:22 +00:00
|
|
|
</vn-client-descriptor-popover>
|
|
|
|
|
|
|
|
<!-- Create invoice PDF confirmation dialog -->
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="createInvoicePdfConfirmation"
|
2021-10-22 08:26:40 +00:00
|
|
|
on-accept="$ctrl.createPdfInvoice()"
|
2021-10-01 12:31:42 +00:00
|
|
|
question="Are you sure you want to generate/regenerate the PDF invoice?"
|
|
|
|
message="Generate PDF invoice document">
|
2021-07-19 10:31:09 +00:00
|
|
|
</vn-confirm>
|
|
|
|
|
2021-10-07 08:04:50 +00:00
|
|
|
<!-- Send PDF invoice confirmation popup -->
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="sendPdfConfirmation"
|
|
|
|
on-accept="$ctrl.sendPdfInvoice($data)"
|
|
|
|
message="Send PDF invoice">
|
2021-09-20 12:01:40 +00:00
|
|
|
<tpl-body>
|
2021-09-20 11:59:57 +00:00
|
|
|
<span translate>Are you sure you want to send it?</span>
|
|
|
|
<vn-textfield vn-one
|
2021-10-07 08:04:50 +00:00
|
|
|
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>
|
|
|
|
</vn-dialog>
|
|
|
|
|
|
|
|
<!-- Send CSV invoice confirmation popup -->
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="sendCsvConfirmation"
|
|
|
|
on-accept="$ctrl.sendCsvInvoice($data)"
|
|
|
|
message="Send CSV invoice">
|
|
|
|
<tpl-body>
|
|
|
|
<span translate>Are you sure you want to send it?</span>
|
|
|
|
<vn-textfield vn-one
|
|
|
|
ng-model="sendCsvConfirmation.data.email">
|
2021-09-20 11:59:57 +00:00
|
|
|
</vn-textfield>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Confirm</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|