salix/modules/ticket/front/basic-data/step-two/index.html

105 lines
4.2 KiB
HTML

<vn-crud-model
url="TicketUpdateActions"
data="ticketUpdateActions"
auto-load="true">
</vn-crud-model>
<vn-card class="vn-w-lg">
<vn-table>
<vn-thead>
<vn-tr>
<vn-th number>Item</vn-th>
<vn-th class="align-center">Description</vn-th>
<vn-th ng-if="$ctrl.ticket.sale.haveDifferences" number>Movable</vn-th>
<vn-th number>Quantity</vn-th>
<vn-th number>Price (PPU)</vn-th>
<vn-th number>New (PPU)</vn-th>
<vn-th number>Difference</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="sale in $ctrl.ticket.sale.items track by sale.id">
<vn-td number>
<span
title="{{::sale.item.name}}"
vn-click-stop="itemDescriptor.show($event, sale.itemFk, sale.id)"
class="link">
{{::sale.itemFk}}
</span>
</vn-td>
<vn-td vn-fetched-tags>
<div>
<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>
</div>
<vn-fetched-tags
max-length="6"
item="::sale.item"
tabindex="-1">
</vn-fetched-tags>
</vn-td>
<vn-td ng-if="$ctrl.ticket.sale.haveDifferences" number>
<span
class="chip"
ng-class="{'alert': sale.quantity>sale.movable}">
{{::sale.movable}}
</span>
</vn-td>
<vn-td number>{{::sale.quantity}}</vn-td>
<vn-td number>{{::sale.price | currency: 'EUR': 2}}</vn-td>
<vn-td number>{{::sale.component.newPrice | currency: 'EUR': 2}}</vn-td>
<vn-td number>{{::sale.component.difference | currency: 'EUR': 2}}</vn-td>
</vn-tr>
</vn-tbody>
<vn-tfoot>
<vn-tr>
<vn-td></vn-td>
<vn-td></vn-td>
<vn-td></vn-td>
</vn-tr>
</vn-tfoot>
</vn-table>
</vn-card>
<vn-side-menu side="right">
<div class="vn-pa-md">
<div class="totalBox align-left">
<h6 class="align-center" translate>Total</h6>
<div> <vn-label translate>Price</vn-label> {{$ctrl.totalPrice | currency: 'EUR': 2}} </div>
<div> <vn-label translate>New price</vn-label> {{$ctrl.totalNewPrice | currency: 'EUR': 2}} </div>
<div> <vn-label translate>Difference</vn-label> {{$ctrl.totalPriceDifference | currency: 'EUR': 2}} </div>
</div>
<vn-card ng-show="::$ctrl.totalPriceDifference">
<div class="totalBox align-left" >
<h6 class="align-center" translate>Charge difference to</h6>
<div ng-repeat="action in ticketUpdateActions">
<vn-radio
ng-model="$ctrl.ticket.option"
label="{{::action.description}}"
val={{::action.code}}>
</vn-radio>
</div>
</div>
</vn-card>
<div class="totalBox align-left" ng-show="::$ctrl.haveNegatives">
<vn-check
ng-model="$ctrl.ticket.withoutNegatives"
label="Create without negatives"
info="Clone this ticket with the changes and only sales availables">
</vn-check>
</div>
</div>
</vn-side-menu>
<vn-item-descriptor-popover
vn-id="item-descriptor"
warehouse-fk="$ctrl.ticket.warehouseFk"
ticket-fk="$ctrl.ticket.id">
</vn-item-descriptor-popover>
<vn-confirm
vn-id="negativesConfirm"
on-accept="$ctrl.onConfirmAccept()"
question="Negatives are going to be generated, are you sure you want to advance all the lines?"
message="Edit basic data">
</vn-confirm>