  <script type="text/javascript" src="calendar1.js"></script>

  <br>
  <table border=0 cellspacing=1 cellpadding=2 width=760>
  <form action="controllers/inputController.php" method="post" name="reportform" id="reportform">
  <input name="reporttype" id="reporttype" type="hidden" value="<?=$pubtask;?>">
  <input name="rpt_projectpkey" id="rpt_projectpkey" type="hidden" value="<?=$pubprojectpkey;?>">
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Report Name</td>
  <td valign=top width=610 class=newscontent style="border-bottom: 1px solid;">
  <?
  if ($pubtask=="mbl") {
    echo "Material Budget List Report";
  } else if ($pubtask=="qv") {
    echo "Quantity Variance Report";
  } else if ($pubtask=="po") {
    echo "Purchase Order Report";
  } else if ($pubtask=="sp") {
    echo "Supplier Performance Report";
  } else if ($pubtask=="bm") {
    echo "Budget Monitoring Report";
  } else if ($pubtask=="pmc") {
    echo "Project Material Cost Report";
  } else if ($pubtask=="scm") {
    echo "Sub-con Material Report";
  } else if ($pubtask=="iqa") {
    echo "IQA Report";
  }  else if ($pubtask=="otdr") {
    echo "On Time Delevery Report";
	}
  ?>
  </td>
  </tr>
  <? if (($pubtask=="po")||($pubtask=="sp")) { ?>
    <tr valign=top>
    <td valign=top width=150 class=formlabel>Supplier Name</td>
    <td valign=top width=610 class=newscontent style="border-bottom: 1px solid;">
    <select name="rpt_supplierpkey" id="rpt_supplierpkey" style="width: 360px;">
    <? $objsupplierpkey = $pubsupplierid; ?>
    <? include_once('object-selectsupplier.tpl'); ?>
    </select>
    </td>
    </tr>
  <? } ?>
  <? if ($pubtask=="scm") { ?>
    <tr valign=top>
    <td valign=top width=150 class=formlabel>Subcon Name</td>
    <td valign=top width=610 class=newscontent style="border-bottom: 1px solid;">
    <select name="rpt_subconpkey" id="rpt_subconpkey" style="width: 360px;">
    <? $objsubconpkey = $pubsubconid; ?>
    <? include_once('object-selectsubcon.tpl'); ?>
    </select>
    </td>
    </tr>
<!--arie tambah utk add supplier-->
	<tr valign=top>
    <td valign=top width=150 class=formlabel>Supplier Name</td>
    <td valign=top width=610 class=newscontent style="border-bottom: 1px solid;">
    <select name="rpt_supplierpkey" id="rpt_supplierpkey" style="width: 360px;">
    <? $objsupplierpkey = $pubsupplierid; ?>
    <? include_once('object-selectsupplier.tpl'); ?>
    </select>
    </td>
    </tr>
	<!--end arie tambah utk add supplier-->
  <? } ?>
  <? if (($pubtask=="po")||($pubtask=="pmc")) { ?>
    <tr valign=top>
    <td valign=top width=150 class=formlabel>PO No</td>
    <td valign=top width=610 class=newscontent style="border-bottom: 1px solid;">
    <input name="rpt_pono" id="rpt_pono" type="text" value="<?=$pubpono;?>" maxlength=40 style="width: 180px;" onKeypress="return integerOnly();">
    </td>
    </tr>
  <? } ?>
  <? if ($pubtask=="po") { ?>
  <!--arie edit remove po date-->

    <!--<tr valign=top>
    <td valign=top width=150 class=formlabel>PO Date</td>
    <td valign=top width=610 class=newscontent style="border-bottom: 1px solid;">
    <input name="rpt_podate" id="rpt_podate" type="text" value="<?=$pubpodate;?>" maxlength=10 style="width: 90px;" onKeypress="dateOnly();">
    <a href='javascript:cal1.popup();'><img src="images/icon/cal.gif" width="16" height="16" border="0" alt="Click to select date"></a>
    </td>
    </tr>-->
  <? } ?>
  <? if ($pubtask=="po") { ?>
    <tr valign=top>
    <td valign=top width=150 class=formlabel>Trade</td>
    <td valign=top width=610 class=newscontent style="border-bottom: 1px solid;">
    <select name="rpt_subtradepkey" id="rpt_subtradepkey" style="width: 360px;">
    <? $objtradepkey3 = $pubsubtradeid; ?>
    <? include_once('object-selecttrade3.tpl'); ?>
    </select>
    </td>
    </tr>
  <? } ?>
  <? if ($pubtask=="po") { ?>
    <tr valign=top>
    <td valign=top width=150 class=formlabel>Sub-Trade</td>
    <td valign=top width=610 class=newscontent style="border-bottom: 1px solid;">
    <select name="rpt_subsubtradepkey" id="rpt_subsubtradepkey" style="width: 360px;">
    <? $objtradepkey4 = $pubsubsubtradeid; ?>
    <? include_once('object-selecttrade4.tpl'); ?>
    </select>
    </td>
    </tr>
  <? } ?>
  <!-- otdr tambahan -->
  
  <!--<tr valign=top>
  <td valign=top width=760 colspan=2 class=newscontent><hr size=1></td>
  </tr>-->
  <tr valign=top>
  <td valign=top width=150 class=formlabel>
  Start Date
  </td>
  <td valign=top width=610 colspan=2 class=newscontent style="border-top: 1px solid; border-bottom: 1px solid;">
  <table border=0 cellspacing=1 cellpadding=2 width=480>
    <tr valign=top>
    <td valign=top width=150 class=newscontent>
    <input name="rpt_datefrom" type="text" id="rpt_datefrom" value="<?=$pubdatefrom;?>" maxlength=10 style="width: 90px;" onkeypress="dateOnly();">
    <a href='javascript:cal2.popup();'><img src="images/icon/cal.gif" width="16" height="16" border="0" alt="Click to select date"></a>
    </td>
    <td valign=top width=330 class=tipscontent>
    &nbsp;
    </td>
    </tr>
  </table>
  </td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>
  End Date
  </td>
  <td valign=top width=610 colspan=2 class=newscontent style="border-bottom: 1px solid;">
  <table border=0 cellspacing=1 cellpadding=2 width=480>
    <tr valign=top>
    <td valign=top width=150 class=newscontent>
    <input name="rpt_dateto" type="text" id="rpt_dateto" value="<?=$pubdateto;?>" maxlength=10 style="width: 90px;" onkeypress="dateOnly();">
    <a href='javascript:cal3.popup();'><img src="images/icon/cal.gif" width="16" height="16" border="0" alt="Click to select date"></a>
    </td>
    <td valign=top width=330 class=tipscontent>
    &nbsp;
    </td>
    </tr>
  </table>
  </td>
  </tr>
  <input type="hidden" name="job" id="job" value="report_print">
  </form>
  </table>

  <script type="text/javascript">

  var objpodate = document.getElementById('rpt_podate');
  if (objpodate!=null) {
    var cal1 = new calendar1(document.forms['reportform'].elements['rpt_podate']);
    cal1.year_scroll = true;
    cal1.time_comp = false;
  }

  var objdatefrom = document.getElementById('rpt_datefrom');
  if (objdatefrom!=null) {
    var cal2 = new calendar1(document.forms['reportform'].elements['rpt_datefrom']);
    cal2.year_scroll = true;
    cal2.time_comp = false;
  }

  var objdateto = document.getElementById('rpt_dateto');
  if (objdateto!=null) {
    var cal3 = new calendar1(document.forms['reportform'].elements['rpt_dateto']);
    cal3.year_scroll = true;
    cal3.time_comp = false;
  }

  </script>

  <script type="text/javascript">

  function validateCriteria() {

    var isvalid=true;
    return isvalid;

  }

  </script>