salix/modules/ticket/front/summary/index.html

342 lines
15 KiB
HTML
Raw Normal View History

2019-01-20 15:47:04 +00:00
<vn-card class="summary">
2019-10-04 09:39:24 +00:00
<h5>
2021-01-12 09:15:33 +00:00
<a
ng-if="::$ctrl.summary.id"
2020-11-23 12:41:51 +00:00
vn-tooltip="Go to the ticket"
2020-11-09 13:52:25 +00:00
ui-sref="ticket.card.summary({id: {{::$ctrl.summary.id}}})"
2020-11-23 12:41:51 +00:00
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
2020-11-09 13:52:25 +00:00
</a>
2019-10-04 09:39:24 +00:00
<span>
Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}}
({{$ctrl.summary.client.id}}) - {{$ctrl.summary.nickname}}
</span>
2019-03-04 15:34:41 +00:00
<vn-button
disabled="!$ctrl.isEditable"
2019-10-18 19:36:30 +00:00
class="flat"
style="color: inherit;"
2019-06-27 13:33:15 +00:00
label="SET OK"
2019-03-04 15:34:41 +00:00
ng-click="$ctrl.setOkState()"
vn-tooltip="Change ticket state to 'Ok'">
</vn-button>
2021-05-03 10:09:12 +00:00
<vn-ticket-descriptor-menu
ng-if="!$ctrl.isTicketModule"
ticket-id="$ctrl.summary.id"
parent-reload="$ctrl.reload()"
/>
2019-03-04 15:34:41 +00:00
</h5>
2019-01-20 15:47:04 +00:00
<vn-horizontal>
<vn-one>
<vn-label-value label="State"
2020-06-23 11:40:49 +00:00
value="{{$ctrl.summary.ticketState.state.name}}">
2019-01-20 15:47:04 +00:00
</vn-label-value>
2020-09-03 13:11:16 +00:00
<vn-label-value label="Salesperson">
<span
ng-click="workerDescriptor.show($event, $ctrl.summary.client.salesPersonFk)"
class="link">
{{$ctrl.summary.client.salesPersonUser.name}}
2020-09-03 13:11:16 +00:00
</span>
2019-01-20 15:47:04 +00:00
</vn-label-value>
<vn-label-value label="Agency"
value="{{$ctrl.summary.agencyMode.name}}">
</vn-label-value>
2020-10-27 07:45:34 +00:00
<vn-label-value label="Zone">
<span
ng-click="zoneDescriptor.show($event, $ctrl.summary.zoneFk)"
class="link">
{{$ctrl.summary.zone.name}}
</span>
2020-01-13 06:42:41 +00:00
</vn-label-value>
2019-01-20 15:47:04 +00:00
<vn-label-value label="Warehouse"
value="{{$ctrl.summary.warehouse.name}}">
</vn-label-value>
2020-03-27 10:10:20 +00:00
<vn-label-value label="Route">
<span
ng-click="routeDescriptor.show($event, $ctrl.summary.routeFk)"
2020-03-27 10:10:20 +00:00
class="link">
{{$ctrl.summary.routeFk}}
</span>
</vn-label-value>
<vn-label-value label="Invoice">
2020-05-18 12:58:06 +00:00
<span
ng-class="{link: $ctrl.summary.refFk}"
ng-click="$ctrl.showInvoiceOutDescriptor($event, $ctrl.summary.refFk)">
{{$ctrl.summary.refFk | dashIfEmpty}}
</span>
2019-01-23 15:51:39 +00:00
</vn-label-value>
2019-01-20 15:47:04 +00:00
</vn-one>
<vn-two>
2019-01-20 15:47:04 +00:00
<vn-label-value label="Shipped"
value="{{$ctrl.summary.shipped | date: 'dd/MM/yyyy HH:mm'}}">
2019-01-20 15:47:04 +00:00
</vn-label-value>
<vn-label-value label="Landed"
value="{{$ctrl.summary.landed | date: 'dd/MM/yyyy'}}">
2019-01-20 15:47:04 +00:00
</vn-label-value>
2020-01-13 06:42:41 +00:00
<vn-label-value label="Package size"
value="{{$ctrl.summary.packages}}">
</vn-label-value>
2020-03-27 10:10:20 +00:00
<vn-label-value label="Address phone"
ng-if="$ctrl.summary.address.phone != null"
2019-01-20 15:47:04 +00:00
value="{{$ctrl.summary.address.phone}}">
</vn-label-value>
2020-03-27 10:10:20 +00:00
<vn-label-value label="Address mobile"
ng-if="$ctrl.summary.address.mobile != null"
value="{{$ctrl.summary.address.mobile}}">
</vn-label-value>
<vn-label-value label="Client phone"
ng-if="$ctrl.summary.client.phone != null"
value="{{$ctrl.summary.client.phone}}">
</vn-label-value>
<vn-label-value label="Client mobile"
ng-if="$ctrl.summary.client.mobile != null"
value="{{$ctrl.summary.client.mobile}}">
</vn-label-value>
<vn-label-value label="Address" no-ellipsize
value="{{$ctrl.formattedAddress}}">
</vn-label-value>
</vn-two>
2019-01-20 15:47:04 +00:00
<vn-one class="notes">
<vn-label-value no-ellipsize
2019-01-20 15:47:04 +00:00
label="{{note.observationType.description}}"
ng-repeat="note in $ctrl.summary.notes track by note.id"
value="{{note.description}}">
</vn-label-value>
</vn-one>
<vn-one class="taxes">
<p><vn-label translate>Subtotal</vn-label> {{$ctrl.summary.totalWithoutVat | currency: 'EUR':2}}</p>
<p><vn-label translate>VAT</vn-label> {{$ctrl.summary.totalWithVat - $ctrl.summary.totalWithoutVat | currency: 'EUR':2}}</p>
<p><vn-label><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.totalWithVat | currency: 'EUR':2}}</strong></p>
2019-01-20 15:47:04 +00:00
</vn-one>
<vn-auto name="sales">
2021-01-08 14:43:33 +00:00
<h4>
2021-01-12 09:15:33 +00:00
<a
ui-sref="ticket.card.sale({id:$ctrl.ticket.id})"
target="_self">
<span translate vn-tooltip="Go to">Sale</span>
2021-01-08 14:43:33 +00:00
</a>
</h4>
2019-10-11 15:38:04 +00:00
<vn-table>
2019-01-30 22:47:06 +00:00
<vn-thead>
<vn-tr>
2019-02-20 13:34:16 +00:00
<vn-th shrink></vn-th>
<vn-th number shrink>Item</vn-th>
<vn-th number shrink>Visible</vn-th>
2021-05-19 15:04:13 +00:00
<vn-th number shrink>Available</vn-th>
<vn-th number shrink>Quantity</vn-th>
2019-02-20 16:52:36 +00:00
<vn-th>Description</vn-th>
2019-01-30 22:47:06 +00:00
<vn-th number>Price</vn-th>
<vn-th number>Discount</vn-th>
<vn-th number>Amount</vn-th>
2021-06-28 06:28:31 +00:00
<vn-th shrink>Packing</vn-th>
2019-01-30 22:47:06 +00:00
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="sale in $ctrl.summary.sales track by sale.id">
2019-02-20 13:34:16 +00:00
<vn-td shrink>
<a ui-sref="claim.card.basicData({id: sale.claim.claimFk})">
<vn-icon icon="icon-claims"
ng-show="sale.claim.claimFk"
vn-tooltip="{{::$ctrl.$t('Claim')}}: {{::sale.claim.claimFk}}">
</vn-icon>
</a>
2019-01-27 23:26:01 +00:00
<a ui-sref="claim.card.basicData({id: sale.claimBeginning.claimFk})">
<vn-icon
ng-show="sale.claimBeginning.claimFk"
2019-01-27 23:26:01 +00:00
icon="icon-claims"
vn-tooltip="{{::$ctrl.$t('Claim')}}: {{::sale.claimBeginning.claimFk}}">
2018-11-21 09:09:36 +00:00
</vn-icon>
2019-01-27 23:26:01 +00:00
</a>
2021-05-25 08:01:18 +00:00
<vn-icon
ng-show="::(sale.visible < 0)"
color-main
icon="warning"
vn-tooltip="Visible: {{::sale.visible || 0}}">
</vn-icon>
<vn-icon ng-show="sale.reserved"
icon="icon-reserve"
2021-05-27 09:41:45 +00:00
translate-attr="{title: 'Reserved'}">
2021-05-25 08:01:18 +00:00
</vn-icon>
<vn-icon
ng-show="::sale.isAvailable === 0"
translate-attr="{title: 'Not available'}"
class="bright"
icon="icon-unavailable">
</vn-icon>
<vn-icon
ng-show="::sale.hasComponentLack"
translate-attr="{title: 'Component lack'}"
class="bright"
icon="icon-components">
</vn-icon>
2019-01-30 22:47:06 +00:00
</vn-td>
<vn-td number shrink>
2019-01-27 23:26:01 +00:00
<span
ng-click="itemDescriptor.show($event, sale.itemFk, sale.id, $ctrl.ticket.shipped)"
2019-02-10 21:52:35 +00:00
class="link">
2019-01-27 23:26:01 +00:00
{{sale.itemFk | zeroFill:6}}
</span>
2019-01-30 22:47:06 +00:00
</vn-td>
2021-05-19 15:04:13 +00:00
<vn-td number shrink>
<vn-chip
class="transparent"
ng-class="{'alert': sale.visible < 0}">
{{::sale.visible}}
</vn-chip>
</vn-td>
<vn-td number shrink>
2021-05-25 08:01:18 +00:00
<vn-chip
class="transparent"
2021-06-01 09:39:40 +00:00
ng-class="{'alert': sale.available < 0}">
2021-05-25 08:01:18 +00:00
{{::sale.available}}
2021-05-19 15:04:13 +00:00
</vn-chip>
</vn-td>
<vn-td number shrink>{{::sale.quantity}}</vn-td>
2021-01-28 14:10:47 +00:00
<vn-td vn-fetched-tags wide>
<vn-one title="{{::sale.item.name}}">{{::sale.item.name}}</vn-one>
<vn-one ng-if="::sale.item.subName">
<h3 title="{{::sale.item.subName}}">{{::sale.item.subName}}</h3>
</vn-one>
<vn-fetched-tags
max-length="6"
2019-03-29 07:01:15 +00:00
item="::sale.item"
2021-01-28 14:10:47 +00:00
tabindex="-1">
2019-10-11 15:38:04 +00:00
</vn-fetched-tags>
2019-03-22 14:05:15 +00:00
</vn-td>
<vn-td number>{{::sale.price | currency: 'EUR':2}}</vn-td>
2019-01-30 22:47:06 +00:00
<vn-td number>{{::sale.discount}} %</vn-td>
2019-12-12 07:22:04 +00:00
<vn-td number>{{::sale.quantity * sale.price * ((100 - sale.discount) / 100) | currency: 'EUR':2}}</vn-td>
2021-06-28 06:28:31 +00:00
<vn-td shrink>
{{::sale.item.itemPackingTypeFk | dashIfEmpty}}
</vn-td>
2019-01-30 22:47:06 +00:00
</vn-tr>
</vn-tbody>
</vn-table>
2019-01-20 15:47:04 +00:00
</vn-auto>
<vn-one ng-if="$ctrl.summary.packagings.length != 0">
2021-01-08 14:43:33 +00:00
<h4>
<a
2021-01-12 09:15:33 +00:00
ui-sref="ticket.card.package({id:$ctrl.ticket.id})"
target="_self">
<span translate vn-tooltip="Go to">Packages</span>
2021-01-08 14:43:33 +00:00
</a>
</h4>
2019-01-27 23:26:01 +00:00
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th number>Created</vn-th>
<vn-th number>Package</vn-th>
<vn-th number>Quantity</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="package in $ctrl.summary.packagings">
<vn-td number>{{package.created | date: 'dd/MM/yyyy'}}</vn-td>
2019-01-27 23:26:01 +00:00
<vn-td number>{{package.packaging.item.name}}</vn-td>
<vn-td number>{{package.quantity}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
2019-01-20 15:47:04 +00:00
</vn-one>
2019-12-12 07:22:04 +00:00
<vn-one class="services" ng-if="$ctrl.summary.services.length != 0">
2021-01-08 14:43:33 +00:00
<h4>
<a
2021-01-12 09:15:33 +00:00
ui-sref="ticket.card.service({id:$ctrl.ticket.id})"
target="_self">
<span translate vn-tooltip="Go to">Service</span>
2021-01-08 14:43:33 +00:00
</a>
</h4>
2019-01-27 23:26:01 +00:00
<vn-table model="model">
<vn-thead>
<vn-tr>
2019-12-12 07:22:04 +00:00
<vn-th number shrink>Quantity</vn-th>
<vn-th expand>Description</vn-th>
<vn-th number shrink>Price</vn-th>
<vn-th class="tax-class">Tax class</vn-th>
2020-06-29 09:43:53 +00:00
<vn-th number>Amount</vn-th>
2019-01-27 23:26:01 +00:00
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="service in $ctrl.summary.services">
2019-12-12 07:22:04 +00:00
<vn-td number shrink>{{::service.quantity}}</vn-td>
2019-02-20 16:52:36 +00:00
<vn-td expand>{{::service.description}}</vn-td>
2020-06-29 09:43:53 +00:00
<vn-td number shrink>{{::service.price | currency: 'EUR':2}}</vn-td>
2021-05-25 08:01:18 +00:00
<vn-td class="tax-class">
<span title="{{::service.taxClass.description}}">
{{::service.taxClass.description}}
</span>
</vn-td>
2020-06-29 09:43:53 +00:00
<vn-td number>{{::service.quantity * service.price | currency: 'EUR':2}}</vn-td>
2019-01-27 23:26:01 +00:00
</vn-tr>
</vn-tbody>
</vn-table>
2019-01-20 15:47:04 +00:00
</vn-one>
</vn-horizontal>
<vn-horizontal>
2019-01-20 15:47:04 +00:00
<vn-auto ng-if="$ctrl.summary.requests.length != 0">
2021-01-08 14:43:33 +00:00
<h4>
<a
2021-01-12 09:15:33 +00:00
ui-sref="ticket.card.request.index({id:$ctrl.ticket.id})"
target="_self">
<span translate vn-tooltip="Go to">Purchase request</span>
2021-01-08 14:43:33 +00:00
</a>
</h4>
2019-01-27 23:26:01 +00:00
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th>Description</vn-th>
<vn-th number>Created</vn-th>
<vn-th>Requester</vn-th>
<vn-th>Atender</vn-th>
<vn-th number>Quantity</vn-th>
<vn-th number>Price</vn-th>
<vn-th number>Item</vn-th>
2019-01-27 23:26:01 +00:00
<vn-th number>Ok</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="request in $ctrl.summary.requests">
2019-02-10 21:52:35 +00:00
<vn-td expand>{{::request.description}}</vn-td>
<vn-td number>{{::request.created | date: 'dd/MM/yyyy'}}</vn-td>
2019-01-27 23:26:01 +00:00
<vn-td>{{::request.requester.user.name}}</vn-td>
<vn-td>{{::request.atender.user.name}}</vn-td>
<vn-td number>{{::request.quantity}}</vn-td>
<vn-td number>{{::request.price}}</vn-td>
<vn-td number>
<span
ng-show="::request.saleFk"
ng-click="itemDescriptor.show($event, request.sale.itemFk, request.sale.id)"
2019-02-10 21:52:35 +00:00
class="link">
{{request.sale.itemFk | zeroFill:6}}
2019-01-27 23:26:01 +00:00
</span>
</vn-td>
<vn-td number>
<vn-check vn-one
2019-10-09 22:47:29 +00:00
ng-model="::request.isOk"
triple-state="true"
title="{{$ctrl.getRequestState(request.isOk)}}"
2019-01-27 23:26:01 +00:00
disabled="true">
</vn-check>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
2019-01-20 15:47:04 +00:00
</vn-auto>
2019-02-10 21:52:35 +00:00
</vn-horizontal>
2018-05-29 12:33:29 +00:00
</vn-card>
2020-02-05 11:44:14 +00:00
<vn-route-descriptor-popover
vn-id="route-descriptor">
2020-02-05 11:44:14 +00:00
</vn-route-descriptor-popover>
2019-01-20 15:47:04 +00:00
<vn-item-descriptor-popover
vn-id="item-descriptor"
warehouse-fk="$ctrl.ticket.warehouseFk",
ticket-fk="$ctrl.ticket.id">
2018-09-04 09:49:00 +00:00
</vn-item-descriptor-popover>
<vn-invoice-out-descriptor-popover
vn-id="invoice-out-descriptor">
2020-09-03 13:11:16 +00:00
</vn-invoice-out-descriptor-popover>
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
2020-10-27 07:45:34 +00:00
<vn-zone-descriptor-popover
vn-id="zoneDescriptor">
</vn-zone-descriptor-popover>