Files
Facilitor/APPL/Shared/loadBtwTabel.asp
Erik Groener c76159b791 SVRZ#35236 BES: BTW-veld bieden voor vrije inkooporders
svn path=/Website/trunk/; revision=28032
2016-02-03 15:20:57 +00:00

58 lines
1.5 KiB
Plaintext

<%@language = "javascript" %>
<% /*
$Revision$
$Id$
*/ %>
<%
DOCTYPE_Disable = true;
%>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/selector.inc" -->
<%
// Build a group list
var bedrijf_key = getFParamInt("bedrijf_key", -1);
var selectjustone = getFParam("selectjustone", true);
var emptyOption = getFParam("emptyOption", null);
var required = getFParam("required", false);
var btwtabel_key = -1;
var sql = "SELECT b.fin_btwtabel_key"
+ " FROM prs_bedrijf b"
+ " WHERE b.prs_bedrijf_key = " + bedrijf_key;
var oRs = Oracle.Execute(sql);
if (!oRs.eof)
btwtabel_key = oRs("fin_btwtabel_key").Value || -1;
oRs.Close();
if (btwtabel_key == -1)
{
sql = "SELECT f.fin_btwtabel_key"
+ " FROM fin_btwtabel f"
+ " WHERE w.fin_btwtabel_verwijder IS NULL"
+ " AND w.fin_btwtabel_default = 1"
oRs = Oracle.Execute(sql);
if (!oRs.eof)
btwtabel_key = oRs("fin_btwtabel_key").Value || -1;
oRs.Close();
}
var sql = "SELECT fin_btwtabelwaarde_perc"
+ " , fin_btwtabelwaarde_oms"
+ " FROM fin_btwtabelwaarde w"
+ " WHERE w.fin_btwtabel_key = " + btwtabel_key
+ " ORDER BY fin_btwtabelwaarde_perc";
var params = { required: required,
selectjustone: selectjustone
}
if (emptyOption != null)
params.emptyOption = emptyOption;
FCLTselectorOptions(sql,
params);
%>