127 lines
3.7 KiB
PHP
127 lines
3.7 KiB
PHP
<?
|
|
include getenv("DOCUMENT_ROOT")."/include/session_include.php";
|
|
|
|
//$func->checkAdmin("index.php");
|
|
|
|
$c_uid = trim($_POST["c_uid"]);
|
|
|
|
//echo "[$c_uid]";exit;
|
|
|
|
if ($mode == "") {
|
|
$mode = "update";
|
|
$btnName = "UPDATE";
|
|
$admTag = "DISABLED";
|
|
}
|
|
|
|
if($c_uid == "") {
|
|
$msg = "Invaild data. Please try again. [Err - c_uid / FORECAST-POPUP]";
|
|
$func -> modalMsg ($msg, 1);
|
|
exit();
|
|
} else {
|
|
|
|
// Get Information
|
|
$query = "SELECT * FROM tbl_customer WHERE c_uid = '$c_uid'";
|
|
$result=$jdb->fQuery($query, "fetch query error");
|
|
// echo"$query";
|
|
|
|
for($i=0; $i<sizeof($result); $i++)
|
|
{
|
|
//list($key, $value) = each($result);
|
|
foreach ( (Array) $result as $key => $value )
|
|
$$key = $value;
|
|
}
|
|
|
|
$c_locationSTR = str_replace("\\", "", $c_location);
|
|
$c_comment_riSTR = str_replace("\\", "", $c_comment_ri);
|
|
|
|
}
|
|
|
|
$c_paymenttypeSTR = $arrPaymenttype[$c_paymenttype];
|
|
|
|
if ($c_paymenttype =="CA") {
|
|
|
|
$query = "SELECT * FROM tbl_daily
|
|
WHERE d_customeruid = '$c_uid' AND d_status = 'F' AND d_quantity > 1 ORDER BY d_visitdate DESC LIMIT 1";
|
|
|
|
$result = $jdb->fQuery($query, "list error");
|
|
//echo "[$query]";
|
|
|
|
if ($result[0] != "") {
|
|
for($i=0; $i<sizeof($result); $i++)
|
|
{
|
|
//list($key, $value) = each($result);
|
|
foreach ( (Array) $result as $key => $value )
|
|
$$key = $value;
|
|
}
|
|
|
|
$d_visitdateSTR = $func -> convertFormat ($d_visitdate, 3);
|
|
|
|
if ($d_paystatus == "") $d_paystatus = "N";
|
|
$d_paystatusSTR = $arrPaidStatus[$d_paystatus];
|
|
|
|
if ($d_paystatus == "P") $d_paystatusSTR = $d_paystatusSTR." (".$d_visitdateSTR." / $".$d_payamount.")";
|
|
else $d_paystatusSTR = $d_paystatusSTR." (".$d_visitdateSTR.")";
|
|
}
|
|
else $d_paystatusSTR = "-";
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">CUSTOMER INFORMATION</h4>
|
|
<button type="button" class="btn" data-dismiss="modal" aria-label="Close" style="color:#fff;"><i class="bi bi-x"></i></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
|
|
<table class="tb-info-box">
|
|
|
|
<tr>
|
|
<td class="td-title-info">Payment Type</td>
|
|
<td class="td-text-info">
|
|
<?=$c_paymenttypeSTR?>
|
|
</td>
|
|
</tr>
|
|
|
|
<? if ($c_paymenttype =="CA") { ?>
|
|
<tr>
|
|
<td class="td-title-info">Pay Status</td>
|
|
<td class="td-text-info">
|
|
<?=$d_paystatusSTR?>
|
|
</td>
|
|
</tr>
|
|
<? } ?>
|
|
|
|
<tr>
|
|
<td class="td-title-info">Comment</td>
|
|
<td class="td-text-info">
|
|
<textarea id="c_comment" class="textarea" name="c_comment" rows="4" cols="20"><?=$c_comment_riSTR?></textarea>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="td-title-info">Container Location</td>
|
|
<td class="td-text-info">
|
|
<textarea id="c_location" class="textarea" name="c_location" rows="2" cols="20"><?=$c_locationSTR?></textarea>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
<br>
|
|
<div class="text-center">
|
|
<button type="button" class="btn-gray" data-dismiss="modal">CLOSE</button>
|
|
</div>
|
|
</FORM>
|
|
</div>
|
|
|
|
|
|
<div class="modal fade" id="myModalPopup" tabindex="-1" role="dialog" aria-labelledby="myModalPopup" style="opacity: 0.5; padding-right: 0px !important;">
|
|
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
|
<div class="modal-content" style="background-color:#2A9B56 !important; max-width:260px; margin: 0 auto;">
|
|
<div class="myModalPopup-body" style="text-align: center; border-radius: 5px; max-height:60px; font-size:18px; background-color:#2A9B56; color: #FFFFFF; font-weight: bold;padding:0.5em 1em; ">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|