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"
|
2020-08-26 14:33:47 +00:00
|
|
|
data="$ctrl.buys">
|
2020-07-20 09:31:47 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<vn-portal slot="topbar">
|
|
|
|
<vn-searchbar
|
|
|
|
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-08-26 14:33:47 +00:00
|
|
|
<vn-th shrink>
|
|
|
|
<vn-multi-check
|
2020-07-20 09:31:47 +00:00
|
|
|
model="model">
|
|
|
|
</vn-multi-check>
|
|
|
|
</vn-th>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-th field="picture">Picture</vn-th>
|
|
|
|
<vn-th field="id">Id</vn-th>
|
|
|
|
<vn-th field="packing">Packing</vn-th>
|
2020-08-27 14:42:01 +00:00
|
|
|
<vn-th field="grouping">Grouping</vn-th>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-th field="size">Size</vn-th>
|
|
|
|
<vn-th field="type">Type</vn-th>
|
|
|
|
<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="quantity">Quantity</vn-th>
|
|
|
|
<vn-th field="buyingValue">Buying value</vn-th>
|
|
|
|
<vn-th field="freightValue">Freight value</vn-th>
|
|
|
|
<vn-th field="comissionValue" expand>Comission value</vn-th>
|
|
|
|
<vn-th field="packageValue" expand>Package value</vn-th>
|
|
|
|
<vn-th field="isIgnored">Is ignored</vn-th>
|
|
|
|
<vn-th field="price2">price2</vn-th>
|
|
|
|
<vn-th field="price3">price3</vn-th>
|
|
|
|
<vn-th field="minPrice">Min price</vn-th>
|
|
|
|
<vn-th field="ektFk">Ekt</vn-th>
|
|
|
|
<vn-th field="weight">Weight</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"
|
2020-08-26 14:33:47 +00:00
|
|
|
ui-sref="entry.card.buy({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
|
|
|
|
ng-src="{{::$root.imagePath}}/catalog/50x50/{{::buy.image}}"
|
|
|
|
zoom-image="{{::$root.imagePath}}/catalog/1600x900/{{::item.image}}"
|
|
|
|
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>
|
2020-08-27 15:54:43 +00:00
|
|
|
<vn-chip 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>
|
2020-08-27 15:54:43 +00:00
|
|
|
<vn-chip 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-07-20 09:31:47 +00:00
|
|
|
<vn-td number>{{::buy.size}}</vn-td>
|
2020-08-26 14:33:47 +00:00
|
|
|
<vn-td shrink title="{{::buy.type}}">
|
|
|
|
{{::buy.type}}
|
|
|
|
</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.quantity}}</vn-td>
|
|
|
|
<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>
|
|
|
|
<vn-td shrink>{{::buy.isIgnored}}</vn-td>
|
|
|
|
<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-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()"
|
|
|
|
message="Edit buy(s)">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-two
|
|
|
|
ng-model="$ctrl.editedColumn.field"
|
|
|
|
data="$ctrl.columns"
|
|
|
|
show-field="displayName"
|
|
|
|
value-field="field"
|
|
|
|
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
|
|
|
|
vn-id="itemDescriptor">
|
|
|
|
</vn-item-descriptor-popover>
|
|
|
|
<vn-entry-descriptor-popover
|
|
|
|
vn-id="entryDescriptor">
|
|
|
|
</vn-entry-descriptor-popover>
|