2018-07-04 06:50:34 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="item/api/Items/getDiary"
|
2018-09-18 11:34:11 +00:00
|
|
|
filter="$ctrl.filter"
|
2018-11-27 14:02:54 +00:00
|
|
|
data="sales" auto-load="false">
|
2018-07-04 06:50:34 +00:00
|
|
|
</vn-crud-model>
|
2018-06-04 07:48:32 +00:00
|
|
|
<vn-vertical>
|
2018-12-14 11:56:21 +00:00
|
|
|
<vn-card pad-large compact>
|
2018-06-04 07:48:32 +00:00
|
|
|
<vn-vertical>
|
|
|
|
<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"
|
2018-10-05 13:53:31 +00:00
|
|
|
label="Select warehouse">
|
2018-06-04 07:48:32 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2018-07-04 06:50:34 +00:00
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th>Date</vn-th>
|
2018-10-05 13:53:31 +00:00
|
|
|
<vn-th number order="DESC">Id</vn-th>
|
2018-07-09 07:37:38 +00:00
|
|
|
<vn-th>State</vn-th>
|
|
|
|
<vn-th>Reference</vn-th>
|
2018-09-04 09:49:00 +00:00
|
|
|
<vn-th>Client</vn-th>
|
2018-07-04 06:50:34 +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>
|
2018-10-23 12:29:34 +00:00
|
|
|
<vn-tr ng-class="::{'isToday': $ctrl.isToday(sale.date), 'isIn': sale.in, 'balanceNegative': sale.balance < 0}"
|
2018-10-05 13:53:31 +00:00
|
|
|
ng-repeat="sale in sales" vn-repeat-last on-last="$ctrl.scrollToLine()">
|
2018-10-23 12:29:34 +00:00
|
|
|
<vn-td class="date">
|
|
|
|
{{::sale.date | date:'dd/MM/yyyy' }}
|
|
|
|
</vn-td>
|
2018-09-06 06:04:43 +00:00
|
|
|
<vn-td number>
|
2018-09-11 11:48:05 +00:00
|
|
|
<span ng-class="::{'link pointer': sale.isTicket}"
|
2018-11-14 10:17:33 +00:00
|
|
|
ng-click="$ctrl.showDescriptor($event, sale)"
|
|
|
|
class="id">
|
2018-09-06 06:04:43 +00:00
|
|
|
{{::sale.origin | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2018-07-09 07:37:38 +00:00
|
|
|
<vn-td>{{::sale.stateName | dashIfEmpty}}</vn-td>
|
|
|
|
<vn-td>{{::sale.reference | dashIfEmpty}}</vn-td>
|
2018-10-05 13:53:31 +00:00
|
|
|
<vn-td class="truncate">
|
|
|
|
<span
|
|
|
|
ng-class="::{'link pointer': sale.isTicket}"
|
2018-09-06 06:04:43 +00:00
|
|
|
ng-click="$ctrl.showClientDescriptor($event, sale)">
|
2018-09-11 11:48:05 +00:00
|
|
|
{{::sale.name | dashIfEmpty}}
|
2018-09-06 06:04:43 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
2018-10-05 13:53:31 +00:00
|
|
|
<vn-td number class="in">{{::sale.in | dashIfEmpty}}</vn-td>
|
2018-07-04 06:50:34 +00:00
|
|
|
<vn-td number>{{::sale.out | dashIfEmpty}}</vn-td>
|
2018-10-05 13:53:31 +00:00
|
|
|
<vn-td number class="balance">
|
|
|
|
<span class="balanceSpan">
|
2018-09-06 06:04:43 +00:00
|
|
|
{{::sale.balance | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2018-07-04 06:50:34 +00:00
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
<vn-empty-rows ng-if="model.data.length === 0" translate>
|
|
|
|
No results
|
|
|
|
</vn-empty-rows>
|
|
|
|
</vn-table>
|
2018-06-04 07:48:32 +00:00
|
|
|
</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>
|