Esempio n. 1
0
}

$columns = array(
    array( 'db' => 'del.purchaseorder_no', 'dt' => 0 , 'field' => 'purchaseorder_no'),
    array( 'db' => 'del.customer_id', 'dt' => 1 , 'field' => 'customer_id'),
    array( 'db' => 'cus.customername', 'dt' => 2  , 'field' => 'customername'),
    array( 'db' => 'del.phone', 'dt' =>3  , 'field' => 'phone'),
    array( 'db' => 'del.email', 'dt' => 4 , 'field' => 'email' ),
    array( 'db' => 'del.your_ref_no',   'dt' => 5 , 'field' => 'your_ref_no' ),
    array( 'db' => 'del.due_amount',   'dt' => 6 , 'field' => 'due_amount' ),
    array( 'db' => 'del.id', 'dt' => 7 ,'formatter' => function ( $d, $row) {
            
            global $base_url;
            
            $cn = '<div class="btn-group">';
            $val = SSP::get_purchaseorders_details($d);
            if(!$val[0]['is_deleted'])
            {
                if($_GET['edit']==1){
                    $cn .= '<a class="btn btn-xs btn-default" title="" data-toggle="tooltip" href="'.$base_url.'Purchaseorders/edit/'.$d.'" data-original-title="Edit">
<i class="fa fa-pencil"></i></a>';
                }
                if($_GET['delete']==1){
                    $cn .= '<a class="btn btn-xs btn-danger" title="" data-toggle="tooltip" href="'.$base_url.'Purchaseorders/delete/'.$d.'" data-original-title="Delete">
<i class="fa fa-times"></i></a>';
                }
                if($val[0]['is_approved']==1)
                {
                $cn .= '<a class="btn btn-xs btn-default" title="" data-toggle="tooltip" href="'.$base_url.'Purchaseorders/pdf/'.$d.'" data-original-title="Report">
<i class="gi gi-print"></i></a>';
                }