<?php
include('db_con.php');
   
  include('function.php');
  
  if (isset($_SESSION['user_id'])) {
    $user_type = $_SESSION['user_type'];
    $user_id = $_SESSION['user_id'];
    $user_name = $_SESSION['user_name'];
    $branch_id = $_SESSION['branch_id'];
    $branch_name = $_SESSION['branch_name'];
     $store_id = $_SESSION['store_id'];
        $store_name = $_SESSION['store_name'];
}else{
  header('Location: login');
  die();
}
$rights_id = $_GET['id'];
include('user_permissions.php');
  if ($user_type!=='admin')
{
  header('Location: login');
  die();
}
  $sql = "SELECT user_name FROM user_detail WHERE user_id = '".$rights_id."'";
            $statement = $connect->prepare($sql);
            $statement->execute(); // no need to add `$sql` here, you can take that out
            $rights_name = $statement->fetchColumn();
 
            
if(isset($_POST["save"]))
{
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['production']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'production'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['rpt_svl']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'rpt_svl'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['rpt_svl_balance']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'rpt_svl_balance'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['rpt_sale_target']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'rpt_sale_target'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['inventory']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'inventory'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_inquiry']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_inquiry'";
            $statement = $connect->prepare($sql);
            $statement->execute();
      
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_transfer']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_transfer'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_transfer_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_transfer_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_transfer_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_transfer_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_transfer_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_transfer_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_adjust']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_adjust'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_adjust_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_adjust_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_adjust_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_adjust_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['items_adjust_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'items_adjust_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['inventory_reports']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'inventory_reports'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['inventory_reports_stockbystore']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'inventory_reports_stockbystore'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['inventory_reports_item_ledger']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'inventory_reports_item_ledger'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['inventory_reports_stockavailable']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'inventory_reports_stockavailable'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['inventory_reports_stockavailable_value']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'inventory_reports_stockavailable_value'";
            $statement = $connect->prepare($sql);
            $statement->execute();
                $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['inventory_reports_min_stock']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'inventory_reports_min_stock'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['production_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'production_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_parent_accounts']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_parent_accounts'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_parent_accounts_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_parent_accounts_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_parent_accounts_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_parent_accounts_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
               $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_parent_accounts_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_parent_accounts_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_accounts']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_accounts'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_accounts_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_accounts_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_accounts_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_accounts_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_accounts_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_accounts_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['jv']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'jv'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['jv_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'jv_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['jv_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'jv_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['jv_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'jv_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['jv_print']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'jv_print'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_reports']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_reports'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_reports_gl']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_reports_gl'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_reports_cash_flow']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_reports_cash_flow'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_reports_trial_balance']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_reports_trial_balance'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['gl_reports_sub_report']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'gl_reports_sub_report'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['vendors']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'vendors'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['vendors_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'vendors_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['vendors_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'vendors_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
               $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['vendors_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'vendors_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
                         $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['sub_vendors']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'sub_vendors'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['sub_vendors_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'sub_vendors_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['sub_vendors_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'sub_vendors_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['sub_vendors_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'sub_vendors_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase'";
            $statement = $connect->prepare($sql);
            $statement->execute();
               $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
               $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
               $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase_print']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase_print'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
               $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase_return']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase_return'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase_return_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase_return_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase_return_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase_return_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
               $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase_return_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase_return_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['purchase_return_print']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'purchase_return_print'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_payments']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_payments'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_payments_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_payments_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_payments_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_payments_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_payments_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_payments_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_payments_print']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_payments_print'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             
               $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_reports']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_reports'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_reports_vl']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_reports_vl'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_reports_os']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_reports_os'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_reports_payments']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_reports_payments'";
            $statement = $connect->prepare($sql);
            $statement->execute();
                  $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_payable_reports_purchase_report']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_payable_reports_purchase_report'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['customers']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'customers'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['customers_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'customers_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['customers_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'customers_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
                  $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['customers_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'customers_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['cash_invoices']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'cash_invoices'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['cash_invoices_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'cash_invoices_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['cash_invoices_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'cash_invoices_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['cash_invoices_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'cash_invoices_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['cash_invoices_print']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'cash_invoices_print'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['wholesale_invoices']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'wholesale_invoices'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['wholesale_invoices_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'wholesale_invoices_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['wholesale_invoices_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'wholesale_invoices_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['wholesale_invoices_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'wholesale_invoices_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['wholesale_invoices_print']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'wholesale_invoices_print'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_wholesale']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_wholesale'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_wholesale_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_wholesale_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_wholesale_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_wholesale_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_wholesale_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_wholesale_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_wholesale_print']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_wholesale_print'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_retail']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_retail'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_retail_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_retail_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_retail_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_retail_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_retail_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_retail_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['return_retail_print']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'return_retail_print'";
            $statement = $connect->prepare($sql);
            $statement->execute();
            $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_payments']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_payments'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_payments_new']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_payments_new'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_payments_edit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_payments_edit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_payments_delete']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_payments_delete'";
            $statement = $connect->prepare($sql);
            $statement->execute();
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_payments_print']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_payments_print'";
            $statement = $connect->prepare($sql);
            $statement->execute();
         
              $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports_cl']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports_cl'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports_os']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports_os'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports_payments']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports_payments'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports_cash_invoices']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports_cash_invoices'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports_sale_invoices']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports_sale_invoices'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports_sale_report_with_profit']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports_sale_report_with_profit'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports_aging']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports_aging'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports_aging_invoices']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports_aging_invoices'";
            $statement = $connect->prepare($sql);
            $statement->execute();
             $sql = "UPDATE user_rights
        SET doc_status = '".$_POST['accounts_receivable_reports_sales_man']."'     
        WHERE user_id = '".$rights_id."' and doc_name = 'accounts_receivable_reports_sales_man'";
            $statement = $connect->prepare($sql);
            $statement->execute();   
     
             $sql = "UPDATE app_options
        SET app_value = '".$_POST['dateup']."'     
        WHERE user_id = '".$rights_id."' and app_name = 'dateup'";
            $statement = $connect->prepare($sql);
            $statement->execute();   
             $sql = "UPDATE app_options
        SET app_value = '".$_POST['datedown']."'     
        WHERE user_id = '".$rights_id."' and app_name = 'datedown'";
            $statement = $connect->prepare($sql);
            $statement->execute();   
     
      header("location:dashboard.php");
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>User Rights</title>
  <?php include('include/head.php'); ?>
  
</head>
<body>
  <?php include('include/header.php'); ?>
  
<div class="main-container">
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark"></h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Users</a></li>
              <li class="breadcrumb-item active">Rights </li>
            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <!-- Small boxes (Stat box) -->
     <span id="alert_action"></span>
    <div class="row">
        <div class="col-12">
          <div class="card">
            <div class="card-header">
              <div class="row">
                          <div class="col-lg-10 col-md-10 col-sm-8 col-xs-6">
                              <h3 class="panel-title">User Rights For User : <?php echo $rights_name;?></h3>
                            </div>
                            <div class="col-lg-2 col-md-2 col-sm-4 col-xs-6" align="right">
                            
                          </div>
                </div>
            </div>
            <!-- /.card-header -->
            <div class="card-body">
                      <div class="row"><div class="col-sm-12 table-responsive">
                        <table width="100%"id="_dataTable" class="table table-bordered table-striped">
       <form method="post" id="setting_form" AutoComplete="off" />          
           <tr>
           <td width="50%"><h6>Production</h6></td><td>
           <input type="radio" name="production" id="production" class="radio-inline production"
           value="ON"  <?php if($production=='ON'){echo "checked";}?> />ON
           <input type="radio" name="production" id="production" class="radio-inline production" 
           value="OFF" <?php if($production=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Sale Target</h6></td><td>
           <input type="radio" name="rpt_sale_target" id="rpt_sale_target" class="radio-inline rpt_sale_target"
           value="ON"  <?php if($rpt_sale_target=='ON'){echo "checked";}?> />ON
           <input type="radio" name="rpt_sale_target" id="rpt_sale_target" class="radio-inline rpt_sale_target"
           value="OFF" <?php if($rpt_sale_target=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>SubVendorLedger</h6></td><td>
           <input type="radio" name="rpt_svl" id="rpt_svl" class="radio-inline rpt_svl"
           value="ON"  <?php if($rpt_svl=='ON'){echo "checked";}?> />ON
           <input type="radio" name="rpt_svl" id="rpt_svl" class="radio-inline rpt_svl"
           value="OFF" <?php if($rpt_svl=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>SubVendorBalance</h6></td><td>
           <input type="radio" name="rpt_svl_balance" id="rpt_svl_balance" class="radio-inline rpt_svl_balance"
           value="ON"  <?php if($rpt_svl_balance=='ON'){echo "checked";}?> />ON
           <input type="radio" name="rpt_svl_balance" id="rpt_svl_balance" class="radio-inline rpt_svl_balance"
           value="OFF" <?php if($rpt_svl_balance=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>1. Inventory</h6></td><td>
           <input type="radio" name="inventory" id="inventory" class="radio-inline inventory"
           value="ON"  <?php if($inventory=='ON'){echo "checked";}?> />ON
           <input type="radio" name="inventory" id="inventory" class="radio-inline inventory" 
           value="OFF" <?php if($inventory=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           
         
          <tr>
           <td width="50%"><h6>items</h6></td><td>
           <input type="radio" name="items" id="items" class="radio-inline items"
           value="ON"  <?php if($items=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items" id="items" class="radio-inline items" 
           value="OFF" <?php if($items=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
              <tr>
           <td width="50%"><h6>items_new</h6></td><td>
           <input type="radio" name="items_new" id="items_new" class="radio-inline items_new"
           value="ON"  <?php if($items_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_new" id="items_new" class="radio-inline items_new" 
           value="OFF" <?php if($items_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Items Edit</h6></td><td>
           <input type="radio" name="items_edit" id="items_edit" class="radio-inline items_edit"
           value="ON"  <?php if($items_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_edit" id="items_edit" class="radio-inline items_edit" 
           value="OFF" <?php if($items_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Items delete</h6></td><td>
           <input type="radio" name="items_delete" id="items_delete" class="radio-inline items_delete"
           value="ON"  <?php if($items_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_delete" id="items_delete" class="radio-inline items_delete" 
           value="OFF" <?php if($items_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>     
           <tr>
           <td width="50%"><h6>Items Inquiry</h6></td><td>
           <input type="radio" name="items_inquiry" id="items_inquiry" class="radio-inline items_inquiry"
           value="ON"  <?php if($items_inquiry=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_inquiry" id="items_inquiry" class="radio-inline items_inquiry" 
           value="OFF" <?php if($items_inquiry=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>         
            <tr>
           <td width="50%"><h6>Items Transfer</h6></td><td>
           <input type="radio" name="items_transfer" id="items_transfer" class="radio-inline items_transfer"
           value="ON"  <?php if($items_transfer=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_transfer" id="items_transfer" class="radio-inline items_transfer" 
           value="OFF" <?php if($items_transfer=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Items Transfer New</h6></td><td>
           <input type="radio" name="items_transfer_new" id="items_transfer_new" class="radio-inline items_transfer_new"
           value="ON"  <?php if($items_transfer_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_transfer_new" id="items_transfer_new" class="radio-inline items_transfer_new" 
           value="OFF" <?php if($items_transfer_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Items Transfer Edit</h6></td><td>
           <input type="radio" name="items_transfer_edit" id="items_transfer_edit" class="radio-inline items_transfer_edit"
           value="ON"  <?php if($items_transfer_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_transfer_edit" id="items_transfer_edit" class="radio-inline items_transfer_edit" 
           value="OFF" <?php if($items_transfer_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Items Transfer Delete</h6></td><td>
           <input type="radio" name="items_transfer_delete" id="items_transfer_delete" class="radio-inline items_transfer_delete"
           value="ON"  <?php if($items_transfer_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_transfer_delete" id="items_transfer_delete" class="radio-inline items_transfer_delete" 
           value="OFF" <?php if($items_transfer_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Items Adjust</h6></td><td>
           <input type="radio" name="items_adjust" id="items_adjust" class="radio-inline items_adjust"
           value="ON"  <?php if($items_adjust=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_adjust" id="items_adjust" class="radio-inline items_adjust" 
           value="OFF" <?php if($items_adjust=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Items Adjust New</h6></td><td>
           <input type="radio" name="items_adjust_new" id="items_adjust_new" class="radio-inline items_adjust_new"
           value="ON"  <?php if($items_adjust_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_adjust_new" id="items_adjust_new" class="radio-inline items_adjust_new" 
           value="OFF" <?php if($items_adjust_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Items Adjust Edit</h6></td><td>
           <input type="radio" name="items_adjust_edit" id="items_adjust_edit" class="radio-inline items_adjust_edit"
           value="ON"  <?php if($items_adjust_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_adjust_edit" id="items_adjust_edit" class="radio-inline items_adjust_edit" 
           value="OFF" <?php if($items_adjust_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Items Adjust Delete</h6></td><td>
           <input type="radio" name="items_adjust_delete" id="items_adjust_delete" class="radio-inline items_adjust_delete"
           value="ON"  <?php if($items_adjust_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="items_adjust_delete" id="items_adjust_delete" class="radio-inline items_adjust_delete" 
           value="OFF" <?php if($items_adjust_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Inventory Reports</h6></td><td>
           <input type="radio" name="inventory_reports" id="inventory_reports" class="radio-inline inventory_reports"
           value="ON"  <?php if($inventory_reports=='ON'){echo "checked";}?> />ON
           <input type="radio" name="inventory_reports" id="inventory_reports" class="radio-inline inventory_reports" 
           value="OFF" <?php if($inventory_reports=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Inventory Reports Stock By Store</h6></td><td>
           <input type="radio" name="inventory_reports_stockbystore" id="inventory_reports_stockbystore" class="radio-inline inventory_reports_stockbystore"
           value="ON"  <?php if($inventory_reports_stockbystore=='ON'){echo "checked";}?> />ON
           <input type="radio" name="inventory_reports_stockbystore" id="inventory_reports_stockbystore" class="radio-inline inventory_reports_stockbystore" 
           value="OFF" <?php if($inventory_reports_stockbystore=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Inventory Reports Item Ledger</h6></td><td>
           <input type="radio" name="inventory_reports_item_ledger" id="inventory_reports_item_ledger" class="radio-inline inventory_reports_item_ledger"
           value="ON"  <?php if($inventory_reports_item_ledger=='ON'){echo "checked";}?> />ON
           <input type="radio" name="inventory_reports_item_ledger" id="inventory_reports_item_ledger" class="radio-inline inventory_reports_item_ledger" 
           value="OFF" <?php if($inventory_reports_item_ledger=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Inventory Reports Stock Available</h6></td><td>
           <input type="radio" name="inventory_reports_stockavailable" id="inventory_reports_stockavailable" class="radio-inline inventory_reports_stockavailable"
           value="ON"  <?php if($inventory_reports_stockavailable=='ON'){echo "checked";}?> />ON
           <input type="radio" name="inventory_reports_stockavailable" id="inventory_reports_stockavailable" class="radio-inline inventory_reports_stockavailable" 
           value="OFF" <?php if($inventory_reports_stockavailable=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Inventory Reports Stock Available Value</h6></td><td>
           <input type="radio" name="inventory_reports_stockavailable_value" id="inventory_reports_stockavailable_value" class="radio-inline inventory_reports_stockavailable_value"
           value="ON"  <?php if($inventory_reports_stockavailable_value=='ON'){echo "checked";}?> />ON
           <input type="radio" name="inventory_reports_stockavailable_value" id="inventory_reports_stockavailable_value" class="radio-inline inventory_reports_stockavailable_value" 
           value="OFF" <?php if($inventory_reports_stockavailable_value=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Inventory Reports Minimum Stock</h6></td><td>
           <input type="radio" name="inventory_reports_min_stock" id="inventory_reports_min_stock" class="radio-inline inventory_reports_min_stock"
           value="ON"  <?php if($inventory_reports_min_stock=='ON'){echo "checked";}?> />ON
           <input type="radio" name="inventory_reports_min_stock" id="inventory_reports_min_stock" class="radio-inline inventory_reports_min_stock" 
           value="OFF" <?php if($inventory_reports_min_stock=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Production Delete</h6></td><td>
           <input type="radio" name="production_delete" id="production_delete" class="radio-inline production_delete"
           value="ON"  <?php if($production_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="production_delete" id="production_delete" class="radio-inline production_delete" 
           value="OFF" <?php if($production_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          
          <tr>
           <td width="50%"><h6>2. GL</h6></td><td>
           <input type="radio" name="gl" id="gl" class="radio-inline gl"
           value="ON"  <?php if($gl=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl" id="gl" class="radio-inline gl" 
           value="OFF" <?php if($gl=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>GL Accounts</h6></td><td>
           <input type="radio" name="gl_accounts" id="gl_accounts" class="radio-inline gl_accounts"
           value="ON"  <?php if($gl_accounts=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_accounts" id="gl_accounts" class="radio-inline gl_accounts" 
           value="OFF" <?php if($gl_accounts=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>GL Accounts New</h6></td><td>
           <input type="radio" name="gl_accounts_new" id="gl_accounts_new" class="radio-inline gl_accounts_new"
           value="ON"  <?php if($gl_accounts_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_accounts_new" id="gl_accounts_new" class="radio-inline gl_accounts_new" 
           value="OFF" <?php if($gl_accounts_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>GL Accounts Edit</h6></td><td>
           <input type="radio" name="gl_accounts_edit" id="gl_accounts_edit" class="radio-inline gl_accounts_edit"
           value="ON"  <?php if($gl_accounts_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_accounts_edit" id="gl_accounts_edit" class="radio-inline gl_accounts_edit" 
           value="OFF" <?php if($gl_accounts_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>GL Accounts delete</h6></td><td>
           <input type="radio" name="gl_accounts_delete" id="gl_accounts_delete" class="radio-inline gl_accounts_delete"
           value="ON"  <?php if($gl_accounts_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_accounts_delete" id="gl_accounts_delete" class="radio-inline gl_accounts_delete" 
           value="OFF" <?php if($gl_accounts_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>GL Parent Accounts</h6></td><td>
           <input type="radio" name="gl_parent_accounts" id="gl_parent_accounts" class="radio-inline gl_parent_accounts"
           value="ON"  <?php if($gl_parent_accounts=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_parent_accounts" id="gl_parent_accounts" class="radio-inline gl_parent_accounts" 
           value="OFF" <?php if($gl_parent_accounts=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>GL Parent Accounts New</h6></td><td>
           <input type="radio" name="gl_parent_accounts_new" id="gl_parent_accounts_new" class="radio-inline gl_parent_accounts_new"
           value="ON"  <?php if($gl_parent_accounts_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_parent_accounts_new" id="gl_parent_accounts_new" class="radio-inline gl_parent_accounts_new" 
           value="OFF" <?php if($gl_parent_accounts_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>GL Parent_Accounts Edit</h6></td><td>
           <input type="radio" name="gl_parent_accounts_edit" id="gl_parent_accounts_edit" class="radio-inline gl_parent_accounts_edit"
           value="ON"  <?php if($gl_parent_accounts_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_parent_accounts_edit" id="gl_parent_accounts_edit" class="radio-inline gl_parent_accounts_edit" 
           value="OFF" <?php if($gl_parent_accounts_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>GL Parent Accounts delete</h6></td><td>
           <input type="radio" name="gl_parent_accounts_delete" id="gl_parent_accounts_delete" class="radio-inline gl_parent_accounts_delete"
           value="ON"  <?php if($gl_parent_accounts_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_parent_accounts_delete" id="gl_parent_accounts_delete" class="radio-inline gl_parent_accounts_delete" 
           value="OFF" <?php if($gl_parent_accounts_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Jv</h6></td><td>
           <input type="radio" name="jv" id="jv" class="radio-inline jv"
           value="ON"  <?php if($jv=='ON'){echo "checked";}?> />ON
           <input type="radio" name="jv" id="jv" class="radio-inline jv" 
           value="OFF" <?php if($jv=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Jv New</h6></td><td>
           <input type="radio" name="jv_new" id="jv_new" class="radio-inline jv_new"
           value="ON"  <?php if($jv_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="jv_new" id="jv_new" class="radio-inline jv_new" 
           value="OFF" <?php if($jv_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Jv Edit</h6></td><td>
           <input type="radio" name="jv_edit" id="jv_edit" class="radio-inline jv_edit"
           value="ON"  <?php if($jv_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="jv_edit" id="jv_edit" class="radio-inline jv_edit" 
           value="OFF" <?php if($jv_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Jv Delete</h6></td><td>
           <input type="radio" name="jv_delete" id="jv_delete" class="radio-inline jv_delete"
           value="ON"  <?php if($jv_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="jv_delete" id="jv_delete" class="radio-inline jv_delete" 
           value="OFF" <?php if($jv_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Jv Print</h6></td><td>
           <input type="radio" name="jv_print" id="jv_print" class="radio-inline jv_print"
           value="ON"  <?php if($jv_print=='ON'){echo "checked";}?> />ON
           <input type="radio" name="jv_print" id="jv_print" class="radio-inline jv_print" 
           value="OFF" <?php if($jv_print=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>GL Reports</h6></td><td>
           <input type="radio" name="gl_reports" id="gl_reports" class="radio-inline gl_reports"
           value="ON"  <?php if($gl_reports=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_reports" id="gl_reports" class="radio-inline gl_reports" 
           value="OFF" <?php if($gl_reports=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
          <td width="50%"><h6>GL Reports General Ledger</h6></td><td>
           <input type="radio" name="gl_reports_gl" id="gl_reports_gl" class="radio-inline gl_reports_gl"
           value="ON"  <?php if($gl_reports_gl=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_reports_gl" id="gl_reports_gl" class="radio-inline gl_reports_gl" 
           value="OFF" <?php if($gl_reports_gl=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
          <td width="50%"><h6>GL Reports Cash Flow</h6></td><td>
           <input type="radio" name="gl_reports_cash_flow" id="gl_reports_cash_flow" class="radio-inline gl_reports_cash_flow"
           value="ON"  <?php if($gl_reports_cash_flow=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_reports_cash_flow" id="gl_reports_cash_flow" class="radio-inline gl_reports_cash_flow" 
           value="OFF" <?php if($gl_reports_cash_flow=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
          <td width="50%"><h6>GL Reports Trial Balance</h6></td><td>
           <input type="radio" name="gl_reports_trial_balance" id="gl_reports_trial_balance" class="radio-inline gl_reports_trial_balance"
           value="ON"  <?php if($gl_reports_trial_balance=='ON'){echo "checked";}?> />ON
           <input type="radio" name="gl_reports_trial_balance" id="gl_reports_trial_balance" class="radio-inline gl_reports_trial_balance" 
           value="OFF" <?php if($gl_reports_trial_balance=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>3. Accounts Payable</h6></td><td>
           <input type="radio" name="accounts_payable" id="accounts_payable" class="radio-inline accounts_payable"
           value="ON"  <?php if($accounts_payable=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable" id="accounts_payable" class="radio-inline accounts_payable" 
           value="OFF" <?php if($accounts_payable=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Vendors</h6></td><td>
           <input type="radio" name="vendors" id="vendors" class="radio-inline vendors"
           value="ON"  <?php if($vendors=='ON'){echo "checked";}?> />ON
           <input type="radio" name="vendors" id="vendors" class="radio-inline vendors" 
           value="OFF" <?php if($vendors=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Vendors new</h6></td><td>
           <input type="radio" name="vendors_new" id="vendors_new" class="radio-inline vendors_new"
           value="ON"  <?php if($vendors_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="vendors_new" id="vendors_new" class="radio-inline vendors_new" 
           value="OFF" <?php if($vendors_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Vendors Edit</h6></td><td>
           <input type="radio" name="vendors_edit" id="vendors_edit" class="radio-inline vendors_edit"
           value="ON"  <?php if($vendors_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="vendors_edit" id="vendors_edit" class="radio-inline vendors_edit" 
           value="OFF" <?php if($vendors_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Vendors Delete</h6></td><td>
           <input type="radio" name="vendors_delete" id="vendors_delete" class="radio-inline vendors_delete"
           value="ON"  <?php if($vendors_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="vendors_delete" id="vendors_delete" class="radio-inline vendors_delete" 
           value="OFF" <?php if($vendors_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>Sub Vendors</h6></td><td>
           <input type="radio" name="sub_vendors" id="sub_vendors" class="radio-inline sub_vendors"
           value="ON"  <?php if($sub_vendors=='ON'){echo "checked";}?> />ON
           <input type="radio" name="sub_vendors" id="sub_vendors" class="radio-inline sub_vendors" 
           value="OFF" <?php if($sub_vendors=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Sub Vendors new</h6></td><td>
           <input type="radio" name="sub_vendors_new" id="sub_vendors_new" class="radio-inline sub_vendors_new"
           value="ON"  <?php if($sub_vendors_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="sub_vendors_new" id="sub_vendors_new" class="radio-inline sub_vendors_new" 
           value="OFF" <?php if($sub_vendors_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Sub Vendors Edit</h6></td><td>
           <input type="radio" name="sub_vendors_edit" id="sub_vendors_edit" class="radio-inline sub_vendors_edit"
           value="ON"  <?php if($sub_vendors_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="sub_vendors_edit" id="sub_vendors_edit" class="radio-inline sub_vendors_edit" 
           value="OFF" <?php if($sub_vendors_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Sub Vendors Delete</h6></td><td>
           <input type="radio" name="sub_vendors_delete" id="sub_vendors_delete" class="radio-inline sub_vendors_delete"
           value="ON"  <?php if($sub_vendors_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="sub_vendors_delete" id="sub_vendors_delete" class="radio-inline sub_vendors_delete" 
           value="OFF" <?php if($sub_vendors_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Purchase</h6></td><td>
           <input type="radio" name="purchase" id="purchase" class="radio-inline purchase"
           value="ON"  <?php if($purchase=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase" id="purchase" class="radio-inline purchase" 
           value="OFF" <?php if($purchase=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Purchase New</h6></td><td>
           <input type="radio" name="purchase_new" id="purchase_new" class="radio-inline purchase_new"
           value="ON"  <?php if($purchase_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase_new" id="purchase_new" class="radio-inline purchase_new" 
           value="OFF" <?php if($purchase_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Purchase Edit</h6></td><td>
           <input type="radio" name="purchase_edit" id="purchase_edit" class="radio-inline purchase_edit"
           value="ON"  <?php if($purchase_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase_edit" id="purchase_edit" class="radio-inline purchase_edit" 
           value="OFF" <?php if($purchase_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Purchase Delete</h6></td><td>
           <input type="radio" name="purchase_delete" id="purchase_delete" class="radio-inline purchase_delete"
           value="ON"  <?php if($purchase_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase_delete" id="purchase_delete" class="radio-inline purchase_delete" 
           value="OFF" <?php if($purchase_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Purchase Print</h6></td><td>
           <input type="radio" name="purchase_print" id="purchase_print" class="radio-inline purchase_print"
           value="ON"  <?php if($purchase_print=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase_print" id="purchase_print" class="radio-inline purchase_print" 
           value="OFF" <?php if($purchase_print=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Purchase Return</h6></td><td>
           <input type="radio" name="purchase_return" id="purchase_return" class="radio-inline purchase_return"
           value="ON"  <?php if($purchase_return=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase_return" id="purchase_return" class="radio-inline purchase_return" 
           value="OFF" <?php if($purchase_return=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Purchase Return New</h6></td><td>
           <input type="radio" name="purchase_return_new" id="purchase_return_new" class="radio-inline purchase_return_new"
           value="ON"  <?php if($purchase_return_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase_return_new" id="purchase_return_new" class="radio-inline purchase_return_new" 
           value="OFF" <?php if($purchase_return_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Purchase Return Edit</h6></td><td>
           <input type="radio" name="purchase_return_edit" id="purchase_return_edit" class="radio-inline purchase_return_edit"
           value="ON"  <?php if($purchase_return_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase_return_edit" id="purchase_return_edit" class="radio-inline purchase_return_edit" 
           value="OFF" <?php if($purchase_return_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Purchase Return Delete</h6></td><td>
           <input type="radio" name="purchase_return_delete" id="purchase_return_delete" class="radio-inline purchase_return_delete"
           value="ON"  <?php if($purchase_return_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase_return_delete" id="purchase_return_delete" class="radio-inline purchase_return_delete" 
           value="OFF" <?php if($purchase_return_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Purchase Return Print</h6></td><td>
           <input type="radio" name="purchase_return_print" id="purchase_return_print" class="radio-inline purchase_return_print"
           value="ON"  <?php if($purchase_return_print=='ON'){echo "checked";}?> />ON
           <input type="radio" name="purchase_return_print" id="purchase_return_print" class="radio-inline purchase_return_print" 
           value="OFF" <?php if($purchase_return_print=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          
          
             <tr>
           <td width="50%"><h6>Accounts Payable Payments</h6></td><td>
           <input type="radio" name="accounts_payable_payments" id="accounts_payable_payments" class="radio-inline accounts_payable_payments"
           value="ON"  <?php if($accounts_payable_payments=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_payments" id="accounts_payable_payments" class="radio-inline accounts_payable_payments" 
           value="OFF" <?php if($accounts_payable_payments=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Accounts Payable Payments New</h6></td><td>
           <input type="radio" name="payable_payments_new" id="payable_payments_new" class="radio-inline payable_payments_new"
           value="ON"  <?php if($accounts_payable_payments_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_payments_new" id="payable_payments_new" class="radio-inline payable_payments_new" 
           value="OFF" <?php if($accounts_payable_payments_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>Accounts_Payable Payments Edit</h6></td><td>
           <input type="radio" name="accounts_payable_payments_edit" id="accounts_payable_payments_edit" class="radio-inline accounts_payable_payments_edit"
           value="ON"  <?php if($accounts_payable_payments_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_payments_edit" id="accounts_payable_payments_edit" class="radio-inline payable_payments_edit" 
           value="OFF" <?php if($accounts_payable_payments_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Accounts Payable Payments Delete</h6></td><td>
           <input type="radio" name="accounts_payable_payments_delete" id="payable_payments_delete" class="radio-inline payable_payments_delete"
           value="ON"  <?php if($accounts_payable_payments_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_payments_delete" id="accounts_payable_payments_delete" class="radio-inline payable_payments_delete" 
           value="OFF" <?php if($accounts_payable_payments_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>accounts_Payable Payments Print</h6></td><td>
           <input type="radio" name="accounts_payable_payments_print" id="payable_payments_print" class="radio-inline accounts_payable_payments_print"
           value="ON"  <?php if($accounts_payable_payments_print=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_payments_print" id="payable_payments_print" class="radio-inline accounts_payable_payments_print" 
           value="OFF" <?php if($accounts_payable_payments_print=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
         
           <tr>
           <td width="50%"><h6>accounts_Payable Reports</h6></td><td>
           <input type="radio" name="accounts_payable_reports" id="accounts_payable_reports" class="radio-inline accounts_payable_reports"
           value="ON"  <?php if($accounts_payable_reports=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_reports" id="accounts_payable_reports" class="radio-inline accounts_payable_reports" 
           value="OFF" <?php if($accounts_payable_reports=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>accounts_Payable Reports Ledger</h6></td><td>
           <input type="radio" name="accounts_payable_reports_vl" id="accounts_accounts_payable_reports_vl" class="radio-inline payable_reports_ledger"
           value="ON"  <?php if($accounts_payable_reports_vl=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_reports_vl" id="accounts_payable_reports_vl" class="radio-inline payable_reports_vl" 
           value="OFF" <?php if($accounts_payable_reports_vl=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>accounts_Payable Reports Out Standings</h6></td><td>
           <input type="radio" name="accounts_payable_reports_os" id="accounts_payable_reports_os" class="radio-inline accounts_payable_reports_os"
           value="ON"  <?php if($accounts_payable_reports_os=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_reports_os" id="accounts_payable_reports_os" class="radio-inline payable_reports_os" 
           value="OFF" <?php if($accounts_payable_reports_os=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>accounts_Payable Reports Payments</h6></td><td>
           <input type="radio" name="accounts_payable_reports_payments" id="accounts_payable_reports_payments" class="radio-inline accounts_payable_reports_payments"
           value="ON"  <?php if($accounts_payable_reports_payments=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_reports_payments" id="accounts_payable_reports_payments" class="radio-inline payable_reports_payments" 
           value="OFF" <?php if($accounts_payable_reports_payments=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>accounts_Payable Reports Purchase Report</h6></td><td>
           <input type="radio" name="accounts_payable_reports_purchase_report" id="accounts_payable_reports_purchase_report" class="radio-inline accounts_payable_reports_purchase_report"
           value="ON"  <?php if($accounts_payable_reports_purchase_report=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_payable_reports_purchase_report" id="accounts_payable_reports_purchase_report" class="radio-inline payable_reports_purchase_report" 
           value="OFF" <?php if($accounts_payable_reports_purchase_report=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>4. accounts_Accounts Receivable</h6></td><td>
           <input type="radio" name="accounts_receivable" id="accounts_receivable" class="radio-inline accounts_receivable"
           value="ON"  <?php if($accounts_receivable=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable" id="accounts_receivable" class="radio-inline accounts_receivable" 
           value="OFF" <?php if($accounts_receivable=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Customers</h6></td><td>
           <input type="radio" name="customers" id="customers" class="radio-inline customers"
           value="ON"  <?php if($customers=='ON'){echo "checked";}?> />ON
           <input type="radio" name="customers" id="customers" class="radio-inline customers" 
           value="OFF" <?php if($customers=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Customers New</h6></td><td>
           <input type="radio" name="customers_new" id="customers_new" class="radio-inline customers_new"
           value="ON"  <?php if($customers_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="customers_new" id="customers_new" class="radio-inline customers_new" 
           value="OFF" <?php if($customers_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Customers Edit</h6></td><td>
           <input type="radio" name="customers_edit" id="customers_edit" class="radio-inline customers_edit"
           value="ON"  <?php if($customers_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="customers_edit" id="customers_edit" class="radio-inline customers_edit" 
           value="OFF" <?php if($customers_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Customers Delete</h6></td><td>
           <input type="radio" name="customers_delete" id="customers_delete" class="radio-inline customers_delete"
           value="ON"  <?php if($customers_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="customers_delete" id="customers_delete" class="radio-inline customers_delete" 
           value="OFF" <?php if($customers_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Cash Invoices</h6></td><td>
           <input type="radio" name="cash_invoices" id="cash_invoices" class="radio-inline cash_invoices"
           value="ON"  <?php if($cash_invoices=='ON'){echo "checked";}?> />ON
           <input type="radio" name="cash_invoices" id="cash_invoices" class="radio-inline cash_invoices" 
           value="OFF" <?php if($cash_invoices=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Cash Invoices New</h6></td><td>
           <input type="radio" name="cash_invoices_new" id="cash_invoices_new" class="radio-inline cash_invoices_new"
           value="ON"  <?php if($cash_invoices_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="cash_invoices_new" id="cash_invoices_new" class="radio-inline cash_invoices_new" 
           value="OFF" <?php if($cash_invoices_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Cash Invoices Edit</h6></td><td>
           <input type="radio" name="cash_invoices_edit" id="cash_invoices_edit" class="radio-inline cash_invoices_edit"
           value="ON"  <?php if($cash_invoices_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="cash_invoices_edit" id="cash_invoices_edit" class="radio-inline cash_invoices_edit" 
           value="OFF" <?php if($cash_invoices_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Cash Invoices Delete</h6></td><td>
           <input type="radio" name="cash_invoices_delete" id="cash_invoices_delete" class="radio-inline cash_invoices_delete"
           value="ON"  <?php if($cash_invoices_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="cash_invoices_delete" id="cash_invoices_delete" class="radio-inline cash_invoices_delete" 
           value="OFF" <?php if($cash_invoices_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Cash Invoices Print</h6></td><td>
           <input type="radio" name="cash_invoices_print" id="cash_invoices_print" class="radio-inline cash_invoices_print"
           value="ON"  <?php if($cash_invoices_print=='ON'){echo "checked";}?> />ON
           <input type="radio" name="cash_invoices_print" id="cash_invoices_print" class="radio-inline cash_invoices_print" 
           value="OFF" <?php if($cash_invoices_print=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Wholesale Invoices</h6></td><td>
           <input type="radio" name="wholesale_invoices" id="wholesale_invoices" class="radio-inline wholesale_invoices"
           value="ON"  <?php if($wholesale_invoices=='ON'){echo "checked";}?> />ON
           <input type="radio" name="wholesale_invoices" id="wholesale_invoices" class="radio-inline wholesale_invoices" 
           value="OFF" <?php if($wholesale_invoices=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Wholesale Invoices New</h6></td><td>
           <input type="radio" name="wholesale_invoices_new" id="wholesale_invoices_edit_new" class="radio-inline wholesale_invoices_edit_new"
           value="ON"  <?php if($wholesale_invoices_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="wholesale_invoices_new" id="wholesale_invoices_edit_new" class="radio-inline wholesale_invoices_edit_new" 
           value="OFF" <?php if($wholesale_invoices_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Wholesale Invoices Edit</h6></td><td>
           <input type="radio" name="wholesale_invoices_edit" id="wholesale_invoices_edit" class="radio-inline wholesale_invoices_edit"
           value="ON"  <?php if($wholesale_invoices_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="wholesale_invoices_edit" id="wholesale_invoices_edit" class="radio-inline wholesale_invoices_edit" 
           value="OFF" <?php if($wholesale_invoices_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Wholesale Invoices Delete</h6></td><td>
           <input type="radio" name="wholesale_invoices_delete" id="wholesale_invoices_delete" class="radio-inline wholesale_invoices_delete"
           value="ON"  <?php if($wholesale_invoices_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="wholesale_invoices_delete" id="wholesale_invoices_delete" class="radio-inline wholesale_invoices_delete" 
           value="OFF" <?php if($wholesale_invoices_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>Wholesale Invoices Print</h6></td><td>
           <input type="radio" name="wholesale_invoices_print" id="wholesale_invoices_print" class="radio-inline wholesale_invoices_print"
           value="ON"  <?php if($wholesale_invoices_print=='ON'){echo "checked";}?> />ON
           <input type="radio" name="wholesale_invoices_print" id="wholesale_invoices_print" class="radio-inline wholesale_invoices_print" 
           value="OFF" <?php if($wholesale_invoices_print=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Return Wholesale</h6></td><td>
           <input type="radio" name="return_wholesale" id="return_wholesale" class="radio-inline return_wholesale"
           value="ON"  <?php if($return_wholesale=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_wholesale" id="return_wholesale" class="radio-inline return_wholesale" 
           value="OFF" <?php if($return_wholesale=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Return Wholesale New</h6></td><td>
           <input type="radio" name="return_wholesale_new" id="return_wholesale_new" class="radio-inline return_wholesale_new"
           value="ON"  <?php if($return_wholesale_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_wholesale_new" id="return_wholesale_new" class="radio-inline return_wholesale_new" 
           value="OFF" <?php if($return_wholesale_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Return Wholesale Edit</h6></td><td>
           <input type="radio" name="return_wholesale_edit" id="return_wholesale_edit" class="radio-inline return_wholesale_edit"
           value="ON"  <?php if($return_wholesale_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_wholesale_edit" id="return_wholesale_edit" class="radio-inline return_wholesale_edit" 
           value="OFF" <?php if($return_wholesale_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Return Wholesale Delete</h6></td><td>
           <input type="radio" name="return_wholesale_delete" id="return_wholesale_delete" class="radio-inline return_wholesale_delete"
           value="ON"  <?php if($return_wholesale_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_wholesale_delete" id="return_wholesale_delete" class="radio-inline return_wholesale_delete" 
           value="OFF" <?php if($return_wholesale_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          <tr>
           <td width="50%"><h6>Return Wholesale Print</h6></td><td>
           <input type="radio" name="return_wholesale_print" id="return_wholesale_print" class="radio-inline return_wholesale_print"
           value="ON"  <?php if($return_wholesale_print=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_wholesale_print" id="return_wholesale_print" class="radio-inline return_wholesale_print" 
           value="OFF" <?php if($return_wholesale_print=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Return Retail</h6></td><td>
           <input type="radio" name="return_retail" id="return_retail" class="radio-inline return_retail"
           value="ON"  <?php if($return_retail=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_retail" id="return_retail" class="radio-inline return_retail" 
           value="OFF" <?php if($return_retail=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Return Retail New</h6></td><td>
           <input type="radio" name="return_retail_new" id="return_retail_new" class="radio-inline return_retail_new"
           value="ON"  <?php if($return_retail_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_retail_new" id="return_retail_new" class="radio-inline return_retail_new" 
           value="OFF" <?php if($return_retail_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Return Retail Edit</h6></td><td>
           <input type="radio" name="return_retail_edit" id="return_retail_edit" class="radio-inline return_retail_edit"
           value="ON"  <?php if($return_retail_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_retail_edit" id="return_retail_edit" class="radio-inline return_retail_edit" 
           value="OFF" <?php if($return_retail_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Return Retail Delete</h6></td><td>
           <input type="radio" name="return_retail_delete" id="return_retail_delete" class="radio-inline return_retail_delete"
           value="ON"  <?php if($return_retail_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_retail_delete" id="return_retail_delete" class="radio-inline return_retail_delete" 
           value="OFF" <?php if($return_retail_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>Return Retail Print</h6></td><td>
           <input type="radio" name="return_retail_print" id="return_retail_print" class="radio-inline return_retail_print"
           value="ON"  <?php if($return_retail_print=='ON'){echo "checked";}?> />ON
           <input type="radio" name="return_retail_print" id="return_retail_print" class="radio-inline return_retail_print" 
           value="OFF" <?php if($return_retail_print=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>accounts_Receivable Payments</h6></td><td>
           <input type="radio" name="accounts_receivable_payments" id="accounts_receivable_payments" class="radio-inline accounts_receivable_payments"
           value="ON"  <?php if($accounts_receivable_payments=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_payments" id="accounts_receivable_payments" class="radio-inline accounts_receivable_payments" 
           value="OFF" <?php if($accounts_receivable_payments=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>accounts_receivable Payments New</h6></td><td>
           <input type="radio" name="accounts_receivable_payments_new" id="accounts_receivable_payments_new" class="radio-inline accounts_receivable_payments_new"
           value="ON"  <?php if($accounts_receivable_payments_new=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_payments_new" id="accounts_receivable_payments_new" class="radio-inline accounts_receivable_payments_new" 
           value="OFF" <?php if($accounts_receivable_payments_new=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>accounts_receivable Payments Edit</h6></td><td>
           <input type="radio" name="accounts_receivable_payments_edit" id="accounts_receivable_payments_edit" class="radio-inline accounts_receivable_payments_edit"
           value="ON"  <?php if($accounts_receivable_payments_edit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_payments_edit" id="accounts_receivable_payments_edit" class="radio-inline accounts_receivable_payments_edit" 
           value="OFF" <?php if($accounts_receivable_payments_edit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>accounts_receivable Payments Delete</h6></td><td>
           <input type="radio" name="accounts_receivable_payments_delete" id="accounts_receivable_payments_delete" class="radio-inline accounts_receivable_payments_edit"
           value="ON"  <?php if($accounts_receivable_payments_delete=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_payments_delete" id="accounts_receivable_payments_delete" class="radio-inline accounts_receivable_payments_edit" 
           value="OFF" <?php if($accounts_receivable_payments_delete=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>accounts_receivable Payments Print</h6></td><td>
           <input type="radio" name="accounts_receivable_payments_print" id="accounts_receivable_payments_print" class="radio-inline accounts_receivable_payments_print"
           value="ON"  <?php if($accounts_receivable_payments_print=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_payments_print" id="accounts_receivable_payments_print" class="radio-inline accounts_receivable_payments_print" 
           value="OFF" <?php if($accounts_receivable_payments_print=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
          
           <tr>
           <td width="50%"><h6>accounts_receivable Reports</h6></td><td>
           <input type="radio" name="accounts_receivable_reports" id="accounts_receivable_reports" class="radio-inline accounts_receivable_reports"
           value="ON"  <?php if($accounts_receivable_reports=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports" id="accounts_receivable_reports" class="radio-inline accounts_receivable_reports" 
           value="OFF" <?php if($accounts_receivable_reports=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>accounts_receivable Reports Ledger</h6></td><td>
           <input type="radio" name="accounts_receivable_reports_cl" id="accounts_receivable_reports_cl" class="radio-inline accounts_receivable_reports_cl"
           value="ON"  <?php if($accounts_receivable_reports_cl=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports_cl" id="accounts_receivable_reports_cl" class="radio-inline accounts_receivable_reports_cl" 
           value="OFF" <?php if($accounts_receivable_reports_cl=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>accounts_receivable Reports Out standings</h6></td><td>
           <input type="radio" name="accounts_receivable_reports_os" id="accounts_receivable_reports_os" class="radio-inline accounts_receivable_reports_os"
           value="ON"  <?php if($accounts_receivable_reports_os=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports_os" id="accounts_receivable_reports_os" class="radio-inline accounts_receivable_reports_os" 
           value="OFF" <?php if($accounts_receivable_reports_os=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>accounts_receivable Reports Payments</h6></td><td>
           <input type="radio" name="accounts_receivable_reports_payments" id="accounts_receivable_reports_payments" class="radio-inline accounts_receivable_reports_payments"
           value="ON"  <?php if($accounts_receivable_reports_payments=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports_payments" id="accounts_receivable_reports_payments" class="radio-inline accounts_receivable_reports_payments" 
           value="OFF" <?php if($accounts_receivable_reports_payments=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>accounts_receivable Reports Cash Invoices</h6></td><td>
           <input type="radio" name="accounts_receivable_reports_cash_invoices" id="accounts_receivable_reports_cash_invoices" class="radio-inline accounts_receivable_reports_cash_invoices"
           value="ON"  <?php if($accounts_receivable_reports_cash_invoices=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports_cash_invoices" id="accounts_receivable_reports_cash_invoices" class="radio-inline accounts_receivable_reports_cash_invoices" 
           value="OFF" <?php if($accounts_receivable_reports_cash_invoices=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>accounts_receivable Reports Sale Invoices</h6></td><td>
           <input type="radio" name="accounts_receivable_reports_sale_invoices" id="accounts_receivable_reports_sale_invoices" class="radio-inline accounts_receivable_reports_sale_invoices"
           value="ON"  <?php if($accounts_receivable_reports_sale_invoices=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports_sale_invoices" id="accounts_receivable_reports_sale_invoices" class="radio-inline accounts_receivable_reports_sale_invoices" 
           value="OFF" <?php if($accounts_receivable_reports_sale_invoices=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
             <tr>
           <td width="50%"><h6>accounts_receivable Reports Sale Report with Profit</h6></td><td>
           <input type="radio" name="accounts_receivable_reports_sale_report_with_profit" id="accounts_receivable_reports_sale_report_with_profit" class="radio-inline accounts_receivable_reports_sale_report_with_profit"
           value="ON"  <?php if($accounts_receivable_reports_sale_report_with_profit=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports_sale_report_with_profit" id="accounts_receivable_reports_sale_report_with_profit" class="radio-inline accounts_receivable_reports_sale_report_with_profit" 
           value="OFF" <?php if($accounts_receivable_reports_sale_report_with_profit=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>accounts_receivable Reports Aging</h6></td><td>
           <input type="radio" name="accounts_receivable_reports_aging" id="accounts_receivable_reports_aging" class="radio-inline accounts_receivable_reports_aging"
           value="ON"  <?php if($accounts_receivable_reports_aging=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports_aging" id="accounts_receivable_reports_aging" class="radio-inline accounts_receivable_reports_aging" 
           value="OFF" <?php if($accounts_receivable_reports_aging=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
            <tr>
           <td width="50%"><h6>accounts_receivable Reports Aging Invoices</h6></td><td>
           <input type="radio" name="accounts_receivable_reports_aging_invoices" id="accounts_receivable_reports_aging_invoices" class="radio-inline accounts_receivable_reports_aging_invoices"
           value="ON"  <?php if($accounts_receivable_reports_aging_invoices=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports_aging_invoices" id="accounts_receivable_reports_aging_invoices" class="radio-inline accounts_receivable_reports_aging_invoices" 
           value="OFF" <?php if($accounts_receivable_reports_aging_invoices=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>accounts_receivable Reports Sales Man</h6></td><td>
           <input type="radio" name="accounts_receivable_reports_sales_man" id="accounts_receivable_reports_sales_man" class="radio-inline accounts_receivable_reports_sales_man"
           value="ON"  <?php if($accounts_receivable_reports_sales_man=='ON'){echo "checked";}?> />ON
           <input type="radio" name="accounts_receivable_reports_sales_man" id="accounts_receivable_reports_sales_man" class="radio-inline accounts_receivable_reports_sales_man" 
           value="OFF" <?php if($accounts_receivable_reports_sales_man=='OFF'){echo "checked";}?> />OFF</td>
                        
          </tr>
           <tr>
           <td width="50%"><h6>Documents Creation Date Up:</h6></td><td>
           <input type="text" name="dateup" id="dateup" class="form-control dateup"
           value="<?php echo $dateup;?>">     
          </tr>
        </tr>
           <tr>
           <td width="50%"><h6>Documents Creation Date Down:</h6></td><td>
           <input type="text" name="datedown" id="datedown" class="form-control datedown"
           value="<?php echo $datedown;?>">     
          </tr>
          <tr>
                <td colspan="2" align="center">
                  
                  <input type="submit" name="save" id="save" class="btnsave" value="save" />
                </td>
              </tr>
          </table>
            
                  </div>
              </div>
          </div>
      </div>
             
        
        
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
 
  <!-- /.content-wrapper -->
 <?php include('include/footer.php'); ?>
    </div>
    </div>
  <?php include('include/script.php'); ?>
  
</body>
</html>
<script>
  $(document).ready(function(){
    $(".btnsave").click(function(){
      $(this).addClass("btnactive");
    
     setTimeout(function(){
      $(".btnsave").removeClass("btnactive");
     
     }, 9000);
    });
  });
</script>