export stock addresses
This commit is contained in:
@@ -134,6 +134,23 @@ function isProductValid(id) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function exportFile() {
|
||||||
|
$("#loader").show();
|
||||||
|
$.ajax({
|
||||||
|
url: "index.php?module=EcmProducts&action=&action=stockAddress&ajax=export&to_pdf=1",
|
||||||
|
}).done(function (data) {
|
||||||
|
$("#loader").hide();
|
||||||
|
if (data.status === 'Error') {
|
||||||
|
alert('Błąd: ' + data.msg);
|
||||||
|
} else {
|
||||||
|
console.log(data);
|
||||||
|
downloadFile(data.fileContent, data.fileName, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
||||||
|
}
|
||||||
|
}).fail(() => {
|
||||||
|
$("#loader").hide();
|
||||||
|
alert('Błąd serwera.');
|
||||||
|
});
|
||||||
|
}
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#address").mask("AB.CD.E.F", {
|
$("#address").mask("AB.CD.E.F", {
|
||||||
placeholder: "__.__._._",
|
placeholder: "__.__._._",
|
||||||
@@ -189,12 +206,49 @@ $(document).ready(function () {
|
|||||||
$("#searchByIndexForm").submit();
|
$("#searchByIndexForm").submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$("#exportTrigger").click(() => {
|
||||||
|
exportFile();
|
||||||
|
});
|
||||||
$('[name^="showAddress').click((event) => {
|
$('[name^="showAddress').click((event) => {
|
||||||
$("#address").val(event.target.name.split('-')[1]);
|
$("#address").val(event.target.name.split('-')[1]);
|
||||||
if (isAddressValid()) {
|
if (isAddressValid()) {
|
||||||
$("#searchByAddressForm").submit();
|
$("#searchByAddressForm").submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
//bind buttons
|
//bind buttons
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function downloadFile(base64Data, fileName, mimeType) {
|
||||||
|
// Stwórz blob z danych base64
|
||||||
|
const byteCharacters = atob(base64Data);
|
||||||
|
const byteArrays = [];
|
||||||
|
|
||||||
|
for (let offset = 0; offset < byteCharacters.length; offset += 512) {
|
||||||
|
const slice = byteCharacters.slice(offset, offset + 512);
|
||||||
|
|
||||||
|
const byteNumbers = new Array(slice.length);
|
||||||
|
for (let i = 0; i < slice.length; i++) {
|
||||||
|
byteNumbers[i] = slice.charCodeAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
const byteArray = new Uint8Array(byteNumbers);
|
||||||
|
byteArrays.push(byteArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
const blob = new Blob(byteArrays, {type: mimeType});
|
||||||
|
|
||||||
|
// Stwórz link do pobrania
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = window.URL.createObjectURL(blob);
|
||||||
|
link.download = fileName;
|
||||||
|
|
||||||
|
// Dodaj link do dokumentu i kliknij go
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
|
||||||
|
// Usuń link z dokumentu
|
||||||
|
setTimeout(function () {
|
||||||
|
document.body.removeChild(link);
|
||||||
|
window.URL.revokeObjectURL(link.href);
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
//error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
//ini_set('display_errors', 1);
|
//ini_set('display_errors', 1);
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
if ($_GET['ajax']) {
|
if ($_GET['ajax']) {
|
||||||
switch ($_GET['ajax']) {
|
switch ($_GET['ajax']) {
|
||||||
case 'addAddress':
|
case 'addAddress':
|
||||||
$productId = $_GET['productId'];
|
$productId = $_GET['productId'];
|
||||||
@@ -11,21 +11,21 @@
|
|||||||
// check if product exists
|
// check if product exists
|
||||||
$productId = $db->fetchByAssoc($db->query("SELECT id FROM ecmproducts WHERE id = '$productId'"))['id'];
|
$productId = $db->fetchByAssoc($db->query("SELECT id FROM ecmproducts WHERE id = '$productId'"))['id'];
|
||||||
if ($productId == null) {
|
if ($productId == null) {
|
||||||
echo json_encode(array('status' => 'Error', 'msg' => 'Nie znalaziono produktu w bazie: '.$index ));
|
echo json_encode(array('status' => 'Error', 'msg' => 'Nie znalaziono produktu w bazie: ' . $index));
|
||||||
}
|
}
|
||||||
// check if location is empty
|
// check if location is empty
|
||||||
$location = $db->fetchByAssoc($db->query("SELECT stock_address FROM ecmproducts_stock_addresses WHERE stock_address = '$address'"));
|
$location = $db->fetchByAssoc($db->query("SELECT stock_address FROM ecmproducts_stock_addresses WHERE stock_address = '$address'"));
|
||||||
if ($location != null) {
|
if ($location != null) {
|
||||||
echo json_encode(array('status' => 'Error', 'msg' => 'Wskazana lokalizacja jest zajęta: '.$address ));
|
echo json_encode(array('status' => 'Error', 'msg' => 'Wskazana lokalizacja jest zajęta: ' . $address));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$db->query("INSERT INTO ecmproducts_stock_addresses (ecmproduct_id, stock_address, is_not_full) VALUES ('$productId','$address', $isNotFull)");
|
$db->query("INSERT INTO ecmproducts_stock_addresses (ecmproduct_id, stock_address, is_not_full) VALUES ('$productId','$address', $isNotFull)");
|
||||||
echo json_encode(array('status' => 'Success', 'msg' => 'addAddress' ));
|
echo json_encode(array('status' => 'Success', 'msg' => 'addAddress'));
|
||||||
break;
|
break;
|
||||||
case 'removeAddress':
|
case 'removeAddress':
|
||||||
$address = $_GET['address'];
|
$address = $_GET['address'];
|
||||||
$db->query("DELETE FROM ecmproducts_stock_addresses WHERE stock_address='$address'");
|
$db->query("DELETE FROM ecmproducts_stock_addresses WHERE stock_address='$address'");
|
||||||
echo json_encode(array('status' => 'Success', 'msg' => 'removeAddress' ));
|
echo json_encode(array('status' => 'Success', 'msg' => 'removeAddress'));
|
||||||
break;
|
break;
|
||||||
case 'setIsNotFull':
|
case 'setIsNotFull':
|
||||||
$address = $_GET['address'];
|
$address = $_GET['address'];
|
||||||
@@ -33,39 +33,40 @@
|
|||||||
$db->query("UPDATE ecmproducts_stock_addresses SET is_not_full=$isNotFull WHERE stock_address='$address'");
|
$db->query("UPDATE ecmproducts_stock_addresses SET is_not_full=$isNotFull WHERE stock_address='$address'");
|
||||||
echo json_encode(array('status' => 'Success', 'msg' => 'setIsNotFull'));
|
echo json_encode(array('status' => 'Success', 'msg' => 'setIsNotFull'));
|
||||||
break;
|
break;
|
||||||
|
case 'export':
|
||||||
|
exportExcel();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$pRes = $db->query("SELECT DISTINCT id, code FROM ecmproducts WHERE deleted=0;");
|
$pRes = $db->query("SELECT DISTINCT id, code FROM ecmproducts WHERE deleted=0;");
|
||||||
$codes = array();
|
$codes = array();
|
||||||
while ($p = $db -> fetchByAssoc($pRes)) {
|
while ($p = $db->fetchByAssoc($pRes)) {
|
||||||
$index = str_replace("'", "'", $p['code']);
|
$index = str_replace("'", "'", $p['code']);
|
||||||
array_push($codes, ['id' => $p['id'], 'code' => $index]);
|
array_push($codes, ['id' => $p['id'], 'code' => $index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$smarty = new Sugar_Smarty ();
|
$smarty = new Sugar_Smarty ();
|
||||||
|
|
||||||
if (strlen($_GET['searchType']) > 0 && $_GET['searchType'] == 'address')
|
if (strlen($_GET['searchType']) > 0 && $_GET['searchType'] == 'address') {
|
||||||
{
|
|
||||||
$address = $_GET['address'];
|
$address = $_GET['address'];
|
||||||
$product = $db->fetchByAssoc($db->query("
|
$product = $db->fetchByAssoc($db->query("
|
||||||
SELECT a.ecmproduct_id, p.name, p.code, p.ems_qty_in_stock AS stock_state, a.is_not_full FROM ecmproducts_stock_addresses AS a
|
SELECT a.ecmproduct_id, p.name, p.code, p.ems_qty_in_stock AS stock_state, a.is_not_full FROM ecmproducts_stock_addresses AS a
|
||||||
INNER JOIN ecmproducts as p ON p.id=a.ecmproduct_id
|
INNER JOIN ecmproducts as p ON p.id=a.ecmproduct_id
|
||||||
WHERE stock_address='$address';"));
|
WHERE stock_address='$address';"));
|
||||||
$state = $db->fetchByAssoc($db->query("SELECT SUM(quantity) as qty FROM ecmstockstates WHERE product_id='".$product['ecmproduct_id']."'"));
|
$state = $db->fetchByAssoc($db->query("SELECT SUM(quantity) as qty FROM ecmstockstates WHERE product_id='" . $product['ecmproduct_id'] . "'"));
|
||||||
$product['stock_state'] = $state['qty'];
|
$product['stock_state'] = $state['qty'];
|
||||||
$smarty->assign("PROCESS", "ADDRESS");
|
$smarty->assign("PROCESS", "ADDRESS");
|
||||||
$smarty->assign("PRODUCT", $product);
|
$smarty->assign("PRODUCT", $product);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($_GET['searchType']) > 0 && $_GET['searchType'] == 'index')
|
if (strlen($_GET['searchType']) > 0 && $_GET['searchType'] == 'index') {
|
||||||
{
|
|
||||||
$id = $_GET['productId'];
|
$id = $_GET['productId'];
|
||||||
$res = $db->query("
|
$res = $db->query("
|
||||||
SELECT a.ecmproduct_id, a.stock_address, a.is_not_full, p.name, p.code FROM ecmproducts_stock_addresses AS a
|
SELECT a.ecmproduct_id, a.stock_address, a.is_not_full, p.name, p.code FROM ecmproducts_stock_addresses AS a
|
||||||
INNER JOIN ecmproducts as p ON p.id=a.ecmproduct_id
|
INNER JOIN ecmproducts as p ON p.id=a.ecmproduct_id
|
||||||
WHERE p.id='$id' AND p.deleted=0;");
|
WHERE p.id='$id' AND p.deleted=0;");
|
||||||
$addresses = array();
|
$addresses = array();
|
||||||
while ($r = $db -> fetchByAssoc($res)) {
|
while ($r = $db->fetchByAssoc($res)) {
|
||||||
array_push($addresses, $r);
|
array_push($addresses, $r);
|
||||||
}
|
}
|
||||||
$product = $db->fetchByAssoc($db->query("SELECT id, name, code, ems_qty_in_stock FROM ecmproducts WHERE id = '$id';"));
|
$product = $db->fetchByAssoc($db->query("SELECT id, name, code, ems_qty_in_stock FROM ecmproducts WHERE id = '$id';"));
|
||||||
@@ -76,8 +77,7 @@
|
|||||||
$smarty->assign("ADDRESSES", $addresses);
|
$smarty->assign("ADDRESSES", $addresses);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($_GET['searchType']) > 0 && $_GET['searchType'] == 'allAddresses')
|
if (strlen($_GET['searchType']) > 0 && $_GET['searchType'] == 'allAddresses') {
|
||||||
{
|
|
||||||
if ($_GET['onlyFull'] == "on") {
|
if ($_GET['onlyFull'] == "on") {
|
||||||
$allAddresses = getAllAddresses(true);
|
$allAddresses = getAllAddresses(true);
|
||||||
} else {
|
} else {
|
||||||
@@ -87,12 +87,12 @@
|
|||||||
SELECT a.ecmproduct_id, a.stock_address, a.is_not_full, p.name, p.code, p.ems_qty_in_stock FROM ecmproducts_stock_addresses AS a
|
SELECT a.ecmproduct_id, a.stock_address, a.is_not_full, p.name, p.code, p.ems_qty_in_stock FROM ecmproducts_stock_addresses AS a
|
||||||
INNER JOIN ecmproducts as p ON p.id=a.ecmproduct_id");
|
INNER JOIN ecmproducts as p ON p.id=a.ecmproduct_id");
|
||||||
$used = array();
|
$used = array();
|
||||||
while ($r = $db -> fetchByAssoc($res)) {
|
while ($r = $db->fetchByAssoc($res)) {
|
||||||
array_push($used, $r);
|
array_push($used, $r);
|
||||||
}
|
}
|
||||||
$addresses = array();
|
$addresses = array();
|
||||||
$sum = 0;
|
$sum = 0;
|
||||||
foreach ($allAddresses as $a ) {
|
foreach ($allAddresses as $a) {
|
||||||
$i = array_search($a, array_column($used, 'stock_address'));
|
$i = array_search($a, array_column($used, 'stock_address'));
|
||||||
$element = ($i !== false ? $used[$i] : null);
|
$element = ($i !== false ? $used[$i] : null);
|
||||||
$row = array();
|
$row = array();
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
$row['name'] = $element['name'];
|
$row['name'] = $element['name'];
|
||||||
$row['code'] = $element['code'];
|
$row['code'] = $element['code'];
|
||||||
$row['ecmproduct_id'] = $element['ecmproduct_id'];
|
$row['ecmproduct_id'] = $element['ecmproduct_id'];
|
||||||
$state = $db->fetchByAssoc($db->query("SELECT SUM(quantity) as qty FROM ecmstockstates WHERE product_id='".$element['ecmproduct_id']."'"));
|
$state = $db->fetchByAssoc($db->query("SELECT SUM(quantity) as qty FROM ecmstockstates WHERE product_id='" . $element['ecmproduct_id'] . "'"));
|
||||||
$row['stock_state'] = $state['qty'];
|
$row['stock_state'] = $state['qty'];
|
||||||
}
|
}
|
||||||
if ($_GET['allType'] == 'used' && $element) {
|
if ($_GET['allType'] == 'used' && $element) {
|
||||||
@@ -127,25 +127,60 @@
|
|||||||
$smarty->assign("CODES", json_encode($codes));
|
$smarty->assign("CODES", json_encode($codes));
|
||||||
$smarty->assign("CURRENT_ADDRESS", $_GET['address']);
|
$smarty->assign("CURRENT_ADDRESS", $_GET['address']);
|
||||||
$smarty->assign("CURRENT_INDEX", $_GET['index']);
|
$smarty->assign("CURRENT_INDEX", $_GET['index']);
|
||||||
echo $smarty->display ( 'modules/EcmProducts/tpls/stockAddress.tpl' );
|
echo $smarty->display('modules/EcmProducts/tpls/stockAddress.tpl');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllAddresses($onlyFull) {
|
function getAllAddresses($onlyFull)
|
||||||
|
{
|
||||||
$addresses = array();
|
$addresses = array();
|
||||||
for ($i = 1; $i <= 17; $i++) {
|
for ($i = 1; $i <= 17; $i++) {
|
||||||
$s1 = (strlen($i) == 1) ? '0'.$i : $i;
|
$s1 = (strlen($i) == 1) ? '0' . $i : $i;
|
||||||
for ($j = 1; $j <= 15; $j++) {
|
for ($j = 1; $j <= 15; $j++) {
|
||||||
$s2 = (strlen($j) == 1) ? '0'.$j : $j;
|
$s2 = (strlen($j) == 1) ? '0' . $j : $j;
|
||||||
for ($k = 1; $k <=3; $k++) {
|
for ($k = 1; $k <= 3; $k++) {
|
||||||
if ($onlyFull) {
|
if ($onlyFull) {
|
||||||
array_push($addresses, $s1.'.'.$s2.'.'.$k.'.0');
|
array_push($addresses, $s1 . '.' . $s2 . '.' . $k . '.0');
|
||||||
} else {
|
} else {
|
||||||
for ($l = 0; $l <=2; $l++) {
|
for ($l = 0; $l <= 2; $l++) {
|
||||||
array_push($addresses, $s1.'.'.$s2.'.'.$k.'.'.$l);
|
array_push($addresses, $s1 . '.' . $s2 . '.' . $k . '.' . $l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $addresses;
|
return $addresses;
|
||||||
|
}
|
||||||
|
|
||||||
|
function exportExcel()
|
||||||
|
{
|
||||||
|
$db = $GLOBALS['db'];
|
||||||
|
|
||||||
|
$address = $_GET['address'];
|
||||||
|
$res = $db->query("SELECT p.code, s.stock_address
|
||||||
|
FROM ecmproducts_stock_addresses AS s
|
||||||
|
INNER JOIN ecmproducts AS p
|
||||||
|
ON p.id = s.ecmproduct_id
|
||||||
|
ORDER BY s.stock_address;");
|
||||||
|
$result = array();
|
||||||
|
while ($row = $db->fetchByAssoc($res)) {
|
||||||
|
array_push($result, $row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'Indeks', 'Adres'
|
||||||
|
];
|
||||||
|
|
||||||
|
$sheetData = array_merge([$headers], $result);
|
||||||
|
|
||||||
|
require_once 'modules/EcmReports/BimIT-Reports/lib/xlsxGenerator.php';
|
||||||
|
|
||||||
|
$xlsx = Shuchkin\SimpleXLSXGen::fromArray($sheetData);
|
||||||
|
$xlsx_content = (string)$xlsx;
|
||||||
|
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo json_encode([
|
||||||
|
'success' => true,
|
||||||
|
'fileContent' => base64_encode($xlsx_content),
|
||||||
|
'fileName' => 'adresy_magazynowe.xlsx'
|
||||||
|
]);
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="loader" id="loader">
|
<div class="loader" id="loader">
|
||||||
<img src="themes/default/images/loading.gif" />
|
<img src="themes/default/images/loading.gif"/>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var CODES = {$CODES};
|
var CODES = {$CODES};
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
<input type="text" name="address" id="address" size="30" value="{$CURRENT_ADDRESS}">
|
<input type="text" name="address" id="address" size="30" value="{$CURRENT_ADDRESS}">
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="hidden" name="module" value="EcmProducts" />
|
<input type="hidden" name="module" value="EcmProducts"/>
|
||||||
<input type="hidden" name="action" value="stockAddress" />
|
<input type="hidden" name="action" value="stockAddress"/>
|
||||||
<input type="hidden" name="searchType" value="address" />
|
<input type="hidden" name="searchType" value="address"/>
|
||||||
<input type="button" id="searchByAddressTrigger" value="Szukaj adresu " class="button" />
|
<input type="button" id="searchByAddressTrigger" value="Szukaj adresu " class="button"/>
|
||||||
<span style="color: red;" id="addressError"></span>
|
<span style="color: red;" id="addressError"></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -34,11 +34,11 @@
|
|||||||
<input type='text' name="index" id="index" size="30" value="{$CURRENT_INDEX}">
|
<input type='text' name="index" id="index" size="30" value="{$CURRENT_INDEX}">
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="hidden" name="module" value="EcmProducts" />
|
<input type="hidden" name="module" value="EcmProducts"/>
|
||||||
<input type="hidden" name="action" value="stockAddress" />
|
<input type="hidden" name="action" value="stockAddress"/>
|
||||||
<input type="hidden" name="searchType" value="index" />
|
<input type="hidden" name="searchType" value="index"/>
|
||||||
<input type="hidden" name="productId" id="productId" value="" />
|
<input type="hidden" name="productId" id="productId" value=""/>
|
||||||
<input type="button" id="searchByIndexTrigger" value="Szukaj indeksu" class="button" />
|
<input type="button" id="searchByIndexTrigger" value="Szukaj indeksu" class="button"/>
|
||||||
<span style="color: red;" id="indexError"></span>
|
<span style="color: red;" id="indexError"></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -57,13 +57,23 @@
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="hidden" name="module" value="EcmProducts" />
|
<input type="hidden" name="module" value="EcmProducts"/>
|
||||||
<input type="hidden" name="action" value="stockAddress" />
|
<input type="hidden" name="action" value="stockAddress"/>
|
||||||
<input type="hidden" name="searchType" value="allAddresses" />
|
<input type="hidden" name="searchType" value="allAddresses"/>
|
||||||
<input type="submit" id="searchByIndexTrigger" value="Pokaż adresy" class="button" />
|
<input type="submit" id="searchByIndexTrigger" value="Pokaż adresy" class="button"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</form>
|
</form>
|
||||||
|
<tr>
|
||||||
|
<td scope="row" nowrap="nowrap" width="1%">
|
||||||
|
<input type="hidden" name="module" value="EcmProducts"/>
|
||||||
|
<input type="hidden" name="action" value="stockAddress"/>
|
||||||
|
<input type="hidden" name="searchType" value="export"/>
|
||||||
|
<input type="button" id="exportTrigger" value="Eksport Excel" class="button"/>
|
||||||
|
</td>
|
||||||
|
<td nowrap="nowrap" width="1%"> </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{if $PROCESS && $PROCESS=='ADDRESS'}
|
{if $PROCESS && $PROCESS=='ADDRESS'}
|
||||||
@@ -92,10 +102,11 @@
|
|||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
<input type="button" value="Karta produktu" class="button"
|
<input type="button" value="Karta produktu" class="button"
|
||||||
onclick="openProductCard('{$PRODUCT.ecmproduct_id}');" />
|
onclick="openProductCard('{$PRODUCT.ecmproduct_id}');"/>
|
||||||
<input type="button" value="Wyszukaj wszystkie adresy" class="button"
|
<input type="button" value="Wyszukaj wszystkie adresy" class="button"
|
||||||
onclick="searchByIndex('{$PRODUCT.code}')" />
|
onclick="searchByIndex('{$PRODUCT.code}')"/>
|
||||||
<input type="button" value="Usuń produkt z adresu" class="button" onclick="removeProductFromAddress()" />
|
<input type="button" value="Usuń produkt z adresu" class="button"
|
||||||
|
onclick="removeProductFromAddress()"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -118,7 +129,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
<input type="button" value="Dodaj produkt" class="button" onclick="addProductToAddress()" />
|
<input type="button" value="Dodaj produkt" class="button" onclick="addProductToAddress()"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -126,7 +137,10 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{if $PROCESS && $PROCESS=='PRODUCT'}
|
{if $PROCESS && $PROCESS=='PRODUCT'}
|
||||||
<h2>{$PRODUCT.code} {$PRODUCT.name} ( Stan: {$PRODUCT.ems_qty_in_stock} ) <input type="button"
|
<h2>{$PRODUCT.code} {$PRODUCT.name} ( Stan: {$PRODUCT.ems_qty_in_stock} ) <input type="button"
|
||||||
value="Karta produktu" class="button" onclick="openProductCard('{$PRODUCT.id}');" /></h2>
|
value="Karta produktu"
|
||||||
|
class="button"
|
||||||
|
onclick="openProductCard('{$PRODUCT.id}');"/>
|
||||||
|
</h2>
|
||||||
<table cellpadding="0" cellspacing="0" class="list view">
|
<table cellpadding="0" cellspacing="0" class="list view">
|
||||||
<tr class="oddListRowS1">
|
<tr class="oddListRowS1">
|
||||||
<th style="width: 15%;"><b>Adres</b></td>
|
<th style="width: 15%;"><b>Adres</b></td>
|
||||||
@@ -142,28 +156,28 @@
|
|||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
<input type="checkbox" {if $item.is_not_full}checked{/if}
|
<input type="checkbox" {if $item.is_not_full}checked{/if}
|
||||||
onclick="setAddressIsNotFull('{$item.stock_address}', this)" />
|
onclick="setAddressIsNotFull('{$item.stock_address}', this)"/>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
<input type="button" value="Usuń lokalizację" class="button"
|
<input type="button" value="Usuń lokalizację" class="button"
|
||||||
onclick="removeAddressFromProduct('{$item.stock_address}')" />
|
onclick="removeAddressFromProduct('{$item.stock_address}')"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<tr class="oddListRowS1">
|
<tr class="oddListRowS1">
|
||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
<input type="text" size="10" id="newAddress" />
|
<input type="text" size="10" id="newAddress"/>
|
||||||
<span style="color: red;" id="newAddressError"></span>
|
<span style="color: red;" id="newAddressError"></span>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
<input type="checkbox" id="isNotFull" />
|
<input type="checkbox" id="isNotFull"/>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
<input type="button" value="Dodaj lokalizację" class="button" onclick="addAddressToProduct();" />
|
<input type="button" value="Dodaj lokalizację" class="button" onclick="addAddressToProduct();"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -186,11 +200,11 @@
|
|||||||
</td>
|
</td>
|
||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
<input type="checkbox" {if $item.is_not_full}checked{/if} disabled />
|
<input type="checkbox" {if $item.is_not_full}checked{/if} disabled/>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
<input type="button" value="Pokaż adres" class="button" name="showAddress-{$item.stock_address}" />
|
<input type="button" value="Pokaż adres" class="button" name="showAddress-{$item.stock_address}"/>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" class="oddListRowS1"
|
<td valign="top" class="oddListRowS1"
|
||||||
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||||
@@ -236,7 +250,8 @@
|
|||||||
background-color: rgba(16, 16, 16, 0.5);
|
background-color: rgba(16, 16, 16, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.loader>img {}
|
.loader > img {
|
||||||
|
}
|
||||||
|
|
||||||
{/literal}
|
{/literal}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user