FSN#39055 BCS/2000 functionaliteit in FACILITOR - customization
svn path=/Website/trunk/; revision=33656
This commit is contained in:
121
APPL/BGT/bgt_budget.js
Normal file
121
APPL/BGT/bgt_budget.js
Normal file
@@ -0,0 +1,121 @@
|
||||
$(document).ready(function () {
|
||||
setTimeout("init_budget()", 100);
|
||||
});
|
||||
|
||||
function init_budget()
|
||||
{
|
||||
$("#budgetdiscipline").change(function() {change_discipline(); });
|
||||
$("#budgetproject").change(function() {change_project(); });
|
||||
$("#budgetcostcategory").change(function() {change_rubriek(); });
|
||||
$("#costtypegroup").change(function() {change_groep(); });
|
||||
$("#costtype").change(function() {change_soort(); });
|
||||
|
||||
var init_niveau = "";
|
||||
var init_key = -1;
|
||||
if ($("#budgetdiscipline").val() != -1) { init_niveau = "D"; init_key = $("#budgetdiscipline").val(); }
|
||||
if ($("#budgetproject").val() != -1) { init_niveau = "P"; init_key = $("#budgetproject").val(); }
|
||||
if ($("#budgetcostcategory").val() != -1) { init_niveau = "R"; init_key = $("#budgetcostcategory").val(); }
|
||||
if ($("#costtypegroup").val() != -1) { init_niveau = "G"; init_key = $("#costtypegroup").val(); }
|
||||
if ($("#costtype").val() != -1) { init_niveau = "S"; init_key = $("#costtype").val(); }
|
||||
|
||||
if (init_key > 0)
|
||||
{
|
||||
$.getJSON( "../bgt/get_bgt_info_ajax.asp",
|
||||
{ req_info: "initsearch",
|
||||
niveau: init_niveau,
|
||||
parent_key: -1,
|
||||
init_key: init_key
|
||||
},
|
||||
re_init);
|
||||
}
|
||||
}
|
||||
|
||||
function re_init(data)
|
||||
{
|
||||
fill_rubriekselector("D", -1 , data.parents.D);
|
||||
fill_rubriekselector("P", data.parents.D, data.parents.P);
|
||||
fill_rubriekselector("R", data.parents.P, data.parents.R);
|
||||
fill_rubriekselector("G", data.parents.R, data.parents.G);
|
||||
fill_rubriekselector("S", data.parents.G, data.parents.S);
|
||||
}
|
||||
|
||||
function change_discipline()
|
||||
{
|
||||
var discipline_key = $("#budgetdiscipline").val();
|
||||
process_info({niveau:"R",lov:[]});
|
||||
process_info({niveau:"G",lov:[]});
|
||||
process_info({niveau:"S",lov:[]});
|
||||
fill_rubriekselector("P", discipline_key);
|
||||
}
|
||||
function change_project()
|
||||
{
|
||||
var project_key = $("#budgetproject").val();
|
||||
process_info({niveau:"G",lov:[]});
|
||||
process_info({niveau:"S",lov:[]});
|
||||
fill_rubriekselector("R", project_key);
|
||||
}
|
||||
function change_rubriek()
|
||||
{
|
||||
var rubriek_key = $("#budgetcostcategory").val();
|
||||
process_info({niveau:"S",lov:[]});
|
||||
fill_rubriekselector("G", rubriek_key);
|
||||
}
|
||||
function change_groep()
|
||||
{
|
||||
var groep_key = $("#costtypegroup").val();
|
||||
fill_rubriekselector("S", groep_key);
|
||||
}
|
||||
function change_soort()
|
||||
{
|
||||
var soort_key = $("#costtype").val();
|
||||
if ($("#contingency").length)
|
||||
$("#contingency").prop("disabled", (soort_key > 0 ? false: true) );
|
||||
}
|
||||
|
||||
function fill_rubriekselector(niveau, parent_key, init_key)
|
||||
{
|
||||
$.getJSON( "../bgt/get_bgt_info_ajax.asp",
|
||||
{ req_info: "projectsearch",
|
||||
niveau: niveau,
|
||||
parent_key: parent_key,
|
||||
init_key: init_key
|
||||
},
|
||||
process_info);
|
||||
}
|
||||
|
||||
|
||||
function process_info(data)
|
||||
{
|
||||
var select;
|
||||
switch(data.niveau)
|
||||
{
|
||||
case "D": select = $("#budgetdiscipline"); break;
|
||||
case "P": select = $("#budgetproject"); break;
|
||||
case "R": select = $("#budgetcostcategory"); break;
|
||||
case "G": select = $("#costtypegroup"); break;
|
||||
case "S": select = $("#costtype"); break;
|
||||
}
|
||||
|
||||
var sel_key = -1;
|
||||
var new_lov = '<option value="-1" ></option>';
|
||||
if (data.lov.length > 0)
|
||||
{
|
||||
for (i=0; i<data.lov.length;i++)
|
||||
{
|
||||
var opt = data.lov[i];
|
||||
new_lov += '<option value="' + opt.key + '"' + (opt.sel?"selected":"") + '>'+ safe.html(opt.oms) + '</option>';
|
||||
if (opt.sel) sel_key = opt.key;
|
||||
}
|
||||
select.prop("disabled", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
select.prop("disabled", true);
|
||||
}
|
||||
select.empty().append(new_lov);
|
||||
if (sel_key > -1)
|
||||
select.val(sel_key);
|
||||
|
||||
if ($("#contingency").length) // dit veld bestaat alleen in bgt_budget.
|
||||
$("#contingency").prop("disabled", true);
|
||||
}
|
||||
48
APPL/BGT/bgt_budgetmutatie.asp
Normal file
48
APPL/BGT/bgt_budgetmutatie.asp
Normal file
@@ -0,0 +1,48 @@
|
||||
<%@language = "javascript" %>
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: bgt_budgetmutatie.asp
|
||||
|
||||
Description: aanroep van model_bgt_budgetmutatie
|
||||
|
||||
Context:
|
||||
|
||||
Notes:
|
||||
*/
|
||||
%>
|
||||
<!-- #include file="../scf/scaffolding.inc" -->
|
||||
<!-- #include file="../api2/model_bgt_budgetmutatie.inc" -->
|
||||
<%
|
||||
var this_model = new model_bgt_budgetmutatie();
|
||||
|
||||
scaffolding(this_model,
|
||||
{
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"mutationdate",
|
||||
"budgetfrom",
|
||||
"budgetto"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"mutationdate",
|
||||
"name",
|
||||
"budgetfrom",
|
||||
"budgetto",
|
||||
"amountto",
|
||||
"amountdifference"
|
||||
],
|
||||
"orderby": [
|
||||
"mutationdate",
|
||||
"budgetfrom"
|
||||
]
|
||||
},
|
||||
"edit":{
|
||||
"modal": true
|
||||
}
|
||||
});
|
||||
%>
|
||||
56
APPL/BGT/bgt_discipline.asp
Normal file
56
APPL/BGT/bgt_discipline.asp
Normal file
@@ -0,0 +1,56 @@
|
||||
<%@language = "javascript" %>
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: bgt_discipline.asp
|
||||
|
||||
Description: fac_management aanroep van model_bgt_discipline
|
||||
|
||||
Context:
|
||||
|
||||
Notes:
|
||||
*/
|
||||
%>
|
||||
<!-- #include file="../scf/scaffolding.inc" -->
|
||||
<!-- #include file="../api2/model_bgt_discipline.inc" -->
|
||||
<!-- #include file="../bgt/bgt_tools.inc" -->
|
||||
<%
|
||||
var this_model = new model_bgt_discipline();
|
||||
|
||||
scaffolding(this_model,
|
||||
{
|
||||
"search": {
|
||||
"autosearch": true
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"code",
|
||||
"name",
|
||||
"customer",
|
||||
"startdate",
|
||||
"vat"
|
||||
]
|
||||
},
|
||||
"show": {
|
||||
"requires": {
|
||||
"js": ["./mgt_tools.js"]
|
||||
},
|
||||
"buttons": [
|
||||
{
|
||||
"title": L("lcl_lcl_terminologie"),
|
||||
"action": "edit_terminologie",
|
||||
"icon": "doc_text_image.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"wrap": {
|
||||
"frames": [{ url: "../bgt/bgt_project.asp?mode=list&budgetdiscipline={0}",
|
||||
autfunction: "WEB_BGTMAN"
|
||||
},
|
||||
{ url: "//mgt/fac_functie.asp?mode=list&ins_discipline={0}",
|
||||
autfunction: "WEB_PRSSYS"
|
||||
}]
|
||||
}
|
||||
});
|
||||
%>
|
||||
40
APPL/BGT/bgt_kostenrubriek.asp
Normal file
40
APPL/BGT/bgt_kostenrubriek.asp
Normal file
@@ -0,0 +1,40 @@
|
||||
<%@language = "javascript" %>
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: bgt_kostenrubriek.asp
|
||||
|
||||
Description: aanroep van model_bgt_kostenrubriek
|
||||
|
||||
Context:
|
||||
|
||||
Notes:
|
||||
*/
|
||||
%>
|
||||
<!-- #include file="../scf/scaffolding.inc" -->
|
||||
<!-- #include file="../api2/model_bgt_kostenrubriek.inc" -->
|
||||
<%
|
||||
var this_model = new model_bgt_kostenrubriek();
|
||||
|
||||
scaffolding(this_model,
|
||||
{
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"name",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
"wrap": {
|
||||
"frames": [{ url: "../mgt/prs_kostensoortgrp.asp?mode=list&budgetcostcategory={0}",
|
||||
autfunction: "WEB_FINMSU"
|
||||
}]
|
||||
}
|
||||
});
|
||||
%>
|
||||
43
APPL/BGT/bgt_project.asp
Normal file
43
APPL/BGT/bgt_project.asp
Normal file
@@ -0,0 +1,43 @@
|
||||
<%@language = "javascript" %>
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: bgt_project.asp
|
||||
|
||||
Description: aanroep van model_bgt_project
|
||||
|
||||
Context:
|
||||
|
||||
Notes:
|
||||
*/
|
||||
%>
|
||||
<!-- #include file="../scf/scaffolding.inc" -->
|
||||
<!-- #include file="../api2/model_bgt_project.inc" -->
|
||||
<%
|
||||
var this_model = new model_bgt_project();
|
||||
|
||||
scaffolding(this_model,
|
||||
{
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"budgetdiscipline",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"budgetdiscipline",
|
||||
"name",
|
||||
"pricedate"
|
||||
]
|
||||
},
|
||||
"wrap": {
|
||||
"frames": [{ url: "../bgt/bgt_kostenrubriek.asp?mode=list&budgetproject={0}",
|
||||
autfunction: "WEB_BGTUSE"
|
||||
}]
|
||||
}
|
||||
|
||||
});
|
||||
%>
|
||||
68
APPL/BGT/bgt_tools.inc
Normal file
68
APPL/BGT/bgt_tools.inc
Normal file
@@ -0,0 +1,68 @@
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: mgt_tools.inc
|
||||
|
||||
Description:
|
||||
|
||||
Context:
|
||||
|
||||
Notes:
|
||||
*/
|
||||
%>
|
||||
<%
|
||||
function bgt_budgetdiscipline_foreign()
|
||||
{
|
||||
return {
|
||||
"tbl": "(SELECT d.ins_discipline_key"
|
||||
+ ", p.bgt_disc_params_code ||' '|| d.ins_discipline_omschrijving oms"
|
||||
+ " FROM ins_tab_discipline d"
|
||||
+ " , bgt_disc_params p"
|
||||
+ " WHERE d.ins_discipline_key = p.bgt_ins_discipline_key"
|
||||
+ " AND d.ins_discipline_module = 'BGT'"
|
||||
+ " AND d.ins_discipline_verwijder IS NULL)",
|
||||
"key": "ins_discipline_key",
|
||||
"desc": "oms"
|
||||
};
|
||||
}
|
||||
|
||||
function bgt_budgetproject_foreign()
|
||||
{
|
||||
return {
|
||||
"tbl": "(SELECT bgt_project_key"
|
||||
+ " , bgt_project_code ||' '|| bgt_project_omschrijving oms"
|
||||
+ " FROM bgt_project"
|
||||
+ " WHERE bgt_project_verwijder IS NULL)",
|
||||
"key": "bgt_project_key",
|
||||
"desc": "oms"
|
||||
};
|
||||
}
|
||||
|
||||
function bgt_budgetcostcategory_foreign()
|
||||
{
|
||||
return {
|
||||
"tbl": "bgt_kostenrubriek",
|
||||
"key": "bgt_kostenrubriek_key",
|
||||
"desc": "bgt_kostenrubriek_oms"
|
||||
};
|
||||
}
|
||||
|
||||
function bgt_costtypegroup_foreign()
|
||||
{
|
||||
return {
|
||||
"tbl": "prs_kostensoortgrp",
|
||||
"key": "prs_kostensoortgrp_key",
|
||||
"desc": "prs_kostensoortgrp_oms"
|
||||
};
|
||||
}
|
||||
|
||||
function bgt_costtype_foreign()
|
||||
{
|
||||
return {
|
||||
"tbl": "prs_kostensoort",
|
||||
"key": "prs_kostensoort_key",
|
||||
"desc": "prs_kostensoort_oms"
|
||||
};
|
||||
}
|
||||
%>
|
||||
54
APPL/BGT/fin_factuur.asp
Normal file
54
APPL/BGT/fin_factuur.asp
Normal file
@@ -0,0 +1,54 @@
|
||||
<%@language = "javascript" %>
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: fin_factuur.asp
|
||||
|
||||
Description: aanroep van model_fin_factuur
|
||||
|
||||
Context:
|
||||
|
||||
Notes:
|
||||
*/
|
||||
%>
|
||||
<!-- #include file="../scf/scaffolding.inc" -->
|
||||
<!-- #include file="../api2/model_fin_factuur.inc" -->
|
||||
<%
|
||||
var this_model = new model_fin_factuur();
|
||||
|
||||
scaffolding(this_model,
|
||||
{
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"costtype",
|
||||
"order"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"invoice",
|
||||
"month",
|
||||
"date",
|
||||
"costtype",
|
||||
"remark",
|
||||
"total",
|
||||
"totalvat"
|
||||
,
|
||||
"totalincl"
|
||||
],
|
||||
"orderby": [
|
||||
"invoice",
|
||||
"date",
|
||||
"costtype"
|
||||
]
|
||||
},
|
||||
"edit": {
|
||||
"requires": {
|
||||
"js": ["../bgt/fin_factuur.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
%>
|
||||
36
APPL/BGT/fin_factuur.js
Normal file
36
APPL/BGT/fin_factuur.js
Normal file
@@ -0,0 +1,36 @@
|
||||
$(document).ready(function () {
|
||||
setTimeout("init_factuur()", 100);
|
||||
});
|
||||
|
||||
function init_factuur()
|
||||
{
|
||||
$("#order").change(function() {change_order(); });
|
||||
}
|
||||
|
||||
function change_order()
|
||||
{
|
||||
var order_key = $("#order").val();
|
||||
$.getJSON( "../bgt/get_bgt_info_ajax.asp",
|
||||
{ req_info: "order",
|
||||
niveau: "x",
|
||||
parent_key: order_key
|
||||
},
|
||||
process_info);
|
||||
}
|
||||
|
||||
function myParseFloat(txt)
|
||||
{
|
||||
return parseFloat(txt.replace(',', '.'));
|
||||
}
|
||||
|
||||
function process_info(data)
|
||||
{
|
||||
if (data.inclbtw)
|
||||
{
|
||||
$("#totalvat").closest("tr").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#totalvat").closest("tr").show();
|
||||
}
|
||||
}
|
||||
63
APPL/BGT/mld_opdr.asp
Normal file
63
APPL/BGT/mld_opdr.asp
Normal file
@@ -0,0 +1,63 @@
|
||||
<%@language = "javascript" %>
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: mld_opdr.asp
|
||||
|
||||
Description: fac_management aanroep van model_mld_opdr
|
||||
|
||||
Context:
|
||||
|
||||
Notes:
|
||||
*/
|
||||
%>
|
||||
<!-- #include file="../scf/scaffolding.inc" -->
|
||||
<!-- #include file="../api2/model_mld_opdr.inc" -->
|
||||
<%
|
||||
var this_model = new model_mld_opdr();
|
||||
|
||||
scaffolding(this_model,
|
||||
{
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"budgetdiscipline",
|
||||
"budgetproject",
|
||||
"budgetcostcategory",
|
||||
"costtypegroup",
|
||||
"costtype",
|
||||
"reference",
|
||||
"company",
|
||||
"additional"
|
||||
],
|
||||
"requires": {
|
||||
"js": ["../bgt/bgt_budget.js"]
|
||||
}
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"costtype",
|
||||
"reference",
|
||||
"company",
|
||||
"account",
|
||||
"description",
|
||||
"startdate",
|
||||
"enddate",
|
||||
"amount",
|
||||
"vat"
|
||||
],
|
||||
"orderby": [
|
||||
"costtype",
|
||||
"reference",
|
||||
"company"
|
||||
]
|
||||
},
|
||||
"edit": {
|
||||
"requires": {
|
||||
"js": ["../bgt/bgt_budget.js"]
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
%>
|
||||
Reference in New Issue
Block a user