Added configuration order of payment options available in Sales Register (#456 #646)

This commit is contained in:
FrancescoUK
2016-06-13 19:39:02 +01:00
parent 11ad1c2476
commit 3a5b88d51c
21 changed files with 63 additions and 15 deletions

View File

@@ -99,7 +99,8 @@ class Config extends Secure_Controller
'currency_decimals' => $this->input->post('currency_decimals'),
'tax_decimals' => $this->input->post('tax_decimals'),
'quantity_decimals' => $this->input->post('quantity_decimals'),
'country_codes' => $this->input->post('country_codes')
'country_codes' => $this->input->post('country_codes'),
'payment_options_order' => $this->input->post('payment_options_order')
);
$result = $this->Appconfig->batch_save($batch_save_data);

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Zahlenformat";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Telefon";
$lang["config_phone_required"] = "Telefon ist erforderlich";
$lang["config_print_bottom_margin"] = "Unterer Rand";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Number Format";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Company Phone";
$lang["config_phone_required"] = "Company phone is a required field";
$lang["config_print_bottom_margin"] = "Margin Bottom";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password es un campo requerido";
$lang["config_msg_src"] = "SMS-API ID remitente";
$lang["config_msg_src_required"] = "SMS-API ID remitente es un campo requerido";
$lang["config_number_format"] = "Formato de número";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Teléfono del Comercio";
$lang["config_phone_required"] = "Teléfono del Comercio es requerido";
$lang["config_print_bottom_margin"] = "Margen Inferior";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Number Format";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Téléphone";
$lang["config_phone_required"] = "Le numéro de téléphone est requis";
$lang["config_print_bottom_margin"] = "Margin Bottom";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Format broja";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Telefon tvrtke";
$lang["config_phone_required"] = "Telefon tvrtke je potreban";
$lang["config_print_bottom_margin"] = "Doljnja margina";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Szám formátum";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Cég telefonszáma";
$lang["config_phone_required"] = "Cég telefonszáma kötelező mező";
$lang["config_print_bottom_margin"] = "Alsó margó";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Format Nomor";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Telepon Perusahaan";
$lang["config_phone_required"] = "Telepon Perusahaan wajib diisi";
$lang["config_print_bottom_margin"] = "Margin Bottom";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Number Format";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Telefoon";
$lang["config_phone_required"] = "De telefoonnummer van het bedrijf moet ingevuld worden";
$lang["config_print_bottom_margin"] = "Marge Beneden";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Senha é um campo obrigatório";
$lang["config_msg_src"] = "SMS-API Remetente ID";
$lang["config_msg_src_required"] = "SMS-API Remetente ID é um campo obrigatório ";
$lang["config_number_format"] = "Formato do número";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Telefone";
$lang["config_phone_required"] = "Telefone da Empresa é requerido";
$lang["config_print_bottom_margin"] = "Margem inferior";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Number Format";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Телефон Компании";
$lang["config_phone_required"] = "Телефон Компании обязательный пробел";
$lang["config_print_bottom_margin"] = "Margin Bottom";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "รูปแบบตัวเลข";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "เบอร์โทรศัพท์";
$lang["config_phone_required"] = "เบอร์โทรต้องกรอก";
$lang["config_print_bottom_margin"] = "Margin Bottom";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Number Format";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "Şirket Telefonu";
$lang["config_phone_required"] = "Şirket Telefonu zorunlu alandır";
$lang["config_print_bottom_margin"] = "Margin Bottom";

View File

@@ -104,6 +104,7 @@ $lang["config_msg_pwd_required"] = "SMS-API Password is a required field";
$lang["config_msg_src"] = "SMS-API Sender ID";
$lang["config_msg_src_required"] = "SMS-API Sender ID is a required field";
$lang["config_number_format"] = "Number Format";
$lang["config_payment_options_order"] = "Payment Options Order";
$lang["config_phone"] = "電話";
$lang["config_phone_required"] = "公司電話為必填";
$lang["config_print_bottom_margin"] = "Margin Bottom";

View File

@@ -469,13 +469,29 @@ class Sale extends CI_Model
public function get_payment_options($giftcard = TRUE)
{
$payments = array(
$this->lang->line('sales_debit') => $this->lang->line('sales_debit'),
$this->lang->line('sales_credit') => $this->lang->line('sales_credit'),
$this->lang->line('sales_cash') => $this->lang->line('sales_cash'),
$this->lang->line('sales_check') => $this->lang->line('sales_check')
);
$payments = array();
if($this->config->item('payment_options_order') == 'debitcreditcash')
{
$payments[$this->lang->line('sales_debit')] = $this->lang->line('sales_debit');
$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')
{
$payments[$this->lang->line('sales_debit')] = $this->lang->line('sales_debit');
$payments[$this->lang->line('sales_cash')] = $this->lang->line('sales_cash');
$payments[$this->lang->line('sales_credit')] = $this->lang->line('sales_credit');
}
else // default: if($this->config->item('payment_options_order') == 'cashdebitcredit')
{
$payments[$this->lang->line('sales_cash')] = $this->lang->line('sales_cash');
$payments[$this->lang->line('sales_debit')] = $this->lang->line('sales_debit');
$payments[$this->lang->line('sales_credit')] = $this->lang->line('sales_credit');
}
$payments[$this->lang->line('sales_check')] = $this->lang->line('sales_check');
if($giftcard)
{
$payments[$this->lang->line('sales_giftcard')] = $this->lang->line('sales_giftcard');

View File

@@ -92,6 +92,19 @@
</div>
</div>
<div class="form-group form-group-sm">
<?php echo form_label($this->lang->line('config_payment_options_order'), 'payment_options_order', array('class'=>'control-label col-xs-2')); ?>
<div class='col-xs-2'>
<?php echo form_dropdown('payment_options_order', array(
'cashdebitcredit' => 'Cash/Debit/Credit',
'debitcreditcash' => 'Debit/Credit/Cash',
'debitcashcredit' => 'Debit/Cash/Credit'
),
$this->config->item('payment_options_order'), array('class'=>'form-control input-sm'));
?>
</div>
</div>
<div class="form-group form-group-sm no-gutter">
<?php echo form_label($this->lang->line('config_country_codes'), 'country_codes', array('class'=>'control-label col-xs-2')); ?>
<div class='col-xs-1'>

View File

@@ -39,8 +39,9 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('receipt_show_serialnumber', '1'),
('invoice_enable', '1'),
('country_codes', 'us'),
('notify_horziontal_position', 'right'),
('notify_vertical_position', 'top');
('notify_horizontal_position', 'right'),
('notify_vertical_position', 'top'),
('payment_options_order', 'cashdebitcredit');
DELETE FROM `ospos_app_config` WHERE `key` = 'use_invoice_template';

View File

@@ -69,8 +69,9 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('msg_uid', ''),
('msg_src', ''),
('msg_pwd', ''),
('notify_horziontal_position', 'right'),
('notify_vertical_position', 'top');
('notify_horizontal_position', 'right'),
('notify_vertical_position', 'top'),
('payment_options_order', 'cashdebitcredit');
-- --------------------------------------------------------

View File

@@ -69,8 +69,9 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('msg_uid', ''),
('msg_src', ''),
('msg_pwd', ''),
('notify_horziontal_position', 'right'),
('notify_vertical_position', 'top');
('notify_horizontal_position', 'right'),
('notify_vertical_position', 'top'),
('payment_options_order', 'cashdebitcredit');
-- --------------------------------------------------------

View File

@@ -69,8 +69,9 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('msg_uid', ''),
('msg_src', ''),
('msg_pwd', ''),
('notify_horziontal_position', 'right'),
('notify_vertical_position', 'top');
('notify_horizontal_position', 'right'),
('notify_vertical_position', 'top'),
('payment_options_order', 'cashdebitcredit');
-- --------------------------------------------------------

View File

@@ -103,6 +103,7 @@ config_msg_pwd_required,SMS-API Password is a required field,SMS-API Password is
config_msg_src,SMS-API Sender ID,SMS-API Sender ID,SMS-API Sender ID,SMS-API ID remitente,SMS-API Sender ID,SMS-API Sender ID,SMS-API Sender ID,SMS-API Sender ID,SMS-API Sender ID,SMS-API Sender ID,SMS-API Sender ID,SMS-API Remetente ID,SMS-API Sender ID
config_msg_src_required,SMS-API Sender ID is a required field,SMS-API Sender ID is a required field,SMS-API Sender ID is a required field,SMS-API ID remitente es un campo requerido,SMS-API Sender ID is a required field,SMS-API Sender ID is a required field,SMS-API Sender ID is a required field,SMS-API Sender ID is a required field,SMS-API Sender ID is a required field,SMS-API Sender ID is a required field,SMS-API Sender ID is a required field,SMS-API Remetente ID é um campo obrigatório ,SMS-API Sender ID is a required field
config_number_format,Szám formátum,Zahlenformat,Number Format,Formato de número,Number Format,Number Format,Number Format,Number Format,รูปแบบตัวเลข,Number Format,Format Nomor,Formato do número,Format broja
config_payment_options_order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order,Payment Options Order
config_phone,Cég telefonszáma,Telefon,Telefoon,Teléfono del Comercio,Company Phone,Téléphone,電話,Телефон Компании,เบอร์โทรศัพท์,Şirket Telefonu,Telepon Perusahaan,Telefone,Telefon tvrtke
config_phone_required,Cég telefonszáma kötelező mező,Telefon ist erforderlich,De telefoonnummer van het bedrijf moet ingevuld worden,Teléfono del Comercio es requerido,Company phone is a required field,Le numéro de téléphone est requis,公司電話為必填,Телефон Компании обязательный пробел,เบอร์โทรต้องกรอก,Şirket Telefonu zorunlu alandır,Telepon Perusahaan wajib diisi,Telefone da Empresa é requerido,Telefon tvrtke je potreban
config_print_bottom_margin,Alsó margó,Unterer Rand,Marge Beneden,Margen Inferior,Margin Bottom,Margin Bottom,Margin Bottom,Margin Bottom,Margin Bottom,Margin Bottom,Margin Bottom,Margem inferior,Doljnja margina
1 label hu-HU de-CH nl-BE es en fr zh ru th tr id pt-BR hr-HR
103 config_msg_src SMS-API Sender ID SMS-API Sender ID SMS-API Sender ID SMS-API ID remitente SMS-API Sender ID SMS-API Sender ID SMS-API Sender ID SMS-API Sender ID SMS-API Sender ID SMS-API Sender ID SMS-API Sender ID SMS-API Remetente ID SMS-API Sender ID
104 config_msg_src_required SMS-API Sender ID is a required field SMS-API Sender ID is a required field SMS-API Sender ID is a required field SMS-API ID remitente es un campo requerido SMS-API Sender ID is a required field SMS-API Sender ID is a required field SMS-API Sender ID is a required field SMS-API Sender ID is a required field SMS-API Sender ID is a required field SMS-API Sender ID is a required field SMS-API Sender ID is a required field SMS-API Remetente ID é um campo obrigatório SMS-API Sender ID is a required field
105 config_number_format Szám formátum Zahlenformat Number Format Formato de número Number Format Number Format Number Format Number Format รูปแบบตัวเลข Number Format Format Nomor Formato do número Format broja
106 config_payment_options_order Payment Options Order Payment Options Order Payment Options Order Payment Options Order Payment Options Order Payment Options Order Payment Options Order Payment Options Order Payment Options Order Payment Options Order Payment Options Order Payment Options Order Payment Options Order
107 config_phone Cég telefonszáma Telefon Telefoon Teléfono del Comercio Company Phone Téléphone 電話 Телефон Компании เบอร์โทรศัพท์ Şirket Telefonu Telepon Perusahaan Telefone Telefon tvrtke
108 config_phone_required Cég telefonszáma kötelező mező Telefon ist erforderlich De telefoonnummer van het bedrijf moet ingevuld worden Teléfono del Comercio es requerido Company phone is a required field Le numéro de téléphone est requis 公司電話為必填 Телефон Компании обязательный пробел เบอร์โทรต้องกรอก Şirket Telefonu zorunlu alandır Telepon Perusahaan wajib diisi Telefone da Empresa é requerido Telefon tvrtke je potreban
109 config_print_bottom_margin Alsó margó Unterer Rand Marge Beneden Margen Inferior Margin Bottom Margin Bottom Margin Bottom Margin Bottom Margin Bottom Margin Bottom Margin Bottom Margem inferior Doljnja margina