Exemple #1
0
            $w = 0;
        }
        $content .= "<tr>\n\t\t\t\t\t\t\t\t<td>Ticket #" . $b[1] . "</td>\n\t\t\t\t\t\t\t    <td style='width:60px;'><center>{$phy}</center></td>\n\t\t\t\t\t\t\t\t<td style='width:60px;'><center>{$sof}</center></td>\n\t\t\t\t\t\t\t\t<td>\$" . $split[1] . "</td>\n\t\t\t\t\t\t\t</tr>";
        $nontaxable = $nontaxable + $split[1];
        MYSQL::QUERY("INSERT INTO core_tickets_processed (t_id, t_customer, t_manufacturer, t_model, t_imei, t_password, t_phy, t_liq, t_sof, t_created_by, t_store, t_session, t_created, t_estimate_created, t_estimate_price, t_estimate_items, t_estimate_time, t_repair_created, t_repair_price, t_repair_items, t_repair_time) SELECT * FROM core_tickets_checkout WHERE t_id = ? LIMIT 1", array($b[1]));
        MYSQL::QUERY("UPDATE core_tickets_processed SET t_warranty=?, t_checkout_created=?, t_checkout_price=?, t_checkout_time=? WHERE t_id = ? LIMIT 1", array($w, Date("Y-m-d H:i:s"), $split[1], $time, $b[1]));
        MYSQL::QUERY("UPDATE core_tickets_status SET t_status = ? WHERE t_id = ? LIMIT 1", array(4, $b[1]));
        MYSQL::QUERY("DELETE FROM core_tickets_checkout WHERE t_id = ? LIMIT 1", array($b[1]));
        USER::NOTE($b[1], "Processed This Ticket [ " . $split[1] . " ] [ {$time} ]", 2);
    } else {
        if ($b[0] == "ac") {
            $taxable = $taxable + $split[1];
            $ITEM = MYSQL::QUERY('SELECT * FROM device_accessories WHERE a_id = ? LIMIT 1', array($b[1]));
            $content .= "<tr>\n\t\t\t\t\t\t\t\t<td>" . $ITEM['a_name'] . "</td>\n\t\t\t\t\t\t\t    <td style='width:60px;'></td>\n\t\t\t\t\t\t\t\t<td style='width:60px;'></td>\n\t\t\t\t\t\t\t\t<td>\$" . $split[1] . "</td>\n\t\t\t\t\t\t\t</tr>";
        } else {
            if ($b[0] == "de") {
                $taxable = $taxable + $split[1];
                $DEVICE = MYSQL::QUERY('SELECT * FROM core_refurb_devices WHERE d_id = ? LIMIT 1', array($b[1]));
                $MODEL = MYSQL::QUERY('SELECT m_name FROM device_models WHERE m_id = ? LIMIT 1', array($DEVICE['d_model_id']));
                $content .= "<tr>\n\t\t\t\t\t\t\t    <td>" . $MODEL['m_name'] . "</td>\n\t\t\t\t\t\t\t\t<td style='width:60px;'>6 Month</td>\n\t\t\t\t\t\t\t\t<td style='width:60px;'>None</td>\n\t\t\t\t\t\t\t\t<td>\$" . $split[1] . "</td>\n\t\t\t\t\t\t\t</tr>";
                MYSQL::QUERY("UPDATE core_refurb_devices SET d_sold = ? WHERE d_id = ? LIMIT 1", array($T['c_id'] . "|" . $split[1], $b[1]));
            }
        }
    }
}
$content .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t    <td colspan='3'></td>\n\t\t\t\t\t    <td colspan='1'><center><b>Tax:</b> \${$totaltax}</center></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t    <td colspan='3'>{$paymentmethod}</td>\n\t\t\t\t\t    <td colspan='1'><center><b>Total:</b> \${$totalcost}</center></td>\n\t\t\t\t\t</tr>\n\t\t        </tbody>\n            </table>\n\t\t\t<table border='1' cellspacing='0' id='Disclaimer-Table' class='escca' style='border: 1px solid black;width: 98% !important;border-left: 0px;border-bottom:0px none !important;border-top: 0px none;'>\n\t            <tbody>\n\t\t            <tr style='text-align:center;'>\n\t\t\t            <td><b>Warranty Information</b></td>\n\t\t\t        </tr>\n\t\t\t        <tr>\n\t\t\t            <td><br/>\n\t\t\t\t\t\t    <b>Physical Warranty</b> - This warranty covers any parts replaced in the repair proccess. If the part we replaced proves to be defective in any way we will replace it at no extra charge.\n\t\t\t\t\t\t\tThis warranty is void if the part sustains any physical or liquid damage or if it is removed from the device. If your phone came in with liquid damage there will be no warranty offered on any\n\t\t\t\t\t\t\tpart that we install. Any aftermarket parts that are brought in by customers are not covered by any warranties.\n\t\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\t\t<b>Software Warranty</b> - This warranty guarantees any software service we provide you. If for any reason the phone is updated, modified (ie. jailbreaking, unlocking, rooting) or sustains\n\t\t\t\t\t\t\tphysical or liquid damage the warranty becomes void.\n\t\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\t\t<b>Liquid Damage</b> - We <b>do not</b> provide a warranty for any liquid damaged devices that we repair. This include any parts replaced or software services done on any device. Furthermore\n\t\t\t\t\t\t\tany device that we provide a service for that becomes liquid damaged will lose its warranty. No Exceptions.<br/><br/>\n\t\t\t\t        </td>\n\t\t\t        </tr>\n\t\t        </tbody>\n\t        </table>\n        </center>\t\t\n    ";
echo $content;
TRACKING::CHECKOUTS($nontaxable, $taxable, $totaltax, $user, $pm1, $pm1cost, $pm2, $pm2cost);
USER::STAT('checkouts');
USER::MEDAL('bronze', $itemscheckedout);
Exemple #2
0
    $v = explode("-", $v);
    if ($v[0] == "it") {
        MYSQL::QUERY("UPDATE inventory_stock SET quantity = quantity + 1 WHERE store = ? AND item = ? LIMIT 1", array($user['store'], $v[1]));
    }
}
foreach ($added as $k => $v) {
    $v = explode("-", $v);
    if ($v[0] == "it") {
        MYSQL::QUERY("UPDATE inventory_stock SET quantity = quantity - 1 WHERE store = ? AND item = ? LIMIT 1", array($user['store'], $v[1]));
    }
}
$status = array(3);
foreach ($_POST as $k => $v) {
    $key1 = "t_" . str_replace($ticket, "", $k);
    $key2 = explode(".", $Main[$key1]);
    $key3 = $key2[0] . "." . $v;
    array_push($status, $key3);
}
$reward = round($price / 50);
array_push($status, $ticket);
MYSQL::QUERY("INSERT INTO core_tickets_checkout (t_id, t_customer, t_manufacturer, t_model, t_imei, t_password, t_phy, t_liq, t_sof, t_created_by, t_store, t_session, t_created, t_estimate_created, t_estimate_price, t_estimate_items, t_estimate_time) SELECT * FROM core_tickets_repair WHERE t_id = ? LIMIT 1", array($ticket));
MYSQL::QUERY("UPDATE core_tickets_checkout SET t_repair_created = ?, t_repair_price = ?, t_repair_items = ?, t_repair_time = ? WHERE t_id = ?", array(Date("Y-m-d H:i:s"), $price, $items, $time, $ticket));
MYSQL::QUERY("UPDATE core_tickets_status SET t_status = ?,t_order = 0,t_simcard = ?,t_sdcard = ?,t_case = ?,t_charger = ?,t_power = ?,t_buttons = ?,t_inaudio = ?,t_exaudio = ?,t_touch = ?,t_housing = ?,t_charging = ?,t_service = ? WHERE t_id = ? LIMIT 1", $status);
MYSQL::QUERY("DELETE FROM core_tickets_repair WHERE t_id = ? LIMIT 1", array($ticket));
MYSQL::QUERY('INSERT INTO core_tickets_note (t_id, t_note, t_note_by, t_date) VALUES (?, ?, ?, ?)', array($ticket, "Device Repaired [{$time}]", $user['user_id'], Date("Y-m-d H:i:s")));
TRACKING::REPAIRS($itemsnew, $user);
USER::NOTE($ticket, "Device Repaired [ {$price} ] [ {$time} ]", 2);
USER::STAT('repairs');
USER::MEDAL('bronze', $reward);
?>
 
Exemple #3
0
<?php

require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0, TRUE);
$price = $_POST['price'];
unset($_POST['price']);
$time = $_POST['time'];
unset($_POST['time']);
$items = $_POST['items'];
unset($_POST['items']);
$ticket = $_POST['ticket'];
unset($_POST['ticket']);
$Main = MYSQL::QUERY("SELECT * FROM core_tickets_status WHERE t_id = ? LIMIT 1", array($ticket));
if ($Main['t_status'] == 1) {
    $status = array(2);
    foreach ($_POST as $k => $v) {
        $key1 = "t_" . str_replace($ticket, "", $k);
        $key2 = explode(".", $Main[$key1]);
        $key3 = $v . "." . $key2[1];
        array_push($status, $key3);
    }
    array_push($status, $ticket);
    MYSQL::QUERY("INSERT INTO core_tickets_repair (t_id, t_customer, t_manufacturer, t_model, t_imei, t_password, t_phy, t_liq, t_sof, t_created_by, t_store, t_session, t_created) SELECT * FROM core_tickets_estimate WHERE t_id = ? LIMIT 1", array($ticket));
    MYSQL::QUERY("UPDATE core_tickets_repair SET t_estimate_created = ?, t_estimate_price = ?, t_estimate_items = ?, t_estimate_time = ? WHERE t_id = ? LIMIT 1", array(Date("Y-m-d H:i:s"), $price, $items, $time, $ticket));
    MYSQL::QUERY("UPDATE core_tickets_status SET t_status = ?,t_simcard = ?,t_sdcard = ?,t_case = ?,t_charger = ?,t_power = ?,t_buttons = ?,t_inaudio = ?,t_exaudio = ?,t_touch = ?,t_housing = ?,t_charging = ?,t_service = ? WHERE t_id = ? LIMIT 1", $status);
    MYSQL::QUERY("DELETE FROM core_tickets_estimate WHERE t_id = ? LIMIT 1", array($ticket));
    USER::NOTE($ticket, "Ticket Estimated [ {$price} ] [ {$time} ]", 2);
    USER::STAT('estimates');
    USER::MEDAL('bronze', 1);
}
Exemple #4
0
        $qu_note = 'INSERT INTO core_tickets_note (t_id,t_note,t_note_by,t_type,t_date) VALUES ';
        $i = 1;
        foreach ($ticks as $ti) {
            if ($ti == "") {
            } else {
                $ti = explode('/', $ti);
                array_push($params, $ti[0], $_POST["customerid"], $modelsused[$i - 1], $ti[1], $user['user_id'], $user['store'], $date);
                array_push($params_note, $ti[0], $_POST["issue{$i}"], $user['user_id'], 3, $date);
                if ($i == 1) {
                    $qu .= '(?,?,?,?,?,?,?)';
                    $qu_note .= '(?,?,?,?,?)';
                } else {
                    $qu .= ',(?,?,?,?,?,?,?)';
                    $qu_note .= ',(?,?,?,?,?)';
                }
                $i++;
            }
        }
        MYSQL::QUERY($qu, $params);
        MYSQL::QUERY($qu_note, $params_note);
        $i--;
        $params = array($i, $_POST["customerid"]);
        MYSQL::QUERY('UPDATE core_customers SET c_tickets = c_tickets + ? WHERE c_id = ?', $params);
        USER::STAT('tickets', $i);
        USER::MEDAL('bronze', $i);
    } else {
        die('E1423');
    }
} else {
    die('E1424');
}