mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-27 18:48:50 -04:00
add navigation buttons in sales receipt and invoice, fix invoice styling (#394)
This commit is contained in:
1 parent
e8e89f1c7e
commit
87853f0da4
9 files changed
+275
-228
No files matched your search
@@ -276,8 +276,6 @@ class Sales extends Secure_area
|
||||
|
||||
$data['warning'] = $this->sale_lib->out_of_stock($item_id_or_number_or_item_kit_or_receipt,$item_location);
|
||||
|
||||
|
||||
|
||||
$this->_reload($data);
|
||||
}
|
||||
|
||||
@@ -427,6 +425,7 @@ class Sales extends Secure_area
|
||||
{
|
||||
$this->load->view("sales/receipt", $data);
|
||||
}
|
||||
|
||||
$this->sale_lib->clear_all();
|
||||
}
|
||||
}
|
||||
@@ -594,7 +593,7 @@ class Sales extends Secure_area
|
||||
function receipt($sale_id)
|
||||
{
|
||||
$data = $this->_load_sale_data($sale_id);
|
||||
$this->load->view("sales/receipt",$data);
|
||||
$this->load->view("sales/receipt", $data);
|
||||
$this->sale_lib->clear_all();
|
||||
}
|
||||
|
||||
@@ -692,7 +691,7 @@ class Sales extends Secure_area
|
||||
{
|
||||
$person_info = $this->Employee->get_logged_in_employee_info();
|
||||
$data['cart'] = $this->sale_lib->get_cart();
|
||||
$data['modes'] = array('sale'=>$this->lang->line('sales_sale'),'return'=>$this->lang->line('sales_return'));
|
||||
$data['modes'] = array('sale'=>$this->lang->line('sales_sale'), 'return'=>$this->lang->line('sales_return'));
|
||||
$data['mode'] = $this->sale_lib->get_mode();
|
||||
|
||||
$data['stock_locations'] = $this->Stock_location->get_allowed_locations('sales');
|
||||
|
||||
@@ -1,37 +1,47 @@
|
||||
<?php $this->load->view("partial/header"); ?>
|
||||
|
||||
<?php
|
||||
if (isset($error_message))
|
||||
{
|
||||
echo '<h1 style="text-align: center;">'.$error_message.'</h1>';
|
||||
echo "<div class='alert alert-dismissible alert-danger'>".$error_message."</div>";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php $this->load->view('partial/print_receipt', array('print_after_sale', $print_after_sale,
|
||||
'selected_printer' => 'invoice_printer')); ?>
|
||||
<?php $this->load->view('partial/print_receipt', array('print_after_sale', $print_after_sale, 'selected_printer'=>'invoice_printer')); ?>
|
||||
|
||||
<div class="print_hide" id="control_buttons" style="text-align:right">
|
||||
<a href="javascript:window.print()"><div class="btn btn-info btn-sm", id="show_print_button"><?php echo $this->lang->line('common_print'); ?></div></a>
|
||||
<?php /* this line will allow to print and go back to sales automatically.... echo anchor("#", $this->lang->line('common_print'), array('class'=>'btn btn-info btn-sm', 'id'=>'show_print_button', 'onclick'=>'window.print();')); */ ?>
|
||||
<?php echo anchor("sales", $this->lang->line('sales_register'), array('class'=>'btn btn-info btn-sm', 'id'=>'show_sales_button')); ?>
|
||||
<?php echo anchor("sales/manage", $this->lang->line('sales_takings'), array('class'=>'btn btn-info btn-sm', 'id'=>'show_takings_button')); ?>
|
||||
</div>
|
||||
|
||||
<div id="page-wrap">
|
||||
<div id="header"><?php echo $this->lang->line('sales_invoice'); ?></div>
|
||||
<div id="block1">
|
||||
<div id="customer-title"><?php if(isset($customer))
|
||||
{
|
||||
?>
|
||||
<textarea id="customer" rows="5" cols="6"><?=$customer_info ?></textarea>
|
||||
<?php
|
||||
}
|
||||
?></div>
|
||||
|
||||
<div id="customer-title">
|
||||
<?php
|
||||
if(isset($customer))
|
||||
{
|
||||
?>
|
||||
<textarea id="customer" rows="5" cols="6"><?=$customer_info ?></textarea>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="logo">
|
||||
<?php if ($this->Appconfig->get('company_logo') == '')
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<img id="image" src="<?php echo base_url('uploads/' . $this->Appconfig->get('company_logo')); ?>" alt="company_logo" />
|
||||
<img id="image" src="<?php echo base_url('uploads/' . $this->Appconfig->get('company_logo')); ?>" alt="company_logo" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -39,6 +49,7 @@ if (isset($error_message))
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div id="block2">
|
||||
<textarea id="company-title" rows="5" cols="20"><?=$company_info?></textarea>
|
||||
<table id="meta">
|
||||
@@ -50,26 +61,23 @@ if (isset($error_message))
|
||||
<td class="meta-head"><?php echo $this->lang->line('common_date'); ?></td>
|
||||
<td><textarea rows="5" cols="6"><?php echo $transaction_date; ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="meta-head"><?php echo $this->lang->line('sales_amount_due'); ?></td>
|
||||
<td><textarea rows="5" cols="6"><?php echo to_currency($total); ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="items">
|
||||
<tr>
|
||||
<th><?php echo $this->lang->line('sales_item_number'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_item_name'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_quantity'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_price'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_discount'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
<tr>
|
||||
<th><?php echo $this->lang->line('sales_item_number'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_item_name'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_quantity'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_price'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_discount'); ?></th>
|
||||
<th><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach($cart as $line=>$item)
|
||||
{
|
||||
?>
|
||||
@@ -87,24 +95,28 @@ if (isset($error_message))
|
||||
<tr>
|
||||
<td class="blank" colspan="6" align="center"><?php echo ' '; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="blank-bottom"> </td>
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $this->lang->line('sales_sub_total'); ?></textarea></td>
|
||||
<td class="total-value"><textarea rows="5" cols="6" id="subtotal"><?php echo to_currency($tax_exclusive_subtotal); ?></textarea></td>
|
||||
</tr>
|
||||
<?php foreach($taxes as $name=>$value) { ?>
|
||||
<tr>
|
||||
<td colspan="3" class="blank"> </td>
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $name; ?>:</textarea></td>
|
||||
<td class="total-value"><textarea rows="5" cols="6" id="taxes"><?php echo to_currency($value); ?></textarea></td>
|
||||
</tr>
|
||||
<?php }; ?>
|
||||
<tr>
|
||||
<td colspan="3" class="blank"> </td>
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $this->lang->line('sales_total'); ?></textarea></td>
|
||||
<td class="total-value"><textarea rows="5" cols="6" id="total"><?php echo to_currency($total); ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="blank-bottom"> </td>
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $this->lang->line('sales_sub_total'); ?></textarea></td>
|
||||
<td class="total-value"><textarea rows="5" cols="6" id="subtotal"><?php echo to_currency($tax_exclusive_subtotal); ?></textarea></td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach($taxes as $name=>$value)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" class="blank"> </td>
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $name; ?>:</textarea></td>
|
||||
<td class="total-value"><textarea rows="5" cols="6" id="taxes"><?php echo to_currency($value); ?></textarea></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" class="blank"> </td>
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $this->lang->line('sales_total'); ?></textarea></td>
|
||||
<td class="total-value"><textarea rows="5" cols="6" id="total"><?php echo to_currency($total); ?></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="terms">
|
||||
@@ -131,19 +143,19 @@ $(window).load(function()
|
||||
<?php if (!$this->Appconfig->get('print_header'))
|
||||
{
|
||||
?>
|
||||
// set page header
|
||||
jsPrintSetup.setOption('headerStrLeft', '');
|
||||
jsPrintSetup.setOption('headerStrCenter', '');
|
||||
jsPrintSetup.setOption('headerStrRight', '');
|
||||
// set page header
|
||||
jsPrintSetup.setOption('headerStrLeft', '');
|
||||
jsPrintSetup.setOption('headerStrCenter', '');
|
||||
jsPrintSetup.setOption('headerStrRight', '');
|
||||
<?php
|
||||
}
|
||||
if (!$this->Appconfig->get('print_footer'))
|
||||
{
|
||||
?>
|
||||
// set empty page footer
|
||||
jsPrintSetup.setOption('footerStrLeft', '');
|
||||
jsPrintSetup.setOption('footerStrCenter', '');
|
||||
jsPrintSetup.setOption('footerStrRight', '');
|
||||
// set empty page footer
|
||||
jsPrintSetup.setOption('footerStrLeft', '');
|
||||
jsPrintSetup.setOption('footerStrCenter', '');
|
||||
jsPrintSetup.setOption('footerStrRight', '');
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" rev="stylesheet" href="<?php echo base_url();?>css/invoice_email.css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
if (isset($error_message))
|
||||
{
|
||||
echo '<h1 style="text-align: center;">'.$error_message.'</h1>';
|
||||
echo "<div class='alert alert-dismissible alert-danger'>".$error_message."</div>";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
@@ -22,13 +22,13 @@ if (isset($error_message))
|
||||
<?php if ($this->Appconfig->get('company_logo') == '')
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<img id="image" src="<?php echo $image_prefix. 'uploads/' . $this->config->item('company_logo'); ?>" alt="company_logo" />
|
||||
<img id="image" src="<?php echo $image_prefix. 'uploads/' . $this->config->item('company_logo'); ?>" alt="company_logo" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -197,13 +197,13 @@ function init_table_sorting()
|
||||
|
||||
<div id="title_bar">
|
||||
<div id="title" class="float_left"><?php echo $this->lang->line('common_list_of').' '.$this->lang->line('sales_receipt_number'); ?></div>
|
||||
<a href="javascript:window.print()"><div class="btn btn-info btn-sm pull-right print_hide"><span><?php echo $this->lang->line('common_print'); ?></span></div></a>
|
||||
<a href="javascript:window.print()"><div class="btn btn-info btn-sm pull-right print_hide"><?php echo $this->lang->line('common_print'); ?></div></a>
|
||||
</div>
|
||||
|
||||
<div id="pagination"><?= $links ?></div>
|
||||
|
||||
<div class="print_hide" id="titleTextImg">
|
||||
<div style="float:left;vertical-align:text-top;"><?php echo $this->lang->line('common_search_options'). ': '; ?></div>
|
||||
<div style="float:left; vertical-align:text-top;"><?php echo $this->lang->line('common_search_options') . ': '; ?></div>
|
||||
<a id="imageDivLink" href="javascript:show_hide_search_filter('search_filter_section', 'imageDivLink');" style="outline:none;">
|
||||
<img src="<?php echo base_url().'images/plus.png'; ?>" style="border:0;outline:none;padding:0px;margin:0px;position:relative;top:-5px;"></a>
|
||||
</div>
|
||||
|
||||
+138
-103
@@ -1,27 +1,35 @@
|
||||
<?php $this->load->view("partial/header"); ?>
|
||||
|
||||
<?php $this->load->view('partial/print_receipt', array('print_after_sale', $print_after_sale,
|
||||
'selected_printer' => 'receipt_printer')); ?>
|
||||
|
||||
<?php
|
||||
if (isset($error_message))
|
||||
{
|
||||
echo '<h1 style="text-align: center;">'.$error_message.'</h1>';
|
||||
echo "<div class='alert alert-dismissible alert-danger'>".$error_message."</div>";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php $this->load->view('partial/print_receipt', array('print_after_sale', $print_after_sale, 'selected_printer'=>'receipt_printer')); ?>
|
||||
|
||||
<div class="print_hide" id="control_buttons" style="text-align:right">
|
||||
<a href="javascript:window.print()"><div class="btn btn-info btn-sm", id="show_print_button"><?php echo $this->lang->line('common_print'); ?></div></a>
|
||||
<?php /* this line will allow to print and go back to sales automatically.... echo anchor("sales", $this->lang->line('common_print'), array('class'=>'btn btn-info btn-sm', 'id'=>'show_print_button', 'onclick'=>'window.print();')); */ ?>
|
||||
<?php echo anchor("sales", $this->lang->line('sales_register'), array('class'=>'btn btn-info btn-sm', 'id'=>'show_sales_button')); ?>
|
||||
<?php echo anchor("sales/manage", $this->lang->line('sales_takings'), array('class'=>'btn btn-info btn-sm', 'id'=>'show_takings_button')); ?>
|
||||
</div>
|
||||
|
||||
<div id="receipt_wrapper">
|
||||
<div id="receipt_header">
|
||||
<?php if ($this->Appconfig->get('company_logo') == '')
|
||||
<?php
|
||||
if ($this->Appconfig->get('company_logo') == '')
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<div id="company_name"><?php echo $this->config->item('company'); ?></div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><img id="image" src="<?php echo base_url('uploads/' . $this->Appconfig->get('company_logo')); ?>" alt="company_logo" /></div>
|
||||
<div id="company_name"><img id="image" src="<?php echo base_url('uploads/' . $this->Appconfig->get('company_logo')); ?>" alt="company_logo" /></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -31,135 +39,162 @@ if (isset($error_message))
|
||||
<div id="sale_time"><?php echo $transaction_time ?></div>
|
||||
</div>
|
||||
<div id="receipt_general_info">
|
||||
<?php if(isset($customer))
|
||||
<?php
|
||||
if(isset($customer))
|
||||
{
|
||||
?>
|
||||
<div id="customer"><?php echo $this->lang->line('customers_customer').": ".$customer; ?></div>
|
||||
<div id="customer"><?php echo $this->lang->line('customers_customer').": ".$customer; ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="sale_id"><?php echo $this->lang->line('sales_id').": ".$sale_id; ?></div>
|
||||
<?php if (!empty($invoice_number))
|
||||
|
||||
<?php
|
||||
if (!empty($invoice_number))
|
||||
{
|
||||
?>
|
||||
<div id="invoice_number"><?php echo $this->lang->line('recvs_invoice_number').": ".$invoice_number; ?></div>
|
||||
<div id="invoice_number"><?php echo $this->lang->line('recvs_invoice_number').": ".$invoice_number; ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="employee"><?php echo $this->lang->line('employees_employee').": ".$employee; ?></div>
|
||||
</div>
|
||||
|
||||
<table id="receipt_items">
|
||||
<tr>
|
||||
<th style="width:40%;"><?php echo $this->lang->line('sales_description_abbrv'); ?></th>
|
||||
<th style="width:20%;"><?php echo $this->lang->line('sales_price'); ?></th>
|
||||
<th style="width:20%;"><?php echo $this->lang->line('sales_quantity'); ?></th>
|
||||
<th style="width:20%;" class="total-value"><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach(array_reverse($cart, true) as $line=>$item)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span class='long_name'> <?php echo ucfirst($item['name']); ?></span></td>
|
||||
|
||||
|
||||
<td><?php echo to_currency($item['price']); ?></td>
|
||||
<td><?php
|
||||
echo $item['quantity'] . " " . ($show_stock_locations ? " [" . $item['stock_name'] . "]" : "");
|
||||
?></td>
|
||||
<td><div class="total-value"><?php echo to_currency($item[($this->Appconfig->get('show_total_discount') ? 'total' : 'discounted_total')]); ?></div></td>
|
||||
<th style="width:40%;"><?php echo $this->lang->line('sales_description_abbrv'); ?></th>
|
||||
<th style="width:20%;"><?php echo $this->lang->line('sales_price'); ?></th>
|
||||
<th style="width:20%;"><?php echo $this->lang->line('sales_quantity'); ?></th>
|
||||
<th style="width:20%;" class="total-value"><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><?php echo $item['description']; ?></td>
|
||||
<td ><?php echo $item['serialnumber']; ?></td>
|
||||
</tr>
|
||||
<?php if ($item['discount'] > 0) : ?>
|
||||
<tr>
|
||||
<td colspan="3" class="discount"> <?php echo number_format($item['discount'], 0) . " " . $this->lang->line("sales_discount_included")?> </td><td class="total-value"><?php echo to_currency($item['discounted_total']) ; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
foreach(array_reverse($cart, true) as $line=>$item)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span class='long_name'><?php echo ucfirst($item['name']); ?></span></td>
|
||||
<td><?php echo to_currency($item['price']); ?></td>
|
||||
<td><?php echo $item['quantity'] . " " . ($show_stock_locations ? " [" . $item['stock_name'] . "]" : ""); ?></td>
|
||||
<td><div class="total-value"><?php echo to_currency($item[($this->Appconfig->get('show_total_discount') ? 'total' : 'discounted_total')]); ?></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><?php echo $item['description']; ?></td>
|
||||
<td><?php echo $item['serialnumber']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($item['discount'] > 0)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" class="discount"><?php echo number_format($item['discount'], 0) . " " . $this->lang->line("sales_discount_included")?></td>
|
||||
<td class="total-value"><?php echo to_currency($item['discounted_total']) ; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($this->Appconfig->get('show_total_discount') && $discount > 0): ?>
|
||||
<tr>
|
||||
<td colspan="3" style='text-align:right;border-top:2px solid #000000;'><?php echo $this->lang->line('sales_sub_total'); ?></td>
|
||||
<td style='text-align:right;border-top:2px solid #000000;'><?php echo to_currency($subtotal); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="total-value"><?php echo $this->lang->line('sales_discount'); ?>:</td>
|
||||
<td class="total-value"><?php echo to_currency($discount*-1); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->Appconfig->get('receipt_show_taxes')): ?>
|
||||
<tr>
|
||||
<td colspan="3" style='text-align:right;border-top:2px solid #000000;'><?php echo $this->lang->line('sales_sub_total'); ?></td>
|
||||
<td style='text-align:right;border-top:2px solid #000000;'><?php echo to_currency($this->config->item('tax_included') ? $tax_exclusive_subtotal : $discounted_subtotal); ?></td>
|
||||
</tr>
|
||||
<?php foreach($taxes as $name=>$value) { ?>
|
||||
<?php
|
||||
if ($this->Appconfig->get('show_total_discount') && $discount > 0)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" style='text-align:right;border-top:2px solid #000000;'><?php echo $this->lang->line('sales_sub_total'); ?></td>
|
||||
<td style='text-align:right;border-top:2px solid #000000;'><?php echo to_currency($subtotal); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="total-value"><?php echo $this->lang->line('sales_discount'); ?>:</td>
|
||||
<td class="total-value"><?php echo to_currency($discount*-1); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($this->Appconfig->get('receipt_show_taxes'))
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" style='text-align:right;border-top:2px solid #000000;'><?php echo $this->lang->line('sales_sub_total'); ?></td>
|
||||
<td style='text-align:right;border-top:2px solid #000000;'><?php echo to_currency($this->config->item('tax_included') ? $tax_exclusive_subtotal : $discounted_subtotal); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach($taxes as $name=>$value)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" class="total-value"><?php echo $name; ?>:</td>
|
||||
<td class="total-value"><?php echo to_currency($value); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="total-value"><?php echo $name; ?>:</td>
|
||||
<td class="total-value"><?php echo to_currency($value); ?></td>
|
||||
</tr>
|
||||
<?php }; ?>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
</tr>
|
||||
<?php $border = (!$this->Appconfig->get('receipt_show_taxes') && !($this->Appconfig->get('show_total_discount') && $discount > 0)); ?>
|
||||
<tr>
|
||||
<td colspan="3" style='<?php echo $border? 'border-top: 2px solid black;' :''; ?>text-align:right;'><?php echo $this->lang->line('sales_total'); ?></td>
|
||||
<td style='<?php echo $border? 'border-top: 2px solid black;' :''; ?>text-align:right'><?php echo to_currency($total); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="4"> </td></tr>
|
||||
|
||||
<?php
|
||||
$only_sale_check = TRUE;
|
||||
$show_giftcard_remainder = FALSE;
|
||||
foreach($payments as $payment_id=>$payment)
|
||||
{
|
||||
$only_sale_check &= $payment['payment_type'] == $this->lang->line('sales_check');
|
||||
$splitpayment=explode(':',$payment['payment_type']);
|
||||
$show_giftcard_remainder |= $splitpayment[0] == $this->lang->line('sales_giftcard');
|
||||
?>
|
||||
|
||||
<?php $border = (!$this->Appconfig->get('receipt_show_taxes') && !($this->Appconfig->get('show_total_discount') && $discount > 0)); ?>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:right;"><?php echo $splitpayment[0]; ?> </td>
|
||||
<td><div class="total-value"><?php echo to_currency( $payment['payment_amount'] * -1 ); ?></div></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td colspan="3" style='<?php echo $border? 'border-top: 2px solid black;' :''; ?>text-align:right;'><?php echo $this->lang->line('sales_total'); ?></td>
|
||||
<td style='<?php echo $border? 'border-top: 2px solid black;' :''; ?>text-align:right'><?php echo to_currency($total); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="4"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if (isset($cur_giftcard_value) && $show_giftcard_remainder)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<?php
|
||||
$only_sale_check = TRUE;
|
||||
$show_giftcard_remainder = FALSE;
|
||||
foreach($payments as $payment_id=>$payment)
|
||||
{
|
||||
$only_sale_check &= $payment['payment_type'] == $this->lang->line('sales_check');
|
||||
$splitpayment=explode(':',$payment['payment_type']);
|
||||
$show_giftcard_remainder |= $splitpayment[0] == $this->lang->line('sales_giftcard');
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:right;"><?php echo $splitpayment[0]; ?> </td>
|
||||
<td><div class="total-value"><?php echo to_currency( $payment['payment_amount'] * -1 ); ?></div></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<tr><td colspan="4"> </td></tr>
|
||||
|
||||
<?php
|
||||
if (isset($cur_giftcard_value) && $show_giftcard_remainder)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" style='text-align:right;'><?php echo $this->lang->line('sales_giftcard_balance'); ?></td>
|
||||
<td style='text-align:right'><?php echo to_currency($cur_giftcard_value); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" style='text-align:right;'> <?php echo $this->lang->line($amount_change >= 0 ? ($only_sale_check ? 'sales_check_balance' : 'sales_change_due') : 'sales_amount_due') ; ?> </td>
|
||||
<td style='text-align:right'><?php echo to_currency($amount_change); ?></td>
|
||||
</tr>
|
||||
|
||||
<td style='text-align:right'><?php echo to_currency($cur_giftcard_value); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" style='text-align:right;'> <?php echo $this->lang->line($amount_change >= 0 ? ($only_sale_check ? 'sales_check_balance' : 'sales_change_due') : 'sales_amount_due') ; ?> </td>
|
||||
<td style='text-align:right'><?php echo to_currency($amount_change); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="sale_return_policy">
|
||||
<?php echo nl2br($this->config->item('return_policy')); ?>
|
||||
</div>
|
||||
|
||||
<div id='barcode'>
|
||||
<img src='data:image/png;base64,<?php echo $barcode; ?>' /><br>
|
||||
<?php echo $sale_id; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view("partial/footer"); ?>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<div id="sale_receipt"><?php echo $receipt_title; ?></div>
|
||||
<div id="sale_time"><?php echo $transaction_time ?></div>
|
||||
</div>
|
||||
|
||||
<div id="receipt_general_info">
|
||||
<?php if(isset($customer))
|
||||
{
|
||||
@@ -19,74 +20,73 @@
|
||||
</div>
|
||||
|
||||
<table id="receipt_items">
|
||||
<tr>
|
||||
<th style="width:25%;"><?php echo $this->lang->line('sales_item_number'); ?></th>
|
||||
<th style="width:25%;"><?php echo $this->lang->line('items_item'); ?></th>
|
||||
<th style="width:17%;"><?php echo $this->lang->line('common_price'); ?></th>
|
||||
<th style="width:16%;text-align:center;"><?php echo $this->lang->line('sales_quantity'); ?></th>
|
||||
<th style="width:16%;text-align:center;"><?php echo $this->lang->line('sales_discount'); ?></th>
|
||||
<th style="width:17%;text-align:right;"><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach(array_reverse($cart, true) as $line=>$item)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $item['item_number']; ?></td>
|
||||
<td><span class='long_name'><?php echo $item['name']; ?></span><span class='short_name'><?php echo character_limiter($item['name'],10); ?></span></td>
|
||||
<td><?php echo to_currency($item['price']); ?></td>
|
||||
<td style='text-align:center;'><?php echo $item['quantity']; ?></td>
|
||||
<td style='text-align:center;'><?php echo $item['discount']; ?></td>
|
||||
<td style='text-align:right;'><?php echo to_currency($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100); ?></td>
|
||||
<th style="width:25%;"><?php echo $this->lang->line('sales_item_number'); ?></th>
|
||||
<th style="width:25%;"><?php echo $this->lang->line('items_item'); ?></th>
|
||||
<th style="width:17%;"><?php echo $this->lang->line('common_price'); ?></th>
|
||||
<th style="width:16%;text-align:center;"><?php echo $this->lang->line('sales_quantity'); ?></th>
|
||||
<th style="width:16%;text-align:center;"><?php echo $this->lang->line('sales_discount'); ?></th>
|
||||
<th style="width:17%;text-align:right;"><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach(array_reverse($cart, true) as $line=>$item)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $item['item_number']; ?></td>
|
||||
<td><span class='long_name'><?php echo $item['name']; ?></span><span class='short_name'><?php echo character_limiter($item['name'],10); ?></span></td>
|
||||
<td><?php echo to_currency($item['price']); ?></td>
|
||||
<td style='text-align:center;'><?php echo $item['quantity']; ?></td>
|
||||
<td style='text-align:center;'><?php echo $item['discount']; ?></td>
|
||||
<td style='text-align:right;'><?php echo to_currency($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="center"><?php echo $item['description']; ?></td>
|
||||
<td colspan="2" ><?php echo $item['serialnumber']; ?></td>
|
||||
<td colspan="2"><?php echo ' '; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="4" style='text-align:right;border-top:2px solid #000000;'><?php echo $this->lang->line('sales_sub_total'); ?></td>
|
||||
<td colspan="2" style='text-align:right;border-top:2px solid #000000;'><?php echo to_currency($subtotal); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="center"><?php echo $item['description']; ?></td>
|
||||
<td colspan="2" ><?php echo $item['serialnumber']; ?></td>
|
||||
<td colspan="2"><?php echo ' '; ?></td>
|
||||
</tr>
|
||||
<?php foreach($taxes as $name=>$value) { ?>
|
||||
<tr>
|
||||
<td colspan="4" style='text-align:right;'><?php echo $name; ?>:</td>
|
||||
<td colspan="2" style='text-align:right;'><?php echo to_currency($value); ?></td>
|
||||
</tr>
|
||||
<?php }; ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="4" style='text-align:right;border-top:2px solid #000000;'><?php echo $this->lang->line('sales_sub_total'); ?></td>
|
||||
<td colspan="2" style='text-align:right;border-top:2px solid #000000;'><?php echo to_currency($subtotal); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php foreach($taxes as $name=>$value) { ?>
|
||||
<tr>
|
||||
<td colspan="4" style='text-align:right;'><?php echo $name; ?>:</td>
|
||||
<td colspan="2" style='text-align:right;'><?php echo to_currency($value); ?></td>
|
||||
<td colspan="4" style='text-align:right;'><?php echo $this->lang->line('sales_total'); ?></td>
|
||||
<td colspan="2" style='text-align:right'><?php echo to_currency($total); ?></td>
|
||||
</tr>
|
||||
<?php }; ?>
|
||||
|
||||
<tr>
|
||||
<td colspan="4" style='text-align:right;'><?php echo $this->lang->line('sales_total'); ?></td>
|
||||
<td colspan="2" style='text-align:right'><?php echo to_currency($total); ?></td>
|
||||
</tr>
|
||||
<tr><td colspan="6"> </td></tr>
|
||||
|
||||
<tr><td colspan="6"> </td></tr>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
foreach($payments as $payment_id=>$payment)
|
||||
{ ?>
|
||||
{ ?>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align:right;"><?php echo $this->lang->line('sales_payment'); ?></td>
|
||||
<td colspan="2" style="text-align:right;"><?php $splitpayment=explode(':',$payment['payment_type']); echo $splitpayment[0]; ?> </td>
|
||||
<td colspan="2" style="text-align:right"><?php echo to_currency( $payment['payment_amount'] * -1 ); ?> </td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<tr><td colspan="6"> </td></tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" style="text-align:right;"><?php echo $this->lang->line('sales_payment'); ?></td>
|
||||
<td colspan="2" style="text-align:right;"><?php $splitpayment=explode(':',$payment['payment_type']); echo $splitpayment[0]; ?> </td>
|
||||
<td colspan="2" style="text-align:right"><?php echo to_currency( $payment['payment_amount'] * -1 ); ?> </td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<tr><td colspan="6"> </td></tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4" style='text-align:right;'><?php echo $this->lang->line('sales_change_due'); ?></td>
|
||||
<td colspan="2" style='text-align:right'><?php echo $amount_change; ?></td>
|
||||
</tr>
|
||||
|
||||
<td colspan="4" style='text-align:right;'><?php echo $this->lang->line('sales_change_due'); ?></td>
|
||||
<td colspan="2" style='text-align:right'><?php echo $amount_change; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="sale_return_policy">
|
||||
|
||||
+3
-3
@@ -8,12 +8,12 @@
|
||||
/*body { font: 14px/1.4 Georgia, serif; }*/
|
||||
#page-wrap { width: 800px; margin: 0 auto; }
|
||||
|
||||
#page-wrap textarea { border: 0; font: 14px Georgia, Sans-Serif; overflow: hidden; resize: none; }
|
||||
#page-wrap textarea { border: 0; font: 14px /*Georgia, Sans-Serif;*/ overflow: hidden; resize: none; }
|
||||
#page-wrap table { border-collapse: collapse; }
|
||||
#page-wrap table td, #page-wrap table th { border: 1px solid black; padding: 5px; }
|
||||
#page-wrap table td { padding: 5px; }
|
||||
|
||||
#header { height: 30px; width: 100%; margin: 20px 0; background: #222; text-align: center; color: white; font: bold 26px Helvetica, Sans-Serif; letter-spacing: 4px; padding: 8px 0px; }
|
||||
#header { height: 40px; width: 100%; margin: 20px 0; background: #222; text-align: center; color: white; font: bold 26px /*Helvetica, Sans-Serif*/; letter-spacing: 4px; padding: 8px 0px; }
|
||||
|
||||
/* first row */
|
||||
#logo { text-align: right; margin-top: 15px; float: left; position: relative; border: 1px solid #fff; max-width: 150px; max-height: 150px; overflow: hidden; }
|
||||
@@ -53,7 +53,7 @@
|
||||
#items td.blank-bottom { border: 1px; }
|
||||
|
||||
#terms { text-align: center; margin: 20px 0 0 0; }
|
||||
#terms h5 { text-transform: uppercase; font: 13px Helvetica, Sans-Serif; letter-spacing: 10px; border-bottom: 1px solid black; padding: 0 0 8px 0; margin: 0 0 8px 0; }
|
||||
#terms h5 { text-transform: uppercase; font: 13px /*Helvetica, Sans-Serif*/; letter-spacing: 10px; border-bottom: 1px solid black; padding: 0 0 8px 0; margin: 0 0 8px 0; }
|
||||
#terms textarea { width: 100%; text-align: center;}
|
||||
|
||||
.delete-wpr { position: relative; }
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long.
Vendored
+2
-1
File diff suppressed because one or more lines are too long.
Reference in new issue
Block a user