Untitled
unknown
plain_text
5 months ago
14 kB
3
Indexable
<%@page import="java.util.*,com.dcx.service.gcs.gcschargeback.model.*"%> <%@page import="com.dcx.service.gcs.gcschargeback.model.jdbc.*,com.dcx.service.gcs.gcschargeback.common.*"%> <%! public static GcsLogger log = GcsLogger.getLogger(ApplicationConstants.GCS); %> <% java.text.NumberFormat fmt = new java.text.DecimalFormat("0.00"); String path = "/GCSChargebackWeb/"; GCSCBClaimDTO claimdto = (GCSCBClaimDTO)(request.getAttribute("REQUEST_GCSAPP_DTO")); SessionDTO sdto = (SessionDTO) request.getSession().getAttribute("SESSION_CLAIM_DTO"); //Unpackage claimdto ArrayList condlist = claimdto.getListconditions(); GCSCBConditionDTO conddto = (GCSCBConditionDTO) condlist.get(claimdto.getConditionSequence() - 1); List laborlist = conddto.getLabor(); //Unpackage session dto GCSCBClaimDTO sclaimdto = sdto.getClaim(); ArrayList scondlist = sclaimdto.getListconditions(); GCSCBConditionDTO sconddto = (GCSCBConditionDTO) scondlist.get(claimdto.getConditionSequence() - 1); List slaborlist = sconddto.getLabor(); // Labor hour & Sequence No Ctr // Dhanraj Sahani - 09/26/2005 int zeroLaborHourCtr = 0, sequenceNoCtr = 0; // End of Code - 09/26/2005 // GCSCBConditionDTO sconddto = null; // GCSCBConditionDTO xconddto = null; // for(int i=0;i<scondlist.size();i++) // { // xconddto = (GCSCBConditionDTO) scondlist.get(i); // if(xconddto.getConditionSequence() == condseq) // sconddto = xconddto; // } int condseq = claimdto.getConditionSequence(); if (condseq == 0) condseq = 1; int noofconds = claimdto.getNoOfConditions(); if (noofconds == 0) noofconds = 1; String action = request.getParameter("action"); if (action == null) action = ""; String checkedArray = request.getParameter("checkedArray"); if (checkedArray == null) checkedArray = ""; GCSCBLaborDTO LDTO = null; // GCSCBLaborDTO SLDTO = null; %> <SCRIPT LANGUAGE="JavaScript" SRC="<%=path%>service/claims/gcs/gcschargeback/scripts/GCSCBLabor.js"></SCRIPT> <form id ="laborformId" name="laborForm" method="POST" action="<%=path%>GCSChargebackServlet"> <!-- ************ Beginning of HTML, Below Tab Bar *********** --> <input type="hidden" name="PEG_RATE" value="1"> <!-- ************ Beginning of HTML, Below Tab Bar *********** --> <input type="hidden" name="I_CLM_SAN" value="<%= claimdto.getGcd_i_clm_san() %>"> <input type="hidden" name="I_CURR_REP" value="<%= claimdto.getDealer() %>"> <input type="hidden" name="GCS_I_PRTITN" value="<%=claimdto.getGcs_i_prtitn()%>"> <input type="hidden" name="GCS_I_VHCL_SAN" value="<%=claimdto.getGcs_i_vhcl_san()%>"> <input type="hidden" name="GCS_I_CLM_SAN" value='<%=claimdto.getGcs_i_clm_san()%>'> <input type="hidden" name="C_MKT" value="<%=claimdto.getMarket()%>"> <input type="hidden" name="I_CLM" value="<%=claimdto.getClaimNo()%>"> <input type="hidden" name="C_TRANS_TYP" value="<%= claimdto.getTranstype() %>"> <input type="hidden" name="action" value="addlabor"> <input type="hidden" name="nextAction" value="getlabor"> <input type="hidden" name="I_PRTITN" value="<%=claimdto.getGcs_i_prtitn()%>"> <input type="hidden" name="I_VHCL_SAN" value='<%=claimdto.getGcs_i_vhcl_san()%>'> <input type="hidden" name="NO_OF_CONDS" value="<%=noofconds%>"> <input type="hidden" name="checkedArray" value=''> <input type="hidden" name="chargeBackHoursArray" value=''> <table cellspacing="0" cellpadding="0"> <tr> <td class="formLabel" height="35">Condition: </td> <td width="5"></td> <td> <select name="I_COND_SEQ" class="bodyText" onChange="setcondseq();"> <% int c = 0; for(int i=0;i< noofconds;i++) { c++; if (condseq == c ) { %> <option value="<%=c%>" selected><%=c%> </option> <% }else { %> <option value="<%=c%>" ><%=c%> </option> <% } } %> </select> </td> </tr> </table> <div align="center"> <!-- ************ Begining of "LOP Summary" Table *********** --> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="15" height="10" align="center" class="tableHeader">Labor Summary</td> </tr> <tr> <td colspan="15" height="3"></td> </tr> <tr> <td class="tableColumnHeader" align="center" width="15"></td> <td width="2"></td> <td class="tableColumnHeader" align="center" width="40">Line</td> <td width="2"></td> <td class="tableColumnHeader" align="center" width="104">LOP Number</td> <td width="2"></td> <td class="tableColumnHeader" align="center" width="400">LOP Description</td> <td width="2"></td> <td class="tableColumnHeader" align="center" width="105">Failure Code</td> <td width="2"></td> <td class="tableColumnHeader" align="center" width="92">Labor Hour</td> <td width="2"></td> <td class="tableColumnHeader" align="center" width="138">Chargeback Hour</td> <td width="2"></td> <%-- Local Currency indicated with Amount w.r.t SeRV00200516 by t4810mr --%> <td class="tableColumnHeader" align="center" width="73">Amount(USD)</td> </tr> <tr height=5></tr> <input type="hidden" name='laborListSize' value='<%=laborlist.size()%>'> <% try{ // double rlaborhour = 0.00; // double ramount = 0.00; // int iseq = 0; // if(laborlist.size() > 0 ) { // for(int i=0;i<laborlist.size();i++) { // LDTO = (GCSCBLaborDTO) laborlist.get(i); // for(int j=0;j<slaborlist.size();j++) { // SLDTO = (GCSCBLaborDTO) slaborlist.get(j); // if(LDTO.getLopNo().equals(SLDTO.getLaborOperation())) { // rlaborhour = SLDTO.getLaborHour(); // ramount = SLDTO.getAmount(); // } // } // String bground=""; // if (i%2 == 0){ // bground = "#FFFFFF"; // }else{ // bground = "#CCCCCC"; // } if(laborlist.size() > 0 ) { String bground = ""; // Dhanraj Sahani - 09/15/2005 boolean laborSequenceCheck = false; // End of Code - 09/15/2005 for (int i=0; i<laborlist.size();i++) { sequenceNoCtr++; // Dhanraj Sahani - 09/15/2005 laborSequenceCheck = false; // End of Code - 09/15/2005 LDTO = (GCSCBLaborDTO) laborlist.get(i); if (i%2 == 0) bground = "#FFFFFF"; else bground = "#CCCCCC"; // Checks if labor hours submitted > 0 and correct sequence # is checked // Dhanraj Sahani - 09/15/2005 // System.out.println("checkedArray=" + checkedArray); if(LDTO.getLaborHourSubmt() > 0 && (checkedArray.trim().equals("") || checkedArray.indexOf(Integer.toString(LDTO.getLaborSequence())) > -1)) laborSequenceCheck = true; // End of Code - 09/15/2005 %> <tr bgcolor="<%=bground%>"> <td align="center" class="tableCell" valign="center"> <% if(sclaimdto.getClaimAdjAmt() > 0 || sclaimdto.getAppliedDeductible() > 0 || (claimdto.getBatchid().equals("$F")) || (claimdto.getBatchid().equals("$P"))) {%> <input disabled type="Checkbox" name='isChecked<%=i%>' " value="<%=LDTO.getLaborSequence() %>" <% if(LDTO.getLaborHourSubmt() > 0) { %> checked <%}%> > <%} else { //jtest fix by t4810mr //if(LDTO.getLaborHourRemain() == 0) { if(Double.compare(LDTO.getLaborHourRemain(),0) == 0) { zeroLaborHourCtr++; %> --<input type="hidden" name='isChecked<%=i%>' " value="<%=LDTO.getLaborSequence() %>" <%} else { %> <input type="Checkbox" name='isChecked<%=i%>' " value="<%=LDTO.getLaborSequence() %>" <% // Commented by Dhanraj Sahani - 09/15/2005 // if(LDTO.getLaborHourSubmt() > 0) // End of Code - 09/15/2005 if(laborSequenceCheck) { %> checked <% } %> onclick="if(document.laborForm['isChecked<%=i%>'].checked) { document.laborForm['chargeBackHours<%=i%>'].value='<%=LDTO.getLaborHourRemain()%>'; } else { document.laborForm['chargeBackHours<%=i%>'.value=''; }" > <%} } %> </td> <td></td> <td align="center" class="tableCell" valign="center">L<%= LDTO.getLaborSequence() %></td> <td></td> <td align="left" class="tableCell" valign="center"><%=LDTO.getLaborOperation()%></td> <td></td> <td align="left" class="tableCell" valign="center" width="400"><% if(!LDTO.getLaborDescription().equalsIgnoreCase(" ")){%><%= LDTO.getLaborDescription()%> <%} else {%> No Description Found <%}%></td> <td></td> <td align="center" class="tableCell" valign="center"><%if(LDTO.getFailedCode() != null){%><%=LDTO.getFailedCode()%> <%}else {%> Not Found <%}%></td> <td></td> <td class="tableCell" valign="center" align="center"><%=LDTO.getLaborHourRemain()%></td> <td></td> <td align="right"> <% if(sclaimdto.getClaimAdjAmt() > 0 || sclaimdto.getAppliedDeductible() > 0 || (claimdto.getBatchid().equals("$F")) || (claimdto.getBatchid().equals("$P"))) {%> <input disabled type="Text" size="4" maxlength="4" name='chargeBackHours<%=i%>' value='<%=LDTO.getLaborHourSubmt()%>'> <%} else { %> <% // Checks if chargeback labor hours = 0, disabled the chargeback labor hours submitted field // Dhanraj Sahani - 09/30/2005 //jtest fix by t4810mr //if(LDTO.getLaborHourRemain() == 0) { if(Double.compare(LDTO.getLaborHourRemain(),0) == 0) { %> <input disabled type="Text" size="4" maxlength="4" name='chargeBackHours<%=i%>' value='<%=LDTO.getLaborHourSubmt()%>'> <% // End of Code - 09/30/2005 // Checks if labor hours submitted > 0 and correct sequence # is checked // Dhanraj Sahani - 09/15/2005 } else if(laborSequenceCheck) { %> <input type="Text" size="4" maxlength="4" name='chargeBackHours<%=i%>' value='<%=LDTO.getLaborHourSubmt()%>'> <% } else {%> <input type="Text" size="4" maxlength="4" name='chargeBackHours<%=i%>' value='0.0'> <% } } // End of Code - 09/15/2005 %> <input type="hidden" name='chargeBackHoursFull<%=i%>' value='<%=LDTO.getLaborHourRemain()%>'> </td> <td></td> <% // Checks if labor hours submitted > 0 and correct sequence # is checked // Dhanraj Sahani - 09/15/2005 if(laborSequenceCheck) { %> <td align="right" class="tableCell" valign="center"><%=fmt.format(LDTO.getLaborAmountSubmt())%></td> <% } else { %> <td align="right" class="tableCell" valign="center">0.0</td> <% } // End of Code - 09/15/2005 %> <td></td> </tr> <% } } else { out.println("No Labor Operation found"); } }catch(Exception e) { //SeRV00744909 : Added by t9512rb for Jtest changes - Start //System.out.println("Exception on GCSCBLabor.jsp"); //e.printStackTrace(); log.error("Exception on GCSCBLabor.jsp "+e.toString()); //SeRV00744909 : Added by t9512rb for Jtest changes - End } %> </table> </table> <!-- ************ End of "Claim Summary" Table *********** --> <BR><BR><BR> <% // Display Save Button only in Hour > 0 // Dhanraj Sahani - 09/26/2005 //SeRV00744909 : Added by t9512rb for Jtest changes - Start //System.out.println("sequenceNoCtr = " + sequenceNoCtr + " zeroLaborHourCtr = " + zeroLaborHourCtr); log.debug("sequenceNoCtr = " + sequenceNoCtr + " zeroLaborHourCtr = " + zeroLaborHourCtr); //SeRV00744909 : Added by t9512rb for Jtest changes - End if(sequenceNoCtr != zeroLaborHourCtr) { %> <!-- ************ Beginning of Dynamic Graphic Buttons *********** --> <table cellpadding=0 cellspacing=0 border=0> <tr> <td class=buttonSpace> </td> <td class=buttonRegHead> </td> <td class=buttonRegBody align="center"> <% if(sclaimdto.getClaimAdjAmt() > 0 || sclaimdto.getAppliedDeductible() > 0 || (claimdto.getBatchid().equals("$F")) || (claimdto.getBatchid().equals("$P"))) {%> <a class=buttonLabel href="javascript:cannotSaveMsg();">Save</a> <%} else {%> <a class=buttonLabel href="javascript:Save(<%= laborlist.size() %>);">Save</a></td> <%}%> <td class=buttonRegTail> </td> <td> <td> <td class=buttonSpace> </td> <td class=buttonRegHead> </td> <td class=buttonRegBody align="center"><a class=buttonLabel href="javascript:document.laborForm.reset();">Reset</a></td> <td class=buttonRegTail> </td> </tr> </table> <% } %> <!-- ************ End of Dynamic Graphic Buttons. *********** --> </form> </DIV> ---end of code--- //else { %> <input type="Checkbox" name='isChecked<%=i%>' " value="<%=LDTO.getLaborSequence() %>" <% // Commented by Dhanraj Sahani - 09/15/2005 // if(LDTO.getLaborHourSubmt() > 0) // End of Code - 09/15/2005 if(laborSequenceCheck) { %> checked <% } %> onclick="if(document.laborForm['isChecked<%=i%>'].checked) { document.laborForm['chargeBackHours<%=i%>'].value='<%=LDTO.getLaborHourRemain()%>'; } else { document.laborForm['chargeBackHours<%=i%>'.value=''; }" > <%} } %> //here when i unchecking it should be zero('') but it is always showing some value means it is not going to else
Editor is loading...
Leave a Comment