class RegVehicle_DocHead{ constructor(){ this.name = "RegVehicle_DocHead"; } static GetCustomDestination(data, dest){ return (data.vehicle_id ?? "" != "" ? "regvehicle.view" : "regvehicle.overview"); } static GetCustomDestID(data, destID){ return data.vehicle_id ?? destID; } static allowView(){ return userrights.has("regvehicles.view"); } static allowAddNew(){ return true; } static allowEdit(){ return userrights.has("regvehicles.edit"); } static allowDelete(){ return userrights.has("regvehicles.edit"); } static GetColumns(){ return ["doc_number", "creationdate" ,"status", "totalprice_no_discount","totalprice_discount","id"] } static TableDataCreate(row, key){ if(key == "id"){ return `
${row.note.replace(/\n/g,"
")}
${System.buildEmployeeName(row.creator)} - ${System.formatTimestamp(row.createddate)}
${getTranslation("passed")}: ${getTranslation(row.passed == 1 ? "yes": "no")}
${getTranslation("new_mot")}: ${System.formatDate(row.new_mot) }
${getTranslation("old_mot")}: ${System.formatDate(row.old_mot) }
${contentHtml}${getTranslation("mot.lights")} | ${getTranslation("mot.brakes_tyres")} | ${getTranslation("mot.windows")} | ${getTranslation("mot.others")} |
---|---|---|---|
${getTranslation("headlights")} | ${getTranslation("front_brakes")} | ${getTranslation("windscreen")} | ${getTranslation("horn")} |
${getTranslation("rear_lights")} | ${getTranslation("rear_brakes")} | ${getTranslation("rear_window")} | ${getTranslation("exhaust_system")} |
${getTranslation("indicators")} | ${getTranslation("front_tyres")} | ${getTranslation("side_windows")} | ${getTranslation("engine")} |
${getTranslation("rear_tyres")} | ${getTranslation("bodywork")} |