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>
|
|
|
|
<vn-data-viewer
|
|
|
|
model="model"
|
|
|
|
class="vn-mb-xl vn-w-xl">
|
|
|
|
<vn-card>
|
|
|
|
<vn-table
|
|
|
|
model="model"
|
|
|
|
show-fields="$ctrl.showFields"
|
|
|
|
vn-smart-table="latestBuys">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
2020-09-02 13:20:28 +00:00
|
|
|
<vn-th shrink>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-multi-check
|
2020-07-20 09:31:47 +00:00
|
|
|
model="model">
|
|
|
|
</vn-multi-check>
|
|
|
|
</vn-th>
|
2020-09-02 13:20:28 +00:00
|
|
|
<vn-th field="Image">Picture</vn-th>
|
|
|
|
<vn-th smart-table-ignore field="id">Id</vn-th>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-th field="packing">Packing</vn-th>
|
2020-08-27 14:42:01 +00:00
|
|
|
<vn-th field="grouping">Grouping</vn-th>
|
2020-09-10 12:32:44 +00:00
|
|
|
<vn-th field="quantity">Quantity</vn-th>
|
2020-08-28 08:40:47 +00:00
|
|
|
<vn-th field="description" style="text-align: center">Description</vn-th>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-th field="size">Size</vn-th>
|
2021-02-23 10:52:29 +00:00
|
|
|
<vn-th field="name" style="text-align: center">Tags</vn-th>
|
|
|
|
<vn-th field="code">Type</vn-th>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-th field="intrastat">Intrastat</vn-th>
|
|
|
|
<vn-th field="origin">Origin</vn-th>
|
|
|
|
<vn-th field="density">Density</vn-th>
|
|
|
|
<vn-th field="isActive">Active</vn-th>
|
|
|
|
<vn-th field="family">Family</vn-th>
|
|
|
|
<vn-th field="entryFk">Entry</vn-th>
|
|
|
|
<vn-th field="buyingValue">Buying value</vn-th>
|
|
|
|
<vn-th field="freightValue">Freight value</vn-th>
|
2020-09-02 11:09:30 +00:00
|
|
|
<vn-th field="comissionValue" expand>Commission value</vn-th>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-th field="packageValue" expand>Package value</vn-th>
|
|
|
|
<vn-th field="isIgnored">Is ignored</vn-th>
|
2020-09-02 11:09:30 +00:00
|
|
|
<vn-th expand field="price2">Grouping price</vn-th>
|
|
|
|
<vn-th expand field="price3">Packing price</vn-th>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-th field="minPrice">Min price</vn-th>
|
|
|
|
<vn-th field="ektFk">Ekt</vn-th>
|
|
|
|
<vn-th field="weight">Weight</vn-th>
|
2020-09-10 11:26:04 +00:00
|
|
|
<vn-th field="packageFk" expand>PackageName</vn-th>
|
2020-07-20 09:31:47 +00:00
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
|
|
|
<a ng-repeat="buy in $ctrl.buys"
|
|
|
|
class="clickable vn-tr search-result"
|
2021-03-12 07:45:41 +00:00
|
|
|
ui-sref="entry.card.buy.index({id: {{::buy.entryFk}}})">
|
2020-07-20 09:31:47 +00:00
|
|
|
<vn-td shrink>
|
|
|
|
<vn-check
|
|
|
|
ng-model="buy.checked"
|
|
|
|
vn-click-stop>
|
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-td shrink >
|
|
|
|
<img
|
2020-11-27 12:10:39 +00:00
|
|
|
ng-src="{{::$root.imagePath('catalog', '50x50', buy.itemFk)}}"
|
|
|
|
zoom-image="{{::$root.imagePath('catalog', '1600x900', buy.itemFk)}}"
|
2020-08-26 14:33:47 +00:00
|
|
|
vn-click-stop
|
|
|
|
on-error-src/>
|
|
|
|
</vn-td>
|
2020-07-20 09:31:47 +00:00
|
|
|
<vn-td shrink>
|
2020-08-26 14:33:47 +00:00
|
|
|
<span
|
|
|
|
vn-click-stop="itemDescriptor.show($event, buy.itemFk)"
|
|
|
|
class="link">
|
|
|
|
{{::buy.itemFk | zeroFill:6}}
|
|
|
|
</span>
|
2020-07-20 09:31:47 +00:00
|
|
|
</vn-td>
|
2020-08-27 14:40:08 +00:00
|
|
|
<vn-td number>
|
2021-04-28 09:15:02 +00:00
|
|
|
<vn-chip class="transparent" translate-attr="buy.groupingMode == 2 ? {title: 'Minimun amount'} : {title: 'Packing'}" ng-class="{'message': buy.groupingMode == 2}">
|
2020-08-27 14:42:01 +00:00
|
|
|
<span translate>{{::buy.packing | dashIfEmpty}}</span>
|
2020-08-27 14:40:08 +00:00
|
|
|
</vn-chip>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number>
|
2021-04-28 09:15:02 +00:00
|
|
|
<vn-chip class="transparent" translate-attr="buy.groupingMode == 1 ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': buy.groupingMode == 1}">
|
2020-08-27 14:42:01 +00:00
|
|
|
<span translate>{{::buy.grouping | dashIfEmpty}}</span>
|
2020-08-27 14:40:08 +00:00
|
|
|
</vn-chip>
|
|
|
|
</vn-td>
|
2020-09-10 12:32:44 +00:00
|
|
|
<vn-td number>{{::buy.quantity}}</vn-td>
|
2020-09-02 13:20:28 +00:00
|
|
|
<vn-td vn-two title="{{::buy.description}}">
|
2020-08-28 08:40:47 +00:00
|
|
|
{{::buy.description | dashIfEmpty}}
|
|
|
|
</vn-td>
|
2020-07-20 09:31:47 +00:00
|
|
|
<vn-td number>{{::buy.size}}</vn-td>
|
2021-01-28 14:10:47 +00:00
|
|
|
<vn-td vn-fetched-tags>
|
|
|
|
<vn-one title="{{::buy.name}}">{{::buy.name}}</vn-one>
|
|
|
|
<vn-one ng-if="::buy.subName">
|
|
|
|
<h3 title="{{::buy.subName}}">{{::buy.subName}}</h3>
|
|
|
|
</vn-one>
|
2020-09-14 09:44:47 +00:00
|
|
|
<vn-fetched-tags
|
|
|
|
max-length="6"
|
|
|
|
item="::buy"
|
2021-01-28 14:10:47 +00:00
|
|
|
tabindex="-1">
|
2020-09-14 09:44:47 +00:00
|
|
|
</vn-fetched-tags>
|
|
|
|
</vn-td>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-td shrink title="{{::buy.type}}">
|
2021-02-23 10:52:29 +00:00
|
|
|
{{::buy.code}}
|
2020-08-26 14:33:47 +00:00
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink title="{{::item.intrastat}}">
|
|
|
|
{{::buy.intrastat}}
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>{{::buy.origin}}</vn-td>
|
|
|
|
<vn-td shrink>{{::buy.density}}</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<vn-check
|
|
|
|
disabled="true"
|
|
|
|
ng-model="::buy.isActive">
|
|
|
|
</vn-check>
|
2020-07-20 09:31:47 +00:00
|
|
|
</vn-td>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-td shrink>{{::buy.family}}</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<span
|
|
|
|
vn-click-stop="entryDescriptor.show($event, buy.entryFk)"
|
|
|
|
class="link">
|
|
|
|
{{::buy.entryFk}}
|
|
|
|
</span>
|
2020-07-20 09:31:47 +00:00
|
|
|
</vn-td>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-td number>{{::buy.buyingValue | currency: 'EUR':2}}</vn-td>
|
|
|
|
<vn-td number>{{::buy.freightValue | currency: 'EUR':2}}</vn-td>
|
|
|
|
<vn-td number>{{::buy.comissionValue | currency: 'EUR':2}}</vn-td>
|
|
|
|
<vn-td number>{{::buy.packageValue | currency: 'EUR':2}}</vn-td>
|
2020-09-14 07:43:00 +00:00
|
|
|
<vn-td shrink>
|
|
|
|
<vn-check
|
|
|
|
disabled="true"
|
|
|
|
ng-model="::buy.isIgnored">
|
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-td number>{{::buy.price2 | currency: 'EUR':2}}</vn-td>
|
|
|
|
<vn-td number>{{::buy.price3 | currency: 'EUR':2}}</vn-td>
|
|
|
|
<vn-td number>{{::buy.minPrice | currency: 'EUR':2}}</vn-td>
|
|
|
|
<vn-td number>{{::buy.ektFk | dashIfEmpty}}</vn-td>
|
|
|
|
<vn-td number>{{::buy.weight}}</vn-td>
|
2020-09-10 11:26:04 +00:00
|
|
|
<vn-td number>{{::buy.packageFk}}</vn-td>
|
2020-07-20 09:31:47 +00:00
|
|
|
</a>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</vn-card>
|
|
|
|
</vn-data-viewer>
|
|
|
|
<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>
|