make consistent use of elseif in place of else if

This commit is contained in:
FrancescoUK
2016-07-01 17:08:01 +01:00
parent 5cb755b0e3
commit b7cb5c5873
9 changed files with 18 additions and 18 deletions

View File

@@ -50,7 +50,7 @@ class Receivings extends Secure_Controller
$mode = $this->input->post('mode');
$this->receiving_lib->set_mode($mode);
}
else if($this->Stock_location->is_allowed_location($stock_source, 'receivings'))
elseif($this->Stock_location->is_allowed_location($stock_source, 'receivings'))
{
$this->receiving_lib->set_stock_source($stock_source);
$this->receiving_lib->set_stock_destination($stock_destination);
@@ -87,11 +87,11 @@ class Receivings extends Secure_Controller
{
$this->receiving_lib->return_entire_receiving($item_id_or_number_or_item_kit_or_receipt);
}
else if($this->receiving_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
elseif($this->receiving_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
{
$this->receiving_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt, $item_location);
}
else if(!$this->receiving_lib->add_item($item_id_or_number_or_item_kit_or_receipt, $quantity, $item_location))
elseif(!$this->receiving_lib->add_item($item_id_or_number_or_item_kit_or_receipt, $quantity, $item_location))
{
$data['error'] = $this->lang->line('receivings_unable_to_add_item');
}

View File

@@ -143,7 +143,7 @@ class Sales extends Secure_Controller
$mode = $this->input->post('mode');
$this->sale_lib->set_mode($mode);
}
else if($this->Stock_location->is_allowed_location($stock_location, 'sales'))
elseif($this->Stock_location->is_allowed_location($stock_location, 'sales'))
{
$this->sale_lib->set_sale_location($stock_location);
}
@@ -269,11 +269,11 @@ class Sales extends Secure_Controller
{
$this->sale_lib->return_entire_sale($item_id_or_number_or_item_kit_or_receipt);
}
else if($this->sale_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
elseif($this->sale_lib->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt))
{
$this->sale_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt, $item_location);
}
else if(!$this->sale_lib->add_item($item_id_or_number_or_item_kit_or_receipt, $quantity, $item_location, $discount))
elseif(!$this->sale_lib->add_item($item_id_or_number_or_item_kit_or_receipt, $quantity, $item_location, $discount))
{
$data['error'] = $this->lang->line('sales_unable_to_add_item');
}

View File

@@ -178,23 +178,23 @@ class Barcode_lib
{
$result = $this->CI->lang->line('items_name') . " " . $item['name'];
}
else if($layout_type == 'category' && isset($item['category']))
elseif($layout_type == 'category' && isset($item['category']))
{
$result = $this->CI->lang->line('items_category') . " " . $item['category'];
}
else if($layout_type == 'cost_price' && isset($item['cost_price']))
elseif($layout_type == 'cost_price' && isset($item['cost_price']))
{
$result = $this->CI->lang->line('items_cost_price') . " " . to_currency($item['cost_price']);
}
else if($layout_type == 'unit_price' && isset($item['unit_price']))
elseif($layout_type == 'unit_price' && isset($item['unit_price']))
{
$result = $this->CI->lang->line('items_unit_price') . " " . to_currency($item['unit_price']);
}
else if($layout_type == 'company_name')
elseif($layout_type == 'company_name')
{
$result = $barcode_config['company'];
}
else if($layout_type == 'item_code')
elseif($layout_type == 'item_code')
{
$result = $barcode_config['barcode_content'] !== "id" && isset($item['item_number']) ? $item['item_number'] : $item['item_id'];
}

View File

@@ -370,7 +370,7 @@ class Sale_lib
{
return $this->CI->lang->line('sales_quantity_less_than_zero');
}
else if($item_quantity - $quantity_added < $item_info->reorder_level)
elseif($item_quantity - $quantity_added < $item_info->reorder_level)
{
return $this->CI->lang->line('sales_quantity_less_than_reorder_level');
}
@@ -443,7 +443,7 @@ class Sale_lib
{
return $this->CI->Sale->exists($pieces[1]);
}
else if($this->CI->config->item('invoice_enable') == TRUE)
elseif($this->CI->config->item('invoice_enable') == TRUE)
{
$sale_info = $this->CI->Sale->get_sale_by_invoice_number($receipt_sale_id);
if($sale_info->num_rows() > 0)

View File

@@ -473,7 +473,7 @@ class Sale extends CI_Model
$payments[$this->lang->line('sales_credit')] = $this->lang->line('sales_credit');
$payments[$this->lang->line('sales_cash')] = $this->lang->line('sales_cash');
}
else if($this->config->item('payment_options_order') == 'debitcashcredit')
elseif($this->config->item('payment_options_order') == 'debitcashcredit')
{
$payments[$this->lang->line('sales_debit')] = $this->lang->line('sales_debit');
$payments[$this->lang->line('sales_cash')] = $this->lang->line('sales_cash');

View File

@@ -207,7 +207,7 @@ class Code128 extends BarcodeBase
$this->type = self::TYPE_C;
}
// Are there only capitals?
else if(strtoupper($this->data) == $this->data)
elseif(strtoupper($this->data) == $this->data)
{
$this->type = self::TYPE_A;
}

View File

@@ -160,7 +160,7 @@ class Code39 extends BarcodeBase
$currentBarX += $narrowBar;
}
// Wide Bar
else if($bit == '1')
elseif($bit == '1')
{
imagefilledrectangle($this->img, $currentBarX, 0, ($currentBarX + $wideBar), ($this->y - 1), $color);
$currentBarX += $wideBar;

View File

@@ -121,7 +121,7 @@ $(document).ready(function()
$("#mailpath").prop('disabled', false);
$("#smtp_host, #smtp_user, #smtp_pass, #smtp_port, #smtp_timeout, #smtp_crypto").prop('disabled', true);
}
else if($("#protocol").val() == 'smtp')
elseif($("#protocol").val() == 'smtp')
{
$("#smtp_host, #smtp_user, #smtp_pass, #smtp_port, #smtp_timeout, #smtp_crypto").prop('disabled', false);
$("#mailpath").prop('disabled', true);

View File

@@ -65,7 +65,7 @@ $.fn.datetimepicker.dates['<?php echo $this->config->item("language"); ?>'] = {
meridiem: ["am", "pm"],
<?php
}
else if( strpos($this->config->item('timeformat'), 'A') !== false )
elseif( strpos($this->config->item('timeformat'), 'A') !== false )
{
?>
meridiem: ["AM", "PM"],