| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- <?php
- require_once("util.php");
- require_once("NTK/NTK.php");
- require_once("../DataBase/Product.php");
- require_once("../DataBase/Group.php");
- require_once("../DataBase/Priceset.php");
- require_once("../DataBase/Price.php");
- require_once("../DataBase/Category.php");
- require_once("../DataBase/Tax.php");
- require_once("../DataBase/Assistant.php");
- require_once("../DataBase/Bill.php");
- require_once("DataBase/Bill_Product.php");
- $group = new Group();
- $priceset = new Priceset();
- $category = new Category();
- $product = new Product();
- $price = new Price();
- $tax = new Tax();
- $assistant = new Assistant();
- $bill = new Bill();
- $var_print = var_post("print", "");
- $var_group_all = var_post("group_all", "");
- $var_group = var_post("group", "");
- $var_category_all = var_post("category_all", "");
- $var_category = var_post("category", "");
- $var_available = var_post("available", "");
- $var_not_available = var_post("not_available", "");
- $var_product_id_from = var_post("product_id_from", "");
- $var_product_id_to = var_post("product_id_to", "");
- $var_assistant = var_post("assistant", "");
- $var_priceset = var_post("priceset", "");
- $var_product_id = var_post("product_id", "");
- $var_date_from = var_post("date_from", "");
- $var_date_to = var_post("date_to", "");
- if($var_print == "print")
- {
- $search = "";
- if(!$var_group_all)
- {
- if($search)
- $search .= " AND group_id='".$var_group."' ";
- else
- $search .= "group_id='".$var_group."' ";
- }
- if(!$var_category_all)
- {
- if($search)
- $search .= " AND category_id='".$var_category."' ";
- else
- $search .= "category_id='".$var_category."' ";
- }
- if($var_available && !$var_not_available)
- {
- if($search)
- $search .= " AND available='1' ";
- else
- $search .= "available='1' ";
- }
- if(!$var_available && $var_not_available)
- {
- if($search)
- $search .= " AND available='0' ";
- else
- $search .= "available='0' ";
- }
- if($var_product_id_from)
- {
- if($search)
- $search .= " AND (product_id >=".$var_product_id_from.") ";
- else
- $search .= "(product_id >=".$var_product_id_from.") ";
- }
- if($var_product_id_to)
- {
- if($search)
- $search .= " AND (product_id <=".$var_product_id_to.") ";
- else
- $search .= "(product_id <=".$var_product_id_to.") ";
- }
- $product_data = $product->get('', array(), $search);
- $assistant_data = $assistant->get($var_assistant);
- $priceset = new Priceset();
- $tmp = $priceset->get($var_priceset);
- $priceset_data = $tmp[0];
- include("Druckvorlagen/zeilen.php");
- include("Druckvorlagen/list.php");
- }
- elseif($var_print == "print_re")
- {
- $search = "";
- if($var_date_from)
- {
- if($search)
- $search .= " AND (date >='".$var_date_from."') ";
- else
- $search .= "(date >='".$var_date_from."') ";
- }
- if($var_date_to)
- {
- if($search)
- $search .= " AND (date <='".$var_date_to."') ";
- else
- $search .= "(date <='".$var_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
- {
- $main_box = new NTKTable("main_box", 14, 4, False);
- $main_box->setStyle("background-color: #dfe7f3;");
- $main_box->add(new NTKLabel("", "Produktnummer von:"), 1, 0);
- $main_box->add(new NTKEntry("product_id_from", ""), 1, 1);
- $main_box->add(new NTKLabel("", "bis: "), 1, 2);
- $main_box->add(new NTKEntry("product_id_to", ""), 1, 3);
- $main_box->add(new NTKLabel("", "alle Gruppen"), 3, 0);
- $main_box->add(new NTKCheckbox("group_all", 1, True), 3, 1);
- $main_box->add(new NTKLabel("", "aus Gruppe"), 3, 2);
- $main_box->add(new NTKComboBox("group", $group->get("")), 3, 3);
- $main_box->add(new NTKLabel("", "verfügbare"), 5, 0);
- $main_box->add(new NTKCheckbox("available", 1, True), 5, 1);
- $main_box->add(new NTKLabel("", "nicht verfügbare"), 5, 2);
- $main_box->add(new NTKCheckbox("not_available", 1, False), 5, 3);
- $main_box->add(new NTKLabel("", "aus Preisliste"), 7, 0);
- $main_box->add(new NTKComboBox("priceset", $priceset->get("")), 7, 1);
- $main_box->add(new NTKLabel("", "alle Kategorien"), 9, 0);
- $main_box->add(new NTKCheckbox("category_all", 1, True), 9, 1);
- $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>
|