Exemple #1
0
//select customer
if (Input::get('cust_sel') != null && Input::get('return_url') != null) {
    $return_url = Crytion::decryt64(Input::get("return_url"));
    $inv->select_cust(Input::get('cust_sel'));
    Redirect::to($return_url);
}
//detach customer
if (Input::get('detach') && Input::get('detach') == 1) {
    $return_url = Crytion::decryt64(Input::get("return_url"));
    $inv->detach_customer();
    Redirect::to($return_url);
}
//cancel sales
if (Input::get('detachall') == 1) {
    $return_url = Crytion::decryt64(Input::get("return_url"));
    $inv->cancel_sale();
    Redirect::to($return_url);
}
//remove item from shopping cart
if (Input::get('removep') && Input::get('return_url') && Session::exists('products')) {
    $code = Input::get('removep');
    $return_url = Crytion::decryt64(Input::get("return_url"));
    $inv->remove_item(Input::get('bac'), $code);
    Redirect::to($return_url);
}
//complete sales
if (Input::exists() && Input::get('complete') == md5("complete") && Session::exists('products') && Session::exists('add-pay')) {
    $return_url = Crytion::decryt64(Input::get("return_url"));
    echo $emp_id = Crytion::decryt64(Session::get('user_id'));
    $email = Input::get('bool-email');
    if (Session::exists('select_cust')) {