salix/client/item/src/diary/index.html

76 lines
3.3 KiB
HTML
Raw Normal View History

<vn-crud-model
vn-id="model"
url="item/api/Items/getDiary"
filter="$ctrl.filter"
2018-09-06 13:08:02 +00:00
data="sales">
</vn-crud-model>
<vn-vertical>
<vn-card pad-large>
<vn-vertical>
<vn-title>Item diary</vn-title>
<vn-horizontal>
<vn-autocomplete
vn-focus
url="/item/api/Warehouses"
show-field="name"
value-field="id"
2018-09-06 13:08:02 +00:00
initial-data="$ctrl.warehouseFk"
field="$ctrl.warehouseFk"
label="Select warehouse"
on-change="$ctrl.onChange(value)">
</vn-autocomplete>
</vn-horizontal>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th>Date</vn-th>
<vn-th number>Id</vn-th>
<vn-th>State</vn-th>
<vn-th>Reference</vn-th>
2018-09-04 09:49:00 +00:00
<vn-th>Client</vn-th>
<vn-th number>In</vn-th>
<vn-th number>Out</vn-th>
<vn-th number>Balance</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
2018-09-11 11:48:05 +00:00
<vn-tr ng-class="::{'warning': $ctrl.isToday(sale.date)}"
ng-repeat="sale in sales" vn-repeat-last on-last="$ctrl.scrollToActive()">
<vn-td>{{::sale.date | date:'dd/MM/yyyy HH:mm' }}</vn-td>
<vn-td number>
2018-09-11 11:48:05 +00:00
<span ng-class="::{'link pointer': sale.isTicket}"
ng-click="$ctrl.showDescriptor($event, sale)">
{{::sale.origin | dashIfEmpty}}
</span>
</vn-td>
<vn-td>{{::sale.stateName | dashIfEmpty}}</vn-td>
<vn-td>{{::sale.reference | dashIfEmpty}}</vn-td>
<vn-td>
2018-09-11 11:48:05 +00:00
<span ng-class="::{'link pointer': sale.isTicket}"
ng-click="$ctrl.showClientDescriptor($event, sale)">
2018-09-11 11:48:05 +00:00
{{::sale.name | dashIfEmpty}}
</span>
</vn-td>
<vn-td number>{{::sale.in | dashIfEmpty}}</vn-td>
<vn-td number>{{::sale.out | dashIfEmpty}}</vn-td>
<vn-td number>
<span class="balance">
{{::sale.balance | dashIfEmpty}}
</span>
</vn-td>
</vn-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table>
</vn-vertical>
</vn-card>
</vn-vertical>
2018-09-04 09:49:00 +00:00
<vn-ticket-descriptor-popover
vn-id="descriptor">
</vn-ticket-descriptor-popover>
<vn-client-descriptor-popover
vn-id="clientDescriptor">
</vn-client-descriptor-popover>