stat_bill_merge.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. require_once("util.php");
  3. require_once("NTK/NTK.php");
  4. require_once("../DataBase/Product.php");
  5. require_once("../DataBase/Group.php");
  6. require_once("../DataBase/Priceset.php");
  7. require_once("../DataBase/Price.php");
  8. require_once("../DataBase/Category.php");
  9. require_once("../DataBase/Tax.php");
  10. require_once("../DataBase/Assistant.php");
  11. require_once("../DataBase/Bill.php");
  12. require_once("DataBase/Bill_Product.php");
  13. $group = new Group();
  14. $priceset = new Priceset();
  15. $category = new Category();
  16. $product = new Product();
  17. $price = new Price();
  18. $tax = new Tax();
  19. $assistant = new Assistant();
  20. $bill = new Bill();
  21. if(var_post("print", "") == "print_re")
  22. {
  23. $search = "";
  24. if(var_post("product_id", ""))
  25. {
  26. if($search)
  27. $search .= " AND (product_id >=".var_post("product_id", "").") ";
  28. else
  29. $search .= "(product_id >=".var_post("product_id", "").") ";
  30. }
  31. if(var_post("date_from", ""))
  32. {
  33. if($search)
  34. $search .= " AND (date >='".var_post("date_from", "")."') ";
  35. else
  36. $search .= "(date >='".var_post("date_from", "")."') ";
  37. }
  38. if(var_post("date_to", ""))
  39. {
  40. if($search)
  41. $search .= " AND (date <='".var_post("date_to", "")."') ";
  42. else
  43. $search .= "(date <='".var_post("date_to", "")."') ";
  44. }
  45. $bill_data = $bill->get("", array("bill_id"), $search);
  46. $bill_product = new Bill_Product();
  47. $tour_data[1] = "( Alle Touren )";
  48. $product = new Product();
  49. $product_data = $product->get();
  50. include("Druckvorlagen/tour.php");
  51. }
  52. else
  53. {
  54. $toolbar_box = new NTKVBox("toolbar_box", 0, 0, False);
  55. $main_box = new NTKTable("main_box", 5, 4, False);
  56. $main_box->setStyle("background-color: #dfe7f3;");
  57. $main_box->add(new NTKLabel("", "<b>Rechnungszusammenfassung nach Datum</b>"), 0, 0);
  58. $main_box->add(new NTKLabel("", "Von:"), 2, 0);
  59. $main_box->add(new NTKEntry("date_from", ""), 2, 1);
  60. $main_box->add(new NTKLabel("", "Bis:"), 2, 2);
  61. $main_box->add(new NTKEntry("date_to", ""), 2, 3);
  62. $main_box->add(new NTKButton("submit", "Druckvorschau", "document.forms['print_re'].submit();"), 4, 3);
  63. $form = new NTKForm("print_re", "stat_bill_merge.php", $main_box);
  64. $form->addAttribute("print", "print_re");
  65. $toolbar_box->add($form, 0, 0);
  66. echo getHead();
  67. echo $toolbar_box->getHtml();
  68. }
  69. ?>
  70. </body>
  71. </html>