v1.2.1
- [FORECAST] 컨테니어 표시 버그 수정. - [ORDER] 컨테니어 표시 버그 수정. - [CUSTOMER] Removal date 표시.
This commit is contained in:
parent
e7a4b6b539
commit
6211afe6e4
|
|
@ -93,6 +93,9 @@ if ($mode == "update") {
|
|||
|
||||
if ($c_installdate != "N/A") $c_installdateSTR = $func -> convertFormat ($c_installdate, 3);
|
||||
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) {
|
||||
|
|
@ -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>
|
||||
</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">
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@ if ($count > 0) {
|
|||
|
||||
//$c_fullquantityR = $c_fullquantity;
|
||||
|
||||
|
||||
// Get Area Info
|
||||
$qry_area = "SELECT * FROM tbl_area GROUP BY a_text ORDER BY a_text ASC ";
|
||||
$rt_area = $jdb->nQuery($qry_area, "list error");
|
||||
|
|
@ -138,45 +137,6 @@ while($lt_area=mysqli_fetch_array($rt_area, MYSQLI_ASSOC)) {
|
|||
$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) {
|
||||
$fullcycleQRY = " AND (c_fullcycle >= $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 ";
|
||||
|
||||
// 중복 제거
|
||||
$uids_R = [];
|
||||
$uids_P = [];
|
||||
$qryR_dupQRY = "";
|
||||
if ($c_type_r == 'R') {
|
||||
$orderdate = str_replace("-", "", $orderdate);
|
||||
|
|
@ -271,6 +233,7 @@ if ($c_type_r == 'R') {
|
|||
$$key = $value;
|
||||
}
|
||||
$qryR_dupQRY = $qryR_dupQRY . $r_customeruid . ',';
|
||||
$uids_R[] = $r_customeruid;
|
||||
}
|
||||
$qryR_dupQRY = $qryR_dupQRY . '0) '; // 의미없는 uid 추가
|
||||
}
|
||||
|
|
@ -289,9 +252,52 @@ if ($c_type_p == 'P') {
|
|||
$$key = $value;
|
||||
}
|
||||
$qryS_dupQRY = $qryS_dupQRY . $c_uid . ',';
|
||||
$uids_P[] = $c_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
|
||||
$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_fullquantityActual = round(floatval($c_fullquantity + ($dDiff * $c_fullquantitydaily)));
|
||||
$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
|
||||
|
|
@ -663,6 +671,7 @@ if ($c_type_r == 'R') {
|
|||
|
||||
|
||||
if ($c_type_p == 'P') {
|
||||
|
||||
/*
|
||||
select c_accountno,c_schedule,c_scheduleday
|
||||
from tbl_customer where c_schedule > '1W' AND c_schedule <= '6W'
|
||||
|
|
@ -680,13 +689,14 @@ if ($c_type_p == 'P') {
|
|||
|
||||
$rt_s=$jdb->nQuery($qry_s, "list error");
|
||||
|
||||
|
||||
while($list=mysqli_fetch_array($rt_s, MYSQLI_ASSOC)) {
|
||||
for($i=0; $i<sizeof($list); $i++) {
|
||||
//list($key, $value) = each($list);
|
||||
foreach ( (Array) $list as $key => $value )
|
||||
$$key = $value;
|
||||
}
|
||||
|
||||
|
||||
$c_nameSTR = str_replace("\\", "", $c_name);
|
||||
$c_addressSTR = str_replace("\\", "", $c_address);
|
||||
$c_containerSTR = str_replace("\\", "", $c_container);
|
||||
|
|
@ -696,7 +706,10 @@ if ($c_type_p == 'P') {
|
|||
//$c_fullquantitySTR = number_format(floatval($c_fullquantity));
|
||||
$c_fullquantityActual = round(floatval($c_fullquantity + ($dDiff * $c_fullquantitydaily)));
|
||||
$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
|
||||
|
|
|
|||
|
|
@ -1772,18 +1772,14 @@ function renderSummary(){
|
|||
}
|
||||
|
||||
function getContainerIcon(type){
|
||||
|
||||
switch(type){
|
||||
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 === 'D'){
|
||||
return 'bi-database-fill';
|
||||
}
|
||||
|
||||
if(type && type.endsWith('B')){
|
||||
return 'bi-archive-fill';
|
||||
}
|
||||
return 'bi-box';
|
||||
}
|
||||
|
||||
function buildTypeChips(typeCounts){
|
||||
|
|
|
|||
|
|
@ -124,7 +124,8 @@ foreach ($rows as $list) {
|
|||
$d_quantitySTR = number_format(floatval($d_quantity));
|
||||
|
||||
$d_quantitySUM = $d_quantitySUM + floatval($d_quantity);
|
||||
|
||||
|
||||
$c_uid = $d_customeruid;
|
||||
$customerContainers = $customerContainerMap[$c_uid] ?? [];
|
||||
ob_start();
|
||||
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 $d_ordertypeSTR = "";
|
||||
|
||||
$c_uid = $d_customeruid;
|
||||
|
||||
if ($d_fullcycleflag == 1) {
|
||||
$d_fullcycleSTR = $d_fullcycleforced;
|
||||
$d_fullcycleCSS = "style='color:red;'";
|
||||
|
|
|
|||
Loading…
Reference in New Issue