Code style adjustments

This commit is contained in:
FrancescoUK
2018-04-14 14:40:02 +01:00
parent 5c1baf20b0
commit 4bab3fc4e3
31 changed files with 66 additions and 55 deletions

View File

@@ -706,7 +706,7 @@ class Config extends Secure_Controller
if($success && $delete_rejected)
{
$message = $this->lang->line('config_tax_category_used');
$success = false;
$success = FALSE;
}
else
{

View File

@@ -126,7 +126,7 @@ class Customers extends Persons
$data['packages'] = $packages;
$data['selected_package'] = $info->package_id;
if ($customer_sales_tax_support == '1')
if($customer_sales_tax_support == '1')
{
$data['customer_sales_tax_enabled'] = TRUE;
}

View File

@@ -84,7 +84,7 @@ class Expenses_categories extends Secure_Controller
{
$expense_category_to_delete = $this->input->post('ids');
if ($this->Expense_category->delete_list($expense_category_to_delete))
if($this->Expense_category->delete_list($expense_category_to_delete))
{
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('expenses_categories_successful_deleted') . ' ' . count($expense_category_to_delete) . ' ' . $this->lang->line('expenses_categories_one_or_multiple')));
}

View File

@@ -131,7 +131,7 @@ class Item_kits extends Secure_Controller
$success = TRUE;
$new_item = FALSE;
//New item kit
if ($item_kit_id == -1)
if($item_kit_id == -1)
{
$item_kit_id = $item_kit_data['item_kit_id'];
$new_item = TRUE;

View File

@@ -497,7 +497,7 @@ class Items extends Secure_Controller
*/
public function check_kit_exists()
{
if ($this->input->post('item_number') === -1)
if($this->input->post('item_number') === -1)
{
$exists = $this->Item_kit->item_kit_exists_for_name($this->input->post('name'));
}
@@ -702,7 +702,8 @@ class Items extends Secure_Controller
needs further discussion */
$pic_file = $data[24];
/*if(strcmp('.htaccess', $pic_file)==0) {
/*if(strcmp('.htaccess', $pic_file)==0)
{
$pic_file='';
}*/
$item_data['pic_filename'] = $pic_file;

View File

@@ -148,7 +148,7 @@ class Receivings extends Secure_Controller
}
$data['employees'] = array();
foreach ($this->Employee->get_all()->result() as $employee)
foreach($this->Employee->get_all()->result() as $employee)
{
$data['employees'][$employee->person_id] = $this->xss_clean($employee->first_name . ' '. $employee->last_name);
}

View File

@@ -1330,7 +1330,7 @@ class Reports extends Secure_Controller
foreach($report_data['details'][$key] as $drow)
{
$quantity_purchased = $drow['receiving_quantity'] > 1 ? to_quantity_decimals($drow['quantity_purchased']) . ' x ' . to_quantity_decimals($drow['receiving_quantity']) : to_quantity_decimals($drow['quantity_purchased']);
if ($show_locations)
if($show_locations)
{
$quantity_purchased .= ' [' . $this->Stock_location->get_location_name($drow['item_location']) . ']';
}

View File

@@ -576,7 +576,8 @@ class Sales extends Secure_Controller
$candidate_invoice_number = $invoice_number;
if($candidate_invoice_number != NULL && strlen($candidate_invoice_number) > 3)
{
if (strpos($candidate_invoice_number, '{') == false) {
if(strpos($candidate_invoice_number, '{') == FALSE)
{
$override_invoice_number = $candidate_invoice_number;
}
}
@@ -605,7 +606,7 @@ class Sales extends Secure_Controller
$invoice_format = $this->config->item('sales_invoice_format');
}
if ($override_invoice_number == NULL)
if($override_invoice_number == NULL)
{
$invoice_number = $this->token_lib->render($invoice_format);
}

View File

@@ -83,7 +83,7 @@ class Taxes extends Secure_Controller
$data['rounding_options'] = Rounding_mode::get_rounding_options();
$data['html_rounding_options'] = $this->get_html_rounding_options();
if ($tax_code == -1)
if($tax_code == -1)
{
$data['tax_code'] = '';
$data['tax_code_name'] = '';
@@ -170,7 +170,7 @@ class Taxes extends Secure_Controller
}
}
if (!empty($tax_code_rate_exceptions))
if(!empty($tax_code_rate_exceptions))
{
$success = $this->Tax->save_tax_rate_exceptions($tax_code_rate_exceptions, $entered_tax_code);
}