Exemplo n.º 1
0
            return SSP::get_attn_name($d);
        },'field' => 'attn'),
    array( 'db' => 'sales.phone', 'dt' => 6 ,'field' => 'phone'),
    array( 'db' => 'sales.email', 'dt' => 7 ,'field' => 'email'),
    array( 'db' => 'sales.quotationno',   'dt' => 8 ,'field' => 'quotationno'),
    
    array( 'db' => 'sales.ref_no', 'dt' => 9 ,'field' => 'ref_no'),
    array( 'db' => 'sales.quotation_id', 'dt' => 10, 'formatter' => function( $d, $row ) {
            return SSP::get_salesperson_name($d);
        },'field' => 'quotation_id'),
    array( 'db' => 'sales.id', 'dt' => 11 ,'formatter' => function ( $d, $row) {
            
            global $base_url;
            
            $cn = '<div class="btn-group"  style="white-space: nowrap; width: 100px;">';
            $val = SSP::get_sales_details($d);
            if(!$val[0]['is_deleted'])
            {
                if($_GET['edit']==1){
                    $cn .= '<a class="btn btn-xs btn-default" title="Edit" data-toggle="tooltip" href="'.$base_url.'Salesorders/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="Delete" data-toggle="tooltip" href="'.$base_url.'Salesorders/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="Report" data-toggle="tooltip" href="'.$base_url.'Salesorders/pdf/'.$d.'" data-original-title="Report">
<i class="gi gi-print"></i></a>';
                $cn .= '<a class="btn btn-xs btn-default" title="Tags" data-toggle="tooltip" href="'.$base_url.'Salesorders/pdf_tag/'.$d.'" data-original-title="Tags">