FSN#39055 BCS/2000 functionaliteit in FACILITOR - customization
Andere volgorde van velden in het overzicht. svn path=/Website/branches/v2017.2/; revision=36374
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
<!-- #include file="../api2/model_fin_factuur.inc" -->
|
||||
<!-- #include file="./model_custom_fields.inc"-->
|
||||
<!-- #include file="./model_mld_kenmerk.inc"-->
|
||||
<!-- #include file="../bgt/bgt_tools.inc" -->
|
||||
<%
|
||||
|
||||
function model_mld_opdr()
|
||||
@@ -26,7 +27,11 @@ function model_mld_opdr()
|
||||
this.record_title = L("lcl_fin_mld_opdr");
|
||||
this.records_title = L("lcl_fin_opdrachten");
|
||||
|
||||
this.fields = {
|
||||
var fields_main_1 = {};
|
||||
var fields_main_2 = {};
|
||||
var fields_bgt_1 = {};
|
||||
|
||||
fields_main_1 = {
|
||||
"id": {
|
||||
"dbs": "mld_opdr_key",
|
||||
"label": L("lcl_key"),
|
||||
@@ -35,7 +40,12 @@ function model_mld_opdr()
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
"seq": "mld_s_mld_opdr_key"
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
if (S("bgt_enabled"))
|
||||
{
|
||||
fields_bgt_1 = {
|
||||
"budgetdiscipline": {
|
||||
"dbs": "bgt_project.ins_discipline_key",
|
||||
"label": L("bgt_discipline_omschrijving"),
|
||||
@@ -75,7 +85,11 @@ function model_mld_opdr()
|
||||
"required": true,
|
||||
"foreign": bgt_costtype_foreign(),
|
||||
"showtransit": true
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
fields_main_2 = {
|
||||
"company": {
|
||||
"dbs": "mld_uitvoerende_keys",
|
||||
"label": L("lcl_ord_company"),
|
||||
@@ -225,6 +239,10 @@ function model_mld_opdr()
|
||||
}
|
||||
};
|
||||
|
||||
this.fields = object_merge({}, fields_main_1, (S("bgt_enabled") ? fields_bgt_1 : {}), fields_main_2);
|
||||
|
||||
|
||||
|
||||
this.includes= {
|
||||
"custom_fields" : {
|
||||
"model": new model_custom_fields(this, new model_mld_kenmerk('O', { internal: true }), { pNiveau: "O" }),
|
||||
@@ -256,7 +274,7 @@ function model_mld_opdr()
|
||||
if (!oRs.eof)
|
||||
{
|
||||
btw_data.btw_inc = oRs("prs_kostensoort_btw").Value;
|
||||
btw_data.btw_val = oRs("fin_btwtabelwaarde_perc").Value;
|
||||
btw_data.btw_val = oRs("fin_btwtabelwaarde_perc").Value || "0";
|
||||
}
|
||||
oRs.Close();
|
||||
}
|
||||
@@ -343,14 +361,14 @@ function model_mld_opdr()
|
||||
var v_cur_costtype_key = oRs("prs_kostensoort_key").Value;
|
||||
oRs.Close();
|
||||
checkUniekContractnummer(key, v_project_key, v_ordernr, obj.sequence);
|
||||
if (v_cur_costtype_key != obj.costtype)
|
||||
if (v_cur_costtype_key != v_costtype)
|
||||
{ // contract verplaatsen naar ander kostensoort
|
||||
checkBudgetoverschrijding(obj.id, v_cur_costtype_key, 0, 0); // bedrag van deze kostensoort verwijderen
|
||||
checkBudgetoverschrijding(-1, obj.costtype, obj.amount, obj.vat); // (aangepast) bedrag aan nieuwe kostensoort toevoegen
|
||||
checkBudgetoverschrijding(-1, v_costtype, obj.amount, obj.vat); // (aangepast) bedrag aan nieuwe kostensoort toevoegen
|
||||
}
|
||||
else
|
||||
{
|
||||
checkBudgetoverschrijding(obj.id, obj.costtype, obj.amount, obj.vat);
|
||||
checkBudgetoverschrijding(obj.id, v_costtype, obj.amount, obj.vat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +391,11 @@ function model_mld_opdr()
|
||||
checkBudgetoverschrijding(key, prs_kostensoort, 0, 0);
|
||||
}
|
||||
|
||||
var gparams = {
|
||||
|
||||
var gparams = {};
|
||||
if (S("bgt_enabled") == 1)
|
||||
{
|
||||
gparams = {
|
||||
GET: {
|
||||
tables: [
|
||||
"prs_kostensoort",
|
||||
@@ -389,6 +411,7 @@ function model_mld_opdr()
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function checkUniekContractnummer(p_contract_key, p_project_key, p_contractnr, p_volgnr)
|
||||
{
|
||||
@@ -447,6 +470,9 @@ function model_mld_opdr()
|
||||
var budget_exc = oRs("budget_exc").Value;
|
||||
var budget_btw = oRs("budget_btw").Value;
|
||||
oRs.Close();
|
||||
if (budget_key_res == null)
|
||||
abort_with_warning("Er is geen budget met kenmerk 'reserve' aanwezig voor dit project");
|
||||
|
||||
var amount_old_exc = 0;
|
||||
var amount_old_btw = 0;
|
||||
if (data_id > -1)
|
||||
|
||||
Reference in New Issue
Block a user