sale_items pdf
This commit is contained in:
@@ -27,6 +27,22 @@
|
||||
<%= f.input :precision, input_html: { min: 0, max: 2, :onkeypress => "return isNumberKey(event);", :onkeyup => "greaterThanTwo(this.value);" } %>
|
||||
<%= f.input :delimiter %>
|
||||
<%= f.input :heading_space %>
|
||||
|
||||
<% if !@print_setting.new_record? and @print_setting.unique_code == 'CloseCashierPdf' %>
|
||||
<div class="form-group boolean optional sale_items bmd-form-group is-filled">
|
||||
<div class="checkbox">
|
||||
<input value="0" type="hidden" name="shift_sale_items">
|
||||
<label class="boolean optional" for="sale_items">
|
||||
<input class="boolean optional" type="checkbox" value="<%= @lookup %>" name="shift_sale_items" id="sale_items" onchange="set_value(this)">
|
||||
<span class="checkbox-decorator">
|
||||
<span class="check"></span>
|
||||
<div class="ripple-container"></div>
|
||||
</span>Shift Sale Items
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
@@ -82,7 +98,11 @@
|
||||
.attr("value",value.target)
|
||||
.text(value.deviceName));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if ($('#sale_items').val() == '1') {
|
||||
$('#sale_items').prop('checked', true);
|
||||
}
|
||||
|
||||
// if selected printer change call and bind
|
||||
$("#print_setting_printer_name").on("change", function(){
|
||||
@@ -119,4 +139,12 @@
|
||||
function greaterThanTwo(val){
|
||||
if(parseInt(val)>2) $("#print_setting_precision").val(2);
|
||||
}
|
||||
|
||||
function set_value(ele){
|
||||
if ($(ele).val() == '1'){
|
||||
$(ele).val(0)
|
||||
}else{
|
||||
$(ele).val(1)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -58,6 +58,16 @@
|
||||
<th><%= t("views.right_panel.detail.print_copies") %></th>
|
||||
<td><%= @print_setting.print_copies %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Include Shift Sale Items</th>
|
||||
<td>
|
||||
<% if @lookup == '1' %>
|
||||
<%= 'True' %>
|
||||
<% else %>
|
||||
<%= 'False' %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<%= link_to t("views.btn.edit"), edit_print_setting_path(@print_setting),:class => 'btn btn-info btn-sm waves-effect' %>
|
||||
|
||||
Reference in New Issue
Block a user