Made invoice optional from store config checkbox, updated and regen database script, few config fixes (#410)

This commit is contained in:
FrancescoUK
2016-04-24 17:11:37 +01:00
parent b88575b2a5
commit 34d09bc575
15 changed files with 247 additions and 122 deletions

View File

@@ -9,9 +9,18 @@ class Detailed_receivings extends Report
public function getDataColumns()
{
return array('summary' => array($this->lang->line('reports_receiving_id'), $this->lang->line('reports_date'), $this->lang->line('reports_quantity'), $this->lang->line('reports_received_by'), $this->lang->line('reports_supplied_by'), $this->lang->line('reports_total'), $this->lang->line('reports_payment_type'), $this->lang->line('recvs_invoice_number'), $this->lang->line('reports_comments')),
'details' => array($this->lang->line('reports_item_number'), $this->lang->line('reports_name'), $this->lang->line('reports_category'), $this->lang->line('reports_quantity'), $this->lang->line('reports_total'), $this->lang->line('reports_discount'))
);
if(get_instance()->config->item('invoice_enable') == TRUE)
{
return array('summary' => array($this->lang->line('reports_receiving_id'), $this->lang->line('reports_date'), $this->lang->line('reports_quantity'), $this->lang->line('reports_received_by'), $this->lang->line('reports_supplied_by'), $this->lang->line('reports_total'), $this->lang->line('reports_payment_type'), $this->lang->line('recvs_invoice_number'), $this->lang->line('reports_comments')),
'details' => array($this->lang->line('reports_item_number'), $this->lang->line('reports_name'), $this->lang->line('reports_category'), $this->lang->line('reports_quantity'), $this->lang->line('reports_total'), $this->lang->line('reports_discount'))
);
}
else
{
return array('summary' => array($this->lang->line('reports_receiving_id'), $this->lang->line('reports_date'), $this->lang->line('reports_quantity'), $this->lang->line('reports_received_by'), $this->lang->line('reports_supplied_by'), $this->lang->line('reports_total'), $this->lang->line('reports_payment_type'), $this->lang->line('reports_comments')),
'details' => array($this->lang->line('reports_item_number'), $this->lang->line('reports_name'), $this->lang->line('reports_category'), $this->lang->line('reports_quantity'), $this->lang->line('reports_total'), $this->lang->line('reports_discount'))
);
}
}
public function getDataByReceivingId($receiving_id)
@@ -90,6 +99,7 @@ class Detailed_receivings extends Report
{
$this->db->where('quantity_purchased = 0');
}
return $this->db->get()->row_array();
}
}