Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
daN4cat authored and jekkos committed Aug 30, 2023
1 parent 82d7f48 commit 4806c0f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
24 changes: 15 additions & 9 deletions application/controllers/Reports.php
Expand Up @@ -368,7 +368,7 @@ public function summary_discounts_input()
$data['mode'] = 'sale';
$data['discount_type_options'] = array(
'0' => $this->lang->line('reports_discount_percent'),
'1'=> $this->lang->line('reports_discount_fixed'));
'1' => $this->lang->line('reports_discount_fixed'));
$data['sale_type_options'] = $this->get_sale_type_options();

$this->load->view('reports/date_input', $data);
Expand Down Expand Up @@ -913,19 +913,23 @@ public function specific_customer_input()
$data['sale_type_options'] = $this->get_sale_type_options();

$data['payment_type'] = $this->get_payment_type();

$this->load->view('reports/specific_customer_input', $data);
}

public function get_payment_type()
{
$payment_type = array( 'all' => $this->lang->line('common_none_selected_text'),
'cash' => $this->lang->line('sales_cash'),
'due' => $this->lang->line('sales_due'),
'check' => $this->lang->line('sales_check'),
'credit' => $this->lang->line('sales_credit'),
'debit' => $this->lang->line('sales_debit'),
'invoices' => $this->lang->line('sales_invoice'));
return $payment_type;
$payment_type = array(
'all' => $this->lang->line('common_none_selected_text'),
'cash' => $this->lang->line('sales_cash'),
'due' => $this->lang->line('sales_due'),
'check' => $this->lang->line('sales_check'),
'credit' => $this->lang->line('sales_credit'),
'debit' => $this->lang->line('sales_debit'),
'invoices' => $this->lang->line('sales_invoice')
);

return $payment_type;
}

public function specific_customer($start_date, $end_date, $customer_id, $sale_type, $payment_type)
Expand Down Expand Up @@ -1350,6 +1354,7 @@ public function get_sale_type_options()
}
$sale_type_options['canceled'] = $this->lang->line('reports_canceled');
$sale_type_options['returns'] = $this->lang->line('reports_returns');

return $sale_type_options;
}

Expand Down Expand Up @@ -1451,6 +1456,7 @@ public function detailed_sales($start_date, $end_date, $sale_type, $location_id
'details_data_rewards' => $details_data_rewards,
'overall_summary_data' => $this->xss_clean($model->getSummaryData($inputs))
);

$this->load->view('reports/tabular_details', $data);
}

Expand Down
2 changes: 1 addition & 1 deletion application/helpers/tabular_helper.php
Expand Up @@ -789,7 +789,7 @@ function get_cash_up_data_row($cash_up)
'close_date' => to_datetime(strtotime($cash_up->close_date)),
'close_employee_id' => $cash_up->close_first_name . ' ' . $cash_up->close_last_name,
'closed_amount_cash' => to_currency($cash_up->closed_amount_cash),
'note' => $cash_up->note ? '<span class="glyphicon glyphicon-ok"></span>' : '<span class="glyphicon glyphicon-remove"></span>',
'note' => $cash_up->note ? $CI->lang->line('common_yes') : $CI->lang->line('common_no'),
'closed_amount_due' => to_currency($cash_up->closed_amount_due),
'closed_amount_card' => to_currency($cash_up->closed_amount_card),
'closed_amount_check' => to_currency($cash_up->closed_amount_check),
Expand Down
4 changes: 2 additions & 2 deletions application/language/en-GB/common_lang.php
Expand Up @@ -52,7 +52,7 @@
$lang["common_manager"] = "";
$lang["common_migration_needed"] = "A database migration to %1 will start after login";
$lang["common_new"] = "New";
$lang["common_no"] = "";
$lang["common_no"] = "No";
$lang["common_no_persons_to_display"] = "There are no people to display.";
$lang["common_none_selected_text"] = "[Select]";
$lang["common_or"] = "OR";
Expand Down Expand Up @@ -81,6 +81,6 @@
$lang["common_website"] = "opensourcepos.org";
$lang["common_welcome"] = "Welcome";
$lang["common_welcome_message"] = "Welcome to OSPOS, click on a module to get started.";
$lang["common_yes"] = "";
$lang["common_yes"] = "Yes";
$lang["common_you_are_using_ospos"] = "";
$lang["common_zip"] = "Post Code";
4 changes: 2 additions & 2 deletions application/language/en-GB/reports_lang.php
Expand Up @@ -18,8 +18,8 @@
$lang["reports_completed_sales"] = "Completed Sales";
$lang["reports_confirm_delete"] = "Are you sure you want to delete the selected entry(ies)?";
$lang["reports_confirm_restore"] = "Are you sure you want to restore the selected entry(ies)?";
$lang["reports_cost"] = "Wholesale";
$lang["reports_cost_price"] = "Wholesale Price";
$lang["reports_cost"] = "Cost";
$lang["reports_cost_price"] = "Cost Price";
$lang["reports_count"] = "Count";
$lang["reports_customer"] = "Customer";
$lang["reports_customers"] = "Customers";
Expand Down
4 changes: 2 additions & 2 deletions application/language/en-US/common_lang.php
Expand Up @@ -53,7 +53,7 @@
$lang["common_manager"] = "";
$lang["common_migration_needed"] = "";
$lang["common_new"] = "New";
$lang["common_no"] = "";
$lang["common_no"] = "No";
$lang["common_no_persons_to_display"] = "There are no people to display.";
$lang["common_none_selected_text"] = "[Select]";
$lang["common_or"] = "OR";
Expand Down Expand Up @@ -82,6 +82,6 @@
$lang["common_website"] = "opensourcepos.org";
$lang["common_welcome"] = "Welcome";
$lang["common_welcome_message"] = "Welcome to OSPOS, click a module below to get started.";
$lang["common_yes"] = "";
$lang["common_yes"] = "Yes";
$lang["common_you_are_using_ospos"] = "";
$lang["common_zip"] = "Postal Code";

0 comments on commit 4806c0f

Please sign in to comment.