v1.2.1
- [FORECAST] 컨테니어 표시 버그 수정. - [ORDER] 컨테니어 표시 버그 수정. - [CUSTOMER] Removal date 표시.
This commit is contained in:
parent
e7a4b6b539
commit
6211afe6e4
|
|
@ -94,6 +94,9 @@ if ($mode == "update") {
|
||||||
if ($c_installdate != "N/A") $c_installdateSTR = $func -> convertFormat ($c_installdate, 3);
|
if ($c_installdate != "N/A") $c_installdateSTR = $func -> convertFormat ($c_installdate, 3);
|
||||||
else $c_installdateSTR = "N/A";
|
else $c_installdateSTR = "N/A";
|
||||||
|
|
||||||
|
if ($c_removaldate != "N/A") $c_removaldateSTR = $func -> convertFormat ($c_removaldate, 3);
|
||||||
|
else $c_removaldateSTR = "N/A";
|
||||||
|
|
||||||
//
|
//
|
||||||
function safeDate($val) {
|
function safeDate($val) {
|
||||||
if (!$val || $val === 'N/A') return null;
|
if (!$val || $val === 'N/A') return null;
|
||||||
|
|
@ -1491,9 +1494,9 @@ $(document).ready(function()
|
||||||
<input type="text" id="c_installdate" name="c_installdate" value="<?=$c_installdateSTR?>" placeholder="<?=date('Y-m-d')?>" readonly>
|
<input type="text" id="c_installdate" name="c_installdate" value="<?=$c_installdateSTR?>" placeholder="<?=date('Y-m-d')?>" readonly>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="td-title-info">Last Container Work Date</td>
|
<td class="td-title-info">Last Removal Date</td>
|
||||||
<td class="td-text-info">
|
<td class="td-text-info">
|
||||||
<input type="text" id="c_lastworkdate" name="c_exc_lastworkdatechangedate" value="<?=$lastWorkSTR?>" placeholder="<?=date('Y-m-d')?>" readonly>
|
<input type="text" id="c_removaldate" name="c_removaldate" value="<?=$c_removaldateSTR?>" placeholder="<?=date('Y-m-d')?>" readonly>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,6 @@ if ($count > 0) {
|
||||||
|
|
||||||
//$c_fullquantityR = $c_fullquantity;
|
//$c_fullquantityR = $c_fullquantity;
|
||||||
|
|
||||||
|
|
||||||
// Get Area Info
|
// Get Area Info
|
||||||
$qry_area = "SELECT * FROM tbl_area GROUP BY a_text ORDER BY a_text ASC ";
|
$qry_area = "SELECT * FROM tbl_area GROUP BY a_text ORDER BY a_text ASC ";
|
||||||
$rt_area = $jdb->nQuery($qry_area, "list error");
|
$rt_area = $jdb->nQuery($qry_area, "list error");
|
||||||
|
|
@ -138,45 +137,6 @@ while($lt_area=mysqli_fetch_array($rt_area, MYSQLI_ASSOC)) {
|
||||||
$area_cnt++;
|
$area_cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Get Bin (Main Container) Info
|
|
||||||
// 불필요 (2024.01.17)
|
|
||||||
/*
|
|
||||||
$bin_cnt=1;
|
|
||||||
foreach ($arrBin AS $key=>$value)
|
|
||||||
{
|
|
||||||
//echo "[$key][$value]"; => [0][Waiting][1][Confirmed][E][Declined]...
|
|
||||||
|
|
||||||
if ($bin_cnt%2 == 0) $binSTR = "<br>";
|
|
||||||
else $binSTR = "";
|
|
||||||
|
|
||||||
//if ($c_maincontainerall) $checkedFlag = "checked";
|
|
||||||
//else {
|
|
||||||
if(is_array($c_maincontainer)) {
|
|
||||||
$count_m = count($c_maincontainer);
|
|
||||||
for($ia = 0; $ia < $count_m; $ia ++) {
|
|
||||||
if ($c_maincontainer[$ia] == $key) {
|
|
||||||
$checkedFlag = "checked";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else $checkedFlag = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//}
|
|
||||||
|
|
||||||
$c_maincontainerSTR .= "
|
|
||||||
<label class=\"container-chk\">".$value."
|
|
||||||
<input type=\"checkbox\" name=\"c_maincontainer[]\" id='c_area_".$key."' value=\"".$key."\" ".$checkedFlag.">
|
|
||||||
<span class=\"checkmark\"></span>
|
|
||||||
</label>".$binSTR;
|
|
||||||
$checkedFlag = "";
|
|
||||||
$bin_cnt++;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($c_fullcycle) {
|
if ($c_fullcycle) {
|
||||||
$fullcycleQRY = " AND (c_fullcycle >= $c_fullcycle) ";
|
$fullcycleQRY = " AND (c_fullcycle >= $c_fullcycle) ";
|
||||||
$fullcycleSTR = $c_fullcycle;
|
$fullcycleSTR = $c_fullcycle;
|
||||||
|
|
@ -259,6 +219,8 @@ $rt_driver = $jdb->fQuery($qry_driver, "fetch query error");
|
||||||
// ORDER BY tbl_members.m_uid DESC ";
|
// ORDER BY tbl_members.m_uid DESC ";
|
||||||
|
|
||||||
// 중복 제거
|
// 중복 제거
|
||||||
|
$uids_R = [];
|
||||||
|
$uids_P = [];
|
||||||
$qryR_dupQRY = "";
|
$qryR_dupQRY = "";
|
||||||
if ($c_type_r == 'R') {
|
if ($c_type_r == 'R') {
|
||||||
$orderdate = str_replace("-", "", $orderdate);
|
$orderdate = str_replace("-", "", $orderdate);
|
||||||
|
|
@ -271,6 +233,7 @@ if ($c_type_r == 'R') {
|
||||||
$$key = $value;
|
$$key = $value;
|
||||||
}
|
}
|
||||||
$qryR_dupQRY = $qryR_dupQRY . $r_customeruid . ',';
|
$qryR_dupQRY = $qryR_dupQRY . $r_customeruid . ',';
|
||||||
|
$uids_R[] = $r_customeruid;
|
||||||
}
|
}
|
||||||
$qryR_dupQRY = $qryR_dupQRY . '0) '; // 의미없는 uid 추가
|
$qryR_dupQRY = $qryR_dupQRY . '0) '; // 의미없는 uid 추가
|
||||||
}
|
}
|
||||||
|
|
@ -289,9 +252,52 @@ if ($c_type_p == 'P') {
|
||||||
$$key = $value;
|
$$key = $value;
|
||||||
}
|
}
|
||||||
$qryS_dupQRY = $qryS_dupQRY . $c_uid . ',';
|
$qryS_dupQRY = $qryS_dupQRY . $c_uid . ',';
|
||||||
|
$uids_P[] = $c_uid;
|
||||||
}
|
}
|
||||||
$qryS_dupQRY = $qryS_dupQRY . '0) '; // 의미없는 uid 추가
|
$qryS_dupQRY = $qryS_dupQRY . '0) '; // 의미없는 uid 추가
|
||||||
}
|
}
|
||||||
|
$uids_R = array_values(array_unique($uids_R));
|
||||||
|
$uids_P = array_values(array_unique($uids_P));
|
||||||
|
|
||||||
|
$containerMap_R = [];
|
||||||
|
|
||||||
|
if (!empty($uids_R)) {
|
||||||
|
$in = implode(',', array_map('intval', $uids_R));
|
||||||
|
|
||||||
|
$sql = "
|
||||||
|
SELECT cc_customer_uid, cc_type, cc_owner_type, cc_is_used, cc_has_lock, cc_has_wheel, cc_has_woodframe
|
||||||
|
FROM tbl_customer_container
|
||||||
|
WHERE cc_status = 'A'
|
||||||
|
AND cc_customer_uid IN ($in)
|
||||||
|
ORDER BY cc_customer_uid, cc_type, cc_uid
|
||||||
|
";
|
||||||
|
|
||||||
|
$res = $jdb->nQuery($sql, "Load R containers error");
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_assoc($res)) {
|
||||||
|
$containerMap_R[$row['cc_customer_uid']][] = $row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$containerMap_P = [];
|
||||||
|
|
||||||
|
if (!empty($uids_P)) {
|
||||||
|
$in = implode(',', array_map('intval', $uids_P));
|
||||||
|
|
||||||
|
$sql = "
|
||||||
|
SELECT cc_customer_uid, cc_type, cc_owner_type, cc_is_used, cc_has_lock, cc_has_wheel, cc_has_woodframe
|
||||||
|
FROM tbl_customer_container
|
||||||
|
WHERE cc_status = 'A'
|
||||||
|
AND cc_customer_uid IN ($in)
|
||||||
|
ORDER BY cc_customer_uid, cc_type, cc_uid
|
||||||
|
";
|
||||||
|
|
||||||
|
$res = $jdb->nQuery($sql, "Load P containers error");
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_assoc($res)) {
|
||||||
|
$containerMap_P[$row['cc_customer_uid']][] = $row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//total record
|
//total record
|
||||||
$query = "SELECT COUNT(c_uid) FROM tbl_customer
|
$query = "SELECT COUNT(c_uid) FROM tbl_customer
|
||||||
|
|
@ -596,8 +602,10 @@ if ($c_type_r == 'R') {
|
||||||
//$c_fullquantitySTR = number_format(floatval($c_fullquantity));
|
//$c_fullquantitySTR = number_format(floatval($c_fullquantity));
|
||||||
$c_fullquantityActual = round(floatval($c_fullquantity + ($dDiff * $c_fullquantitydaily)));
|
$c_fullquantityActual = round(floatval($c_fullquantity + ($dDiff * $c_fullquantitydaily)));
|
||||||
$c_fullquantitySTR = number_format($c_fullquantityActual);
|
$c_fullquantitySTR = number_format($c_fullquantityActual);
|
||||||
|
$customerContainers = $containerMap_R[$c_uid] ?? [];
|
||||||
|
ob_start();
|
||||||
|
include $_SERVER['DOCUMENT_ROOT'].'/lib/customer_container_chips.php';
|
||||||
|
$containerChipsHtml = ob_get_clean();
|
||||||
|
|
||||||
///////////////////////
|
///////////////////////
|
||||||
// Get This/Last year Quantity
|
// Get This/Last year Quantity
|
||||||
|
|
@ -663,6 +671,7 @@ if ($c_type_r == 'R') {
|
||||||
|
|
||||||
|
|
||||||
if ($c_type_p == 'P') {
|
if ($c_type_p == 'P') {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
select c_accountno,c_schedule,c_scheduleday
|
select c_accountno,c_schedule,c_scheduleday
|
||||||
from tbl_customer where c_schedule > '1W' AND c_schedule <= '6W'
|
from tbl_customer where c_schedule > '1W' AND c_schedule <= '6W'
|
||||||
|
|
@ -680,6 +689,7 @@ if ($c_type_p == 'P') {
|
||||||
|
|
||||||
$rt_s=$jdb->nQuery($qry_s, "list error");
|
$rt_s=$jdb->nQuery($qry_s, "list error");
|
||||||
|
|
||||||
|
|
||||||
while($list=mysqli_fetch_array($rt_s, MYSQLI_ASSOC)) {
|
while($list=mysqli_fetch_array($rt_s, MYSQLI_ASSOC)) {
|
||||||
for($i=0; $i<sizeof($list); $i++) {
|
for($i=0; $i<sizeof($list); $i++) {
|
||||||
//list($key, $value) = each($list);
|
//list($key, $value) = each($list);
|
||||||
|
|
@ -696,7 +706,10 @@ if ($c_type_p == 'P') {
|
||||||
//$c_fullquantitySTR = number_format(floatval($c_fullquantity));
|
//$c_fullquantitySTR = number_format(floatval($c_fullquantity));
|
||||||
$c_fullquantityActual = round(floatval($c_fullquantity + ($dDiff * $c_fullquantitydaily)));
|
$c_fullquantityActual = round(floatval($c_fullquantity + ($dDiff * $c_fullquantitydaily)));
|
||||||
$c_fullquantitySTR = number_format($c_fullquantityActual);
|
$c_fullquantitySTR = number_format($c_fullquantityActual);
|
||||||
|
$customerContainers = $containerMap_P[$c_uid] ?? [];
|
||||||
|
ob_start();
|
||||||
|
include $_SERVER['DOCUMENT_ROOT'].'/lib/customer_container_chips.php';
|
||||||
|
$containerChipsHtml = ob_get_clean();
|
||||||
|
|
||||||
///////////////////////
|
///////////////////////
|
||||||
// Get This/Last year Quantity
|
// Get This/Last year Quantity
|
||||||
|
|
|
||||||
|
|
@ -1772,18 +1772,14 @@ function renderSummary(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContainerIcon(type){
|
function getContainerIcon(type){
|
||||||
|
if(type === 'D'){
|
||||||
switch(type){
|
return 'bi-database-fill';
|
||||||
case 'D':
|
|
||||||
case '3D':
|
|
||||||
return 'bi-database-fill'; // 드럼 느낌
|
|
||||||
case '400B':
|
|
||||||
case '600B':
|
|
||||||
case '600B/L':
|
|
||||||
return 'bi-archive-fill'; // 빈 느낌
|
|
||||||
default:
|
|
||||||
return 'bi-box';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(type && type.endsWith('B')){
|
||||||
|
return 'bi-archive-fill';
|
||||||
|
}
|
||||||
|
return 'bi-box';
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildTypeChips(typeCounts){
|
function buildTypeChips(typeCounts){
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@ foreach ($rows as $list) {
|
||||||
|
|
||||||
$d_quantitySUM = $d_quantitySUM + floatval($d_quantity);
|
$d_quantitySUM = $d_quantitySUM + floatval($d_quantity);
|
||||||
|
|
||||||
|
$c_uid = $d_customeruid;
|
||||||
$customerContainers = $customerContainerMap[$c_uid] ?? [];
|
$customerContainers = $customerContainerMap[$c_uid] ?? [];
|
||||||
ob_start();
|
ob_start();
|
||||||
include $_SERVER['DOCUMENT_ROOT'].'/lib/customer_container_chips.php';
|
include $_SERVER['DOCUMENT_ROOT'].'/lib/customer_container_chips.php';
|
||||||
|
|
@ -210,8 +211,6 @@ foreach ($rows as $list) {
|
||||||
else if ($d_driveruid == $d_createruid) $d_ordertypeSTR = "class='bg-period'";
|
else if ($d_driveruid == $d_createruid) $d_ordertypeSTR = "class='bg-period'";
|
||||||
else $d_ordertypeSTR = "";
|
else $d_ordertypeSTR = "";
|
||||||
|
|
||||||
$c_uid = $d_customeruid;
|
|
||||||
|
|
||||||
if ($d_fullcycleflag == 1) {
|
if ($d_fullcycleflag == 1) {
|
||||||
$d_fullcycleSTR = $d_fullcycleforced;
|
$d_fullcycleSTR = $d_fullcycleforced;
|
||||||
$d_fullcycleCSS = "style='color:red;'";
|
$d_fullcycleCSS = "style='color:red;'";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue