mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-28 02:52:14 -04:00
Made invoice optional from store config checkbox, updated and regen database script, few config fixes (#410)
This commit is contained in:
@@ -23,7 +23,7 @@ class Config extends Secure_area
|
||||
$upload_success = $this->_handle_logo_upload();
|
||||
$upload_data = $this->upload->data();
|
||||
|
||||
$batch_save_data=array(
|
||||
$batch_save_data = array(
|
||||
'company'=>$this->input->post('company'),
|
||||
'address'=>$this->input->post('address'),
|
||||
'phone'=>$this->input->post('phone'),
|
||||
@@ -48,7 +48,7 @@ class Config extends Secure_area
|
||||
|
||||
function save_general()
|
||||
{
|
||||
$batch_save_data=array(
|
||||
$batch_save_data = array(
|
||||
'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'),
|
||||
'default_tax_1_name'=>$this->input->post('default_tax_1_name'),
|
||||
'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'),
|
||||
@@ -148,7 +148,7 @@ class Config extends Secure_area
|
||||
|
||||
function save_barcode()
|
||||
{
|
||||
$batch_save_data=array(
|
||||
$batch_save_data = array(
|
||||
'barcode_type'=>$this->input->post('barcode_type'),
|
||||
'barcode_quality'=>$this->input->post('barcode_quality'),
|
||||
'barcode_width'=>$this->input->post('barcode_width'),
|
||||
@@ -197,8 +197,8 @@ class Config extends Secure_area
|
||||
{
|
||||
$batch_save_data = array (
|
||||
'invoice_enable'=>$this->input->post('invoice_enable') != null,
|
||||
'recv_invoice_format'=>$this->input->post('recv_invoice_format'),
|
||||
'sales_invoice_format'=>$this->input->post('sales_invoice_format'),
|
||||
'recv_invoice_format'=>$this->input->post('recv_invoice_format'),
|
||||
'use_invoice_template'=>$this->input->post('use_invoice_template') != null,
|
||||
'invoice_default_comments'=>$this->input->post('invoice_default_comments'),
|
||||
'invoice_email_message'=>$this->input->post('invoice_email_message')
|
||||
@@ -236,7 +236,7 @@ class Config extends Secure_area
|
||||
|
||||
function backup_db()
|
||||
{
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
|
||||
if($this->Employee->has_module_grant('config',$employee_id))
|
||||
{
|
||||
$this->load->dbutil();
|
||||
|
||||
@@ -76,9 +76,15 @@ class Reports extends Secure_area
|
||||
$report_data['employee_name'],
|
||||
$report_data['supplier_name'],
|
||||
to_currency($report_data['total']),
|
||||
$report_data['payment_type'],
|
||||
$report_data['invoice_number'],
|
||||
$report_data['comment']);
|
||||
$report_data['payment_type']
|
||||
);
|
||||
|
||||
if($this->config->item('invoice_enable') == TRUE)
|
||||
{
|
||||
$summary_data[] = $report_data['invoice_number'];
|
||||
}
|
||||
|
||||
$summary_data[] = $report_data['comment'];
|
||||
|
||||
echo get_detailed_data_row($summary_data, $this);
|
||||
}
|
||||
@@ -949,7 +955,35 @@ class Reports extends Secure_area
|
||||
|
||||
foreach($report_data['summary'] as $key=>$row)
|
||||
{
|
||||
$summary_data[] = array(anchor('receivings/edit/'.$row['receiving_id'], 'RECV '.$row['receiving_id'], array('class'=>'modal-dlg modal-btn-delete modal-btn-submit')), $row['receiving_date'], to_quantity_decimals($row['items_purchased']), $row['employee_name'], $row['supplier_name'], to_currency($row['total']), $row['payment_type'], $row['invoice_number'], $row['comment']);
|
||||
if($this->config->item('invoice_enable') == TRUE)
|
||||
{
|
||||
$summary_data[] = array(
|
||||
anchor('receivings/edit/'.$row['receiving_id'],
|
||||
'RECV '.$row['receiving_id'],
|
||||
array('class'=>'modal-dlg modal-btn-delete modal-btn-submit')),
|
||||
$row['receiving_date'],
|
||||
to_quantity_decimals($row['items_purchased']),
|
||||
$row['employee_name'], $row['supplier_name'],
|
||||
to_currency($row['total']),
|
||||
$row['payment_type'],
|
||||
$row['invoice_number'],
|
||||
$row['comment']
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$summary_data[] = array(
|
||||
anchor('receivings/edit/'.$row['receiving_id'],
|
||||
'RECV '.$row['receiving_id'],
|
||||
array('class'=>'modal-dlg modal-btn-delete modal-btn-submit')),
|
||||
$row['receiving_date'],
|
||||
to_quantity_decimals($row['items_purchased']),
|
||||
$row['employee_name'], $row['supplier_name'],
|
||||
to_currency($row['total']),
|
||||
$row['payment_type'],
|
||||
$row['comment']
|
||||
);
|
||||
}
|
||||
|
||||
foreach($report_data['details'][$key] as $drow)
|
||||
{
|
||||
|
||||
@@ -56,8 +56,15 @@ class Sales extends Secure_area
|
||||
$total_rows = $this->Sale->get_found_rows($search, $filters);
|
||||
|
||||
// filters that will be loaded in the multiselect dropdown
|
||||
$data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'),
|
||||
'only_invoices' => $this->lang->line('sales_invoice_filter'));
|
||||
if($this->config->item('invoice_enable') == TRUE)
|
||||
{
|
||||
$data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'),
|
||||
'only_invoices' => $this->lang->line('sales_invoice_filter'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'));
|
||||
}
|
||||
$data['selected'] = array( ($only_cash ? 'only_cash' : ''), ($only_invoices ? 'only_invoices' : '') );
|
||||
|
||||
$data['start_date'] = $start_date;
|
||||
@@ -103,7 +110,14 @@ class Sales extends Secure_area
|
||||
|
||||
$sale_type = 'all';
|
||||
$location_id = 'all';
|
||||
$only_invoices = $this->input->post('only_invoices') != null;
|
||||
if($this->config->item('invoice_enable') == TRUE)
|
||||
{
|
||||
$only_invoices = $this->input->post('only_invoices') != null;
|
||||
}
|
||||
else
|
||||
{
|
||||
$only_invoices = FALSE;
|
||||
}
|
||||
$only_cash = $this->input->post('only_cash') != null;
|
||||
|
||||
$filters = array('sale_type' => $sale_type,
|
||||
|
||||
Reference in New Issue
Block a user