mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-20 07:14:33 -04:00
Use bootstrap grid for payment options in sale register (#116)
Short review of receipt/invoice email send (#475)
This commit is contained in:
1 parent
6c791afffc
commit
8aa46126c5
6 files changed
+78
-90
No files matched your search
@@ -69,7 +69,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=0a2ee6807c"/>
|
||||
<!-- end mincss template tags -->
|
||||
<!-- start minjs template tags -->
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=70829b0891" language="javascript"></script>
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=ac39c5dc2e" language="javascript"></script>
|
||||
<!-- end minjs template tags -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
@@ -8,28 +8,26 @@ if (isset($error_message))
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if(isset($customer_email) && !empty($customer_email)): ?>
|
||||
<script type='text/javascript'>
|
||||
function send_email() {
|
||||
$.get('<?php echo site_url() . "/sales/send_receipt/" . $sale_id_num; ?>',
|
||||
function(response) {
|
||||
$.notify(response.message, { type: response.success ? 'success' : 'danger'} );
|
||||
}, 'json'
|
||||
);
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
<?php if(isset($email_receipt) && !empty($email_receipt)): ?>
|
||||
send_email();
|
||||
<?php endif; ?>
|
||||
var send_mail = function()
|
||||
{
|
||||
$.get('<?php echo site_url() . "/sales/send_receipt/" . $sale_id_num; ?>',
|
||||
function(response)
|
||||
{
|
||||
$.notify(response.message, { type: response.success ? 'success' : 'danger'} );
|
||||
}, 'json'
|
||||
);
|
||||
};
|
||||
|
||||
<?php if(isset($customer_email) && !empty($customer_email)): ?>
|
||||
$("#show_email_button").click(function(event) {
|
||||
send_email();
|
||||
});
|
||||
<?php endif; ?>
|
||||
$("#show_email_button").click(send_mail);
|
||||
<?php echo (isset($email_receipt) && !empty($email_receipt)) ? 1 : 0; ?> && send_email();
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->load->view('partial/print_receipt', array('print_after_sale'=>$print_after_sale, 'selected_printer'=>'receipt_printer')); ?>
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ if (isset($success))
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php echo form_open($controller_name."/cancel", array('id'=>'buttons_form', 'class'=>'form-horizontal')); ?>
|
||||
<?php echo form_open($controller_name."/cancel", array('id'=>'buttons_form')); ?>
|
||||
<div class="form-group" id="buttons_sale">
|
||||
<div class='btn btn-sm btn-default pull-left' id='suspend_sale_button'><span class="glyphicon glyphicon-align-justify"> </span><?php echo $this->lang->line('sales_suspend_sale'); ?></div>
|
||||
|
||||
@@ -447,64 +447,60 @@ if (isset($success))
|
||||
if (count($payments) > 0)
|
||||
{
|
||||
?>
|
||||
<div class="form-group form-group-sm">
|
||||
<?php echo form_label($this->lang->line('common_comments'), 'comments', array('class'=>'control-label', 'id'=>'comment_label', 'for'=>'comment')); ?>
|
||||
<?php echo form_textarea(array('name'=>'comment', 'id'=>'comment', 'class'=>'form-control input-sm', 'value'=>$comment, 'rows'=>'2')); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="form-group form-group-sm">
|
||||
<div class="col-xs-12">
|
||||
<?php echo form_label($this->lang->line('common_comments'), 'comments', array('class'=>'control-label', 'id'=>'comment_label', 'for'=>'comment')); ?>
|
||||
<?php echo form_textarea(array('name'=>'comment', 'id'=>'comment', 'class'=>'form-control input-sm', 'value'=>$comment, 'rows'=>'2')); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="sales_table_100">
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: left;">
|
||||
<?php echo form_label($this->lang->line('sales_print_after_sale'), 'print_after_sale', array('class'=>'control-label')); ?>
|
||||
</td>
|
||||
<td style="width: 20%; text-align: center; display: inline-block;">
|
||||
<?php echo form_checkbox(array('name'=>'sales_print_after_sale', 'id'=>'sales_print_after_sale', 'class'=>'checkbox', 'value'=>1, 'checked'=>$print_after_sale)); ?>
|
||||
</td>
|
||||
<div class="form-group form-group-sm">
|
||||
<div class="col-xs-6">
|
||||
<label for="sales_print_after_sale" class="control-label checkbox">
|
||||
<?php echo form_checkbox(array('name'=>'sales_print_after_sale', 'id'=>'sales_print_after_sale', 'value'=>1, 'checked'=>$print_after_sale)); ?>
|
||||
<?php echo $this->lang->line('sales_print_after_sale')?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if(!empty($customer_email))
|
||||
{
|
||||
?>
|
||||
<td style="width: 30%; text-align: left;">
|
||||
<?php echo form_label($this->lang->line('sales_email_receipt'), 'email_receipt', array('class'=>'control-label')); ?>
|
||||
</td>
|
||||
<td style="width: 20%; text-align: center; display: inline-block;">
|
||||
<?php echo form_checkbox(array('name'=>'email_receipt', 'id'=>'email_receipt', 'class'=>'checkbox', 'value'=>1, 'checked'=>$email_receipt)); ?>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<td style="width: 30%; text-align: left;"></td>
|
||||
<td style="width: 20%; text-align: center; display: inline-block;"></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if ($mode == "sale" && $this->config->item('invoice_enable') == TRUE)
|
||||
if(!empty($customer_email))
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td style="width: 30%; text-align: left;">
|
||||
<?php echo form_label($this->lang->line('sales_invoice_enable'), 'invoice_enable', array('class'=>'control-label')); ?>
|
||||
</td>
|
||||
<td style="width: 20%; text-align: center; display: inline-block;">
|
||||
<?php echo form_checkbox(array('name'=>'sales_invoice_enable', 'id'=>'sales_invoice_enable', 'class'=>'checkbox', 'value'=>1, 'checked'=>$invoice_number_enabled)); ?>
|
||||
</td>
|
||||
<td style="width: 30%; text-align: left;">
|
||||
<?php echo form_label($this->lang->line('sales_invoice_number'), 'invoice_number', array('class'=>'control-label')); ?>
|
||||
</td>
|
||||
<td style="width: 20%; text-align: right;">
|
||||
<?php echo form_input(array('name'=>'sales_invoice_number', 'id'=>'sales_invoice_number', 'class'=>'form-control input-sm', 'value'=>$invoice_number, 'size'=>5));?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
<div class="col-xs-6">
|
||||
<label for="email-receipt" class="control-label checkbox">
|
||||
<?php echo form_checkbox(array('name'=>'email_receipt', 'id'=>'email_receipt', 'value'=>1, 'checked'=>$email_receipt)); ?>
|
||||
<?php echo $this->lang->line('sales_email_receipt');?>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ($mode == "sale" && $this->config->item('invoice_enable') == TRUE)
|
||||
{
|
||||
?>
|
||||
|
||||
<div class="form-group form-group-sm">
|
||||
<div class="col-xs-6">
|
||||
<label class="control-label checkbox" for="sales_invoice_enable">
|
||||
<?php echo form_checkbox(array('name'=>'sales_invoice_enable', 'id'=>'sales_invoice_enable', 'value'=>1, 'checked'=>$invoice_number_enabled)); ?>
|
||||
<?php echo $this->lang->line('sales_invoice_enable');?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon input-sm">#</span>
|
||||
<?php echo form_input(array('name'=>'sales_invoice_number', 'id'=>'sales_invoice_number', 'class'=>'form-control input-sm', 'value'=>$invoice_number));?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
Vendored
+8
-11
@@ -15048,7 +15048,7 @@ return jQuery;
|
||||
|
||||
}));
|
||||
/**
|
||||
* @version: 2.1.21
|
||||
* @version: 2.1.22
|
||||
* @author: Dan Grossman http://www.dangrossman.info/
|
||||
* @copyright: Copyright (c) 2012-2016 Dan Grossman. All rights reserved.
|
||||
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
|
||||
@@ -15907,9 +15907,15 @@ return jQuery;
|
||||
selected = this.endDate ? this.endDate.clone() : this.previousRightTime.clone();
|
||||
minDate = this.startDate;
|
||||
|
||||
if (selected.isBefore(this.startDate))
|
||||
selected = this.startDate.clone();
|
||||
|
||||
if (maxDate && selected.isAfter(maxDate))
|
||||
selected = maxDate.clone();
|
||||
|
||||
//Preserve the time already selected
|
||||
var timeSelector = this.container.find('.calendar.right .calendar-time div');
|
||||
if (timeSelector.html() != '') {
|
||||
if (!this.endDate && timeSelector.html() != '') {
|
||||
|
||||
selected.hour(timeSelector.find('.hourselect option:selected').val() || selected.hour());
|
||||
selected.minute(timeSelector.find('.minuteselect option:selected').val() || selected.minute());
|
||||
@@ -15923,12 +15929,6 @@ return jQuery;
|
||||
selected.hour(0);
|
||||
}
|
||||
|
||||
if (selected.isBefore(this.startDate))
|
||||
selected = this.startDate.clone();
|
||||
|
||||
if (maxDate && selected.isAfter(maxDate))
|
||||
selected = maxDate.clone();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20580,9 +20580,6 @@ return jQuery;
|
||||
}
|
||||
if ($.inArray(row[params.field], params.values) !== -1) {
|
||||
this.options.data.splice(i, 1);
|
||||
if (this.options.sidePagination === 'server') {
|
||||
this.options.totalRows -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+7
-10
File diff suppressed because one or more lines are too long.
@@ -73,7 +73,7 @@
|
||||
<!-- end mincss template tags -->
|
||||
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/style.css"/>
|
||||
<!-- start minjs template tags -->
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=70829b0891" language="javascript"></script>
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=ac39c5dc2e" language="javascript"></script>
|
||||
<!-- end minjs template tags -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in new issue
Block a user