326 lines
10 KiB
HTML
326 lines
10 KiB
HTML
<vn-icon-button
|
|
icon="more_vert"
|
|
vn-popover="menu">
|
|
</vn-icon-button>
|
|
|
|
<vn-menu vn-id="menu">
|
|
<vn-list>
|
|
<vn-item
|
|
vn-acl="administrative"
|
|
vn-acl-action="remove"
|
|
ng-click="transferClient.show()"
|
|
translate>
|
|
Transfer client
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="addTurn.show()"
|
|
vn-acl="buyer"
|
|
vn-acl-action="remove"
|
|
name="addTurn"
|
|
translate>
|
|
Add turn
|
|
</vn-item>
|
|
<vn-item class="dropdown"
|
|
vn-click-stop="showDeliveryNoteMenu.show($event, 'left')"
|
|
translate>
|
|
Show Delivery Note...
|
|
<vn-menu vn-id="showDeliveryNoteMenu">
|
|
<vn-list>
|
|
<vn-item
|
|
ng-if="!$ctrl.hasDocuwareFile"
|
|
ng-click="$ctrl.showPdfDeliveryNote('deliveryNote')"
|
|
translate>
|
|
as PDF
|
|
</vn-item>
|
|
<a class="vn-item"
|
|
ng-if="$ctrl.hasDocuwareFile"
|
|
href='api/Docuwares/{{$ctrl.ticket.id}}/download/deliveryClient/findTicket?access_token={{$ctrl.vnToken.token}}'
|
|
target="_blank"
|
|
translate>
|
|
as PDF
|
|
</a>
|
|
<vn-item
|
|
ng-if="!$ctrl.hasDocuwareFile"
|
|
ng-click="$ctrl.showPdfDeliveryNote('withoutPrices')"
|
|
translate>
|
|
as PDF without prices
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="$ctrl.showCsvDeliveryNote()"
|
|
translate>
|
|
as CSV
|
|
</vn-item>
|
|
</vn-list>
|
|
</vn-menu>
|
|
</vn-item>
|
|
<vn-item class="dropdown"
|
|
vn-click-stop="sendDeliveryNoteMenu.show($event, 'left')"
|
|
translate>
|
|
Send Delivery Note...
|
|
<vn-menu vn-id="sendDeliveryNoteMenu">
|
|
<vn-list>
|
|
<vn-item
|
|
ng-click="sendPdfConfirmation.show({email: $ctrl.ticket.client.email})"
|
|
translate>
|
|
Send PDF
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="sendCsvConfirmation.show({email: $ctrl.ticket.client.email})"
|
|
translate>
|
|
Send CSV
|
|
</vn-item>
|
|
</vn-list>
|
|
</vn-menu>
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="$ctrl.showPdfDeliveryNote('proforma')"
|
|
translate>
|
|
Show Proforma
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="deleteConfirmation.show()"
|
|
ng-show="$ctrl.isEditable"
|
|
name="deleteTicket"
|
|
translate>
|
|
Delete ticket
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="restoreConfirmation.show()"
|
|
ng-show="$ctrl.canRestoreTicket"
|
|
name="restoreTicket"
|
|
translate>
|
|
Restore ticket
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="$ctrl.showChangeShipped()"
|
|
ng-show="$ctrl.isEditable"
|
|
name="changeShipped"
|
|
translate>
|
|
Change shipped hour
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="$ctrl.sendPaymentSms()"
|
|
name="sendPaymentSms"
|
|
translate>
|
|
SMS Pending payment
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="$ctrl.sendImportSms()"
|
|
name="sendImportSms"
|
|
translate>
|
|
SMS Minimum import
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="$ctrl.sendChangesSms()"
|
|
name="sendChangesSms"
|
|
translate>
|
|
SMS Notify changes
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="makeInvoiceConfirmation.show()"
|
|
ng-show="$ctrl.isEditable"
|
|
vn-acl="invoicing"
|
|
vn-acl-action="remove"
|
|
name="makeInvoice"
|
|
translate>
|
|
Make invoice
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="createPdfConfirmation.show()"
|
|
ng-show="$ctrl.isInvoiced && ($ctrl.hasInvoicing || !$ctrl.ticket.invoiceOut.hasPdf)"
|
|
name="regenerateInvoice"
|
|
translate>
|
|
{{!$ctrl.ticket.invoiceOut.hasPdf ? 'Generate PDF invoice': 'Regenerate PDF invoice'}}
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="recalculateComponentsConfirmation.show()"
|
|
ng-show="$ctrl.isEditable"
|
|
translate>
|
|
Recalculate components
|
|
</vn-item>
|
|
<vn-item
|
|
ng-click="refundAllConfirmation.show()"
|
|
vn-acl="invoicing, claimManager, salesAssistant"
|
|
vn-acl-action="remove"
|
|
translate>
|
|
Refund all
|
|
</vn-item>
|
|
</vn-list>
|
|
</vn-menu>
|
|
|
|
<!-- Add turn popup -->
|
|
<vn-popup vn-id="addTurn">
|
|
<div class="vn-pa-md">
|
|
<h5 style="text-align: center" translate>
|
|
What is the day of receipt of the ticket?
|
|
</h5>
|
|
<vn-tool-bar class="vn-mt-md">
|
|
<vn-button
|
|
label="Monday"
|
|
ng-click="$ctrl.addTurn(0)">
|
|
</vn-button>
|
|
<vn-button
|
|
label="Tuesday"
|
|
ng-click="$ctrl.addTurn(1)">
|
|
</vn-button>
|
|
<vn-button
|
|
label="Wednesday"
|
|
ng-click="$ctrl.addTurn(2)">
|
|
</vn-button>
|
|
<vn-button
|
|
label="Thursday"
|
|
ng-click="$ctrl.addTurn(3)">
|
|
</vn-button>
|
|
<vn-button
|
|
label="Friday"
|
|
ng-click="$ctrl.addTurn(4)">
|
|
</vn-button>
|
|
<vn-button
|
|
label="Saturday"
|
|
ng-click="$ctrl.addTurn(5)">
|
|
</vn-button>
|
|
<vn-button
|
|
label="Sunday"
|
|
ng-click="$ctrl.addTurn(6)">
|
|
</vn-button>
|
|
</vn-tool-bar>
|
|
</div>
|
|
</vn-popup>
|
|
|
|
<!-- Send PDF delivery note confirmation popup -->
|
|
<vn-dialog
|
|
vn-id="sendPdfConfirmation"
|
|
on-accept="$ctrl.sendPdfDeliveryNote($data)"
|
|
message="Send PDF Delivery Note">
|
|
<tpl-body>
|
|
<span translate>Are you sure you want to send it?</span>
|
|
<vn-textfield vn-one
|
|
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 delivery note confirmation popup -->
|
|
<vn-dialog
|
|
vn-id="sendCsvConfirmation"
|
|
on-accept="$ctrl.sendCsvDeliveryNote($data)"
|
|
message="Send CSV Delivery Note">
|
|
<tpl-body>
|
|
<span translate>Are you sure you want to send it?</span>
|
|
<vn-textfield vn-one
|
|
ng-model="sendCsvConfirmation.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>
|
|
|
|
<!-- Delete ticket confirmation popup -->
|
|
<vn-confirm
|
|
vn-id="deleteConfirmation"
|
|
on-accept="$ctrl.deleteTicket()"
|
|
question="You are going to delete this ticket"
|
|
message="This ticket will be removed from current route! Continue anyway?">
|
|
</vn-confirm>
|
|
|
|
<!-- Restore ticket confirmation popup -->
|
|
<vn-confirm
|
|
vn-id="restoreConfirmation"
|
|
on-accept="$ctrl.restoreTicket()"
|
|
question="You are going to restore this ticket"
|
|
message="Are you sure you want to restore this ticket?">
|
|
</vn-confirm>
|
|
|
|
<!-- Change shipped dialog -->
|
|
<vn-dialog
|
|
vn-id="changeShippedDialog"
|
|
on-accept="$ctrl.changeShipped()"
|
|
message="Change shipped hour">
|
|
<tpl-body>
|
|
<vn-input-time
|
|
ng-model="$ctrl.newShipped"
|
|
label="Shipped hour"
|
|
vn-focus>
|
|
</vn-input-time>
|
|
</tpl-body>
|
|
<tpl-buttons>
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
<button response="accept" translate>Save</button>
|
|
</tpl-buttons>
|
|
</vn-dialog>
|
|
|
|
<!-- Transfer Client popup -->
|
|
|
|
<vn-dialog
|
|
vn-id="transferClient"
|
|
title="transferClient"
|
|
size="sm"
|
|
on-accept="$ctrl.transferClient($client)">
|
|
<tpl-body>
|
|
<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.ticket.client.id"
|
|
initial-data="$ctrl.ticket.client.id"
|
|
order="id">
|
|
<tpl-item>
|
|
#{{id}} - {{::name}}
|
|
</tpl-item>
|
|
</vn-autocomplete>
|
|
</tpl-body>
|
|
<tpl-buttons>
|
|
<button response="accept" translate>Transfer client</button>
|
|
</tpl-buttons>
|
|
</vn-dialog>
|
|
|
|
<!-- Send SMS popup -->
|
|
<vn-sms-dialog
|
|
vn-id="sms"
|
|
on-send="$ctrl.onSmsSend($sms)"
|
|
sms="$ctrl.newSMS">
|
|
</vn-sms-dialog>
|
|
|
|
<!-- Make invoice confirmation dialog -->
|
|
<vn-confirm
|
|
vn-id="makeInvoiceConfirmation"
|
|
on-accept="$ctrl.makeInvoice()"
|
|
question="You are going to invoice this ticket"
|
|
message="Are you sure you want to invoice this ticket?">
|
|
</vn-confirm>
|
|
|
|
<!-- Create invoice PDF confirmation dialog -->
|
|
<vn-confirm
|
|
vn-id="createPdfConfirmation"
|
|
on-accept="$ctrl.createPdfInvoice()"
|
|
question="Are you sure you want to generate/regenerate the PDF invoice?"
|
|
message="Generate PDF invoice document">
|
|
</vn-confirm>
|
|
|
|
<!-- Recalculate components confirmation dialog -->
|
|
<vn-confirm
|
|
vn-id="recalculateComponentsConfirmation"
|
|
on-accept="$ctrl.recalculateComponents()"
|
|
question="Are you sure you want to recalculate the components?"
|
|
message="Recalculate components">
|
|
</vn-confirm>
|
|
|
|
<!-- Refund all confirmation dialog -->
|
|
<vn-confirm
|
|
vn-id="refundAllConfirmation"
|
|
on-accept="$ctrl.refund()"
|
|
question="Are you sure you want to refund all?"
|
|
message="Refund all">
|
|
</vn-confirm>
|