Ejemplo n.º 1
0
    $discount = Input::get('goods_discount');
    $return_url = Crytion::decryt64(Input::get("return_url"));
    $inv->update_item($product_code, $qty, $discount);
    Redirect::to($return_url);
}
//global discount
if (Input::exists() && Input::get('type') == 'globaldiscount' && Input::get('return_url')) {
    $return_url = Crytion::decryt64(Input::get("return_url"));
    $discount = Input::get('setglobald');
    $inv->discountall($discount);
    Redirect::to($return_url);
}
//payment
if (Input::get('pay-type') != null && Input::get('amount') != null) {
    $return_url = Crytion::decryt64(Input::get("return_url"));
    $inv->payment(Input::get('pay-type'), Input::get('amount'));
    Redirect::to($return_url);
}
//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