mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
Made print company name in receipts optional (#925)
This commit is contained in:
@@ -671,6 +671,7 @@ class Config extends Secure_Controller
|
||||
{
|
||||
$batch_save_data = array (
|
||||
'receipt_template' => $this->input->post('receipt_template'),
|
||||
'receipt_show_company_name' => $this->input->post('receipt_show_company_name') != NULL,
|
||||
'receipt_show_taxes' => $this->input->post('receipt_show_taxes') != NULL,
|
||||
'receipt_show_total_discount' => $this->input->post('receipt_show_total_discount') != NULL,
|
||||
'receipt_show_description' => $this->input->post('receipt_show_description') != NULL,
|
||||
|
||||
@@ -194,6 +194,7 @@ $lang["config_receipt_default"] = "Default";
|
||||
$lang["config_receipt_info"] = "Receipt Configuration Information";
|
||||
$lang["config_receipt_printer"] = "Ticket Printer";
|
||||
$lang["config_receipt_short"] = "Short";
|
||||
$lang["config_receipt_show_company_name"] = "Show Company Name";
|
||||
$lang["config_receipt_show_description"] = "Show Description";
|
||||
$lang["config_receipt_show_serialnumber"] = "Show Serial Number";
|
||||
$lang["config_receipt_show_taxes"] = "Show Taxes";
|
||||
@@ -228,4 +229,4 @@ $lang["config_top"] = "Top";
|
||||
$lang["config_website"] = "Website";
|
||||
$lang["config_giftcard_number"] = "Gift Card Number";
|
||||
$lang["config_giftcard_series"] = "Generate in Series";
|
||||
$lang["config_giftcard_random"] = "Generate Random";
|
||||
$lang["config_giftcard_random"] = "Generate Random";
|
||||
|
||||
@@ -16,6 +16,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('config_receipt_show_company_name'), 'receipt_show_company_name', array('class' => 'control-label col-xs-2')); ?>
|
||||
<div class='col-xs-1'>
|
||||
<?php echo form_checkbox(array(
|
||||
'name' => 'receipt_show_company_name',
|
||||
'value' => 'receipt_show_company_name',
|
||||
'id' => 'receipt_show_company_name',
|
||||
'checked'=>$this->config->item('receipt_show_company_name'))); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('config_receipt_show_taxes'), 'receipt_show_taxes', array('class' => 'control-label col-xs-2')); ?>
|
||||
<div class='col-xs-1'>
|
||||
@@ -114,7 +125,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('config_print_top_margin'), 'print_top_margin', array('class' => 'control-label col-xs-2 required')); ?>
|
||||
<div class='col-xs-2'>
|
||||
<div class="input-group">
|
||||
@@ -131,7 +142,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('config_print_left_margin'), 'print_left_margin', array('class' => 'control-label col-xs-2 required')); ?>
|
||||
<div class='col-xs-2'>
|
||||
<div class="input-group">
|
||||
@@ -148,7 +159,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('config_print_bottom_margin'), 'print_bottom_margin', array('class' => 'control-label col-xs-2 required')); ?>
|
||||
<div class='col-xs-2'>
|
||||
<div class="input-group">
|
||||
@@ -165,7 +176,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('config_print_right_margin'), 'print_right_margin', array('class' => 'control-label col-xs-2 required')); ?>
|
||||
<div class='col-xs-2'>
|
||||
<div class="input-group">
|
||||
@@ -203,7 +214,7 @@ $(document).ready(function()
|
||||
var $this = $(this)
|
||||
$(printers).each(function(key, value)
|
||||
{
|
||||
$this.append($('<option>', { value : value }).text(value));
|
||||
$this.append($('<option>', { value : value }).text(value));
|
||||
});
|
||||
$("option[value='" + localStorage[$(this).attr('id')] + "']", this).prop('selected', true);
|
||||
$(this).change(function()
|
||||
@@ -241,48 +252,48 @@ $(document).ready(function()
|
||||
rules:
|
||||
{
|
||||
print_top_margin:
|
||||
{
|
||||
required:true,
|
||||
number:true
|
||||
},
|
||||
print_left_margin:
|
||||
{
|
||||
required:true,
|
||||
number:true
|
||||
},
|
||||
print_bottom_margin:
|
||||
{
|
||||
required:true,
|
||||
number:true
|
||||
},
|
||||
print_right_margin:
|
||||
{
|
||||
required:true,
|
||||
number:true
|
||||
}
|
||||
{
|
||||
required:true,
|
||||
number:true
|
||||
},
|
||||
print_left_margin:
|
||||
{
|
||||
required:true,
|
||||
number:true
|
||||
},
|
||||
print_bottom_margin:
|
||||
{
|
||||
required:true,
|
||||
number:true
|
||||
},
|
||||
print_right_margin:
|
||||
{
|
||||
required:true,
|
||||
number:true
|
||||
}
|
||||
},
|
||||
|
||||
messages:
|
||||
{
|
||||
print_top_margin:
|
||||
{
|
||||
required:"<?php echo $this->lang->line('config_print_top_margin_required'); ?>",
|
||||
number:"<?php echo $this->lang->line('config_print_top_margin_number'); ?>"
|
||||
required:"<?php echo $this->lang->line('config_print_top_margin_required'); ?>",
|
||||
number:"<?php echo $this->lang->line('config_print_top_margin_number'); ?>"
|
||||
},
|
||||
print_left_margin:
|
||||
{
|
||||
required:"<?php echo $this->lang->line('config_print_left_margin_required'); ?>",
|
||||
number:"<?php echo $this->lang->line('config_print_left_margin_number'); ?>"
|
||||
required:"<?php echo $this->lang->line('config_print_left_margin_required'); ?>",
|
||||
number:"<?php echo $this->lang->line('config_print_left_margin_number'); ?>"
|
||||
},
|
||||
print_bottom_margin:
|
||||
{
|
||||
required:"<?php echo $this->lang->line('config_print_bottom_margin_required'); ?>",
|
||||
number:"<?php echo $this->lang->line('config_print_bottom_margin_number'); ?>"
|
||||
required:"<?php echo $this->lang->line('config_print_bottom_margin_required'); ?>",
|
||||
number:"<?php echo $this->lang->line('config_print_bottom_margin_number'); ?>"
|
||||
},
|
||||
print_right_margin:
|
||||
{
|
||||
required:"<?php echo $this->lang->line('config_print_right_margin_required'); ?>",
|
||||
number:"<?php echo $this->lang->line('config_print_right_margin_number'); ?>"
|
||||
required:"<?php echo $this->lang->line('config_print_right_margin_required'); ?>",
|
||||
number:"<?php echo $this->lang->line('config_print_right_margin_number'); ?>"
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -18,19 +18,23 @@ if (isset($error_message))
|
||||
<div id="receipt_wrapper">
|
||||
<div id="receipt_header">
|
||||
<?php
|
||||
if ($this->config->item('company_logo') == '')
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
if ($this->config->item('company_logo') != '')
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><img id="image" src="<?php echo base_url('uploads/' . $this->config->item('company_logo')); ?>" alt="company_logo" /></div>
|
||||
<div id="company_name"><img id="image" src="<?php echo base_url('uploads/' . $this->config->item('company_logo')); ?>" alt="company_logo" /></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($this->config->item('receipt_show_company_name'))
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="company_address"><?php echo nl2br($this->config->item('address')); ?></div>
|
||||
<div id="company_phone"><?php echo $this->config->item('phone'); ?></div>
|
||||
<div id="sale_receipt"><?php echo $receipt_title; ?></div>
|
||||
|
||||
@@ -58,7 +58,8 @@ $(document).ready(function()
|
||||
</div>
|
||||
|
||||
<div id="logo">
|
||||
<?php if($this->Appconfig->get('company_logo') != '')
|
||||
<?php
|
||||
if($this->Appconfig->get('company_logo') != '')
|
||||
{
|
||||
?>
|
||||
<img id="image" src="<?php echo base_url('uploads/' . $this->Appconfig->get('company_logo')); ?>" alt="company_logo" />
|
||||
@@ -66,7 +67,14 @@ $(document).ready(function()
|
||||
}
|
||||
?>
|
||||
<div> </div>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
if ($this->Appconfig->get('receipt_show_company_name'))
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -58,15 +58,23 @@ if (isset($error_message))
|
||||
</div>
|
||||
|
||||
<div id="logo">
|
||||
<?php if($this->Appconfig->get('company_logo') != '')
|
||||
<?php
|
||||
if($this->Appconfig->get('company_logo') != '')
|
||||
{
|
||||
?>
|
||||
?>
|
||||
<img id="image" src="<?php echo base_url('uploads/' . $this->Appconfig->get('company_logo')); ?>" alt="company_logo" />
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div> </div>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
if ($this->Appconfig->get('receipt_show_company_name'))
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,14 +2,22 @@
|
||||
<div id="receipt_header">
|
||||
<?php
|
||||
if ($this->config->item('company_logo') != '')
|
||||
{
|
||||
?>
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><img id="image" src="<?php echo base_url('uploads/' . $this->config->item('company_logo')); ?>" alt="company_logo" /></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
if ($this->config->item('receipt_show_company_name'))
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="company_address"><?php echo nl2br($this->config->item('address')); ?></div>
|
||||
<div id="company_phone"><?php echo $this->config->item('phone'); ?></div>
|
||||
<div id="sale_receipt"><?php echo $receipt_title; ?></div>
|
||||
@@ -188,4 +196,4 @@
|
||||
<img src='data:image/png;base64,<?php echo $barcode; ?>' /><br>
|
||||
<?php echo $sale_id; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,14 +2,22 @@
|
||||
<div id="receipt_header" style="text-align:center;">
|
||||
<?php
|
||||
if ($this->config->item('company_logo') != '')
|
||||
{
|
||||
?>
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><img id="image" src="<?php echo base_url('uploads/' . $this->config->item('company_logo')); ?>" alt="company_logo" /></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="company_name" style="font-size:150%; font-weight:bold;"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
if ($this->config->item('receipt_show_company_name'))
|
||||
{
|
||||
?>
|
||||
<div id="company_name" style="font-size:150%; font-weight:bold;"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="company_address"><?php echo nl2br($this->config->item('address')); ?></div>
|
||||
<div id="company_phone"><?php echo $this->config->item('phone'); ?></div>
|
||||
<br>
|
||||
|
||||
@@ -2,14 +2,22 @@
|
||||
<div id="receipt_header">
|
||||
<?php
|
||||
if ($this->config->item('company_logo') != '')
|
||||
{
|
||||
?>
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><img id="image" src="<?php echo base_url('uploads/' . $this->config->item('company_logo')); ?>" alt="company_logo" /></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
if ($this->config->item('receipt_show_company_name'))
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="company_address"><?php echo nl2br($this->config->item('address')); ?></div>
|
||||
<div id="company_phone"><?php echo $this->config->item('phone'); ?></div>
|
||||
<div id="sale_receipt"><?php echo $receipt_title; ?></div>
|
||||
|
||||
@@ -223,4 +223,8 @@ ALTER TABLE `ospos_giftcards` CHANGE `giftcard_number` `giftcard_number` VARCHAR
|
||||
|
||||
-- add support for select between gitcard number series or random
|
||||
|
||||
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('giftcard_number', 'series');
|
||||
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('giftcard_number', 'series');
|
||||
|
||||
-- add option to print company name in receipt
|
||||
|
||||
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('receipt_show_company_name', '1');
|
||||
|
||||
@@ -41,6 +41,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
|
||||
('barcode_page_width', '100'),
|
||||
('barcode_page_cellspacing', '20'),
|
||||
('barcode_generate_if_empty', '0'),
|
||||
('receipt_show_company_name', '1'),
|
||||
('receipt_show_taxes', '0'),
|
||||
('receipt_show_total_discount', '1'),
|
||||
('receipt_show_description', '1'),
|
||||
@@ -94,7 +95,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
|
||||
('customer_reward_enable',''),
|
||||
('default_origin_tax_code', ''),
|
||||
('cash_decimals', '2'),
|
||||
('financial_year','1'),
|
||||
('financial_year', '1'),
|
||||
('giftcard_number', 'series');
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
|
||||
('barcode_page_width', '100'),
|
||||
('barcode_page_cellspacing', '20'),
|
||||
('barcode_generate_if_empty', '0'),
|
||||
('receipt_show_company_name', '1'),
|
||||
('receipt_show_taxes', '0'),
|
||||
('receipt_show_total_discount', '1'),
|
||||
('receipt_show_description', '1'),
|
||||
@@ -94,7 +95,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
|
||||
('customer_reward_enable',''),
|
||||
('default_origin_tax_code', ''),
|
||||
('cash_decimals', '2'),
|
||||
('financial_year','1'),
|
||||
('financial_year', '1'),
|
||||
('giftcard_number', 'series');
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
|
||||
('barcode_page_width', '100'),
|
||||
('barcode_page_cellspacing', '20'),
|
||||
('barcode_generate_if_empty', '0'),
|
||||
('receipt_show_company_name', '1'),
|
||||
('receipt_show_taxes', '0'),
|
||||
('receipt_show_total_discount', '1'),
|
||||
('receipt_show_description', '1'),
|
||||
@@ -94,7 +95,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
|
||||
('customer_reward_enable',''),
|
||||
('default_origin_tax_code', ''),
|
||||
('cash_decimals', '2'),
|
||||
('financial_year','1'),
|
||||
('financial_year', '1'),
|
||||
('giftcard_number', 'series');
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user