Пример #1
0
function PrintCheckedOrderList($servername, $username, $password, $dbname, $orderlist)
{
    require_once 'EAN13.php';
    $pdf = new PDF_EAN13('P', 'mm', array(105, 148));
    //    echo "PrintCheckedOrderList for: " . $orderlist . "<br><br>";
    $orders = explode(";", $orderlist);
    foreach ($orders as $order) {
        if ($order != "") {
            $order_db = GetOrder($order);
            $orderlines = GetOrderLine($order_db->entity_id, $order);
            CreatePDFFile($servername, $username, $password, $dbname, $order_db, $orderlines, false, $pdf);
        }
    }
    $nomFacture = getcwd() . "/upload/Reservierungen_checked_orders.pdf";
    $pdf->Output($nomFacture);
    echo "Reservierungszettel f&uuml;r <a href=\"" . "upload/Reservierungen_checked_orders.pdf" . "\">" . "alle angekreuzten Bestellunen</a> drucken.<br><br>";
    foreach ($orders as $order) {
        if ($order != "") {
            $order_db = GetOrder($order);
            $orderlines = GetOrderLine($order_db->entity_id, $order);
            CreatePDFFile($servername, $username, $password, $dbname, $order_db, $orderlines, true, null);
        }
    }
    echo "<b>zum beenden bitte Tab schliessen</b>";
    exit;
}
Пример #2
0
     echo "<div class=\"ac_results\" style=\"position: absolute; width: 169px; top: 530px; left: 179px; display: none;\">";
     echo "<ul><li></li></ul></div>";
     echo "</table>";
     echo "<br>";
     echo "<br>";
     echo "<br>";
     echo "<br>";
     echo "<br>";
     echo "<p><input type=\"button\" onclick=\"searchartikle()\" style=\"font-family: Arial; font-size: 12pt; height: 24px\" value=\"Artikelstamm aktualisieren\"/></p>";
     echo "<p id='result'></p>";
 } else {
     $order = substr($eanorder, 0, strlen($eanorder) - 1);
     $order = ltrim($order, '0');
     if ($order != "") {
         $order_db = GetOrder($order);
         $orderlines = GetOrderLine($order_db->entity_id, $order);
         if ($order_db->entity_id != "") {
             echo CreateOrderHead($order_db, $MKZ, $UGP);
             echo CreateOrderArticle($orderlines, $MKZ, $UGP, true);
             $orderfound = true;
         } else {
             $orderfound = false;
             $link = OpenDatabase();
             $sql = "SELECT * FROM `Artikel` where `ean` = " . $eanorder;
             $res = mysql_query($sql, $link);
             $art = new Article();
             $articlefound = false;
             if ($art = mysql_fetch_object($res)) {
                 $articlefound = true;
                 echo GetUserInfo();
                 echo "<table  border=\"0\" style='width: 1024px; border-collapse: collapse; '>";
Пример #3
0
function CreateOrderTable($orders, $MKZ, $UGP)
{
    $table = "<table cellpadding=\"1\">\n";
    $table = $table . "<style type=\"text/css\">\n";
    $table = $table . "table { width: 1200px; }\n";
    $table = $table . "table { border-collapse: collapse;}\n";
    $table = $table . "table, td, th { border: 1px solid black; }\n";
    $table = $table . "td, th { height: 10px; font-family: Arial; font-Size: 12px};\n";
    $table = $table . "td, th { height: 10px; font-family: Arial; font-Size: 12px};\n";
    $table = $table . "th { text-align: right; };\n";
    $table = $table . "td { text-align: left; };\n";
    $table = $table . "</style>\n";
    $table = $table . "<tr>";
    $table = $table . "<th title=\"alle Bestellungen an-/abw&auml;hlen\" width='20px'><input type=\"checkbox\" name=\"auswahl\" onmousedown=\"isKeyPressed(this.value, 0, event)\" value=\"alle\"><br>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width='80px'><b>Bestellnummer</b>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width='40px'><b>Artikel</b>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width=\"120px\"><b>Datum</b>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width='100px'><b>Name</b>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width='80px'><b>Vorname</b>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width='50px'><b>S-Shop</b>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width='50px'><b>S-HiFi</b>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width='100px'><b>Versandweg</b>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width='90px'><b>Bemerkung</b>\n";
    $table = $table . "</th>\n";
    $table = $table . "<th width='50px'><b>Ware(n)</b>\n";
    $table = $table . "</th></tr>\n";
    $id = 0;
    foreach ($orders as $order) {
        $id++;
        //artikelholen
        $lines = GetOrderLine($order->entity_id, $order->increment_id);
        $lcol = "#FFFFFF";
        foreach ($lines as $line) {
            if ($line->data_error != "") {
                $lcol = "#FF0000";
            }
        }
        $table = $table . "<tr BGCOLOR=" . $lcol . ">";
        $table = $table . "<td title=\"Bestellung ausw&auml;hlen\" width='20px'>";
        $table = $table . "<input id=\"" . $id . "\"class= \"ordercheckbox\" type=\"checkbox\" name=\"orders[]\" onmousedown=\"isKeyPressed(this.value, " . $id . ", event)\" value=\"" . $order->increment_id . "\"><br>\n";
        $table = $table . "</td>\n";
        $aorder = "<a href=\"order.php" . "?MKZ=" . $MKZ . "&UPG=" . $UGP . "&order=" . $order->increment_id . "&function=ShowTheOrder\">";
        $aorder = $aorder . $order->increment_id . "</a>";
        $table = $table . "<td title=\"Bestellung aufrufen\" width='80px'>";
        $table = $table . "" . $aorder . " ";
        $table = $table . "</td>\n";
        $hint = "";
        foreach ($lines as $line) {
            $hint = $hint . round($line->qty_ordered) . " " . GetEinheit($line->einheit, GetVPE($line->vpe)) . " " . $line->name . "\n";
            if ($line->data_error != "") {
                $hint = "(DATENFEHLER) " . $line->data_error . " " . $hint;
            }
        }
        $table = $table . "<td width='40px' align='center' title=\"" . $hint . "\">";
        $table = $table . "" . sizeof($lines) . " ";
        $table = $table . "</td>\n";
        $ts = strtotime($order->created_at);
        $table = $table . "<td width='120px'>";
        $table = $table . "" . date("d.m.Y G:i:s", $ts) . " ";
        $table = $table . "</td>\n";
        $table = $table . "<td width='100px'>";
        $table = $table . "" . $order->customer_lastname . " ";
        $table = $table . "</td>\n";
        $table = $table . "<td width='80px'>";
        $table = $table . "" . $order->customer_firstname . " ";
        $table = $table . "</td>\n";
        $table = $table . "<td width='50px'>";
        $table = $table . "" . substr($order->status_mag, 0, 15) . " ";
        $table = $table . "</td>\n";
        $table = $table . "<td width='50px'>";
        $table = $table . "" . $order->status . " ";
        $table = $table . "</td>\n";
        $table = $table . "<td width='100px'>";
        $table = $table . "" . substr($order->shipping_description, 0, 15) . " ";
        $table = $table . "</td>\n";
        $table = $table . "<td  width='90px'>";
        $table = $table . "";
        $table = $table . "<input name=\"" . $order->increment_id . "\" onchange=\"myFunction(this.name, this.value)\" size=55 maxlength=255 type=\"text\" ";
        $table = $table . "value=\"" . $order->bemerkung . "\">";
        $table = $table . "</td>\n";
        $table = $table . "<td  width='50px'>";
        $ahref = "<a href=\"order.php?MKZ=" . $MKZ . "&UPG=" . $UGP . "&order=" . $order->increment_id . "\"><button>buchen</button></a>";
        $table = $table . "" . $ahref . "";
        $table = $table . "</td></tr>\n";
    }
    $table = $table . "</table><br>\n";
    return $table;
}