Commit old changes

This commit is contained in:
2024-09-30 08:44:00 +00:00
parent 01c92080cd
commit 6a37a77895
20 changed files with 581 additions and 956 deletions

View File

@@ -44,7 +44,7 @@ $(document).ready(function () {
match: true
});
},
13: function ($cell, indx) {
12: function ($cell, indx) {
return $.tablesorter.filterFormatter.select2($cell, indx, {
match: true
});
@@ -52,7 +52,7 @@ $(document).ready(function () {
},
},
headers: {
17: { sorter: 'production_date' },
16: { sorter: 'production_date'},
},
});
$("#allTable").bind('filterEnd', function (event, config) {

View File

@@ -37,7 +37,7 @@ if (!isset($_GET['ajaxAction'])) {
ON si.ecmproduct_id = p.id
LEFT JOIN ecmstockstates AS ss
ON ss.product_id = si.ecmproduct_id AND ss.stock_id = 'c7afd71a-4c3a-bde4-138d-4acaee1644e4'
WHERE s.delivery_date > '$dateFrom' AND s.status IN ('s10', 's20', 's30')";
WHERE s.delivery_date > '$dateFrom'";
if (is_array($_GET['exclude']) && count($_GET['exclude']) > 0) {
foreach ($_GET['exclude'] as $name) {
if (strlen($name) > 0) {
@@ -88,6 +88,7 @@ if (!isset($_GET['ajaxAction'])) {
$row['orderNo'] = $r['document_no'];
$row['orderId'] = $r['id'];
$row['orderStatus'] = $app_list_strings['ecmsales_status_dom'][$r['status']];
$row['orderType'] = $app_list_strings['ecmsales_type_dom'][$r['type']];
$row['orderParent'] = $r['parent_name'];
$row['orderParentId'] = $r['parent_id'];
$row['orderRegisterDate'] = $r['register_date'];

View File

@@ -1,14 +1,14 @@
<script type="text/javascript" src="modules/EcmReports/javascript/jquery.js"></script>
<link rel="stylesheet" href="modules/EcmReports/BimIT-Reports/lib/tablesorter-2.31.3/dist/css/theme.blue.min.css">
<script type="text/javascript"
src="modules/EcmReports/BimIT-Reports/lib/tablesorter-2.31.3/dist/js/jquery.tablesorter.js"></script>
src="modules/EcmReports/BimIT-Reports/lib/tablesorter-2.31.3/dist/js/jquery.tablesorter.js"></script>
<script type="text/javascript"
src="modules/EcmReports/BimIT-Reports/lib/tablesorter-2.31.3/dist/js/jquery.tablesorter.widgets.js">
src="modules/EcmReports/BimIT-Reports/lib/tablesorter-2.31.3/dist/js/jquery.tablesorter.widgets.js">
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.4.6/select2.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/3.4.6/select2.min.js"></script>
<script type="text/javascript"
src="modules/EcmReports/BimIT-Reports/lib/tablesorter-2.31.3/dist/js/widgets/widget-filter-formatter-select2.min.js">
src="modules/EcmReports/BimIT-Reports/lib/tablesorter-2.31.3/dist/js/widgets/widget-filter-formatter-select2.min.js">
</script>
<script type="text/javascript" src="modules/EcmReports/javascript/jquery.blockUI.js"></script>
<script type="text/javascript" src="modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.js"></script>
@@ -16,58 +16,58 @@
<!-- HEADER -->
<table id="tableMenu" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<img src="themes/Sugar5/images/CaseReports.gif" style="margin-top: 3px; margin-right: 3px;" width="16"
height="16">
</td>
<td>
<h2>Produkcja</h2>
</td>
</tr>
<tr>
<td>
<img src="themes/Sugar5/images/CaseReports.gif" style="margin-top: 3px; margin-right: 3px;" width="16"
height="16">
</td>
<td>
<h2>Produkcja</h2>
</td>
</tr>
</table>
<!-- SEARCH -->
<form action="index.php" method="get" name="searchProductBySales">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="index" />
<input type="hidden" name="reportName" value="productsBySales" />
<input type="hidden" name="hideReadyProducts" id="hideReadyProducts" value="{$hideReadyProducts}" />
<input type="hidden" name="module" value="EcmReports"/>
<input type="hidden" name="action" value="index"/>
<input type="hidden" name="reportName" value="productsBySales"/>
<input type="hidden" name="hideReadyProducts" id="hideReadyProducts" value="{$hideReadyProducts}"/>
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0"
cellspacing="0">
cellspacing="0">
<tr>
<td class="dataLabel" width="5%" nowrap="nowrap">
Data wysyłki: od
&nbsp;
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title=""
value="{$dateFrom}" autocomplete="off">
value="{$dateFrom}" autocomplete="off">
<img id="date_from_trigger" src="themes/default/images/jscalendar.gif">
<script language="JavaScript" type="text/javascript">
Calendar.setup ({ldelim}
inputField: "date_from",
Calendar.setup({ldelim}
inputField: "date_from",
daFormat: "%d.%m.%Y",
button: "date_from_trigger",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
{rdelim}
);
</script>
&nbsp;
do
&nbsp;
<input autocomplete="off" name="date_to" id="date_to" value="{$dateTo}" title="" tabindex="" size="11"
maxlength="10" type="text">
maxlength="10" type="text">
<img src="themes/default/images/jscalendar.gif" alt="Enter Date" id="date_to_trigger">
<script language="JavaScript" type="text/javascript">
Calendar.setup ({ldelim}
inputField: "date_to",
Calendar.setup({ldelim}
inputField: "date_to",
daFormat: "%d.%m.%Y",
button: "date_to_trigger",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
{rdelim}
);
</script>
&nbsp;&nbsp;
@@ -75,7 +75,8 @@
<select name="exclude[]" size="3" style="width: 150px" multiple="true">
<option></option>
<option value="Media Markt" {if @in_array('Media Markt', $exclude)}selected="selected" {/if}>Media
Markt</option>
Markt
</option>
<option value="TwinPol" {if @in_array('TwinPol', $exclude)}selected="selected" {/if}>TwinPol
</option>
<option value="Euro-net" {if @in_array('Euro-net', $exclude)}selected="selected" {/if}>Euro-net
@@ -105,8 +106,10 @@
<li class="active" id="1_menu">
<script language="javascript">
{literal}
var set1 = function() { SetTab('1'); };
SelectedTab = '1';
var set1 = function () {
SetTab('1');
};
SelectedTab = '1';
{/literal}
</script>
<a class="current" href="javascript:set1();">Produkty</a>
@@ -114,7 +117,9 @@
<li class="" id="2_menu">
<script language="javascript">
{literal}
var set2 = function() { SetTab('2'); };
var set2 = function () {
SetTab('2');
};
{/literal}
</script>
<a class="" href="javascript:set2();">Komponenty</a>
@@ -122,7 +127,9 @@
<li class="" id="3_menu">
<script language="javascript">
{literal}
var set3 = function() { SetTab('3'); };
var set3 = function () {
SetTab('3');
};
{/literal}
</script>
<a class="" href="javascript:set3();">Surowce</a>
@@ -132,161 +139,158 @@
<!-- TABS -->
<div id="1">
<br>
<input class="button" name="submit" value="Utwórz zamówienie wewnętrzne" type="button" id="createInsideOrder" />
<input class="button" name="submit" value="Utwórz zamówienie wewnętrzne" type="button" id="createInsideOrder"/>
<br>
<form action="index.php?module=EcmInsideOrders&action=EditView&fromProductsBySalesReport=true" method="post"
target="_blank" id="createInsideOrderForm">
<input id="insideOrderProducts" name="insideOrderProducts" type="hidden" value="" />
target="_blank" id="createInsideOrderForm">
<input id="insideOrderProducts" name="insideOrderProducts" type="hidden" value=""/>
</form>
<table id="allTable">
<thead>
<tr>
<th class="filter-false"><input type="checkbox" id="selectAll" /></th>
<th>Pozycja</th>
<th>Indeks</th>
<th>Nazwa</th>
<th>Ilość</th>
<th>Stan</th>
<th>ZS E5</th>
<th>Status</th>
<th>Zamawiający</th>
<th>Odbiorca</th>
<th>Rodzaj</th>
<th>Rozmiar</th>
<th>Forma</th>
<th>Marka</th>
<th>Data rejestracji</th>
<th>Data wysyłki</th>
<th>Data dostawy</th>
<th>Data produkcji</th>
<th>Uwagi</th>
</tr>
<tr>
<th class="filter-false"><input type="checkbox" id="selectAll"/></th>
<th>Pozycja</th>
<th>Indeks</th>
<th>Nazwa</th>
<th>Ilość</th>
<th>Stan</th>
<th>ZS E5</th>
<th>Typ</th>
<th>Status</th>
<th>Zamawiający</th>
<th>Odbiorca</th>
<th>Forma</th>
<th>Marka</th>
<th>Data rejestracji</th>
<th>Data wysyłki</th>
<th>Data dostawy</th>
<th>Data produkcji</th>
<th>Uwagi</th>
</tr>
</thead>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$allData item=ROW name=loop}
{foreach from=$allData item=ROW name=loop}
{if $smarty.foreach.loop.index % 2 == 1}
<tr>
{if $smarty.foreach.loop.index % 2 == 1}
<tr>
{else}
<tr style="background-color: #e6e6e6;" role="row">
{/if}
<td>
<input type="checkbox" value="{$ROW.orderItemId}" class="allCheck" />
<input type="hidden" id="productId-{$ROW.orderItemId}" value="{$ROW.productId}" />
</td>
<td>
{$ROW.position}
</td>
<td>
<a title="{$ROW.productFullCode}" target="_blank" href="index.php?module=EcmProducts&action=DetailView&record={$ROW.productId}">
{$ROW.productCode}
</a>
</td>
<td title="{$ROW.productFullName}">
{$ROW.productName}
</td>
<td id="productQty-{$ROW.orderItemId}">
{$ROW.productQty}
</td>
<td>
{$ROW.productStockState}
</td>
<td>
<a target="_blank" href="index.php?module=EcmSales&action=DetailView&record={$ROW.orderId}">
{$ROW.orderNo}
</a>
</td>
<td>
{$ROW.orderStatus}
</td>
<td>
<a target="_blank" href="index.php?module=Accounts&action=DetailView&record={$ROW.orderParentId}">
{$ROW.orderParent}
</a>
</td>
<td>
{$ROW.shippingTo}
</td>
<td>
{$ROW.productKind}
</td>
<td>
{$ROW.productSize}
</td>
<td>
{$ROW.productShape}
</td>
<td>
{$ROW.productBrand}
</td>
<td>
{$ROW.orderRegisterDate}
</td>
<td>
{$ROW.orderSendDate}
</td>
<td>
{$ROW.orderDeliveryDate}
</td>
<td>
<input id="production-date-{$ROW.orderItemId}" name="production-date-{$ROW.orderItemId}" type="text"
maxlength="10" size="11" tabindex="" title="" value="{$ROW.productionDate}" autocomplete="off"
id="production-date-{$ROW.orderItemId}" onchange="saveProductionDate('{$ROW.orderItemId}')">
<img id="production-date-trigger-{$ROW.orderItemId}" src="themes/default/images/jscalendar.gif"
style="width: 13px;">
<script language="JavaScript" type="text/javascript">
Calendar.setup ({ldelim}
inputField: "production-date-{$ROW.orderItemId}",
daFormat: "%Y-%m-%d",
button: "production-date-trigger-{$ROW.orderItemId}",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
);
</script>
</td>
<td title="{$ROW.fullDescription}">
<div id="edit-{$ROW.orderItemId}" class="ui-icon ui-icon-pencil"
onclick="editComment('{$ROW.orderItemId}')" style="display: inline-block;"></div>
<div id="save-{$ROW.orderItemId}" class="ui-icon ui-icon-check"
onclick="saveComment('{$ROW.orderItemId}')" style="display: none;"></div>
<div id="description-{$ROW.orderItemId}" style="display: inline; width: 300px;">{$ROW.description}
</div>
<input id="descriptionInput-{$ROW.orderItemId}" type="text" value="{$ROW.fullDescription}"
style="width: 300px; display: none;" />
</td>
</tr>
{/foreach}
<tr style="background-color: #e6e6e6;" role="row">
{/if}
<td>
<input type="checkbox" value="{$ROW.orderItemId}" class="allCheck"/>
<input type="hidden" id="productId-{$ROW.orderItemId}" value="{$ROW.productId}"/>
</td>
<td>
{$ROW.position}
</td>
<td>
<a title="{$ROW.productFullCode}" target="_blank"
href="index.php?module=EcmProducts&action=DetailView&record={$ROW.productId}">
{$ROW.productCode}
</a>
</td>
<td title="{$ROW.productFullName}">
{$ROW.productName}
</td>
<td id="productQty-{$ROW.orderItemId}">
{$ROW.productQty}
</td>
<td>
{$ROW.productStockState}
</td>
<td>
<a target="_blank" href="index.php?module=EcmSales&action=DetailView&record={$ROW.orderId}">
{$ROW.orderNo}
</a>
</td>
<td>
{$ROW.orderType}
</td>
<td>
{$ROW.orderStatus}
</td>
<td>
<a target="_blank" href="index.php?module=Accounts&action=DetailView&record={$ROW.orderParentId}">
{$ROW.orderParent}
</a>
</td>
<td>
{$ROW.shippingTo}
</td>
<td>
{$ROW.productShape}
</td>
<td>
{$ROW.productBrand}
</td>
<td>
{$ROW.orderRegisterDate}
</td>
<td>
{$ROW.orderSendDate}
</td>
<td>
{$ROW.orderDeliveryDate}
</td>
<td>
<input id="production-date-{$ROW.orderItemId}" name="production-date-{$ROW.orderItemId}" type="text"
maxlength="10" size="11" tabindex="" title="" value="{$ROW.productionDate}" autocomplete="off"
id="production-date-{$ROW.orderItemId}" onchange="saveProductionDate('{$ROW.orderItemId}')">
<img id="production-date-trigger-{$ROW.orderItemId}" src="themes/default/images/jscalendar.gif"
style="width: 13px;">
<script language="JavaScript" type="text/javascript">
Calendar.setup({ldelim}
inputField: "production-date-{$ROW.orderItemId}",
daFormat: "%Y-%m-%d",
button: "production-date-trigger-{$ROW.orderItemId}",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
);
</script>
</td>
<td title="{$ROW.fullDescription}">
<div id="edit-{$ROW.orderItemId}" class="ui-icon ui-icon-pencil"
onclick="editComment('{$ROW.orderItemId}')" style="display: inline-block;"></div>
<div id="save-{$ROW.orderItemId}" class="ui-icon ui-icon-check"
onclick="saveComment('{$ROW.orderItemId}')" style="display: none;"></div>
<div id="description-{$ROW.orderItemId}" style="display: inline; width: 300px;">{$ROW.description}
</div>
<input id="descriptionInput-{$ROW.orderItemId}" type="text" value="{$ROW.fullDescription}"
style="width: 300px; display: none;"/>
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td colspan=4></td>
<td id="allTableSum">0</td>
<td colspan="13"></td>
</tr>
<tr>
<td colspan=4></td>
<td id="allTableSum">0</td>
<td colspan="13"></td>
</tr>
</tfoot>
</table>
</div>
<div id="2" style="display: none">
<br>
<input class="button" name="submit" value="Zamówienie - komponenty" type="button" id="orderComponents" />
<input class="button" name="submit" value="Zamówienie - komponenty" type="button" id="orderComponents"/>
<br>
<form action="index.php?module=EcmPurchaseOrders&action=EditView&fromProductsBySalesReport=true" method="post"
target="_blank" id="orderComponentsForm">
<input id="componentsToOrder" name="componentsToOrder" type="hidden" value="" />
target="_blank" id="orderComponentsForm">
<input id="componentsToOrder" name="componentsToOrder" type="hidden" value=""/>
</form>
<div id="componentsTableContainer">
</div>
</div>
<div id="3" style="display: none">
<br>
<input class="button" name="submit" value="Zamówienie - surowce" type="button" id="orderRawMaterials" />
<input class="button" name="submit" value="Zamówienie - surowce" type="button" id="orderRawMaterials"/>
<br>
<form action="index.php?module=EcmPurchaseOrders&action=EditView&fromProductsBySalesReport=true" method="post"
target="_blank" id="orderRawMaterialsForm">
<input id="rawMaterialsToOrder" name="rawMaterialsToOrder" type="hidden" value="" />
target="_blank" id="orderRawMaterialsForm">
<input id="rawMaterialsToOrder" name="rawMaterialsToOrder" type="hidden" value=""/>
</form>
<div id="rawMaterialsTableContainer">
</div>