feature/issue-1/view-store-detail
Frédérik Benoist 2023-11-21 22:50:43 +01:00
parent a1cb0cb4a2
commit 9e0aac7ad3
4 changed files with 63 additions and 8955 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -518,7 +518,7 @@ Contact: frederik.benoist@inetum.com
<th>TYPE</th>
<th>DATES</th>
<th>PRICE</th>
<th data-priority="2">EXTERNAL_ID</th>
<th>EXTERNAL_ID</th>
<th>CREATE</th>
<th>UPDATE</th>
</tr>
@ -529,6 +529,36 @@ Contact: frederik.benoist@inetum.com
<!--end::Card body-->
</div>
<!--end::Table ITEM_PRICES-->
<!--begin::Table ITEM_STOCK-->
<div class="card card-flush py-4">
<!--begin::Card header-->
<div class="card-header">
<div class="card-title">
<h2>Table INV_STOCK_LEDGER_ACC</h2>
</div>
</div>
<!--end::Card header-->
<!--begin::Card body-->
<div class="card-body py-4">
<!--begin::Table-->
<table class="table table-striped border rounded gy-5 gs-7" id="kt_table_item_stock">
<thead>
<tr class="text-start text-muted fw-bold fs-7 text-uppercase gs-0">
<th>ITEM_ID</th>
<th>LOCATION</th>
<th>BUCKET</th>
<th>ITEM_ID</th>
<th>STOCK</th>
<th>CREATE</th>
<th>UPDATE</th>
</tr>
</thead>
</table>
<!--end::Table-->
</div>
<!--end::Card body-->
</div>
<!--end::Table ITEM_STOCK-->
</div>
</div>
<!--end::Tab pane-->

View File

@ -11,6 +11,8 @@ var KTStoreView = function () {
var tableItemOptions = document.getElementById('kt_table_item_options');
var datatableItemPrices;
var tableItemPrices = document.getElementById('kt_table_item_prices');
var datatableItemStock;
var tableItemStock = document.getElementById('kt_table_item_stock');
// Init store view page
var initStoreView = () => {
@ -181,7 +183,6 @@ var KTStoreView = function () {
'order': [],
"pageLength": 10,
"lengthChange": false,
responsive: true,
columns: [
{ data: 'itemId', name: "ITEM_ID" },
{ data: null,
@ -210,6 +211,36 @@ var KTStoreView = function () {
],
"data": data.itemPrices
});
if ( $.fn.dataTable.isDataTable('#kt_table_item_stock') ) {
$('#kt_table_item_stock').DataTable().destroy();
}
datatableItemStock = $(tableItemStock).DataTable({
"info": true,
"bStateSave": true, // cookie
'order': [],
"pageLength": 10,
"lengthChange": false,
columns: [
{ data: 'itemId', name: "ITEM_ID" },
{ data: 'invLocationId', name: "LOCATION" },
{ data: 'bucketId', name: "BUCKET" },
{ data: 'itemId', name: "ITEM_ID" },
{ data: 'unitCount', name: "STOCK" },
{ data: null, // Using null to create a custom column
render: function(data, type, full, meta) {
return full.createDate + '<br>' + full.createUserId;
}
},
{ data: null, // Using null to create a custom column
render: function(data, type, full, meta) {
return full.updateDate + '<br>' + full.updateUserId;
}
}
],
"data": data.itemStock
});
// Enable submit button after loading
submitButton.removeAttribute('data-kt-indicator');