getAmountByDate($product_id, $date_from, $date_to, 1); $bill_data = $product->getBillsByDate($product_id, $date_from, $date_to, 1); $customer_data = $product->getCustomersByDate($product_id, $date_from, $date_to, 1); $result_box = new NTKTable("result_box", 4, 2, False); $result_box->setStyle("background-color: #F8FF77;"); $result_box->add(new NTKLabel("", "Produktnummer:"), 0, 0); $result_box->add(new NTKLabel("", "".$product_id.""), 0, 1); $result_box->add(new NTKLabel("", "Zeitraum:"), 1, 0); $result_box->add(new NTKLabel("", "von ".$date_from." bis ".$date_to.""), 1, 1); $result_box->add(new NTKLabel("", "Menge:"), 1, 0); $result_box->add(new NTKLabel("", "".round($product_amount, 2).""), 1, 1); $result_box->add(new NTKLabel("", "In Rechnungen (Menge):"), 2, 0); $bills = ""; for($i = 0; $i < count($bill_data); $i++) { $bills = $bills." ".$bill_data[$i][0]." ("; $bills = $bills." ".$bill_data[$i][1].") ; "; } $result_box->add(new NTKLabel("", $bills), 2, 1); $result_box->add(new NTKLabel("", "Von Kunden:"), 3, 0); $customer_string = ""; for($i = 0; $i < count($customer_data); $i++) { $customer_string = $customer_string." ".$customer_data[$i][0]."("; $customer_string = $customer_string." ".$customer_data[$i][1].") ; "; } $result_box->add(new NTKLabel("", $customer_string), 3, 1); $toolbar_box->add($result_box, 0, 0); } $main_box = new NTKTable("main_box", 6, 4, False); $main_box->setStyle("background-color: #dfe7f3;"); $main_box->add(new NTKLabel("", "Produktverkauf in einem bestimmten Zeitraum"), 0, 0); $main_box->add(new NTKLabel("", "Produktnummer:"), 2, 0); $main_box->add(new NTKEntry("product_id", $product_id), 2, 1); $main_box->add(new NTKLabel("", "Von:"), 3, 0); $main_box->add(new NTKEntry("date_from", $date_from), 3, 1); $main_box->add(new NTKLabel("", "Bis:"), 3, 2); $main_box->add(new NTKEntry("date_to", $date_to), 3, 3); $main_box->add(new NTKButton("submit", "OK", "document.forms['stat_product_date_count'].submit();"), 5, 3); $form = new NTKForm("stat_product_date_count", "stat_product_date_count.php", $main_box); $toolbar_box->add($form, 10, 0); echo $toolbar_box->getHtml(); ?>