Exemple #1
0
$ITEMS = EXPLODE('|', $CHECKOUT['items']);
$LIST = '';
$IT = 1;
$oldnontaxable = 0;
$nontaxable = 0;
$oldtaxable = 0;
$taxable = 0;
$oldtotaltax = 0;
$totaltax = 0;
foreach ($ITEMS as $I) {
    if ($I != '') {
        $I = EXPLODE('/', $I);
        $LIST .= '|' . $I[0] . '/' . $_GET['item' . $IT];
        $EX = EXPLODE('-', $I[0]);
        if ($EX[0] == 'ti') {
            MYSQL::QUERY('UPDATE core_tickets_processed SET t_checkout_created=?,t_checkout_price=? WHERE t_id=? LIMIT 1', array($_GET['date'], $_GET['item' . $IT], $EX[1]));
            $nontaxable = $nontaxable + ($_GET['item' . $IT] - 0);
            $oldnontaxable = $oldnontaxable + $I[1];
        } else {
            $taxable = $taxable + ($_GET['item' . $IT] - 0);
            $totaltax = $totaltax + ($_GET['item' . $IT] - 0) / 100 * $user['store_info']['s_taxrate'];
            $oldtaxable = $oldtaxable + $I[1];
            $oldtotaltax = $I[1] / 100 * $user['store_info']['s_taxrate'];
        }
    }
    $IT++;
}
MYSQL::QUERY('UPDATE core_checkout_sessions SET items=?,pm_1=?,pm_1_cost=?,pm_2=?,pm_2_cost=?,d_date=? WHERE qb_id=? LIMIT 1', array($LIST, $_GET['pm_1'], $_GET['pm_1_charge'], $_GET['pm_2'], $_GET['pm_2_charge'], $_GET['date'], $_GET['chid']));
TRACKING::CHECKOUTS($oldnontaxable, $oldtaxable, $oldtotaltax, $user, $CHECKOUT['pm_1'], $CHECKOUT['pm_1_cost'], $CHECKOUT['pm_2'], $CHECKOUT['pm_2_cost'], '-', $_GET['date']);
TRACKING::CHECKOUTS($nontaxable, $taxable, $totaltax, $user, $_GET['pm_1'], $_GET['pm_1_charge'], $_GET['pm_2'], $_GET['pm_2_charge'], '+', $_GET['date']);
Exemple #2
0
            $sof = 'None';
            $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);