diff --git a/app/views/origami/sales/show.html.erb b/app/views/origami/sales/show.html.erb
index 703df86b..dda2bbc8 100755
--- a/app/views/origami/sales/show.html.erb
+++ b/app/views/origami/sales/show.html.erb
@@ -415,7 +415,18 @@ $(document).on('click', '.access_modal', function(event){
}else if(type == "reprint") {
$('#AccessCodeModal').modal('hide');
var sale_id = $('#sale_id').val();
- window.location.href = '/origami/'+ sale_id + "/reprint"
+ var ajax_url = "/origami/"+ sale_id + "/reprint";
+ $.ajax({
+ type: "GET",
+ url: ajax_url,
+ success: function (result) {
+ // For Server Print - from jade
+ if ($("#server_mode").val() == "cloud") {
+ code2lab.printFile(result.filepath.substr(6), result.printer_url);
+ }
+ location.reload();
+ }
+ });
}else if(type == "foc"){
$('#AccessCodeModal').modal('hide');
$('#focModal').modal('show');
@@ -427,21 +438,4 @@ $(document).on('click', '.access_modal', function(event){
}
});
}
-
-$('#re-print').click(function() {
- var sale_id = $('#sale_id').val();
- var ajax_url = "/origami/"+ sale_id + "/reprint"
- // return false;
- $.ajax({
- type: "GET",
- url: ajax_url,
- success: function (result) {
- // For Server Print - from jade
- if ($("#server_mode").val() == "cloud") {
- code2lab.printFile(result.filepath.substr(6), result.printer_url);
- }
- location.reload();
- }
- });
- });