File manager - Edit - /home/autoph/public_html/connect/home/PRF/PRF_NewPRFMyForApproval.php
Back
<?php include 'core/init.php'; protected_page(); $uniqueRefID = $user_data['u_id']; $prfDate = date_create() ->format("Y-m-d"); $prtTime =Explode(":", date('H:i:s')); $txDate = explode("-",$prfDate); $refYear = $txDate[0]; $refMonth = $txDate[1]; $refMinute = $prtTime[1]; $refSecond = $prtTime[2]; $NewRefCode = $refMonth.''.$refMinute.''.$refSecond; ?> <!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/> <link rel="stylesheet" type="text/css" href="css/jquery-ui.css"/> <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1"/> </head> <body> <div class='NewPRFHeader'> <p class='PRFBodyTitle'>📑 For Approval Request</p> </div> <!--########################## MAIN TABLE WINDOW ############################################--> <!--########################################################################################################--> <div class='NewPRFBody'> <div class='NewPRFBodyMenu'> <div class='searchDIVA'> <!--<b class='BodyTopMenu' id='LoadNewPRFForm' onclick='showActionSlipForm()'>➕ New Purchase </b> --> <b class='BodyTopMenu'>📠 Print </b> <b class='BodyTopMenu'>💾 Export</b> </div> <div class='searchDIVB'> <input type='text' id='searchText' placeholder='Search Record.' class='textSearch' style='width:70%;margin:0px;border:1px solid lightgray;'> <button id='searchNewPRF' class='searchButton' style='width:25%'> 🔍 Search</button> </div> </div> <input type='hidden' id="approvalCode"> <!-- USE TO CAPTURE WHAT TYPE OF APPROVAL TO BE PROCESSED. DEPT. HEAD, GM, ASSET--> <input type='hidden' id="DisApprovalCode"> <!-- USE TO CAPTURE WHAT TYPE OF APPROVAL TO BE PROCESSED. DEPT. HEAD, GM, ASSET--> <div id='mainTable' class='PRFTableBody'> <div style='width:100%;height:33px;background:white'> <table> <thead> <th style='width:3%'>NO</th> <th style='width:10%'>REF. CODE</th> <th style='width:7%'>DATE</th> <th style='width:18%'>COMPANY</th> <th style='width:15%'>DEALER</th> <th style='width:14%'>REQ. CATEGOY</th> <th style='width:15%'>REQ. TYPE</th> <th style='width:14%'>STATUS</th> <th style='width:5%'></th> </thead> </table> </div> <div class='PRFTableItems'> <table> <?php //$getItemHdr = mysql_query("SELECT * FROM `prf_request_hdr` WHERE `deleted`=0 AND `request_by`='$uniqueRefID' AND `current_status` = 1 ORDER BY id DESC"); $getItemHdrDeptHead = mysql_query("SELECT *FROM `prf_request_hdr` WHERE `dept_head_id` ='$uniqueRefID' AND `current_status`=1 AND `deleted`=0 ORDER BY id DESC"); while($row=mysql_fetch_array($getItemHdrDeptHead)){ $count = $count + 1; $prfCompID = $row['comp_id']; $prfCompName = mysql_result(mysql_query("SELECT comp_name from vts_company WHERE comp_id = $prfCompID"),0); $prfDealID = $row['deal_id']; $prfDealName = mysql_result(mysql_query("SELECT deal_name from vts_dealerships WHERE deal_id = $prfDealID"),0); $prfCatID = $row['category_id']; $prfCatName = mysql_result(mysql_query("SELECT description from prf_expensecategory WHERE id= $prfCatID"),0); $prfSubCatID = $row['sub_category_id']; $prfSubCatName = mysql_result(mysql_query("SELECT description from prf_expenseitems WHERE id= $prfSubCatID"),0); $prfDeptApproverID = $row['dept_head_id']; $prfDeptApproverFName=mysql_result(mysql_query("SELECT u_fname from vts_users WHERE u_id= $prfDeptApproverID"),0); $prfDeptApproverLName=mysql_result(mysql_query("SELECT u_lname from vts_users WHERE u_id= $prfDeptApproverID"),0); $prfStatus = $row['current_status']; ?><tr onclick="javascript:showPRFUpdateA(this);" onDblclick="javascript:showFollowUp(this);" ><?php echo "<td style='width:3%'>".$count."</td>"; echo "<td style='width:10%'>".strtoupper($row['reference_code'])."</td>"; echo "<td style='width:7%'>".strtoupper($row['date_created'])."</td>"; echo "<td style='width:18%'>".strtoupper($prfCompName)."</td>"; echo "<td style='width:15%'>".strtoupper($prfDealName)."</td>"; echo "<td style='width:14%'>".strtoupper($prfCatName)."</td>"; echo "<td style='width:15%'>".strtoupper($prfSubCatName)."</td>"; echo "<td style='width:14%;font-family:Yu Gothic;font-weight:normal;color:blue;font-size:12px'>"; $status = $row['current_status']; $statusName =mysql_result(mysql_query("SELECT status_name FROM prf_status WHERE sequence = $status"),0); echo $statusName; echo"</td>"; echo "<td style='width:5%;text-align:center;font-size:14px;padding:3px'>"; $checkUnReadMail = mysql_result(mysql_query("SELECT COUNT(id) FROM `prf_ff_message` WHERE `ref_code`='".$row['reference_code']."' AND `read`=0 AND `send_to`='$uniqueRefID'"),0); $withMail ='📩'; $noMail = '✉'; if($checkUnReadMail > 0){ echo "<b style='text-shadow:0 0 5px red;font-size:13px'>".$withMail."</b>"; }else{ echo $noMail; } echo"</td>"; echo "</tr>"; } //################################################################################################################################################################################## //FOR GM APPROVAL APPEND TO TABLE $getItemHdrGM = mysql_query("SELECT *FROM `prf_request_hdr` WHERE `approving_GM_id` ='$uniqueRefID' AND `current_status`= 2 AND `deleted`=0 ORDER BY id DESC"); while($row=mysql_fetch_array($getItemHdrGM)){ $count = $count + 1; $prfCompID = $row['comp_id']; $prfCompName = mysql_result(mysql_query("SELECT comp_name from vts_company WHERE comp_id = $prfCompID"),0); $prfDealID = $row['deal_id']; $prfDealName = mysql_result(mysql_query("SELECT deal_name from vts_dealerships WHERE deal_id = $prfDealID"),0); $prfCatID = $row['category_id']; $prfCatName = mysql_result(mysql_query("SELECT description from prf_expensecategory WHERE id= $prfCatID"),0); $prfSubCatID = $row['sub_category_id']; $prfSubCatName = mysql_result(mysql_query("SELECT description from prf_expenseitems WHERE id= $prfSubCatID"),0); $prfDeptApproverID = $row['dept_head_id']; $prfDeptApproverFName=mysql_result(mysql_query("SELECT u_fname from vts_users WHERE u_id= $prfDeptApproverID"),0); $prfDeptApproverLName=mysql_result(mysql_query("SELECT u_lname from vts_users WHERE u_id= $prfDeptApproverID"),0); $prfStatus = $row['current_status']; ?><tr onclick="javascript:showPRFUpdateB(this);" onDblclick="javascript:showFollowUp(this);" ><?php echo "<td style='width:3%'>".$count."</td>"; echo "<td style='width:10%'>".strtoupper($row['reference_code'])."</td>"; echo "<td style='width:7%'>".strtoupper($row['date_created'])."</td>"; echo "<td style='width:18%'>".strtoupper($prfCompName)."</td>"; echo "<td style='width:15%'>".strtoupper($prfDealName)."</td>"; echo "<td style='width:14%'>".strtoupper($prfCatName)."</td>"; echo "<td style='width:15%'>".strtoupper($prfSubCatName)."</td>"; echo "<td style='width:14%;font-family:Yu Gothic;font-weight:normal;color:blue;font-size:12px'>"; $status = $row['current_status']; $statusName =mysql_result(mysql_query("SELECT status_name FROM prf_status WHERE sequence = $status"),0); echo $statusName; echo"</td>"; echo "<td style='width:5%;text-align:center;font-size:14px;padding:3px'>"; $checkUnReadMail = mysql_result(mysql_query("SELECT COUNT(id) FROM `prf_ff_message` WHERE `ref_code`='".$row['reference_code']."' AND `read`=0 AND `send_to`='$uniqueRefID'"),0); $withMail ='📩'; $noMail = '✉'; if($checkUnReadMail > 0){ echo "<b style='text-shadow:0 0 5px red;font-size:13px'>".$withMail."</b>"; }else{ echo $noMail; } echo"</td>"; echo "</tr>"; } //################################################################################################################################################################################## //AUTHORIZING DEPARTMENT / CHECKING ASSET / SPECS $getItemHdrAsset = mysql_query("SELECT *FROM `prf_request_hdr` WHERE `approving_admin_id` ='$uniqueRefID' AND `current_status`= 3 AND `deleted`=0 ORDER BY id DESC"); while($row=mysql_fetch_array($getItemHdrAsset)){ $count = $count + 1; $prfCompID = $row['comp_id']; $prfCompName = mysql_result(mysql_query("SELECT comp_name from vts_company WHERE comp_id = $prfCompID"),0); $prfDealID = $row['deal_id']; $prfDealName = mysql_result(mysql_query("SELECT deal_name from vts_dealerships WHERE deal_id = $prfDealID"),0); $prfCatID = $row['category_id']; $prfCatName = mysql_result(mysql_query("SELECT description from prf_expensecategory WHERE id= $prfCatID"),0); $prfSubCatID = $row['sub_category_id']; $prfSubCatName = mysql_result(mysql_query("SELECT description from prf_expenseitems WHERE id= $prfSubCatID"),0); $prfDeptApproverID = $row['dept_head_id']; $prfDeptApproverFName=mysql_result(mysql_query("SELECT u_fname from vts_users WHERE u_id= $prfDeptApproverID"),0); $prfDeptApproverLName=mysql_result(mysql_query("SELECT u_lname from vts_users WHERE u_id= $prfDeptApproverID"),0); $prfStatus = $row['current_status']; ?><tr onclick="javascript:showPRFUpdateC(this);" onDblclick="javascript:showFollowUpAsset(this);" ><?php echo "<td style='width:3%'>".$count."</td>"; echo "<td style='width:10%'>".strtoupper($row['reference_code'])."</td>"; echo "<td style='width:7%'>".strtoupper($row['date_created'])."</td>"; echo "<td style='width:18%'>".strtoupper($prfCompName)."</td>"; echo "<td style='width:15%'>".strtoupper($prfDealName)."</td>"; echo "<td style='width:14%'>".strtoupper($prfCatName)."</td>"; echo "<td style='width:15%'>".strtoupper($prfSubCatName)."</td>"; echo "<td style='width:14%;font-family:Yu Gothic;font-weight:normal;color:blue;font-size:12px'>"; $status = $row['current_status']; $statusName =mysql_result(mysql_query("SELECT status_name FROM prf_status WHERE sequence = $status"),0); echo $statusName; echo"</td>"; echo "<td style='width:5%;text-align:center;font-size:14px;padding:3px'>"; $checkUnReadMail = mysql_result(mysql_query("SELECT COUNT(id) FROM `prf_ff_message` WHERE `ref_code`='".$row['reference_code']."' AND `read`=0 AND `send_to`='$uniqueRefID'"),0); $withMail ='📩'; $noMail = '✉'; if($checkUnReadMail > 0){ echo "<b style='text-shadow:0 0 5px red;font-size:13px'>".$withMail."</b>"; }else{ echo $noMail; } echo"</td>"; echo "</tr>"; } //################################################################################################################################################################################## //################################################################################################################################################################################## ?> <tr><td colspan='9' ><hr style='padding:0px;background:transparent;border:0px;border-bottom:1px solid gray'></td> <tr> <td colspan='3' style='background:white;font-family:Yu Gothic; font-size:13px;color: #f97d43 ;height:20px;font-weight:normal'>Selected Record:</td> <td colspan='6' style='background:white;'> <input type='hidden' id='selectedPRFHeaderID' class='TableBottomLabel'> <input disabled type='text' id='selectedPRFHeaderIDLabel' style='background:white;border:0px;font-family:Yu Gothic;font-size:14px;color: #f97d43 ;font-weight:normal'> </td> </tr> </table> </div> </div> </div> <!--########################## EDIT/UPDATE PURCHASE REQUEST ###############################################--> <div id="PRFPOSTEDNewRequest" class="PopUpWindowPRF"> <div class='PopUpWindowTitle'> 🗒 Posted Purchase Request Form <div class='PopUpWindowClose'> <b onclick="javascript:hidePostedPRFForm(this);" style='font-weight:bold'> ✕ </b> </div> </div> <!--BODY--> <div class='PopUpWindowBodyContainer'> <label class='PRFRefID' id='PosteduReferenceID'>:</label> <label class='PRFRefID'>Reference Number.</label> <div id="PostedPRFNewContentInfo" class="PopUpWindowBody"> </div> <div class='PRFLowerActionButtonDiv' style='background:transparent'> <div style='width:70%;float:right;height:50px;padding:10px;background:transparent'> <button onclick="javascript:showDisApprovedConfirmationBox(this);" class='PopUpLowerButtonR' style='width:30%'>✖ DisApprove</button> <!--PRF_PostedForDeptHeadApproval.php --> <button onclick="javascript:showReturnConfirmationBox(this);" class='PopUpLowerButtonR' style='width:30%'>🔃 Return to Requestor</button> <button onclick="javascript:showApprovedConfirmationBox(this);" class='PopUpLowerButtonR' style='width:30%'>📪 Approve PRF</button> </div> </div> </div> </div> <!--########################## END OF EDIT/UPDATING PURCHASE REQEUST ############################################--> <!--########################## END OF EDIT/UPDATING PURCHASE REQEUST ############################################--> <!--########################## EDIT/UPDATE PURCHASE REQUEST ###############################################--> <div id="PRFPOSTEDNewRequestAsset" class="PopUpWindowPRF"> <div class='PopUpWindowTitle'> 🗒 Asset Validation: <div class='PopUpWindowClose'> <b onclick="javascript:hidePostedPRFFormAsset(this);" style='font-weight:bold'> ✕ </b> </div> </div> <!--BODY--> <div class='PopUpWindowBodyContainer'> <label class='PRFRefID' id='PosteduReferenceIDAsset'>:</label> <label class='PRFRefID'>Reference Number.</label> <div id="PostedPRFNewContentInfoAsset" class="PopUpWindowBody"> </div> <div class='PRFLowerActionButtonDiv' style='background:transparent'> <div style='width:70%;float:right;height:50px;padding:10px;background:transparent'> <button onclick="javascript:showReturnConfirmationBoxAsset(this);" class='PopUpLowerButtonR' style='width:30%'>🔃 Issue Existing Asset</button> <button onclick="javascript:showApprovedConfirmationBoxAsset(this);" class='PopUpLowerButtonR' style='width:30%'>📪 OK to Purchase</button> </div> </div> </div> </div> <!--########################## END OF EDIT/UPDATING PURCHASE REQEUST ############################################--> <div id="PRFTimeLine" class="PopUpActionWindow"> <div class='PopUpWindowTitle'> 🪧 Confirm Action <div class='PopUpWindowClose'> <b onclick="javascript:hideFollowUp(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:10px;padding-left:20px;width:100%;background:white;font-family:Yu Gothic; font-size:16px;color:red ;height:10px;font-weight:normal;text-align:left'> Active / Selected Record:<br> <input disabled type='hidden' id='ActionReferenceID' style='text-align:center;margin-top:10px;background:white;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <input disabled type='text' id='ActionReferenceIDDesc' style='text-align:center;margin-top:10px;background:yellow;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <br> </td> </tr> <tr> <td colspan='1' style='padding:20px;width:250px;background:white;text-align:center;padding-top:5px'> <button onclick="javascript:showPostedPRFForm(this);" id='LoadPOSTEDPRF' class="PopUpLowerButtonR" style='width:100%'>📑 View Details</button> </td> </tr> </table> </div> <!--########################## CHECKING OF ASSET ############################################--> <!--########################## CHECKING OF ASSET ############################################--> <!--########################## CHECKING OF ASSET ############################################--> <!--########################## ACHECKING OF ASSET ############################################--> <div id="PRFTimeLineAsset" class="PopUpActionWindow"> <div class='PopUpWindowTitle'> 🪧 Asset Validation - Checking Existing Assets <div class='PopUpWindowClose'> <b onclick="javascript:hideFollowUpAsset(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:10px;padding-left:20px;width:100%;background:white;font-family:Yu Gothic; font-size:16px;color:red ;height:10px;font-weight:normal;text-align:left'> Active / Selected Record:<br> <input disabled type='hidden' id='ActionReferenceIDAsset' style='text-align:center;margin-top:10px;background:white;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <input disabled type='text' id='ActionReferenceIDDescAsset' style='text-align:center;margin-top:10px;background:yellow;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <br><br> </td> </tr> <tr> <td colspan='1' style='padding:20px;width:250px;background:white;text-align:center;padding-top:5px'> <button onclick="javascript:showPostedPRFFormAsset(this);" id='LoadPOSTEDPRFAsset' style='float:right;height:35px;width:100%;border-radius:5px;'>📑 View Details</button> </td> </tr> </table> </div> <!--########################## PRF DEPT. HEAD DISAPPROVAL ############################################--> <!--########################## PRF DEPT. HEAD DISAPPROVAL ############################################--> <div id="PRFDisApprovedCOnfirmation" class="PopUpActionWindow"> <div class='PopUpWindowTitle'> ⚠ Confirm Action <div class='PopUpWindowClose'> <b onclick="javascript:hideDisApprovedConfirmationBox(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:20px;width:100%;background:white;font-family:Yu Gothic; font-size:16px;color:red ;height:10px;font-weight:normal;text-align:left;padding-bottom:10px;'> Are you sure you want to DISAPPROVE this purchase request?<br> <input disabled type='hidden' id='DisApprovedRequestID' value='<?php echo $UpdatePRFReferenceNumber;?>' style='text-align:center;margin-top:5px;background:white;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <input disabled type='text' value='<?php echo $UpdatePRFReferenceNumber;?>' style='text-align:center;margin-top:5px;background:white;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> </td> </tr> <tr> <td colspan='1' style='padding:10px;width:250px;background:white;text-align:center;padding-top:5px;padding-left:15px;padding-right:15px'> <button id='PRFProcessDisApproval' style='float:right;height:40px;width:55%;border-radius:5px;'>⛔ Yes, DISAPPROVE</button> <button onclick="javascript:hideDisApprovedConfirmationBox(this);" style='float:left;height:40px;width:40%;border-radius:5px;'>🔙 No</button> </td> </tr> </table> </div> <!--##################################################################################################################--> <!--##################################################################################################################--> <!--########################## ASSET APPROVAL ############################################--> <div id="PRFApprovedCOnfirmationAsset" class="PopUpActionWindow"> <div class='PopUpWindowTitle'> ⚠ Confirm Action <div class='PopUpWindowClose'> <b onclick="javascript:hideApprovedConfirmationBoxAsset(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:20px;width:100%;background:white;font-family:Yu Gothic; font-size:16px;color:red ;height:10px;font-weight:normal;text-align:left;padding-bottom:10px;'> Are you sure you want to proceed with the acquisition of this request?<br> <input disabled type='text' id='ApprovedRequestIDAsset' value='<?php echo $UpdatePRFReferenceNumber;?>'style='text-align:center;margin-top:5px;background:white;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> </td> </tr> <tr> <td colspan='1' style='padding:10px;width:250px;background:white;text-align:center;padding-top:5px;padding-left:15px;padding-right:15px'> <button id='PRFProcessApprovalAsset' style='float:right;height:40px;width:60%;border-radius:5px;'>⛔ Purchase this item</button> <button onclick="javascript:hideApprovedConfirmationBoxAsset(this);" style='float:left;height:40px;width:30%;border-radius:5px;'>🔙 No</button> </td> </tr> </table> </div> <!--########################## PRF DEPT. HEAD APPROVAL ############################################--> <!--########################## PRF DEPT. HEAD APPROVAL ############################################--> <!--########################## PRF DEPT. HEAD APPROVAL ############################################--> <div id="PRFApprovedCOnfirmation" class="PopUpActionWindow"> <div class='PopUpWindowTitle'> ⚠ Confirm Action <div class='PopUpWindowClose'> <b onclick="javascript:hideApprovedConfirmationBox(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:20px;width:100%;background:white;font-family:Yu Gothic; font-size:16px;color:red ;height:10px;font-weight:normal;text-align:left;padding-bottom:10px;'> Are you sure you want to APPROVE this purchase request?<br> <input disabled type='text' id='ApprovedRequestID' value='<?php echo $UpdatePRFReferenceNumber;?>'style='text-align:center;margin-top:5px;background:white;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> </td> </tr> <tr> <td colspan='1' style='padding:10px;width:250px;background:white;text-align:center;padding-top:5px;padding-left:15px;padding-right:15px'> <button id='PRFProcessApproval' style='float:right;height:40px;width:55%;border-radius:5px;'>⛔ Yes, APPROVE</button> <button onclick="javascript:hideApprovedConfirmationBox(this);" style='float:left;height:40px;width:40%;border-radius:5px;'>🔙 No</button> </td> </tr> </table> </div> <!--########################## PRF DEPT. HEAD APPROVAL ############################################--> <!--########################## PRF DEPT. HEAD APPROVAL ############################################--> <div id="PRFReturnCOnfirmationAsset" class="PopUpActionWindow"> <div class='PopUpWindowTitle'> ⚠ Confirm Action <div class='PopUpWindowClose'> <b onclick="javascript:hideReturnConfirmationBoxAsset(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:10px;width:100%;background:white;font-family:Yu Gothic; font-size:16px;color:gray ;height:10px;font-weight:normal;text-align:left;padding-bottom:5px;'> Type your reason for cancelling this request.. <input disabled type='hidden' id='returnRefCodeAsset' value='<?php echo $UpdatePRFReferenceNumber;?>'style='text-align:center;margin-top:5px;background:white;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <textarea rows='2' type='text' id='returnCommentAsset' placeholder="" style='width:100%;margin-top:2px;text-left:center;font-family:Yu Gothic;font-size:12px;font-weight:normal;color:red'></textarea> </td> </tr> <tr> <td colspan='1' style='padding:10px;width:250px;background:white;text-align:center;padding-top:5px;padding-left:15px;padding-right:15px'> <button id='PRFAssetIssuance' style='float:right;height:40px;width:65%;border-radius:5px;'>⛔ Yes, Assign this Asset</button> <button onclick="javascript:hideReturnConfirmationBoxAsset(this);" style='float:left;height:40px;width:30%;border-radius:5px;'>🔙 No</button> </td> </tr> </table> </div> <!--########################## PRF DEPT. HEAD APPROVAL ############################################--> <!--########################## PRF DEPT. HEAD APPROVAL ############################################--> <div id="PRFReturnCOnfirmationAssetItem" class="PopUpActionWindow"> <div class='PopUpWindowTitle'> ⚠ Cancel Seletect Item <div class='PopUpWindowClose'> <b onclick="javascript:hideFollowUpAssetItemOnly(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:10px;width:100%;background:white;font-family:Yu Gothic; font-size:16px;color:gray ;height:10px;font-weight:normal;text-align:left;padding-bottom:5px;'> Type your reason for cancelling this item.. <input disabled type='hidden' id='returnRefCodeAssetItemOnly' value='<?php echo $UpdatePRFReferenceNumber;?>'style='text-align:center;margin-top:5px;background:white;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <input type='hidden' id='cancelThisItem'> <input type='hidden' id='cancelThisRefCode'> <textarea rows='2' type='text' id='returnCommentAssetItemOnly' placeholder="" style='width:100%;margin-top:2px;text-left:center;font-family:Yu Gothic;font-size:12px;font-weight:normal;color:red'></textarea> </td> </tr> <tr> <td colspan='1' style='padding:10px;width:250px;background:white;text-align:center;padding-top:5px;padding-left:15px;padding-right:15px'> <button id='PRFAssetIssuanceItemOnly' style='float:right;height:40px;width:65%;border-radius:5px;'>⛔ Cancel this Item</button> <button onclick="javascript:hideFollowUpAssetItemOnly(this);" style='float:left;height:40px;width:30%;border-radius:5px;'>🔙 No</button> </td> </tr> </table> </div> <!--########################## PRF DEPT. HEAD APPROVAL ############################################--> <!--########################## PRF DEPT. HEAD APPROVAL ############################################--> <div id="PRFReturnCOnfirmation" class="PopUpActionWindow"> <div class='PopUpWindowTitle'> ⚠ Confirm Action <div class='PopUpWindowClose'> <b onclick="javascript:hideReturnConfirmationBox(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:10px;width:100%;background:white;font-family:Yu Gothic; font-size:16px;color:red ;height:10px;font-weight:normal;text-align:left;padding-bottom:5px;'> Are you sure you want to RETURN this purchase request? <input disabled type='hidden' id='returnRefCode' value='<?php echo $UpdatePRFReferenceNumber;?>'style='text-align:center;margin-top:5px;background:white;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <textarea id='returnComment' placeholder="Type your comment here..." style='width:100%;margin-top:2px' rows=2></textarea> </td> </tr> <tr> <td colspan='1' style='padding:10px;width:250px;background:white;text-align:center;padding-top:5px;padding-left:15px;padding-right:15px'> <button id='PRFProcessReturnPRF' style='float:right;height:40px;width:65%;border-radius:5px;'>⛔ Yes, RETURN THIS PRF</button> <button onclick="javascript:hideReturnConfirmationBox(this);" style='float:left;height:40px;width:30%;border-radius:5px;'>🔙 No</button> </td> </tr> </table> </div> </body> </html> <!--##################################################################################################################--> <!--- LOCALIZED COPY OF JAVASCRIPT --> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ //====================================================================================================== $("#LoadPOSTEDPRF").click(function(){ var ActionReferenceID = $("#ActionReferenceID").val(); var approvalCode = $("#approvalCode").val(); var DisApprovalCode = $("#DisApprovalCode").val(); ShowUploadBar(); //alert(approvalCode); //exit; $.ajax({ url: "PRF_PostedForDeptHeadApproval.php", type: "POST", async: false, data: { "ActionReferenceID": ActionReferenceID, "approvalCode": approvalCode, "DisApprovalCode": DisApprovalCode, "done": 1 }, success: function(d){ ShowUploadBar(); $("#PostedPRFNewContentInfo").html(d); updateApprovalPRF(); } }) }); //====================================================================================================== //====================================================================================================== $("#LoadPOSTEDPRFAsset").click(function(){ var ActionReferenceID = $("#ActionReferenceID").val(); var approvalCode = $("#approvalCode").val(); var DisApprovalCode = $("#DisApprovalCode").val(); ShowUploadBar(); hideFollowUpAsset(); //alert(approvalCode); //exit; $.ajax({ url: "PRF_PostedForDeptHeadApproval.php", type: "POST", async: false, data: { "ActionReferenceID": ActionReferenceID, "approvalCode": approvalCode, "DisApprovalCode": DisApprovalCode, "done": 1 }, success: function(d){ ShowUploadBar(); $("#PostedPRFNewContentInfoAsset").html(d); updateApprovalPRF(); } }) }); //====================================================================================================== //====================================================================================================== $("#PRFProcessReturnPRF").click(function(){ var returnRefCode = $("#returnRefCode").val(); var returnComment = $("#returnComment").val(); if(returnComment==''){ alert('Please type your comment or reason for returning this request'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_ReturnPRF.php", type: "POST", async: false, data: { "returnRefCode": returnRefCode, "returnComment": returnComment, "done": 1 }, success: function(d){ hideApprovedConfirmationBox(); hidePostedPRFForm(); $("#mainTable").html(d); ShowUploadBar(); updateApprovalPRF(); } }) }); //====================================================================================================== //====================================================================================================== $("#PRFProcessApproval").click(function(){ var UpdateReferenceHeaderCode = $("#UpdateReferenceHeaderCode").val(); var myApprovalCode = $("#myApprovalCode").val(); //alert(myApprovalCode); //exit; ShowUploadBar(); $.ajax({ url: "PRF_PostNewPRF.php", type: "POST", async: false, data: { "UpdateReferenceHeaderCode": UpdateReferenceHeaderCode, "myApprovalCode": myApprovalCode, "done": 1 }, success: function(d){ hideApprovedConfirmationBox(); hidePostedPRFForm(); $("#mainTable").html(d); ShowUploadBar(); updateApprovalPRF(); } }) }); //====================================================================================================== //====================================================================================================== $("#PRFProcessApprovalAsset").click(function(){ var UpdateReferenceHeaderCode = $("#UpdateReferenceHeaderCode").val(); var myApprovalCode = $("#myApprovalCode").val(); //alert(UpdateReferenceHeaderCode); //exit; ShowUploadBar(); $.ajax({ url: "PRF_PostAssetApprovedPurchase.php", type: "POST", async: false, data: { "UpdateReferenceHeaderCode": UpdateReferenceHeaderCode, "myApprovalCode": myApprovalCode, "done": 1 }, success: function(d){ hideApprovedConfirmationBoxAsset(); hidePostedPRFFormAsset(); $("#mainTable").html(d); ShowUploadBar(); updateApprovalPRF(); updateCanvassCount(); } }) }); //====================================================================================================== //====================================================returnCommentAssetItemOnly returnRefCodeAssetItemOnly cancelThisItem================================================== $("#PRFAssetIssuance").click(function(){ var returnRefCodeAsset = $("#returnRefCodeAsset").val(); var returnCommentAsset = $("#returnCommentAsset").val(); if(returnCommentAsset==''){ alert('Please type your comment or reason for returning this request'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_AssetIssuancePRFCancelled.php", type: "POST", async: false, data: { "returnRefCodeAsset": returnRefCodeAsset, "returnCommentAsset": returnCommentAsset, "done": 1 }, success: function(d){ hideApprovedConfirmationBox(); hideReturnConfirmationBoxAsset(); hidePostedPRFForm(); $("#mainTable").html(d); ShowUploadBar(); updateApprovalPRF(); } }) }); //====================================================================================================== //====================================================returnCommentAssetItemOnly returnRefCodeAssetItemOnly ================================================== $("#PRFAssetIssuanceItemOnly").click(function(){ var returnCommentAssetItemOnly = $("#returnCommentAssetItemOnly").val(); var cancelThisRefCode = $("#cancelThisRefCode").val(); var cancelThisItem = $("#cancelThisItem").val(); //alert(cancelThisRefCode); if(returnCommentAssetItemOnly==''){ alert('Please type your comment or reason for returning this request'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_AssetIssuanceCancelledItemOnly.php", type: "POST", async: false, data: { "returnCommentAssetItemOnly": returnCommentAssetItemOnly, "cancelThisRefCode": cancelThisRefCode, "cancelThisItem": cancelThisItem, "done": 1 }, success: function(d){ hideFollowUpAssetItemOnly(); hidePostedPRFForm(); $("#UpdatePRFItemBody").html(d); ShowUploadBar(); updateApprovalPRF(); $('#returnCommentAssetItemOnly').val(''); } }) }); //====================================================================================================== //====================================================================================================== $("#PRFProcessDisApproval").click(function(){ var UpdateReferenceHeaderCode = $("#UpdateReferenceHeaderCode").val(); var DisApprovalCode = $("#DisApprovalCode").val(); //alert(DisApprovalCode); //exit; ShowUploadBar(); $.ajax({ url: "PRF_PostNewDISAPPROVED.php", type: "POST", async: false, data: { "UpdateReferenceHeaderCode": UpdateReferenceHeaderCode, "DisApprovalCode": DisApprovalCode, "done": 1 }, success: function(d){ hidePRFDisApprovedCOnfirmation(); hidePostedPRFForm(); $("#mainTable").html(d); ShowUploadBar(); updateApprovalPRF(); } }) }); }); </script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <!--##################################################################################################################--> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> function hideFollowUp(){ $("#PRFTimeLine").fadeOut(500); }; function showFollowUp(){ $("#PRFTimeLine").fadeIn(500); }; function hideFollowUpAsset(){ $("#PRFTimeLineAsset").fadeOut(500); }; function showFollowUpAsset(){ $("#PRFTimeLineAsset").fadeIn(500); }; function hideFollowUpAssetItemOnly(){ $("#PRFReturnCOnfirmationAssetItem").fadeOut(500); }; function showFollowUpAssetItemOnly(){ $("#PRFReturnCOnfirmationAssetItem").fadeIn(500); }; function hidePostedPRFFormAsset(){ $("#PRFPOSTEDNewRequestAsset").fadeOut(500); hideReturnConfirmationBox(); hideApprovedConfirmationBoxAsset(); hideReturnConfirmationBoxAsset(); hideFollowUpAssetItemOnly(); }; function showPostedPRFFormAsset(){ $("#PRFPOSTEDNewRequestAsset").fadeIn(500); hideFollowUp(); }; function hidePostedPRFForm(){ $("#PRFPOSTEDNewRequest").fadeOut(500); hideReturnConfirmationBox(); }; function showPostedPRFForm(){ $("#PRFPOSTEDNewRequest").fadeIn(500); hideFollowUp(); }; function hideApprovedConfirmationBox(){ $("#PRFApprovedCOnfirmation").fadeOut(500); }; function showApprovedConfirmationBox(){ $("#PRFApprovedCOnfirmation").fadeIn(500); }; function hideApprovedConfirmationBoxAsset(){ $("#PRFApprovedCOnfirmationAsset").fadeOut(500); }; function showApprovedConfirmationBoxAsset(){ $("#PRFApprovedCOnfirmationAsset").fadeIn(500); }; function hideReturnConfirmationBox(){ $("#PRFReturnCOnfirmation").fadeOut(500); }; function showReturnConfirmationBox(){ $("#PRFReturnCOnfirmation").fadeIn(500); }; function hideReturnConfirmationBoxAsset(){ $("#PRFReturnCOnfirmationAsset").fadeOut(500); }; function showReturnConfirmationBoxAsset(){ $("#PRFReturnCOnfirmationAsset").fadeIn(500); }; function hidePRFDisApprovedCOnfirmation(){ $("#PRFDisApprovedCOnfirmation").fadeOut(500); }; function showPRFDisApprovedCOnfirmation(){ $("#PRFDisApprovedCOnfirmation").fadeIn(500); }; function showPRFUpdateA(row) { var x=row.cells; document.getElementById("ActionReferenceIDDesc").value = "Ref.#: " + x[1].innerHTML; document.getElementById("ActionReferenceID").value = x[1].innerHTML; document.getElementById("approvalCode").value = 2; document.getElementById("DisApprovalCode").value = 91; document.getElementById("returnRefCode").value = x[1].innerHTML; document.getElementById("returnRefCodeAsset").value = x[1].innerHTML; //document.getElementById("myCompanyName").value = x[3].innerHTML; //document.getElementById("myDealerName").value = x[4].innerHTML; //document.getElementById("myCategory").value = x[5].innerHTML; //document.getElementById("myType").value = x[6].innerHTML; //document.getElementById("selectedPRFHeaderIDLabel").value = x[1].innerHTML; document.getElementById("PosteduReferenceID").innerHTML = x[1].innerHTML; } function showPRFUpdateB(row) { var x=row.cells; document.getElementById("ActionReferenceIDDesc").value = "Ref.#: " + x[1].innerHTML; document.getElementById("ActionReferenceID").value = x[1].innerHTML; document.getElementById("approvalCode").value = 3; document.getElementById("DisApprovalCode").value = 92; document.getElementById("returnRefCode").value = x[1].innerHTML; document.getElementById("returnRefCodeAsset").value = x[1].innerHTML; //document.getElementById("myCompanyName").value = x[3].innerHTML; //document.getElementById("myDealerName").value = x[4].innerHTML; //document.getElementById("myCategory").value = x[5].innerHTML; //document.getElementById("myType").value = x[6].innerHTML; //document.getElementById("selectedPRFHeaderIDLabel").value = x[1].innerHTML; document.getElementById("PosteduReferenceID").innerHTML = x[1].innerHTML; } function showPRFUpdateC(row) { var x=row.cells; document.getElementById("ActionReferenceIDDesc").value = "Ref.#: " + x[1].innerHTML; document.getElementById("ActionReferenceID").value = x[1].innerHTML; document.getElementById("ActionReferenceIDDescAsset").value = "Ref.#: " + x[1].innerHTML; document.getElementById("ActionReferenceIDAsset").value = x[1].innerHTML; document.getElementById("approvalCode").value = 4; document.getElementById("DisApprovalCode").value = 93; document.getElementById("returnRefCode").value = x[1].innerHTML; document.getElementById("returnRefCodeAsset").value = x[1].innerHTML; //document.getElementById("myCompanyName").value = x[3].innerHTML; //document.getElementById("myDealerName").value = x[4].innerHTML; //document.getElementById("myCategory").value = x[5].innerHTML; //document.getElementById("myType").value = x[6].innerHTML; //document.getElementById("selectedPRFHeaderIDLabel").value = x[1].innerHTML; document.getElementById("PosteduReferenceID").innerHTML = x[1].innerHTML; document.getElementById("PosteduReferenceIDAsset").innerHTML = x[1].innerHTML; } //====================================================================================================== function updateApprovalPRF(){ $.ajax({ url: "PRF_UpdateApprovalCount.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#forMyApprovalCount").html(d); } }) } //====================================================================================================== function updateCanvassCount(){ $.ajax({ url: "PRF_UpdateCanvassCount.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#canvassCount").html(d); } }) } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings