=".var_post("product_id", "").") "; else $search .= "(product_id >=".var_post("product_id", "").") "; } if(var_post("date_from", "")) { if($search) $search .= " AND (date >='".var_post("date_from", "")."') "; else $search .= "(date >='".var_post("date_from", "")."') "; } if(var_post("date_to", "")) { if($search) $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("", "Rechnungszusammenfassung nach Datum"), 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(); } ?>