From 0d759ddd4e039f1f5f775bbccb7467ab64784447 Mon Sep 17 00:00:00 2001 From: RamkrishnaMondal Date: Tue, 26 Apr 2016 16:38:13 +0530 Subject: [PATCH] Second commit --- application/helpers/table_helper.php | 53 ++++++++++++++++++---------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/application/helpers/table_helper.php b/application/helpers/table_helper.php index 663683ad2..8c636aed2 100644 --- a/application/helpers/table_helper.php +++ b/application/helpers/table_helper.php @@ -6,17 +6,26 @@ function get_sales_manage_table($sales, $controller) $table=''; $headers = array(' ', - $CI->lang->line('sales_receipt_number'), - $CI->lang->line('sales_sale_time'), - $CI->lang->line('customers_customer'), - $CI->lang->line('sales_amount_tendered'), - $CI->lang->line('sales_amount_due'), - $CI->lang->line('sales_change_due'), - $CI->lang->line('sales_payment'), - $CI->lang->line('sales_invoice_number'), - ' ', - ' ', - ' '); + $CI->lang->line('sales_receipt_number'), + $CI->lang->line('sales_sale_time'), + $CI->lang->line('customers_customer'), + $CI->lang->line('sales_amount_tendered'), + $CI->lang->line('sales_amount_due'), + $CI->lang->line('sales_change_due'), + $CI->lang->line('sales_payment')); + + if($CI->config->item('invoice_enable') == TRUE) + { + $headers[] = $CI->lang->line('sales_invoice_number'); + $headers[] = ' '; + $headers[] = ' '; + $headers[] = ' '; + } + else + { + $headers[] = ' '; + $headers[] = ' '; + } $table.=''; foreach($headers as $header) @@ -75,11 +84,22 @@ function get_sales_manage_sale_data_row($sale, $controller) $table_data_row.=''; $table_data_row.=''; $table_data_row.=''; - $table_data_row.=''; - $table_data_row.=''; + if($CI->config->item('invoice_enable') == TRUE) + { + $table_data_row.=''; + $table_data_row.=''; + } + else + { + // this size includes the 8% of invoice number and 5% of the invoice gliphicon, pluf of course the 12% for the field itself + $table_data_row.=''; + } $table_data_row.=''; $table_data_row.=''; - $table_data_row.=''; + if($CI->config->item('invoice_enable') == TRUE) + { + $table_data_row.=''; + } $table_data_row.=''; return $table_data_row; @@ -194,9 +214,6 @@ function get_detailed_data_row($row, $controller) return $table_data_row; } - - - /* Gets the html table to manage suppliers. */ @@ -212,7 +229,6 @@ function get_supplier_manage_table($suppliers,$controller) $CI->lang->line('common_first_name'), $CI->lang->line('common_email'), $CI->lang->line('common_phone_number'), - $CI->lang->line('common_send_msg'), $CI->lang->line('suppliers_supplier_id'), $CI->lang->line('common_update'),); @@ -270,7 +286,6 @@ function get_supplier_data_row($supplier,$controller) return $table_data_row; } - /* Gets the html table to manage items. */
'.to_currency( $sale['amount_tendered'] ).''.to_currency( $sale['amount_due'] ).''.to_currency( $sale['change_due'] ).''.$sale['payment_type'].''.$sale['invoice_number'].''.$sale['payment_type'].''.$sale['invoice_number'].''.$sale['payment_type'].'