<% @language="javascript"%>
<% /*
    $Revision$
    $Id$

    File:           bes_bedrijfproduct_search.asp
    Description:    Quickscan klant
                    Aan de hand van een oude factuur invullen wat de klant zoal gebruikt

    Parameters:     optioneel
    Context:
    Note:
*/ %>

<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/iface.inc" -->
<!-- #include file="../Shared/plaatsselector.inc" -->
<!-- #include file="../Shared/bedrijfselector.inc" -->
<!-- #include file="../Shared/selector.inc" -->
<!-- #include file="../Shared/calendar.inc" -->
<!-- #include file="bes.inc" -->

<%
FCLTHeader.Requires({ plugins:["jQuery"] });

var authparams = user.checkAutorisation("WEB_BESMSU");

var disc_key = getQParamInt("disc_key", -1); // Discipline
var srtgroep_key = getQParamInt("srtgroep_key", -1);
%>

<html>
  <head>
    <%  FCLTHeader.Generate(); %>
      <script type="text/javascript">
          function doSubmit()
            {
                if (!validateForm("u2"))
                    return false;
                document.forms.u2.submit();
            }
      </script>
  </head>
  <body id="searchbody">
    <div id="search">
      <form name="u2" target="workFrame" action="bes_bedrijfproduct_search_list.asp" method="get">
<%      BLOCK_START("searchtable", L("lcl_filterblok"));%>
          <tr>
            <td class="searchkolom1">
              <table><!-- x rijen, 2 kolommen: label + veld -->
<%
              sql = "SELECT prs_bedrijf_key, prs_bedrijf_naam||' '||prs_bedrijf_bezoek_plaats prs_bedrijf_naam"
                  + "  FROM prs_v_aanwezigbedrijf b"
                  + " WHERE prs_bedrijf_intern=1"  // of contract=1?
                  + " ORDER BY b.prs_bedrijf_naam_upper";
              FCLTselector("klant_key",
                           sql,
                           { label: L("lcl_company"),
                             trclass: "primsearch",
                             emptyOption: L("lcl_select_bedrijf"),
                             required: true
                           });
%>
              </table>
            </td><!-- end column 1 -->

            <td class="searchkolom2">
              <table><!-- x rijen, 2 kolommen: label + veld -->
              <tr>
                <td>
<%
                  // Filtervelden 2de kolom
%>
                </td>
              </tr>
              </table>
            </td><!-- end column 2 -->
          </tr>
<%      BLOCK_END();

        var buttons =  [ {title: L("lcl_search"), action: "doSubmit()", id: "bSearch" } ];
        CreateButtons(buttons, { entersubmit: true});
%>
      </form>
    </div> <!-- search -->

    <div id="result">
      <iframe width="100%" height="100%"
              src="../Shared/empty.asp"
              name="workFrame" id="workFrame"
              onload="FcltMgr.iframeLoaded(this)"
              frameborder="0" scrolling="no">
      </iframe>
    </div>
  </body>
</html>
