change receipt bill format

This commit is contained in:
phyusin
2017-12-22 16:33:10 +06:30
parent 7d8fddbdeb
commit dad83a1f83
2 changed files with 35 additions and 15 deletions

View File

@@ -16,7 +16,7 @@
<%= f.input :page_width %>
<%= f.input :page_height %>
<%= f.input :print_copies, input_html: { min: 1, step: '1', :onkeypress => "return isNumberKey(event);", :onkeyup => "greaterThanOne(this.value);" } %>
<%= f.input :precision, input_html: { min: 0, max: 2, :onkeypress => "return isNumberKey(event);", :onkeyup => "greaterThanThree(this.value);" } %>
<%= f.input :precision, input_html: { min: 0, max: 2, :onkeypress => "return isNumberKey(event);", :onkeyup => "greaterThanTwo(this.value);" } %>
<%= f.input :delimiter %>
<%= f.input :heading_space %>
</div>
@@ -74,7 +74,7 @@
if(parseInt(val)==0) $("#print_setting_print_copies").val(1);
}
function greaterThanThree(val){
function greaterThanTwo(val){
if(parseInt(val)>2) $("#print_setting_precision").val(2);
}
</script>