" . " Kundenname: "; $_show_invoice_text_ = "   Rechnungstext anzeigen\n"; if ($usr_type == 2): // customer (employee) // if ($csc_id == "") reportDie ("$PHP_SELF: Parameter 'csc_id' fehlt", false); $cmp_id = getFieldValueFromId("customer", "cs_id", "$cs_id", "cmp_id"); $cmp_comp = getFieldValueFromId("company", "cmp_id", "$cmp_id", "cmp_comp"); $csc_name = getFieldValueFromId("costcenter", "csc_id", "$csc_id", "csc_name"); $kundenname = "$cmp_comp, Kostenstelle $csc_name"; // $filter_costcenter_disabled = ""; $_cs_eid_ = ""; $_show_invoice_text_ = "                                          "; elseif ($usr_type == 1): // sysadmin $cmp_id = getFieldValueFromId("headquarters", "hq_id", "$hq_id", "cmp_id"); $cmp_comp = getFieldValueFromId("company", "cmp_id", "$cmp_id", "cmp_comp"); $kundenname = "Zentrale $cmp_comp"; elseif ($usr_type == 0): // headquarter $kundenname = "Systemadministrator"; elseif ($usr_type == 3): // courier $costcenter_disabled_start = ""; $_csc_id_ = "courier"; $_cs_eid_ = ""; if (INV_SHOW_JB_CR_REMARK == "1"): $_cs_eid_ = "   Auftragsstatus:erledigt laufend"; endif; if (INV_SHOW_INVOICE_TEXT != "1"): $_show_invoice_text_ = "                                          "; endif; $courierListOptions = ""; if (INV_SHOW_CR_ID_PARENT == "1"): $cr_id = getFieldValueFromId("courier", "usr_id", "$usr_id", "cr_id"); $sqlquery = "SELECT cr_id FROM courier WHERE cr_id_parent = '$cr_id'"; $res = $db->query($sqlquery); if (DB::isError($res)) reportDie ("$PHP_SELF: '$sqlquery': " . $res->getMessage()); $cr_id_clause = $cr_id; while ($row = $res->fetch_assoc()): $cr_id_clause .= "," . $row['cr_id']; endwhile; $res->free(); // Kuriere zusammenstellen, damit danach selektiert werden kann $sqlquery = "SELECT crvh_sid FROM couriervehicle WHERE cr_id IN ($cr_id_clause) ORDER BY crvh_sid"; $res = $db->query($sqlquery); if (DB::isError($res)) reportDie ("$PHP_SELF: '$sqlquery': " . $res->getMessage()); $courierListOptions = "Fahrzeug: \n"; $_cs_eid_ = $courierListOptions . $_cs_eid_; endif; else: reportDie ("$PHP_SELF: Ungültiger 'usr_type': '$usr_type'", false); endif; //include_once("../include/calendar.inc.php"); //$day_to = date("d"); //$month_to = date("m"); //$year_to = date("Y"); //list($year_from, $month_from) = addMonths($year_to, $month_to, -1); //$day_from = $day_to + 1; //if (daysPerMonth($year_from, $month_from) < $day_from) // $day_from = daysPerMonth($year_from, $month_from); $day_to = date("d"); $day_from = 1; $month_to = date("m"); $month_from = $month_to; $year_to = date("Y"); $year_from = $year_to; $_js_date_ = " fillDateFields(1,\"inv_header\",\"invoiceOptions\",\"\",\"day_from\",\"month_from\",\"year_from\",\"\",\"\",\"\");\n"; $_js_date_ .= " setDateTimeFields(\"inv_header\",\"invoiceOptions\",".$day_from.",".$month_from.",".$year_from.", \"\", \"\", \"day_from\", \"month_from\", \"year_from\", \"\", \"\", \"\");\n"; $_js_date_ .= " fillDateFields(0, 'inv_header', 'invoiceOptions', 'year_from', 'day_from', 'month_from', 'year_from', '', '', '');\n"; $_js_date_ .= " fillDateFields(1,\"inv_header\",\"invoiceOptions\", \"\", \"day_to\", \"month_to\", \"year_to\", \"\", \"\", \"\");\n"; $_js_date_ .= " setDateTimeFields(\"inv_header\",\"invoiceOptions\",".$day_to.",".$month_to.",".$year_to.", \"\", \"\", \"day_to\", \"month_to\", \"year_to\", \"\", \"\", \"\");\n"; $_js_date_ .= " fillDateFields(0, 'inv_header', 'invoiceOptions', 'year_to', 'day_to', 'month_to', 'year_to', '', '', '');\n"; //$_js_date_ .= ($_csc_id_ != "" ? " csc_id = \"$_csc_id_\"\n" : ""); list ($jb_costcenter) = getHttpVars(array("jb_costcenter")); $filter_costcenter = addOptionsFromTable("metatype", "mt_sort", "mt_value", "mt_sort", "mt_type = 'job_costcenter'", 2); //$title = "Übersicht der Rechnungsdaten"; ?> <?php echo $pageTitel; ?>
  Datum erledigt von:   bis:  ">