2020-07-20 09:31:47 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2020-08-26 14:33:47 +00:00
|
|
|
url="Buys/latestBuysFilter"
|
2020-07-20 09:31:47 +00:00
|
|
|
limit="20"
|
2021-05-12 10:11:27 +00:00
|
|
|
data="$ctrl.buys"
|
|
|
|
auto-load="true">
|
2020-07-20 09:31:47 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<vn-portal slot="topbar">
|
|
|
|
<vn-searchbar
|
2020-10-06 06:17:12 +00:00
|
|
|
vn-focus
|
2020-07-20 09:31:47 +00:00
|
|
|
panel="vn-latest-buys-search-panel"
|
2020-08-26 14:33:47 +00:00
|
|
|
placeholder="Search by item id or name"
|
|
|
|
info="You can search by item id or name"
|
|
|
|
suggested-filter="{isActive: true}"
|
2020-07-20 09:31:47 +00:00
|
|
|
model="model"
|
|
|
|
auto-state="false">
|
|
|
|
</vn-searchbar>
|
|
|
|
</vn-portal>
|
2021-11-10 16:07:16 +00:00
|
|
|
<vn-card>
|
|
|
|
<smart-table
|
2020-07-20 09:31:47 +00:00
|
|
|
model="model"
|
2021-11-10 16:07:16 +00:00
|
|
|
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"
|
|
|
|
check-field="$checked"> <!-- Change $checked as default prop -->
|
|
|
|
</vn-multi-check>
|
|
|
|
</th>
|
|
|
|
<th>Picture</th>
|
|
|
|
<th field="id">
|
|
|
|
<span translate>Identifier</span>
|
|
|
|
</th>
|
|
|
|
<th field="packing">
|
|
|
|
<span translate>Packing</span>
|
|
|
|
</th>
|
|
|
|
<th field="grouping">
|
|
|
|
<span translate>Grouping</span>
|
|
|
|
</th>
|
|
|
|
<th field="quantity">
|
|
|
|
<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="density">
|
|
|
|
<span translate>Density</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">
|
|
|
|
<span translate>Buying value</span>
|
|
|
|
</th>
|
|
|
|
<th field="freightValue">
|
|
|
|
<span translate>Freight value</span>
|
|
|
|
</th>
|
|
|
|
<th field="comissionValue">
|
|
|
|
<span translate>Commission value</span>
|
|
|
|
</th>
|
|
|
|
<th field="packageValue">
|
|
|
|
<span translate>Package value</span>
|
|
|
|
</th>
|
|
|
|
<th field="isIgnored">
|
|
|
|
<span translate>Is ignored</span>
|
|
|
|
</th>
|
|
|
|
<th field="price2">
|
|
|
|
<span translate>Grouping price</span>
|
|
|
|
</th>
|
|
|
|
<th field="price3">
|
|
|
|
<span translate>Packing price</span>
|
|
|
|
</th>
|
|
|
|
<th field="minPrice">
|
|
|
|
<span translate>Min price</span>
|
|
|
|
</th>
|
|
|
|
<th field="ektFk">
|
|
|
|
<span translate>Ekt</span>
|
|
|
|
</th>
|
|
|
|
<th field="weight">
|
|
|
|
<span translate>Weight</span>
|
|
|
|
</th>
|
|
|
|
<th field="packageFk">
|
|
|
|
<span translate>Package name</span>
|
|
|
|
</th>
|
|
|
|
<th field="packingOut">
|
|
|
|
<span translate>Packing out</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"
|
|
|
|
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 | zeroFill:6}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<vn-chip class="transparent" translate-attr="buy.groupingMode == 2 ? {title: 'Minimun amount'} : {title: 'Packing'}" ng-class="{'message': buy.groupingMode == 2}">
|
|
|
|
<span translate>{{::buy.packing | dashIfEmpty}}</span>
|
|
|
|
</vn-chip>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<vn-chip class="transparent" translate-attr="buy.groupingMode == 1 ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': buy.groupingMode == 1}">
|
|
|
|
<span translate>{{::buy.grouping | dashIfEmpty}}</span>
|
|
|
|
</vn-chip>
|
|
|
|
</td>
|
|
|
|
<td>{{::buy.quantity}}</td>
|
|
|
|
<td vn-two title="{{::buy.description}}">
|
|
|
|
{{::buy.description | dashIfEmpty}}
|
|
|
|
</td>
|
|
|
|
<td>{{::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.density}}</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>{{::buy.buyingValue | currency: 'EUR':2}}</td>
|
|
|
|
<td>{{::buy.freightValue | currency: 'EUR':2}}</td>
|
|
|
|
<td>{{::buy.comissionValue | currency: 'EUR':2}}</td>
|
|
|
|
<td>{{::buy.packageValue | currency: 'EUR':2}}</td>
|
|
|
|
<td>
|
|
|
|
<vn-check
|
|
|
|
disabled="true"
|
|
|
|
ng-model="::buy.isIgnored">
|
|
|
|
</vn-check>
|
|
|
|
</td>
|
|
|
|
<td>{{::buy.price2 | currency: 'EUR':2}}</td>
|
|
|
|
<td>{{::buy.price3 | currency: 'EUR':2}}</td>
|
|
|
|
<td>{{::buy.minPrice | currency: 'EUR':2}}</td>
|
|
|
|
<td>{{::buy.ektFk | dashIfEmpty}}</td>
|
|
|
|
<td>{{::buy.weight}}</td>
|
|
|
|
<td>{{::buy.packageFk}}</td>
|
|
|
|
<td>{{::buy.packingOut}}</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</slot-table>
|
|
|
|
</smart-table>
|
|
|
|
</vn-card>
|
2020-07-20 09:31:47 +00:00
|
|
|
<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"
|
2020-08-26 14:33:47 +00:00
|
|
|
ng-click="edit.show($event)"
|
2020-08-27 13:29:48 +00:00
|
|
|
vn-tooltip="Edit buy(s)"
|
2020-07-20 09:31:47 +00:00
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
|
|
|
</vn-vertical>
|
|
|
|
</div>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-dialog class="edit"
|
|
|
|
vn-id="edit"
|
|
|
|
on-accept="$ctrl.onEditAccept()"
|
2021-03-01 10:54:02 +00:00
|
|
|
on-close="$ctrl.editedColumn = null">
|
2020-08-26 14:33:47 +00:00
|
|
|
<tpl-body>
|
2021-03-22 09:23:52 +00:00
|
|
|
<span translate>Edit</span>
|
2021-03-16 07:44:05 +00:00
|
|
|
<span class="countLines">
|
2021-03-01 10:54:02 +00:00
|
|
|
{{::$ctrl.totalChecked}}
|
2021-03-10 08:49:24 +00:00
|
|
|
</span>
|
2021-03-22 09:23:52 +00:00
|
|
|
<span translate>buy(s)</span>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-two
|
|
|
|
ng-model="$ctrl.editedColumn.field"
|
|
|
|
data="$ctrl.columns"
|
|
|
|
value-field="field"
|
2020-09-02 11:09:30 +00:00
|
|
|
show-field="displayName"
|
2020-08-26 14:33:47 +00:00
|
|
|
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>Create</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|
|
|
|
<vn-item-descriptor-popover
|
2021-05-21 13:31:05 +00:00
|
|
|
vn-id="item-descriptor"
|
|
|
|
warehouse-fk="$ctrl.vnConfig.warehouseFk">
|
2020-08-26 14:33:47 +00:00
|
|
|
</vn-item-descriptor-popover>
|
|
|
|
<vn-entry-descriptor-popover
|
2021-05-21 13:31:05 +00:00
|
|
|
vn-id="entry-descriptor">
|
2020-08-26 14:33:47 +00:00
|
|
|
</vn-entry-descriptor-popover>
|