TWYN#53269 opdrachten en facturen via budgetbeheer

svn path=/Website/branches/v2017.3/; revision=37899
This commit is contained in:
Erik Groener
2018-05-15 10:21:04 +00:00
parent 6e9a17c313
commit 2976c7b2ce

View File

@@ -174,6 +174,8 @@ var transitParam = buildTransitParam([]);
+ " f.fin_factuur_key," + " f.fin_factuur_key,"
+ " f.fin_factuur_datum factuurdatum," + " f.fin_factuur_datum factuurdatum,"
+ " f.fin_factuur_totaal gefactureerd," + " f.fin_factuur_totaal gefactureerd,"
+ " f.fin_factuur_totaal_btw gefactureerd_btw,"
+ " f.fin_factuur_advies adviesdatum,"
+ " bgt_project_omschrijving deelproject," + " bgt_project_omschrijving deelproject,"
+ " ins_discipline_omschrijving project" + " ins_discipline_omschrijving project"
+ " FROM mld_opdr o," + " FROM mld_opdr o,"
@@ -858,6 +860,25 @@ var transitParam = buildTransitParam([]);
} }
// KOLOM GEFACTUREERD // KOLOM GEFACTUREERD
function invoiceLink(p_outputmode, p_groupby, p_oRs, p_val)
{
var v = p_val;
if (p_outputmode != 3)
{
if (p_groupby < 4 && p_oRs("prs_kostensoort_key").Value)
{
v = "<span class='details' onclick='FcltMgr.stopPropagation(event); naarfacturen({0}, {1}, {2}, this)'>" + v +"</span>";
if (p_groupby==3)
v = (v).format(p_oRs("prs_kostensoort_key").Value, null, null);
if (p_groupby==2)
v = (v).format(null, p_oRs("mld_opdr_key").Value, null);
if (p_groupby==1)
v = (v).format(null, null, p_oRs("fin_factuur_key").Value);
}
}
return v;
}
function invoicesShow(oRs) function invoicesShow(oRs)
{ {
var v = safe.curr(Math.round(oRs("gefactureerd").Value), true); var v = safe.curr(Math.round(oRs("gefactureerd").Value), true);
@@ -865,28 +886,47 @@ var transitParam = buildTransitParam([]);
var show_empty = false; var show_empty = false;
if (show_empty || v != 0) if (show_empty || v != 0)
{ {
if (outputmode != 3) v = invoiceLink(outputmode, groupby, oRs, v);
{ return v;
if (groupby < 4 && oRs("prs_kostensoort_key").Value)
{
v = "<span class='details' onclick='FcltMgr.stopPropagation(event); naarfacturen({0}, {1}, {2}, this)'>" + v +"</span>";
if (groupby==3)
v = (v).format(oRs("prs_kostensoort_key").Value, null, null);
if (groupby==2)
v = (v).format(null, oRs("mld_opdr_key").Value, null);
if (groupby==1)
v = (v).format(null, null, oRs("fin_factuur_key").Value);
}
}
return v;
} }
} }
function invoicesAmount(oRs) function invoicesAmount(oRs)
{ {
var v = Math.round(oRs("gefactureerd").Value); var v = Math.round(oRs("gefactureerd").Value);
return v; return v;
} }
// KOLOM GEFACTUREERD BTW
function invoicesVatShow(oRs)
{
var v = safe.curr(Math.round(oRs("gefactureerd_btw").Value), true);
var show_empty = false;
if (show_empty || v != 0)
{
v = invoiceLink(outputmode, groupby, oRs, v);
return v;
}
}
function invoicesVatAmount(oRs)
{
var v = Math.round(oRs("gefactureerd_btw").Value);
return v;
}
function invoicesIncShow(oRs)
{
var v = safe.curr(Math.round(oRs("gefactureerd").Value + oRs("gefactureerd_btw").Value), true);
var show_empty = false;
if (show_empty || v != 0)
{
v = invoiceLink(outputmode, groupby, oRs, v);
return v;
}
}
function invoicesIncAmount(oRs)
{
var v = Math.round(oRs("gefactureerd").Value + oRs("gefactureerd_btw").Value);
return v;
}
// KOLOM TE FACTUREREN // KOLOM TE FACTUREREN
function invoicestogoShow(oRs) function invoicestogoShow(oRs)
{ {
@@ -1010,9 +1050,18 @@ var transitParam = buildTransitParam([]);
if (groupby != 1) if (groupby != 1)
{ {
rst.addColumn(new Column({caption: L("bgt_opdrachten"), content: ordersShow, fnAmount: ordersAmount, datatype: "currency", total: true })); rst.addColumn(new Column({caption: L("bgt_opdrachten"), content: ordersShow, fnAmount: ordersAmount, datatype: "currency", total: true }));
}
if (groupby > 2)
{
rst.addColumn(new Column({caption: L("bgt_opdrachtentogo"), content: orderstogoShow, fnAmount: orderstogoAmount, datatype: "currency", total: true })); rst.addColumn(new Column({caption: L("bgt_opdrachtentogo"), content: orderstogoShow, fnAmount: orderstogoAmount, datatype: "currency", total: true }));
} }
rst.addColumn(new Column({caption: L("bgt_facturen"), content: invoicesShow, fnAmount: invoicesAmount, datatype: "currency", total: true })); rst.addColumn(new Column({caption: L("bgt_facturen"), content: invoicesShow, fnAmount: invoicesAmount, datatype: "currency", total: true }));
if (groupby == 1)
{
rst.addColumn(new Column({caption: L("lcl_fin_btwsum"), content: invoicesVatShow, fnAmount: invoicesVatAmount, datatype: "currency", total: true }));
rst.addColumn(new Column({caption: L("lcl_fin_total_sum"), content: invoicesIncShow, fnAmount: invoicesIncAmount, datatype: "currency", total: true }));
rst.addColumn(new Column({caption: L("lcl_fin_adviesdatum"), content: "adviesdatum"}));
}
if (groupby != 1) if (groupby != 1)
rst.addColumn(new Column({caption: L("bgt_facturentogo"), content: invoicestogoShow, fnAmount: invoicestogoAmount, datatype: "currency", total: true })); rst.addColumn(new Column({caption: L("bgt_facturentogo"), content: invoicestogoShow, fnAmount: invoicestogoAmount, datatype: "currency", total: true }));
@@ -1048,20 +1097,11 @@ var transitParam = buildTransitParam([]);
rst.addColumn(new Column({caption: L("bgt_opdrachtentogo"), content: rs_contracteren})); rst.addColumn(new Column({caption: L("bgt_opdrachtentogo"), content: rs_contracteren}));
rst.addColumn(new Column({caption: L("bgt_facturentogo"), content: rs_factureren})); rst.addColumn(new Column({caption: L("bgt_facturentogo"), content: rs_factureren}));
} }
rst.addColumn(new Column({caption: L("bgt_facturen"), content: "gefactureerd"}));
if (groupby != 1) // denk ik
{
rst.addColumn(new Column({caption: L("bgt_opdrachten"), content: "gecontracteerd"}));
rst.addColumn(new Column({caption: L("bgt_opdrachtentogo"), content: "tecontracteren"}));
rst.addColumn(new Column({caption: L("bgt_facturentogo"), content: "tefactureren"}));
}
// //
rst.addColumn(new Column({caption: L("bgt_facturen"), content: rs_facturen})); rst.addColumn(new Column({caption: L("bgt_facturen"), content: rs_facturen}));
if (groupby != 1) // denk ik if (groupby != 1) // denk ik
{ {
rst.addColumn(new Column({caption: L("bgt_opdrachten"), content: rs_contracten})); rst.addColumn(new Column({caption: L("bgt_opdrachten"), content: rs_contracten}));
rst.addColumn(new Column({caption: L("bgt_opdrachtentogo"), content: rs_contracteren}));
rst.addColumn(new Column({caption: L("bgt_facturentogo"), content: rs_factureren}));
} }
} }