Merge pull request #1101 from RuleDomain/fix-for-line_sequence

Fix merge issues related to line_sequence for receipts and invoices
This commit is contained in:
FrancescoUK
2017-01-31 08:03:52 +00:00
committed by GitHub
3 changed files with 3 additions and 11 deletions

View File

@@ -3,7 +3,6 @@
class Sale_lib
{
private $CI;
private $line_sequence_options = array('0' => 'Standard', '1' => 'Entry', '2' => 'Group by Type', '3' => 'Group by Category');
public function __construct()
{

View File

@@ -688,19 +688,19 @@ class Sale extends CI_Model
$this->db->where('sale_id', $sale_id);
// Entry sequence (this will render kits in the expected sequence)
if($this->config->item('line_sequence') == '1')
if($this->config->item('line_sequence') == '0')
{
$this->db->order_by('line', 'asc');
}
// Group by Stock Type (nonstock first - type 1, stock next - type 0)
elseif($this->config->item('line_sequence') == '2')
elseif($this->config->item('line_sequence') == '1')
{
$this->db->order_by('stock_type', 'desc');
$this->db->order_by('sales_items.description', 'asc');
$this->db->order_by('items.name', 'asc');
}
// Group by Item Category
elseif($this->config->item('line_sequence') == '3')
elseif($this->config->item('line_sequence') == '2')
{
$this->db->order_by('category', 'asc');
$this->db->order_by('sales_items.description', 'asc');

View File

@@ -66,13 +66,6 @@
</div>
</div>
<div class="form-group form-group-sm">
<?php echo form_label($this->lang->line('config_line_sequence'), 'line_sequence', array('class' => 'control-label col-xs-2')); ?>
<div class='col-xs-2'>
<?php echo form_dropdown('line_sequence', $line_sequence_options, $this->config->item('line_sequence'), array('class' => 'form-control input-sm')); ?>
</div>
</div>
<?php echo form_submit(array(
'name' => 'submit_form',
'id' => 'submit_form',