svn path=/Website/branches/v2018.1/; revision=39672
This commit is contained in:
Erik Groener
2018-11-06 12:45:42 +00:00
parent c3f08c551a
commit 7f2a161a9b
5 changed files with 207 additions and 169 deletions

View File

@@ -500,7 +500,7 @@ function model_fin_factuur()
var fin_key = getQParamInt("id", -1);
var ischild = (getQParam("columns", "")=="" ? true : false);
var xmodel = getQParam("model", "");
if (mode == "list" && (xmodel == this.record_name || (ischild && mld_opdr_key == -1) || (!ischild && mld_opdr_key > -1)))
if (mode == "list" && (xmodel == this.record_name /* || (ischild && mld_opdr_key == -1) || (!ischild && mld_opdr_key > -1)*/ ))
{
this.REST_GET = generic_REST_GET(this);
}

View File

@@ -16,6 +16,8 @@
<!-- #include file="../api2/model_bgt_budget.inc" -->
<%
var parent = getQParam("parent", "");
var kostenrubriek_key = getQParamInt("budgetcostcategory", -1);
var kostensoortgrp_key = getQParamInt("costtypegroup", -1);
var kostensoort_key = getQParamInt("costtype", -1);
var this_model = new model_bgt_budget();
@@ -41,7 +43,7 @@ if (mode == "show")
var model_params = {
"search": {
"autosearch": (kostensoort_key == -1 ? false : true),
"autosearch": (parent == "costtype" && kostensoort_key > 0 ? true : false),
"filters": [
"budgetdiscipline",
"budgetproject",
@@ -118,5 +120,16 @@ var model_params = {
}
}
// Onderstaand script is nodig om vanuit budgetbeheer naar het scherm Budget te
// gaan, waarbij de selectievelden ingevuld worden met de bekende waarden.
%>
<script>
if (<%=kostenrubriek_key%> >= -1) var budgetcostcategory_key = <%=kostenrubriek_key%>;
if (<%=kostensoortgrp_key%> >= -1) var costtypegroup_key = <%=kostensoortgrp_key%>;
if (<%=kostensoort_key%> >= -1) var costtype_key = <%=kostensoort_key%>;
</script>
<%
scaffolding(this_model, model_params);
%>

View File

@@ -17,6 +17,7 @@
<%
var p_mld_opdr_key = getQParamInt("opdrachtcommon", -1);
var project_key = getQParamInt("budgetproject", -1);
p_mld_opdr_key = (p_mld_opdr_key == -1 ? getQParamInt("order", -1) : p_mld_opdr_key);
var this_model = new model_fin_factuur();
@@ -34,57 +35,66 @@ if (mode == "show")
}
}
scaffolding(this_model,
{
"search": {
"filters": [
"budgetdiscipline",
"budgetproject",
"company",
"order",
"additional",
"isprinted",
"date",
"invoice",
"status"
],
"transit": [
"budgetdiscipline",
"budgetproject",
"company",
"order"
],
"requires": {
"js": ["../bgt/fin_factuur.js"]
}
},
"list": {
"columns": [
"costtype",
"company",
"ordernr",
"date",
"invoice",
"remark",
"total",
"totalvat",
"totalincl",
"advice",
"additional",
"budgetproject"
],
"orderby": [
"invoice",
"date"
]
},
"edit": {
"requires": {
"js": ["../bgt/fin_factuur.js"]
}
},
"transit": {
"opdrachtcommon": p_mld_opdr_key
var model_params = {
"search": {
"filters": [
"budgetdiscipline",
"budgetproject",
"company",
"order",
"additional",
"isprinted",
"date",
"invoice",
"status"
],
"transit": [
"budgetdiscipline",
"budgetproject",
"company",
"order"
],
"requires": {
"js": ["../bgt/fin_factuur.js"]
}
});
},
"list": {
"columns": [
"costtype",
"company",
"ordernr",
"date",
"invoice",
"remark",
"total",
"totalvat",
"totalincl",
"advice",
"additional",
"budgetproject"
],
"orderby": [
"invoice",
"date"
]
},
"edit": {
"requires": {
"js": ["../bgt/fin_factuur.js"]
}
},
"transit": {
"opdrachtcommon": p_mld_opdr_key
}
}
// Onderstaand script is nodig om vanuit budgetbeheer naar het scherm Facturen te
// gaan, waarbij de selectievelden ingevuld worden met de bekende waarden.
%>
<script>
if (<%=p_mld_opdr_key%> >= -1) var order_key = <%=p_mld_opdr_key%>;
</script>
<%
scaffolding(this_model, model_params);
%>

View File

@@ -23,6 +23,8 @@ function init_factuur()
var v_budgetproject = (typeof $("#budgetproject").val() == "undefined" ? -1 : $("#budgetproject").val() );
var v_company = (typeof $("#company").val() == "undefined" ? (typeof company_key == "undefined" ? -1 : company_key) : $("#company").val() );
var v_order = (typeof $("#order").val() == "undefined" ? -1 : $("#order").val() );
v_order = ( (v_order == null && typeof(order_key) == "number") ? order_key : v_order );
}
else
{ // fin_factuur vanuit mld_opdr

View File

@@ -16,6 +16,9 @@
<!-- #include file="../api2/model_mld_opdr.inc" -->
<%
var project_key = getQParamInt("budgetproject", -1);
var kostenrubriek_key = getQParamInt("budgetcostcategory", -1);
var kostensoortgrp_key = getQParamInt("costtypegroup", -1);
var kostensoort_key = getQParamInt("costtype", -1);
var this_model = new model_mld_opdr();
if (mode == "show")
@@ -34,57 +37,55 @@ if (mode == "list")
this_model.fields.company.foreign = bgt_company_foreign(1);
}
scaffolding(this_model,
{
"search": {
"filters": [
"budgetdiscipline",
"budgetproject",
"budgetcostcategory",
"costtypegroup",
"costtype",
"reference",
"company",
"additional"
],
"transit": [
"budgetdiscipline",
"budgetproject",
"budgetcostcategory",
"costtypegroup",
"costtype",
"company",
"reference",
"account",
"startdate"
],
"requires": {
"js": ["../bgt/bgt_budget.js"]
}
},
"list": {
"columns": [
"costtype",
"company",
"ordernr",
"sequence",
"description",
"reference",
"startdate",
"estimate",
"contracted",
"invoiced",
"tobeinvoiced",
"additional",
"budgetproject"
],
"orderby": [
"ordernr_sort",
"sequence",
"reference"
]
},
var model_params = {
"search": {
"filters": [
"budgetdiscipline",
"budgetproject",
"budgetcostcategory",
"costtypegroup",
"costtype",
"reference",
"company",
"additional"
],
"transit": [
"budgetdiscipline",
"budgetproject",
"budgetcostcategory",
"costtypegroup",
"costtype",
"company",
"reference",
"account",
"startdate"
],
"requires": {
"js": ["../bgt/bgt_budget.js"]
}
},
"list": {
"columns": [
"costtype",
"company",
"ordernr",
"sequence",
"description",
"reference",
"startdate",
"estimate",
"contracted",
"invoiced",
"tobeinvoiced",
"additional",
"budgetproject"
],
"orderby": [
"ordernr_sort",
"sequence",
"reference"
]
},
/*
// TWYN#53173 Ook kunnen kopieren van een opdracht (nieuw opdrachtnummer genereren, en volgnr=0)
"show": {
@@ -103,69 +104,81 @@ scaffolding(this_model,
]
},
*/
"edit": {
"requires": {
"js": ["../bgt/bgt_budget.js"]
}
},
"layout": {
"miscellaneous": L("lcl_mld_miscellaneous_fields"),
"block": [
{
"blockid": "scfLayout_L",
"label": "",
"ishtmlsafe": true,
"hidden": false,
"buttons": [],
"fields": [
"budgetdiscipline",
"budgetproject",
"budgetcostcategory",
"costtypegroup",
"costtype",
"company",
"reference",
"ordernr",
"ordernr_sort",
"sequence",
"account"
]
},
{
"blockid": "scfLayout_R",
"label": "",
"fields": [
"description",
"startdate",
"amount",
"vat",
"amountincl",
"invoiced",
"tobeinvoiced",
"status",
"additional",
"remark"
]
},
{
"blockid": "mldHidden",
"label": L("lcl_mld_hidden_fields"),
"hidden": true,
"fields": [
"startdate_range",
"estimate",
"contracted",
"owner",
"issueordertype",
"module",
"_is_clone"
]
}
]
},
"wrap": {
"no_default_frames": true,
"frames": [ { url: "./fin_factuur.asp?mode=list&opdrachtcommon={0}" } ]
"edit": {
"requires": {
"js": ["../bgt/bgt_budget.js"]
}
});
},
"layout": {
"miscellaneous": L("lcl_mld_miscellaneous_fields"),
"block": [
{
"blockid": "scfLayout_L",
"label": "",
"ishtmlsafe": true,
"hidden": false,
"buttons": [],
"fields": [
"budgetdiscipline",
"budgetproject",
"budgetcostcategory",
"costtypegroup",
"costtype",
"company",
"reference",
"ordernr",
"ordernr_sort",
"sequence",
"account"
]
},
{
"blockid": "scfLayout_R",
"label": "",
"fields": [
"description",
"startdate",
"amount",
"vat",
"amountincl",
"invoiced",
"tobeinvoiced",
"status",
"additional",
"remark"
]
},
{
"blockid": "mldHidden",
"label": L("lcl_mld_hidden_fields"),
"hidden": true,
"fields": [
"startdate_range",
"estimate",
"contracted",
"owner",
"issueordertype",
"module",
"_is_clone"
]
}
]
},
"wrap": {
"no_default_frames": true,
"frames": [ { url: "./fin_factuur.asp?mode=list&opdrachtcommon={0}" } ]
}
}
// Onderstaand script is nodig om vanuit budgetbeheer naar het scherm Contracten te
// gaan, waarbij de selectievelden ingevuld worden met de bekende waarden.
%>
<script>
if (<%=kostenrubriek_key%> >= -1) var budgetcostcategory_key = <%=kostenrubriek_key%>;
if (<%=kostensoortgrp_key%> >= -1) var costtypegroup_key = <%=kostensoortgrp_key%>;
if (<%=kostensoort_key%> >= -1) var costtype_key = <%=kostensoort_key%>;
</script>
<%
scaffolding(this_model, model_params);
%>