2018-07-04 06:50:34 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2020-05-06 16:42:50 +00:00
|
|
|
url="Items/getBalance"
|
2018-09-18 11:34:11 +00:00
|
|
|
filter="$ctrl.filter"
|
2019-02-10 21:52:35 +00:00
|
|
|
data="sales"
|
|
|
|
auto-load="false">
|
2018-07-04 06:50:34 +00:00
|
|
|
</vn-crud-model>
|
2020-09-17 18:12:52 +00:00
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="Warehouses"
|
2020-09-21 08:57:59 +00:00
|
|
|
data="warehouses"
|
2020-09-17 18:12:52 +00:00
|
|
|
order="name"
|
|
|
|
vn-id="warehouse-model">
|
|
|
|
</vn-crud-model>
|
2018-06-04 07:48:32 +00:00
|
|
|
<vn-vertical>
|
2019-12-17 11:23:31 +00:00
|
|
|
<vn-card class="vn-pa-lg vn-w-lg">
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-vertical>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-focus
|
2020-09-21 08:57:59 +00:00
|
|
|
data="warehouses"
|
2019-02-10 21:52:35 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
initial-data="$ctrl.warehouseFk"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.warehouseFk"
|
2019-02-10 21:52:35 +00:00
|
|
|
label="Select warehouse">
|
|
|
|
</vn-autocomplete>
|
2023-05-18 09:42:22 +00:00
|
|
|
<vn-check
|
|
|
|
ng-class="{'table-check':$ctrl.showOld}"
|
2023-05-24 11:40:26 +00:00
|
|
|
label="Show what's before the inventory"
|
2023-05-18 09:42:22 +00:00
|
|
|
ng-model="$ctrl.showOld">
|
|
|
|
</vn-check>
|
|
|
|
<vn-date-picker
|
|
|
|
label="Since"
|
|
|
|
ng-model="$ctrl.date"
|
|
|
|
ng-show="$ctrl.showOld">
|
|
|
|
</vn-date-picker>
|
2019-02-10 21:52:35 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
2021-10-13 10:33:48 +00:00
|
|
|
<vn-th shrink></vn-th>
|
2019-04-01 06:42:19 +00:00
|
|
|
<vn-th expand>Date</vn-th>
|
2020-11-11 15:58:56 +00:00
|
|
|
<vn-th number order="DESC" shrink>Id</vn-th>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-th>State</vn-th>
|
|
|
|
<vn-th>Reference</vn-th>
|
2020-11-11 15:58:56 +00:00
|
|
|
<vn-th expand>Client</vn-th>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-th number>In</vn-th>
|
|
|
|
<vn-th number>Out</vn-th>
|
|
|
|
<vn-th number>Balance</vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
|
|
|
<vn-tr
|
|
|
|
ng-class="::{
|
2021-07-02 11:17:48 +00:00
|
|
|
'isIn': sale.invalue,
|
2023-05-18 09:42:22 +00:00
|
|
|
'balanceNegative': sale.balance < 0}"
|
2019-02-10 21:52:35 +00:00
|
|
|
ng-repeat="sale in sales"
|
|
|
|
vn-repeat-last
|
2020-05-06 16:42:50 +00:00
|
|
|
on-last="$ctrl.scrollToLine(sale.lastPreparedLineFk)"
|
|
|
|
ng-attr-id="vnItemDiary-{{::sale.lineFk}}">
|
2021-10-13 10:33:48 +00:00
|
|
|
<vn-td shrink>
|
2021-11-12 08:28:19 +00:00
|
|
|
<a ui-sref="claim.card.summary({id: sale.claimFk})">
|
2021-10-13 10:33:48 +00:00
|
|
|
<vn-icon icon="icon-claims"
|
2021-10-13 12:03:06 +00:00
|
|
|
ng-show="sale.claimFk"
|
|
|
|
vn-tooltip="{{::$ctrl.$t('Claim')}}: {{::sale.claimFk}}">
|
2021-10-13 10:33:48 +00:00
|
|
|
</vn-icon>
|
|
|
|
</a>
|
|
|
|
</vn-td>
|
2019-04-01 06:42:19 +00:00
|
|
|
<vn-td expand>
|
2023-05-18 09:42:22 +00:00
|
|
|
<span class="chip"
|
2020-05-06 16:42:50 +00:00
|
|
|
ng-class="::{warning: $ctrl.today == sale.shipped}">
|
|
|
|
{{::sale.shipped | date:'dd/MM/yyyy' }}
|
2019-02-10 21:52:35 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
2020-11-11 15:58:56 +00:00
|
|
|
<vn-td number shrink>
|
2020-10-27 11:02:49 +00:00
|
|
|
<span class="link"
|
|
|
|
ng-click="$ctrl.showDescriptor($event, sale)"
|
2019-09-10 06:47:46 +00:00
|
|
|
name="origin">
|
2019-02-10 21:52:35 +00:00
|
|
|
{{::sale.origin | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td>{{::sale.stateName | dashIfEmpty}}</vn-td>
|
|
|
|
<vn-td>{{::sale.reference | dashIfEmpty}}</vn-td>
|
2020-11-11 15:58:56 +00:00
|
|
|
<vn-td class="truncate" expand>
|
2021-02-09 09:43:19 +00:00
|
|
|
<span ng-class="::{'warning chip': sale.highlighted}">
|
|
|
|
<span ng-if="::!sale.isTicket">
|
|
|
|
{{::sale.name | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
ng-if="::sale.isTicket"
|
|
|
|
vn-click-stop="clientDescriptor.show($event, sale.clientFk)"
|
|
|
|
class="link">
|
|
|
|
{{::sale.name | dashIfEmpty}}
|
|
|
|
</span>
|
2019-02-10 21:52:35 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
2021-07-02 11:17:48 +00:00
|
|
|
<vn-td number class="in">{{::sale.invalue | dashIfEmpty}}</vn-td>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-td number>{{::sale.out | dashIfEmpty}}</vn-td>
|
|
|
|
<vn-td number class="balance">
|
2020-05-06 16:42:50 +00:00
|
|
|
<span class="chip balanceSpan"
|
|
|
|
ng-class="::{message: sale.lineFk == sale.lastPreparedLineFk}">
|
2019-02-10 21:52:35 +00:00
|
|
|
{{::sale.balance | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</vn-vertical>
|
2018-06-04 07:48:32 +00:00
|
|
|
</vn-card>
|
|
|
|
</vn-vertical>
|
2023-05-18 09:42:22 +00:00
|
|
|
<vn-ticket-descriptor-popover
|
2020-06-03 08:37:17 +00:00
|
|
|
vn-id="ticket-descriptor">
|
2018-09-04 09:49:00 +00:00
|
|
|
</vn-ticket-descriptor-popover>
|
2023-05-18 09:42:22 +00:00
|
|
|
<vn-client-descriptor-popover
|
2018-09-04 09:49:00 +00:00
|
|
|
vn-id="clientDescriptor">
|
2019-09-05 11:06:40 +00:00
|
|
|
</vn-client-descriptor-popover>
|
2023-05-18 09:42:22 +00:00
|
|
|
<vn-entry-descriptor-popover
|
2020-10-27 11:02:49 +00:00
|
|
|
vn-id="entryDescriptor">
|
|
|
|
</vn-entry-descriptor-popover>
|
|
|
|
|