AAIT#26402 Toevoegen Kostenplaats opdracht/bestelling in factuurinvoer
svn path=/Website/trunk/; revision=18908
This commit is contained in:
@@ -976,6 +976,19 @@ fin = { func_enabled_factuur: // Wat mag ik zoal op deze specifieke factuur?
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fin_factuur.cnt_key)
|
||||||
|
{
|
||||||
|
sql = "SELECT kp.prs_kostenplaats_omschrijving"
|
||||||
|
+ " FROM prs_kostenplaats kp"
|
||||||
|
+ " , cnt_contract c"
|
||||||
|
+ " WHERE kp.prs_kostenplaats_key = c.prs_kostenplaats_key"
|
||||||
|
+ " AND c.cnt_contract_key = " + fin_factuur.cnt_key;
|
||||||
|
oRs = Oracle.Execute(sql);
|
||||||
|
if (!oRs.eof)
|
||||||
|
result.kostenplaats_oms = oRs("prs_kostenplaats_omschrijving").value;
|
||||||
|
oRs.close();
|
||||||
|
}
|
||||||
|
|
||||||
if (result.btwtabel_key)
|
if (result.btwtabel_key)
|
||||||
{
|
{
|
||||||
result.btwtabel = [];
|
result.btwtabel = [];
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ else // nieuwe factuur. Defaults bepalen
|
|||||||
fin_costsrt: "",
|
fin_costsrt: "",
|
||||||
fin_costsrt_default: -1, // Is afhankelijk van het referentie type // TODO: opvragen
|
fin_costsrt_default: -1, // Is afhankelijk van het referentie type // TODO: opvragen
|
||||||
bes_id: "",
|
bes_id: "",
|
||||||
default_costsrt_selected: false // ((fin_costsrt_key == fin_costsrt_default) && (fin_costsrt_key != null)), // TODO: opvragen
|
default_costsrt_selected: false, // ((fin_costsrt_key == fin_costsrt_default) && (fin_costsrt_key != null)), // TODO: opvragen
|
||||||
|
kostenplaats_oms: ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -359,10 +360,10 @@ var fin_btwtabel_key = oRs("fin_btwtabel_key").value; // Standaard btw tabel key
|
|||||||
{
|
{
|
||||||
matchresult = fin.getnomatchreasoncontract(ref_info, fin_factuur.totaalgefactureerd, fin_factuur.fin_totaal);
|
matchresult = fin.getnomatchreasoncontract(ref_info, fin_factuur.totaalgefactureerd, fin_factuur.fin_totaal);
|
||||||
}
|
}
|
||||||
ROFIELDTR("fldtotkosten" + ((matchresult & 2) != 2? " nomatch" : ""), L("lcl_fin_CO_sum"), (ref_info && ref_info.totbedrag? S("currency_pref") + safe.curr(ref_info.totbedrag) + S("currency_suff") : ""), { id: "totbedrag" }); // Contract/Opdrachtbedrag
|
ROFIELDTR("fldtotkosten" + ((matchresult & 2) != 2? " nomatch" : ""), L("lcl_cnt_contract_sum"), (ref_info && ref_info.totbedrag? S("currency_pref") + safe.curr(ref_info.totbedrag) + S("currency_suff") : ""), { id: "totbedrag" }); // Contract/Opdrachtbedrag
|
||||||
if (ref_info && ref_info.ref_type == "C")
|
ROFIELDTR("fldtermkosten" + ((matchresult & 1) != 1? " nomatch" : ""), L("lcl_cnt_period_sum"), (ref_info && ref_info.termbedrag? S("currency_pref") + safe.curr(ref_info.termbedrag) + S("currency_suff") : ""), { id: "termbedrag" }); // Contracttermijnbedrag
|
||||||
ROFIELDTR("fldtermkosten" + ((matchresult & 1) != 1? " nomatch" : ""), L("lcl_cnt_period_sum"), (ref_info.termbedrag? S("currency_pref") + safe.curr(ref_info.termbedrag) + S("currency_suff") : "")); // Contracttermijnbedrag
|
|
||||||
ROFIELDTR("fld", L("lcl_status"), (ref_info && ref_info.status? ref_info.status : ""), { id: "status" }); // Status
|
ROFIELDTR("fld", L("lcl_status"), (ref_info && ref_info.status? ref_info.status : ""), { id: "status" }); // Status
|
||||||
|
ROFIELDTR("fld", L("lcl_shared_account"), (ref_info && ref_info.kostenplaats_oms? ref_info.kostenplaats_oms : ""), { id: "kostenplaats_oms"}); // kostenplaats
|
||||||
ROFIELDTR("flddate", L("lcl_fin_start_date"), (ref_info && ref_info.startdatum? ref_info.startdatum : ""), { id: "startdate" });
|
ROFIELDTR("flddate", L("lcl_fin_start_date"), (ref_info && ref_info.startdatum? ref_info.startdatum : ""), { id: "startdate" });
|
||||||
ROFIELDTR("flddate", L("lcl_fin_end_date"), (ref_info && ref_info.einddatum? ref_info.einddatum : ""), { id: "enddate" });
|
ROFIELDTR("flddate", L("lcl_fin_end_date"), (ref_info && ref_info.einddatum? ref_info.einddatum : ""), { id: "enddate" });
|
||||||
ROFIELDTR("fldfinsom", L("lcl_fin_invoiced"), (ref_info && ref_info.gefactureerd? S("currency_pref") + safe.curr(ref_info.gefactureerd) + S("currency_suff") : ""), { id: "gefactureerd" }); // Reeds gefactureerd (ex.BTW)
|
ROFIELDTR("fldfinsom", L("lcl_fin_invoiced"), (ref_info && ref_info.gefactureerd? S("currency_pref") + safe.curr(ref_info.gefactureerd) + S("currency_suff") : ""), { id: "gefactureerd" }); // Reeds gefactureerd (ex.BTW)
|
||||||
|
|||||||
@@ -116,9 +116,11 @@ function clearRefDetails()
|
|||||||
$('#lev_uit').unbind('click');
|
$('#lev_uit').unbind('click');
|
||||||
|
|
||||||
$("#status").val("");
|
$("#status").val("");
|
||||||
|
$("#kostenplaats_oms").val("");
|
||||||
$("#startdate").val("");
|
$("#startdate").val("");
|
||||||
$("#enddate").val("");
|
$("#enddate").val("");
|
||||||
$("#totbedrag").val("");
|
$("#totbedrag").val("");
|
||||||
|
$("#termbedrag").val("");
|
||||||
$("#gefactureerd").val("");
|
$("#gefactureerd").val("");
|
||||||
$("#gefactureerd_jaar").val("");
|
$("#gefactureerd_jaar").val("");
|
||||||
$("#opdr_omschr").html("");
|
$("#opdr_omschr").html("");
|
||||||
@@ -188,6 +190,7 @@ function FcltGetRefInfoCallback(json)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
$("#status").val(json.status);
|
$("#status").val(json.status);
|
||||||
|
$("#kostenplaats_oms").val(json.kostenplaats_oms);
|
||||||
$("#startdate").val(json.startdatum);
|
$("#startdate").val(json.startdatum);
|
||||||
$("#enddate").val(json.einddatum);
|
$("#enddate").val(json.einddatum);
|
||||||
if (fin_defaultboekmaand == 2 && json.refchanged)
|
if (fin_defaultboekmaand == 2 && json.refchanged)
|
||||||
@@ -200,6 +203,11 @@ function FcltGetRefInfoCallback(json)
|
|||||||
else
|
else
|
||||||
$("#totbedrag").val(currency_pref + num2currEditable(parseFloat(json.totbedrag)) + currency_suff);
|
$("#totbedrag").val(currency_pref + num2currEditable(parseFloat(json.totbedrag)) + currency_suff);
|
||||||
|
|
||||||
|
if (json.termbedrag == "")
|
||||||
|
$("#termbedrag").val("");
|
||||||
|
else
|
||||||
|
$("#termbedrag").val(currency_pref + num2currEditable(parseFloat(json.termbedrag)) + currency_suff);
|
||||||
|
|
||||||
if (json.gefactureerd == "")
|
if (json.gefactureerd == "")
|
||||||
$("#gefactureerd").val("");
|
$("#gefactureerd").val("");
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user