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"
|
2021-12-21 08:19:28 +00:00
|
|
|
order="itemFk DESC"
|
2020-07-20 09:31:47 +00:00
|
|
|
limit="20"
|
2021-05-12 10:11:27 +00:00
|
|
|
data="$ctrl.buys"
|
2022-09-08 12:52:43 +00:00
|
|
|
on-data-change="$ctrl.reCheck()"
|
2021-05-12 10:11:27 +00:00
|
|
|
auto-load="true">
|
2020-07-20 09:31:47 +00:00
|
|
|
</vn-crud-model>
|
2023-02-03 14:21:27 +00:00
|
|
|
<vn-portal slot="topbar">
|
2020-07-20 09:31:47 +00:00
|
|
|
</vn-portal>
|
2023-02-03 14:21:27 +00:00
|
|
|
<vn-latest-buys-search-panel
|
|
|
|
model="model">
|
|
|
|
</vn-latest-buys-search-panel>
|
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"
|
2022-09-08 12:52:43 +00:00
|
|
|
options="$ctrl.smartTableOptions"
|
2021-11-10 16:07:16 +00:00
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
|
|
<slot-table>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th shrink>
|
2021-11-11 15:38:41 +00:00
|
|
|
<vn-multi-check
|
2021-11-10 16:07:16 +00:00
|
|
|
model="model"
|
2022-04-20 06:55:43 +00:00
|
|
|
checked="$ctrl.checkAll"
|
|
|
|
check-field="checked"
|
2022-04-13 06:15:47 +00:00
|
|
|
check-dummy-enabled="true"
|
|
|
|
checked-dummy-count="$ctrl.checkedDummyCount">
|
2021-11-10 16:07:16 +00:00
|
|
|
</vn-multi-check>
|
|
|
|
</th>
|
2021-11-15 07:45:21 +00:00
|
|
|
<th translate>Picture</th>
|
2021-12-21 08:19:28 +00:00
|
|
|
<th field="itemFk">
|
|
|
|
<span translate>Item ID</span>
|
2021-11-10 16:07:16 +00:00
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="packing" number>
|
2021-11-10 16:07:16 +00:00
|
|
|
<span translate>Packing</span>
|
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="grouping" number>
|
2021-11-10 16:07:16 +00:00
|
|
|
<span translate>Grouping</span>
|
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="quantity" number>
|
2021-11-10 16:07:16 +00:00
|
|
|
<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>
|
2022-08-24 12:13:26 +00:00
|
|
|
<th field="weightByPiece">
|
2022-09-30 12:55:31 +00:00
|
|
|
<span translate>Weight/Piece</span>
|
2021-11-10 16:07:16 +00:00
|
|
|
</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>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="buyingValue" number>
|
2021-11-10 16:07:16 +00:00
|
|
|
<span translate>Buying value</span>
|
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="freightValue" number>
|
2021-11-10 16:07:16 +00:00
|
|
|
<span translate>Freight value</span>
|
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="comissionValue" number>
|
2021-11-10 16:07:16 +00:00
|
|
|
<span translate>Commission value</span>
|
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="packageValue" number>
|
2021-11-10 16:07:16 +00:00
|
|
|
<span translate>Package value</span>
|
|
|
|
</th>
|
|
|
|
<th field="isIgnored">
|
|
|
|
<span translate>Is ignored</span>
|
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="price2" number>
|
|
|
|
<span translate>Grouping</span>
|
2021-11-10 16:07:16 +00:00
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="price3" number>
|
|
|
|
<span translate>Packing</span>
|
2021-11-10 16:07:16 +00:00
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="minPrice" number>
|
|
|
|
<span translate>Min</span>
|
2021-11-10 16:07:16 +00:00
|
|
|
</th>
|
|
|
|
<th field="ektFk">
|
|
|
|
<span translate>Ekt</span>
|
|
|
|
</th>
|
|
|
|
<th field="weight">
|
|
|
|
<span translate>Weight</span>
|
|
|
|
</th>
|
|
|
|
<th field="packageFk">
|
2021-11-11 16:18:44 +00:00
|
|
|
<span translate>Package</span>
|
2021-11-10 16:07:16 +00:00
|
|
|
</th>
|
|
|
|
<th field="packingOut">
|
2021-11-11 16:18:44 +00:00
|
|
|
<span translate>Package out</span>
|
2021-11-10 16:07:16 +00:00
|
|
|
</th>
|
2021-11-23 08:00:46 +00:00
|
|
|
<th field="landing">
|
|
|
|
<span translate>Landing</span>
|
|
|
|
</th>
|
2021-11-10 16:07:16 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="buy in $ctrl.buys"
|
|
|
|
vn-anchor="::{
|
2022-09-08 12:52:43 +00:00
|
|
|
state: 'entry.card.buy.index',
|
2021-11-10 16:07:16 +00:00
|
|
|
params: {id: {{::buy.entryFk}}}
|
|
|
|
}">
|
|
|
|
<td>
|
2022-09-08 12:52:43 +00:00
|
|
|
<vn-check
|
2022-04-20 06:55:43 +00:00
|
|
|
ng-model="buy.checked"
|
2022-09-08 12:52:43 +00:00
|
|
|
on-change="$ctrl.saveChecked(buy.id)"
|
2021-11-10 16:07:16 +00:00
|
|
|
vn-click-stop>
|
|
|
|
</vn-check>
|
|
|
|
</td>
|
|
|
|
<td >
|
2022-09-08 12:52:43 +00:00
|
|
|
<img
|
2021-11-10 16:07:16 +00:00
|
|
|
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">
|
2021-11-12 13:15:35 +00:00
|
|
|
{{::buy.itemFk}}
|
2021-11-10 16:07:16 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
2021-11-11 16:18:44 +00:00
|
|
|
<td number>
|
2022-09-08 12:52:43 +00:00
|
|
|
<vn-chip class="transparent" translate-attr="buy.groupingMode == 2 ? {title: 'Minimun amount'} : {title: 'Packing'}" ng-class="{'message': buy.groupingMode == 2}">
|
2022-05-17 11:50:06 +00:00
|
|
|
<span>{{::buy.packing | dashIfEmpty}}</span>
|
2021-11-10 16:07:16 +00:00
|
|
|
</vn-chip>
|
|
|
|
</td>
|
2021-11-11 16:18:44 +00:00
|
|
|
<td number>
|
2022-09-08 12:52:43 +00:00
|
|
|
<vn-chip class="transparent" translate-attr="buy.groupingMode == 1 ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': buy.groupingMode == 1}">
|
2022-05-17 11:50:06 +00:00
|
|
|
<span>{{::buy.grouping | dashIfEmpty}}</span>
|
2021-11-10 16:07:16 +00:00
|
|
|
</vn-chip>
|
|
|
|
</td>
|
2021-11-11 16:18:44 +00:00
|
|
|
<td number>{{::buy.quantity}}</td>
|
2021-11-10 16:07:16 +00:00
|
|
|
<td vn-two title="{{::buy.description}}">
|
|
|
|
{{::buy.description | dashIfEmpty}}
|
|
|
|
</td>
|
2021-11-11 16:18:44 +00:00
|
|
|
<td number>{{::buy.size}}</td>
|
2021-11-10 16:07:16 +00:00
|
|
|
<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>
|
2022-08-24 12:13:26 +00:00
|
|
|
<td>{{::buy.weightByPiece}}</td>
|
2021-11-10 16:07:16 +00:00
|
|
|
<td>
|
|
|
|
<vn-check
|
|
|
|
disabled="true"
|
|
|
|
ng-model="::buy.isActive">
|
2022-09-08 12:52:43 +00:00
|
|
|
</vn-check>
|
2021-11-10 16:07:16 +00:00
|
|
|
</td>
|
|
|
|
<td>{{::buy.family}}</td>
|
|
|
|
<td>
|
|
|
|
<span
|
|
|
|
vn-click-stop="entryDescriptor.show($event, buy.entryFk)"
|
|
|
|
class="link">
|
|
|
|
{{::buy.entryFk}}
|
|
|
|
</span>
|
|
|
|
</td>
|
2023-04-19 07:02:04 +00:00
|
|
|
<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>
|
2021-11-10 16:07:16 +00:00
|
|
|
<td>
|
|
|
|
<vn-check
|
|
|
|
disabled="true"
|
|
|
|
ng-model="::buy.isIgnored">
|
2022-09-08 12:52:43 +00:00
|
|
|
</vn-check>
|
2021-11-10 16:07:16 +00:00
|
|
|
</td>
|
2023-04-19 07:02:04 +00:00
|
|
|
<td number>{{::buy.price2 | currency: 'EUR':3}}</td>
|
|
|
|
<td number>{{::buy.price3 | currency: 'EUR':3}}</td>
|
|
|
|
<td number>{{::buy.minPrice | currency: 'EUR':3}}</td>
|
2021-11-10 16:07:16 +00:00
|
|
|
<td>{{::buy.ektFk | dashIfEmpty}}</td>
|
|
|
|
<td>{{::buy.weight}}</td>
|
|
|
|
<td>{{::buy.packageFk}}</td>
|
|
|
|
<td>{{::buy.packingOut}}</td>
|
2021-11-23 08:00:46 +00:00
|
|
|
<td>{{::buy.landing | date: 'dd/MM/yyyy'}}</td>
|
2021-11-10 16:07:16 +00:00
|
|
|
</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>
|
2022-09-08 12:52:43 +00:00
|
|
|
<vn-dialog class="edit"
|
2020-08-26 14:33:47 +00:00
|
|
|
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'}"/>
|
2023-02-01 07:43:13 +00:00
|
|
|
<button response="accept" translate>Save</button>
|
2020-08-26 14:33:47 +00:00
|
|
|
</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>
|