2021-10-28 07:06:03 +00:00
|
|
|
<vn-auto-search
|
2020-03-13 19:33:12 +00:00
|
|
|
model="model">
|
2021-10-28 07:06:03 +00:00
|
|
|
</vn-auto-search>
|
2021-10-22 13:01:54 +00:00
|
|
|
<vn-card>
|
2021-10-26 15:16:01 +00:00
|
|
|
<smart-table
|
|
|
|
model="model"
|
2021-10-27 15:11:33 +00:00
|
|
|
view-config-id="ticketIndex"
|
2021-10-29 13:52:04 +00:00
|
|
|
options="$ctrl.smartTableOptions"
|
2021-10-26 15:16:01 +00:00
|
|
|
auto-save="true"
|
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)"
|
2021-10-27 15:11:33 +00:00
|
|
|
default-new-data="$ctrl.defaultNewData()">
|
2021-10-23 12:26:42 +00:00
|
|
|
<slot-table>
|
|
|
|
<table class="vn-table">
|
2021-10-22 13:01:54 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2021-10-23 12:26:42 +00:00
|
|
|
<th shrink>
|
|
|
|
<vn-multi-check
|
2021-10-25 15:18:57 +00:00
|
|
|
model="model"
|
|
|
|
check-field="$checked"> <!-- Change $checked as default prop -->
|
2021-10-23 12:26:42 +00:00
|
|
|
</vn-multi-check>
|
|
|
|
</th>
|
2021-10-28 07:06:03 +00:00
|
|
|
<th class="icon-field"></th>
|
2021-10-25 12:20:17 +00:00
|
|
|
<th field="id">
|
|
|
|
<span translate>#ID</span>
|
|
|
|
</th>
|
2021-10-28 07:06:03 +00:00
|
|
|
<th field="salesPersonFk">
|
|
|
|
<span translate>Salesperson</span>
|
|
|
|
</th>
|
|
|
|
<th field="shipped" shrink-date>
|
|
|
|
<span translate>Date</span>
|
2021-10-25 12:20:17 +00:00
|
|
|
</th>
|
2021-10-26 15:16:01 +00:00
|
|
|
<th>
|
2021-10-28 07:06:03 +00:00
|
|
|
<span translate>Hour</span>
|
|
|
|
</th>
|
|
|
|
<th field="zoneHour" shrink>
|
|
|
|
<span translate>Closure</span>
|
|
|
|
</th>
|
|
|
|
<th field="nickname">
|
|
|
|
<span translate>Alias</span>
|
|
|
|
</th>
|
|
|
|
<th field="provinceFk">
|
|
|
|
<span translate>Province</span>
|
2021-10-26 15:16:01 +00:00
|
|
|
</th>
|
2021-10-28 07:06:03 +00:00
|
|
|
<th field="stateFk">
|
|
|
|
<span translate>State</span>
|
|
|
|
</th>
|
|
|
|
<th field="zoneFk">
|
|
|
|
<span translate>Zone</span>
|
|
|
|
</th>
|
|
|
|
<th field="warehouseFk">
|
|
|
|
<span translate>Warehouse</span>
|
|
|
|
</th>
|
|
|
|
<th field="totalWithVat" number>
|
|
|
|
<span translate>Total</span>
|
|
|
|
</th>
|
|
|
|
<th></th>
|
2021-10-22 13:01:54 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2021-10-23 12:26:42 +00:00
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="ticket in model.data | orderBy:'!!id'"
|
2021-10-25 15:18:57 +00:00
|
|
|
ng-class="{'new-row': ticket.$isNew, 'changed-row': ticket.$oldData}"
|
|
|
|
vn-anchor="::{
|
|
|
|
state: 'ticket.card.summary',
|
|
|
|
params: {id: ticket.id}
|
|
|
|
}">
|
2021-10-23 12:26:42 +00:00
|
|
|
<td>
|
|
|
|
<vn-check
|
2021-10-25 15:18:57 +00:00
|
|
|
ng-model="ticket.$checked"
|
2021-10-23 12:26:42 +00:00
|
|
|
vn-click-stop>
|
|
|
|
</vn-check>
|
|
|
|
</td>
|
2021-10-28 07:06:03 +00:00
|
|
|
<td class="icon-field">
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.isTaxDataChecked === 0"
|
|
|
|
translate-attr="{title: 'No verified data'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-no036">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.hasTicketRequest"
|
|
|
|
translate-attr="{title: 'Purchase request'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-100">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.isAvailable === 0"
|
|
|
|
translate-attr="{title: 'Not available'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-unavailable">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.isFreezed"
|
|
|
|
translate-attr="{title: 'Client frozen'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-frozen">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.risk"
|
|
|
|
title="{{::$ctrl.$t('Risk')}}: {{ticket.risk}}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-risk">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.hasComponentLack"
|
|
|
|
translate-attr="{title: 'Component lack'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-components">
|
|
|
|
</vn-icon>
|
|
|
|
</td>
|
|
|
|
<td shrink>{{::ticket.id}}</td>
|
|
|
|
<td class="expendable">
|
|
|
|
<span
|
|
|
|
title="{{::ticket.userName}}"
|
|
|
|
vn-click-stop="workerDescriptor.show($event, ticket.salesPersonFk)"
|
|
|
|
class="link">
|
|
|
|
{{::ticket.userName | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td shrink-date>
|
|
|
|
<span class="chip {{$ctrl.compareDate(ticket.shipped)}}">
|
|
|
|
{{::ticket.shipped | date: 'dd/MM/yyyy'}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td shrink>{{::ticket.shipped | date: 'HH:mm'}}</td>
|
|
|
|
<td shrink>{{::ticket.zoneLanding | date: 'HH:mm'}}</td>
|
|
|
|
<td>
|
|
|
|
<span
|
|
|
|
title="{{::ticket.nickname}}"
|
|
|
|
vn-click-stop="clientDescriptor.show($event, ticket.clientFk)"
|
|
|
|
class="link">
|
|
|
|
{{::ticket.nickname}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td class="expendable">{{::ticket.province}}</td>
|
|
|
|
<td class="expendable">
|
|
|
|
<span
|
|
|
|
ng-show="ticket.refFk"
|
|
|
|
title="{{::ticket.refFk}}"
|
|
|
|
vn-click-stop="invoiceOutDescriptor.show($event, ticket.invoiceOutId)"
|
|
|
|
class="link">
|
|
|
|
{{::ticket.refFk}}
|
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
ng-show="!ticket.refFk"
|
|
|
|
class="chip {{$ctrl.stateColor(ticket)}}">
|
|
|
|
{{ticket.state}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span
|
|
|
|
title="{{::ticket.zoneName}}"
|
|
|
|
vn-click-stop="zoneDescriptor.show($event, ticket.zoneFk)"
|
|
|
|
class="link">
|
|
|
|
{{::ticket.zoneName | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>{{::ticket.warehouse}}</td>
|
|
|
|
<td number>
|
|
|
|
<span class="chip {{$ctrl.totalPriceColor(ticket)}}">
|
|
|
|
{{::(ticket.totalWithVat ? ticket.totalWithVat : 0) | currency: 'EUR': 2}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td actions>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-anchor="::{
|
|
|
|
state: 'ticket.card.sale',
|
|
|
|
params: {id: ticket.id},
|
|
|
|
target: '_blank'
|
|
|
|
}"
|
|
|
|
vn-tooltip="Go to lines"
|
|
|
|
icon="icon-lines">
|
|
|
|
</vn-icon-button>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-click-stop="$ctrl.preview(ticket)"
|
|
|
|
vn-tooltip="Preview"
|
|
|
|
icon="preview">
|
|
|
|
</vn-icon-button>
|
|
|
|
</td>
|
2021-10-22 13:01:54 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-10-23 12:26:42 +00:00
|
|
|
</slot-table>
|
|
|
|
</smart-table>
|
2021-10-22 13:01:54 +00:00
|
|
|
</vn-card>
|
2020-03-09 10:50:23 +00:00
|
|
|
<div fixed-bottom-right>
|
|
|
|
<vn-vertical style="align-items: center;">
|
2020-06-16 10:36:34 +00:00
|
|
|
<vn-button class="round sm vn-mb-sm"
|
|
|
|
icon="print"
|
|
|
|
ng-show="$ctrl.totalChecked > 0"
|
2020-06-17 13:38:37 +00:00
|
|
|
ng-click="$ctrl.setDelivered()"
|
|
|
|
vn-tooltip="Set as delivered and open delivery note(s)"
|
2020-06-16 10:36:34 +00:00
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
2020-03-10 13:28:50 +00:00
|
|
|
<vn-button class="round sm vn-mb-sm"
|
2020-03-09 10:50:23 +00:00
|
|
|
icon="icon-recovery"
|
|
|
|
ng-show="$ctrl.totalChecked > 0"
|
|
|
|
ng-click="$ctrl.openBalanceDialog()"
|
|
|
|
vn-tooltip="Payment on account..."
|
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
2021-06-24 11:33:51 +00:00
|
|
|
<vn-button class="round sm vn-mb-sm"
|
|
|
|
icon="icon-invoices"
|
2021-07-01 11:31:04 +00:00
|
|
|
ng-click="makeInvoiceConfirmation.show()"
|
2021-06-24 11:33:51 +00:00
|
|
|
ng-show="$ctrl.totalChecked > 0"
|
|
|
|
vn-tooltip="Make invoice..."
|
|
|
|
tooltip-position="left"
|
|
|
|
vn-acl="invoicing"
|
|
|
|
vn-acl-action="remove">
|
|
|
|
</vn-button>
|
2021-06-08 15:30:00 +00:00
|
|
|
<a ui-sref="ticket.create($ctrl.clientParams())" vn-bind="+">
|
2020-03-09 10:50:23 +00:00
|
|
|
<vn-button class="round md vn-mb-sm"
|
|
|
|
icon="add"
|
|
|
|
vn-tooltip="New ticket"
|
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
|
|
|
</a>
|
|
|
|
</vn-vertical>
|
|
|
|
</div>
|
2019-10-26 23:30:01 +00:00
|
|
|
<vn-popup vn-id="summary">
|
2020-04-25 09:50:04 +00:00
|
|
|
<vn-ticket-summary
|
2020-09-24 13:00:00 +00:00
|
|
|
ticket="$ctrl.selectedTicket"
|
|
|
|
model="model">
|
2020-04-25 09:50:04 +00:00
|
|
|
</vn-ticket-summary>
|
2019-10-26 23:30:01 +00:00
|
|
|
</vn-popup>
|
2019-04-25 05:57:26 +00:00
|
|
|
<vn-client-descriptor-popover
|
|
|
|
vn-id="clientDescriptor">
|
2019-02-15 11:39:21 +00:00
|
|
|
</vn-client-descriptor-popover>
|
|
|
|
<vn-worker-descriptor-popover
|
2020-04-25 09:50:04 +00:00
|
|
|
vn-id="workerDescriptor">
|
2019-04-25 05:57:26 +00:00
|
|
|
</vn-worker-descriptor-popover>
|
2020-07-30 10:51:19 +00:00
|
|
|
<vn-zone-descriptor-popover
|
|
|
|
vn-id="zoneDescriptor">
|
|
|
|
</vn-zone-descriptor-popover>
|
2019-04-25 05:57:26 +00:00
|
|
|
<vn-client-balance-create
|
|
|
|
vn-id="balanceCreateDialog">
|
2019-09-05 11:06:40 +00:00
|
|
|
</vn-client-balance-create>
|
2020-09-14 11:11:53 +00:00
|
|
|
<vn-invoice-out-descriptor-popover
|
|
|
|
vn-id="invoiceOutDescriptor">
|
|
|
|
</vn-invoice-out-descriptor-popover>
|
2021-06-24 11:33:51 +00:00
|
|
|
|
2021-10-28 07:06:03 +00:00
|
|
|
<vn-contextmenu vn-id="contextmenu" targets="['smart-table']" model="model"
|
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
|
|
<slot-menu>
|
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
|
|
ng-click="contextmenu.filterBySelection()">
|
|
|
|
Filter by selection
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
|
|
ng-click="contextmenu.excludeSelection()">
|
|
|
|
Exclude selection
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
|
|
ng-click="contextmenu.removeFilter()">
|
|
|
|
Remove filter
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
|
|
|
ng-click="contextmenu.removeAllFilters()">
|
|
|
|
Remove all filters
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isActionAllowed()"
|
|
|
|
ng-click="contextmenu.copyValue()">
|
|
|
|
Copy value
|
|
|
|
</vn-item>
|
|
|
|
</slot-menu>
|
|
|
|
</vn-contextmenu>
|
|
|
|
|
2021-06-24 11:33:51 +00:00
|
|
|
<!-- Make invoice confirmation dialog -->
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="makeInvoiceConfirmation"
|
|
|
|
on-accept="$ctrl.makeInvoice()"
|
2021-06-30 14:10:26 +00:00
|
|
|
question="{{$ctrl.confirmationMessage}}"
|
|
|
|
message="Invoice selected tickets">
|
2021-06-24 11:33:51 +00:00
|
|
|
</vn-confirm>
|