diff --git a/APPL/API2/model_fin_factuur.inc b/APPL/API2/model_fin_factuur.inc index c6774eb11f..28ed05eb08 100644 --- a/APPL/API2/model_fin_factuur.inc +++ b/APPL/API2/model_fin_factuur.inc @@ -53,13 +53,8 @@ function model_fin_factuur() "dbs": "prs_kostensoort_key", "label": L("prs_kostensoort_key"), "typ": "key", - "foreign": { - "tbl": "(SELECT prs_kostensoort_key" - + " , prs_kostensoort_oms ||' '|| prs_kostensoort_opmerking oms" - + " FROM prs_kostensoort)", - "key": "prs_kostensoort_key", - "desc": "oms" - } + "foreign": bgt_costtype_foreign(), + "hidden_fld": true }, "order": { "dbs": "mld_opdr_key", @@ -79,23 +74,31 @@ function model_fin_factuur() "status": { "dbs": "fin_factuur_statuses_key", "label": L("lcl_fin_fin_status"), - "typ": "key" + "typ": "key", + "foreign": { + "tbl": "fin_factuur_statuses", + "key": "fin_factuur_statuses_key", + "desc": "fin_factuur_statuses_omschr" + }, + "defaultvalue": "2" }, "total": { "dbs": "fin_factuur_totaal", - "label": "totaal", + "label": L("lcl_fin_CO_sum"), "typ": "float", "iscurrency": true, "total": true, - "readonly": true + "hidden_fld": true, + "defaultvalue": "0" }, "totalvat": { "dbs": "fin_factuur_totaal_btw", - "label": "incl.btw", + "label": L("lcl_fin_btwsum"), "typ": "float", "iscurrency": true, "total": true, - "readonly": true + "hidden_fld": true, + "defaultvalue": "0" } }; @@ -107,6 +110,17 @@ function model_fin_factuur() } }; + this.list = { + "columns": [ + "invoice", + "date", + "remark", + "total", + "totalvat" + ] + }; + + this.hook_pre_post = function(params, obj) { // Wordt alleen gebruikt bij toevoegen.