268 lines
11 KiB
HTML
268 lines
11 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="Buys/latestBuysFilter"
|
|
order="itemFk DESC"
|
|
limit="20"
|
|
data="$ctrl.buys"
|
|
on-data-change="$ctrl.reCheck()"
|
|
auto-load="true">
|
|
</vn-crud-model>
|
|
<vn-portal slot="topbar">
|
|
</vn-portal>
|
|
<vn-latest-buys-search-panel
|
|
model="model">
|
|
</vn-latest-buys-search-panel>
|
|
<vn-card>
|
|
<smart-table
|
|
model="model"
|
|
view-config-id="latestBuys"
|
|
options="$ctrl.smartTableOptions"
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
<slot-table>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th shrink>
|
|
<vn-multi-check
|
|
model="model"
|
|
checked="$ctrl.checkAll"
|
|
check-field="checked"
|
|
check-dummy-enabled="true"
|
|
checked-dummy-count="$ctrl.checkedDummyCount">
|
|
</vn-multi-check>
|
|
</th>
|
|
<th translate>Picture</th>
|
|
<th field="itemFk">
|
|
<span translate>Item ID</span>
|
|
</th>
|
|
<th field="packing" number>
|
|
<span translate>Packing</span>
|
|
</th>
|
|
<th field="grouping" number>
|
|
<span translate>Grouping</span>
|
|
</th>
|
|
<th field="quantity" number>
|
|
<span translate>Quantity</span>
|
|
</th>
|
|
<th field="description">
|
|
<span translate>Description</span>
|
|
</th>
|
|
<th field="size">
|
|
<span translate>Size</span>
|
|
</th>
|
|
<th field="name">
|
|
<span translate>Tags</span>
|
|
</th>
|
|
<th field="code">
|
|
<span translate>Type</span>
|
|
</th>
|
|
<th field="intrastat">
|
|
<span translate>Intrastat</span>
|
|
</th>
|
|
<th field="origin">
|
|
<span translate>Origin</span>
|
|
</th>
|
|
<th field="weightByPiece">
|
|
<span translate>Weight/Piece</span>
|
|
</th>
|
|
<th field="isActive">
|
|
<span translate>Active</span>
|
|
</th>
|
|
<th field="family">
|
|
<span translate>Family</span>
|
|
</th>
|
|
<th field="entryFk">
|
|
<span translate>Entry</span>
|
|
</th>
|
|
<th field="buyingValue" number>
|
|
<span translate>Buying value</span>
|
|
</th>
|
|
<th field="freightValue" number>
|
|
<span translate>Freight value</span>
|
|
</th>
|
|
<th field="comissionValue" number>
|
|
<span translate>Commission value</span>
|
|
</th>
|
|
<th field="packageValue" number>
|
|
<span translate>Package value</span>
|
|
</th>
|
|
<th field="isIgnored">
|
|
<span translate>Is ignored</span>
|
|
</th>
|
|
<th field="price2" number>
|
|
<span translate>Grouping</span>
|
|
</th>
|
|
<th field="price3" number>
|
|
<span translate>Packing</span>
|
|
</th>
|
|
<th field="minPrice" number>
|
|
<span translate>Min</span>
|
|
</th>
|
|
<th field="ektFk">
|
|
<span translate>Ekt</span>
|
|
</th>
|
|
<th field="weight">
|
|
<span translate>Weight</span>
|
|
</th>
|
|
<th field="packagingFk">
|
|
<span translate>Package</span>
|
|
</th>
|
|
<th field="packingOut">
|
|
<span translate>Package out</span>
|
|
</th>
|
|
<th field="landing">
|
|
<span translate>Landing</span>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="buy in $ctrl.buys"
|
|
vn-anchor="::{
|
|
state: 'entry.card.buy.index',
|
|
params: {id: {{::buy.entryFk}}}
|
|
}">
|
|
<td>
|
|
<vn-check
|
|
ng-model="buy.checked"
|
|
on-change="$ctrl.saveChecked(buy.id)"
|
|
vn-click-stop>
|
|
</vn-check>
|
|
</td>
|
|
<td >
|
|
<img
|
|
ng-src="{{::$root.imagePath('catalog', '50x50', buy.itemFk)}}"
|
|
zoom-image="{{::$root.imagePath('catalog', '1600x900', buy.itemFk)}}"
|
|
vn-click-stop
|
|
on-error-src/>
|
|
</td>
|
|
<td>
|
|
<span
|
|
vn-click-stop="itemDescriptor.show($event, buy.itemFk)"
|
|
class="link">
|
|
{{::buy.itemFk}}
|
|
</span>
|
|
</td>
|
|
<td number>
|
|
<vn-chip class="transparent" translate-attr="buy.groupingMode == 2 ? {title: 'Minimun amount'} : {title: 'Packing'}" ng-class="{'message': buy.groupingMode == 2}">
|
|
<span>{{::buy.packing | dashIfEmpty}}</span>
|
|
</vn-chip>
|
|
</td>
|
|
<td number>
|
|
<vn-chip class="transparent" translate-attr="buy.groupingMode == 1 ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': buy.groupingMode == 1}">
|
|
<span>{{::buy.grouping | dashIfEmpty}}</span>
|
|
</vn-chip>
|
|
</td>
|
|
<td number>{{::buy.quantity}}</td>
|
|
<td vn-two title="{{::buy.description}}">
|
|
{{::buy.description | dashIfEmpty}}
|
|
</td>
|
|
<td number>{{::buy.size}}</td>
|
|
<td vn-fetched-tags>
|
|
<div>
|
|
<vn-one title="{{::buy.name}}">{{::buy.name}}</vn-one>
|
|
<vn-one ng-if="::buy.subName">
|
|
<h3 title="{{::buy.subName}}">{{::buy.subName}}</h3>
|
|
</vn-one>
|
|
</div>
|
|
<vn-fetched-tags
|
|
max-length="6"
|
|
item="::buy"
|
|
tabindex="-1">
|
|
</vn-fetched-tags>
|
|
</td>
|
|
<td title="{{::buy.type}}">
|
|
{{::buy.code}}
|
|
</td>
|
|
<td title="{{::item.intrastat}}">
|
|
{{::buy.intrastat}}
|
|
</td>
|
|
<td>{{::buy.origin}}</td>
|
|
<td>{{::buy.weightByPiece}}</td>
|
|
<td>
|
|
<vn-check
|
|
disabled="true"
|
|
ng-model="::buy.isActive">
|
|
</vn-check>
|
|
</td>
|
|
<td>{{::buy.family}}</td>
|
|
<td>
|
|
<span
|
|
vn-click-stop="entryDescriptor.show($event, buy.entryFk)"
|
|
class="link">
|
|
{{::buy.entryFk}}
|
|
</span>
|
|
</td>
|
|
<td number>{{::buy.buyingValue | currency: 'EUR':3}}</td>
|
|
<td number>{{::buy.freightValue | currency: 'EUR':3}}</td>
|
|
<td number>{{::buy.comissionValue | currency: 'EUR':3}}</td>
|
|
<td number>{{::buy.packageValue | currency: 'EUR':3}}</td>
|
|
<td>
|
|
<vn-check
|
|
disabled="true"
|
|
ng-model="::buy.isIgnored">
|
|
</vn-check>
|
|
</td>
|
|
<td number>{{::buy.price2 | currency: 'EUR':3}}</td>
|
|
<td number>{{::buy.price3 | currency: 'EUR':3}}</td>
|
|
<td number>{{::buy.minPrice | currency: 'EUR':3}}</td>
|
|
<td>{{::buy.ektFk | dashIfEmpty}}</td>
|
|
<td>{{::buy.weight}}</td>
|
|
<td>{{::buy.packagingFk}}</td>
|
|
<td>{{::buy.packingOut}}</td>
|
|
<td>{{::buy.landing | date: 'dd/MM/yyyy'}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</slot-table>
|
|
</smart-table>
|
|
</vn-card>
|
|
<div fixed-bottom-right>
|
|
<vn-vertical style="align-items: center;">
|
|
<vn-button class="round sm vn-mb-sm"
|
|
icon="edit"
|
|
ng-show="$ctrl.totalChecked > 0"
|
|
ng-click="edit.show($event)"
|
|
vn-tooltip="Edit buy(s)"
|
|
tooltip-position="left">
|
|
</vn-button>
|
|
</vn-vertical>
|
|
</div>
|
|
<vn-dialog class="edit"
|
|
vn-id="edit"
|
|
on-accept="$ctrl.onEditAccept()"
|
|
on-close="$ctrl.editedColumn = null">
|
|
<tpl-body>
|
|
<span translate>Edit</span>
|
|
<span class="countLines">
|
|
{{::$ctrl.totalChecked}}
|
|
</span>
|
|
<span translate>buy(s)</span>
|
|
<vn-horizontal>
|
|
<vn-autocomplete
|
|
vn-two
|
|
ng-model="$ctrl.editedColumn.field"
|
|
data="$ctrl.columns"
|
|
value-field="field"
|
|
show-field="displayName"
|
|
label="Field to edit">
|
|
</vn-autocomplete>
|
|
<vn-textfield
|
|
vn-one
|
|
label="Value"
|
|
ng-model="$ctrl.editedColumn.newValue">
|
|
</vn-textfield>
|
|
</vn-horizontal>
|
|
</tpl-body>
|
|
<tpl-buttons>
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
<button response="accept" translate>Save</button>
|
|
</tpl-buttons>
|
|
</vn-dialog>
|
|
<vn-item-descriptor-popover
|
|
vn-id="item-descriptor"
|
|
warehouse-fk="$ctrl.vnConfig.warehouseFk">
|
|
</vn-item-descriptor-popover>
|
|
<vn-entry-descriptor-popover
|
|
vn-id="entry-descriptor">
|
|
</vn-entry-descriptor-popover>
|