salix/modules/supplier/front/consumption/index.html

98 lines
3.6 KiB
HTML
Raw Permalink Normal View History

2020-12-16 07:05:41 +00:00
<vn-crud-model vn-id="model"
url="Suppliers/consumption"
link="{supplierFk: $ctrl.$params.id}"
limit="20"
user-params="::$ctrl.filterParams"
data="entries"
order="itemTypeFk, itemName, itemSize">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar
panel="vn-supplier-consumption-search-panel"
suggested-filter="$ctrl.filterParams"
info="Search by item id or name"
model="model"
auto-state="false">
</vn-searchbar>
</vn-portal>
<vn-data-viewer model="model">
<vn-card class="vn-pa-lg vn-w-lg">
<section class="header">
<vn-tool-bar class="vn-mb-md">
<vn-button disabled="!model.userParams.from || !model.userParams.to"
icon="picture_as_pdf"
ng-click="$ctrl.showReport()"
vn-tooltip="Open as PDF">
</vn-button>
<vn-button disabled="!model.userParams.from || !model.userParams.to"
icon="email"
ng-click="confirm.show()"
vn-tooltip="Send to email">
</vn-button>
</vn-tool-bar>
</section>
2022-11-30 14:24:33 +00:00
<vn-table model="model"
ng-repeat="entry in entries"
2020-12-16 07:05:41 +00:00
ng-if="entry.buys">
<vn-thead>
<vn-tr>
2020-12-18 09:08:51 +00:00
<vn-th field="entryFk" expand>Entry </vn-th>
2021-01-28 14:10:47 +00:00
<vn-td>{{::entry.id}}</vn-td>
2020-12-16 07:05:41 +00:00
<vn-th field="data">Date</vn-th>
<vn-td>{{::entry.shipped | date: 'dd/MM/yyyy'}}</vn-td>
2022-12-13 12:37:25 +00:00
<vn-th field="invoiceNumber">Reference</vn-th>
<vn-td vn-tooltip="{{::entry.invoiceNumber}}">{{::entry.invoiceNumber}}</vn-td>
2020-12-16 07:05:41 +00:00
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="buy in entry.buys">
<vn-td expand>
2023-04-12 12:20:05 +00:00
<span
vn-click-stop="itemDescriptor.show($event, buy.id)"
class="link">
{{::buy.itemName}}
</span>
2020-12-16 07:05:41 +00:00
</vn-td>
<vn-td vn-fetched-tags>
<div>
<vn-one></vn-one>
<vn-one ng-if="::buy.subName">
<h3 title="{{::buy.subName}}">{{::buy.subName}}</h3>
</vn-one>
</div>
2020-12-16 07:05:41 +00:00
<vn-fetched-tags
max-length="6"
2021-01-28 14:10:47 +00:00
item="::buy"
tabindex="-1">
2020-12-16 07:05:41 +00:00
</vn-fetched-tags>
</vn-td>
<vn-td number>{{::buy.quantity | dashIfEmpty}}</vn-td>
<vn-td number>{{::buy.price | dashIfEmpty}}</vn-td>
<vn-td number>{{::buy.total | dashIfEmpty}}</vn-td>
<vn-td></vn-td>
</vn-tr>
2020-12-18 09:08:51 +00:00
</vn-tbody>
<vn-tfoot>
2020-12-16 07:05:41 +00:00
<vn-tr>
<vn-td>
<vn-label-value
label="Total entry"
value="{{$ctrl.getTotal(entry)}}">
</vn-label-value>
</vn-td>
2020-12-18 09:08:51 +00:00
</vn-tr>
</vn-tfoot>
2020-12-16 07:05:41 +00:00
</vn-table>
</vn-card>
</vn-data-viewer>
2022-11-30 14:24:33 +00:00
<vn-confirm
vn-id="confirm"
2020-12-16 07:05:41 +00:00
question="Please, confirm"
message="The consumption report will be sent"
on-accept="$ctrl.sendEmail()">
</vn-confirm>
2023-04-12 12:20:05 +00:00
<vn-item-descriptor-popover
vn-id="item-descriptor"
warehouse-fk="$ctrl.vnConfig.warehouseFk">
</vn-item-descriptor-popover>