| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <?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();
- echo getHead();
- $toolbar_box = new NTKVBox("toolbar_box", 5, 0, True);
- $product_id = var_post("product_id", "");
- $date_from = var_post("date_from", "");
- $date_to = var_post("date_to", "");
- if($product_id != "" && $date_from != "" && $date_to != "")
- {
- $product_amount = $product->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("", "<b>".$product_id."</b>"), 0, 1);
- $result_box->add(new NTKLabel("", "Zeitraum:"), 1, 0);
- $result_box->add(new NTKLabel("", "von <b>".$date_from."</b> bis <b>".$date_to."</b>"), 1, 1);
- $result_box->add(new NTKLabel("", "Menge:"), 1, 0);
- $result_box->add(new NTKLabel("", "<b>".round($product_amount, 2)."</b>"), 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("", "<b>Produktverkauf in einem bestimmten Zeitraum</b>"), 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();
- ?>
- </body>
- </html>
|