<?php $small_toolbar = new NTKHBox("small_toolbar", 5, 0, False); $new_button = new NTKButton("new_button", "Neue Rechnung eintragen", "location.replace('bill.php?action=new');"); $small_toolbar->add($new_button, 230); $small_toolbar->add($spacer); $search_toolbar = new NTKHBox("search_toolbar", 2, 0, False); $search_entry = new NTKEntry("search_entry"); $search_toolbar->add($search_entry, 150); $search_button = new NTKButton("search_button", "Suchen", "document.forms['search'].submit();"); $search_toolbar->add($search_button, 80); $search_form = new NTKForm("search", "bill.php", $search_toolbar); $search_form->addAttribute("action", "search"); $small_toolbar->add($search_form, 240); $main_box->add($small_toolbar, True, False, "background-color: #dfe7f3;");
<?php $table = new NTKTable("table", 2, 4, False); $name_label = new NTKLabel("", "Bezeichner:"); $table->add($name_label, 0, 0); $name_entry = new NTKEntry("name"); $table->add($name_entry, 0, 1); $onload .= "document.getElementById('name').focus();"; $assistant_id_label = new NTKLabel("", "Mitarbeiter:"); $table->add($assistant_id_label, 0, 2); $assistant_id_entry = new NTKComboBox("assistant_id", $assistant->get()); $table->add($assistant_id_entry, 0, 3); $cancel_button = new NTKButton("cancel", "Abbrechen", "location.href = 'tour.php';"); $table->add($cancel_button, 1, 2); $submit_button = new NTKButton("submit", "Tour erstellen", "document.forms['tour'].submit();"); $table->add($submit_button, 1, 3); $form = new NTKForm("tour", "tour.php", $table); $form->addAttribute("db_action", "new"); $form->addAttribute("tour_id", ""); $main_box->add($form, False, True, "background-color: #dfe7f3; vertical-align: middle; align: center;");
$search .= " AND (date <='" . var_post("date_to", "") . "') "; } else { $search .= "(date <='" . var_post("date_to", "") . "') "; } } $bill_data = $bill->get("", array("bill_id"), $search); $bill_product = new Bill_Product(); $tour_data[1] = "( Alle Touren )"; $product = new Product(); $product_data = $product->get(); include "Druckvorlagen/tour.php"; } else { $toolbar_box = new NTKVBox("toolbar_box", 0, 0, False); $main_box = new NTKTable("main_box", 5, 4, False); $main_box->setStyle("background-color: #dfe7f3;"); $main_box->add(new NTKLabel("", "<b>Rechnungszusammenfassung nach Datum</b>"), 0, 0); $main_box->add(new NTKLabel("", "Von:"), 2, 0); $main_box->add(new NTKEntry("date_from", ""), 2, 1); $main_box->add(new NTKLabel("", "Bis:"), 2, 2); $main_box->add(new NTKEntry("date_to", ""), 2, 3); $main_box->add(new NTKButton("submit", "Druckvorschau", "document.forms['print_re'].submit();"), 4, 3); $form = new NTKForm("print_re", "stat_bill_merge.php", $main_box); $form->addAttribute("print", "print_re"); $toolbar_box->add($form, 0, 0); echo getHead(); echo $toolbar_box->getHtml(); } ?> </body> </html>
<?php $table = new NTKTable("table", 3, 4, False); $number_label = new NTKLabel("", "Kategorienummer:"); $table->add($number_label, 0, 0); $number_entry = new NTKLabel("category_id", $data[0][0]); $table->add($number_entry, 0, 1, 150); $name_label = new NTKLabel("", "Bezeichner:"); $table->add($name_label, 1, 0); $name_entry = new NTKEntry("name", $data[0][1]); $table->add($name_entry, 1, 1); $onload .= "document.getElementById('name').focus();"; $details_label = new NTKLabel("", "Beschreibung:"); $table->add($details_label, 1, 2); $details_entry = new NTKEntry("details", $data[0][2]); $table->add($details_entry, 1, 3); $delete_button = new NTKButton("delete", "Löschen", "if(confirm('Wirklich loeschen?')) location.href = 'category.php?db_action=delete&category_id=" . $data[0][0] . "';"); $table->add($delete_button, 2, 1); $cancel_button = new NTKButton("cancel", "Abbrechen", "location.href = 'category.php';"); $table->add($cancel_button, 2, 2); $submit_button = new NTKButton("submit", "Speichern", "document.forms['category'].submit();"); $table->add($submit_button, 2, 3); $form = new NTKForm("category", "category.php", $table); $form->addAttribute("db_action", "edit"); $form->addAttribute("category_id", $data[0][0]); $main_box->add($form, False, True, "background-color: #dfe7f3; vertical-align: middle; align: center;");
$list_view = new NTKListView("list_view", array('Tournummer', 'Bezeichner'), "location.href = 'tour.php?action=edit&tour_id=%0%';"); $list_view->addLines($tour->get('', array('tour_id', 'name'), "tour_id LIKE '%{$search}%' OR name LIKE'%{$search}%'")); $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;"); } elseif ($action == "list_tour") { $assistant = new Assistant(); $tour = new Tour(); $bill_box = new NTKHBox("bill_box", 0, 0); $bill_box->add(new NTKLabel("", "<b>Tournummer: " . $tour_id . " - Datum: " . $datum . "</b>"), False, False, "background-color: #dfe7f3;"); $bill_box->add(new NTKLabel("", "Kundennummer:"), 150); $bill_box->add(new NTKEntry("customer_id", ""), 120); $bill_box->add(new NTKLabel("", "Mitarbeiter:"), 120); $bill_box->add(new NTKComboBox("assistant_id", $assistant->get()), 120); $bill_box->add(new NTKLabel("", "Tour:"), 80); $bill_box->add(new NTKComboBox("tour_id", $tour->get()), 120); $bill_box->add(new NTKButton("bill_button", "Erstelle Rechnung", "document.forms['bill_form'].submit();"), 200); $bill_form = new NTKForm("bill_form", "tour.php", $bill_box); $bill_form->addAttribute("db_action", "tour_to_bill"); $bill_form->addAttribute("date", $datum); $bill_form->addAttribute("current_tour_id", $tour_id); $main_box->add($bill_form, 0, 0, "background-color: #dfe7f3; vertical-align: top;"); $list_view = new NTKListView("list_view", array('Rechnungsnummer', 'Kunde'), "location.href = 'bill.php?from_page=tour&fp_tour_id={$tour_id}&fp_date=" . $datum . "&action=edit&bill_id=%0%';"); $list_view->addLines($bill->get('', array('bill_id', 'bill.customer_id'), "bill.tour_id='{$tour_id}' AND date='" . $datum . "'")); $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;"); } else { $list_view = new NTKListView("list_view", array('Tournummer', 'Bezeichner'), "location.href = 'tour.php?action=edit&tour_id=%0%';"); $list_view->addLines($tour->get('', array('tour_id', 'name'))); $main_box->add($list_view, -1, -1, "background-color: #dfe7f3; vertical-align: top;"); } // main content $main_box->add($spacer, -1, -1, "background-color: #dfe7f3;"); echo getHead();
$assistant_id_entry = new NTKComboBox("assistant_id", $assistant->get(), $data[0][4]); $table->add($assistant_id_entry, 2, 1); } else { $assistant_id_entry = new NTKLabel("assistant_id", $data[0][4]); $table->add($assistant_id_entry, 2, 1, 150); } $delete_button = new NTKButton("delete", "Löschen", "if(confirm('Wirklich loeschen?')) location.href = 'bill.php?db_action=delete&bill_id=" . $data[0][0] . "&from_page={$from_page}&fp_date={$fp_date}&fp_tour_id={$fp_tour_id}';"); $table->add($delete_button, 4, 1); $cancel_button = new NTKButton("cancel", "Abbrechen", "location.href = 'bill.php';"); $table->add($cancel_button, 4, 2); if ($data[0][5] == -2) { $submit_button = new NTKButton("submit", "Speichern/RechnungsNr. -1", "document.forms['bill_form'].submit();"); } else { $submit_button = new NTKButton("submit", "Speichern", "document.forms['bill_form'].submit();"); } $table->add($submit_button, 4, 3); $form = new NTKForm("bill_form", "bill.php", $table); if ($data[0][5] == -2) { $form->addAttribute("bill_number", -1); } else { $form->addAttribute("bill_number", $data[0][5]); } if ($data[0][5] != -1) { $form->addAttribute("assistant_id", $data[0][4]); } $form->addAttribute("db_action", "edit"); $form->addAttribute("bill_id", $data[0][0]); $form->addAttribute("from_page", $from_page); $form->addAttribute("fp_tour_id", $fp_tour_id); $form->addAttribute("fp_date", $fp_date); $main_box->add($form, -1, -1, "background-color: #dfe7f3; vertical-align: middle; align: center;");
echo $form->getHtml(); $main_box = new NTKTable("main_box", 3, 4, False); $main_box->setStyle("background-color: #dfe7f3;"); $main_box->add(new NTKLabel("", "<b>Rechnungszusammenfassung nach Datum</b>"), 0, 0); $main_box->add(new NTKLabel("", "Von:"), 1, 0); $main_box->add(new NTKEntry("date_from", ""), 1, 1); $main_box->add(new NTKLabel("", "Bis:"), 1, 2); $main_box->add(new NTKEntry("date_to", ""), 1, 3); $main_box->add(new NTKButton("submit", "Druckvorschau", "document.forms['print_re'].submit();"), 2, 3); $form = new NTKForm("print_re", "print.php", $main_box); $form->addAttribute("print", "print_re"); echo $form->getHtml(); # maske zur listenerzeugung von verkaufszahlen pro produkt in einem bestimmten Zeitraum $main_box = new NTKTable("main_box", 5, 4, False); $main_box->setStyle("background-color: #dfe7f3;"); $main_box->add(new NTKLabel("", "<b>Produktverkauf in einem bestimmten Zeitraum</b>"), 0, 0); $main_box->add(new NTKLabel("", "Produktnummer:"), 1, 0); $main_box->add(new NTKEntry("product_id", ""), 1, 1); $main_box->add(new NTKLabel("", "Von:"), 2, 0); $main_box->add(new NTKEntry("date_from", ""), 2, 1); $main_box->add(new NTKLabel("", "Bis:"), 2, 2); $main_box->add(new NTKEntry("date_to", ""), 2, 3); $main_box->add(new NTKButton("submit", "Druckvorschau", "document.forms['print_2'].submit();"), 4, 3); $form = new NTKForm("print_2", "print.php", $main_box); $form->addAttribute("print", "print_2"); echo $form->getHtml(); } ?> </body> </html>
$anmerkung_label = new NTKLabel("", "Anmerkung:"); $table->add($anmerkung_label, 5, 2); $anmerkung_entry = new NTKEntry("anmerkung", $data[0][8]); $table->add($anmerkung_entry, 5, 3); // adding dynamic-pricesets $row = 6; for ($i = 0; $i < count($priceset_list); $i++) { $priceset_label = new NTKLabel("", $priceset_list[$i][1] . ":"); $table->add($priceset_label, $row, 0); $tmp_price = $price->getPrice($priceset_list[$i][0], $data[0][0]); if (count($tmp_price) > 0) { $priceset_entry = new NTKEntry("priceset_price_" . $i, $tmp_price[0][3]); } else { $priceset_entry = new NTKEntry("priceset_price_" . $i, 0); } $table->add($priceset_entry, $row, 1); $row++; } $delete_button = new NTKButton("delete", "Löschen", "if(confirm('Wirklich loeschen?')) location.href = 'product.php?db_action=delete&product_id=" . $data[0][0] . "';"); $table->add($delete_button, $row, 1); $cancel_button = new NTKButton("cancel", "Abbrechen", "location.href = 'product.php';"); $table->add($cancel_button, $row, 2); $submit_button = new NTKButton("submit", "Speichern", "document.forms['product'].submit();"); $table->add($submit_button, $row, 3); $form = new NTKForm("product", "product.php", $table); $form->addAttribute("db_action", "edit"); $form->addAttribute("product_id", $data[0][0]); for ($i = 0; $i < count($priceset_list); $i++) { $form->addAttribute("priceset_id_" . $i, $priceset_list[$i][0]); } $main_box->add($form, False, True, "background-color: #dfe7f3; vertical-align: middle; align: center;");
$main_box->add(new NTKLabel("", "aus Kategorie"), 9, 2); $main_box->add(new NTKComboBox("category", $category->get("")), 9, 3); $main_box->add(new NTKLabel("", "Mitarbeiter"), 11, 0); $main_box->add(new NTKComboBox("assitant", $assistant->get("")), 11, 1); $main_box->add(new NTKButton("submit", "Druckvorschau", "document.forms['print'].submit();"), 13, 3); $form = new NTKForm("print", "print_dialog.php", $main_box); $form->addAttribute("print", "print"); $main_box->add($form, False, False, "background-color: #dfe7f3;"); $main_box = new NTKTable("main_box", 3, 4, False); $main_box->setStyle("background-color: #dfe7f3;"); $main_box->add(new NTKLabel("", "Rechnungszusammenfassung nach Datum"), 0, 0); $main_box->add(new NTKLabel("", "Von:"), 1, 0); $main_box->add(new NTKEntry("date_from", ""), 1, 1); $main_box->add(new NTKLabel("", "Bis:"), 1, 2); $main_box->add(new NTKEntry("date_to", ""), 1, 3); $main_box->add(new NTKButton("submit", "Druckvorschau", "document.forms['print_re'].submit();"), 2, 3); $form = new NTKForm("print_re", "print_dialog.php", $main_box); $form->addAttribute("print", "print_re"); $main_box->add($form, False, False, "background-color: #dfe7f3;"); echo getHead(); echo $main_box->getHtml(); } ?> <html> <body> agöflkifn </body> </html>