for origami view file

This commit is contained in:
Aung Myo
2017-06-08 14:57:01 +06:30
4 changed files with 20 additions and 21 deletions

View File

@@ -109,6 +109,7 @@ GEM
nokogiri (1.7.2)
mini_portile2 (~> 2.1.0)
pdf-core (0.7.0)
pg (0.20.0)
prawn (2.2.2)
pdf-core (~> 0.7.0)
ttfunk (~> 1.5)
@@ -244,6 +245,7 @@ DEPENDENCIES
kaminari (~> 0.16.3)
listen (~> 3.0.5)
mysql2 (>= 0.3.18, < 0.5)
pg
prawn
prawn-table
puma (~> 3.0)

View File

@@ -13,6 +13,7 @@ class Crm::HomeController < BaseCrmController
def print_order
@booking = Booking.find(params[:id])
unique_code="CrmOrderPdf"
print_settings = PrintSetting.find_by_unique_code(unique_code)

View File

@@ -42,14 +42,27 @@ $(function(){
$(".summary-items tbody tr").remove();
$("#cancel").removeAttr("disabled");
$("#assign").removeAttr("disabled");
$("#crm_print").removeAttr("disabled");
//$("#crm_print").val($(this).attr('data'));
$("#crm_print").removeAttr("disabled");
var url = $(this).attr('data-ref');
show_details(url);
});
$('.crm_print').click(function() {
var id = $(this).val();
alert(id)
$.ajax({
type: "GET",
url: "crm/print/"+id,
data: {},
dataType: "json",
success: function(data) {
}
});
});
$('.assign').click(function(e){
var booking_id = $(this).val()

View File

@@ -105,24 +105,7 @@
<script type="text/javascript">
$( document ).ready(function() {
$('.crm_print').click(function() {
var id = "BKI-000000000004"
$.ajax({
type: "GET",
url: "crm/print/"+id,
data: {},
dataType: "json",
success: function(data) {
/*if(data.status == true && data.type == "cancel")
{
alert('Booking has canceled!');
}else{
alert('Booking has completed!');
}
location.reload();*/
}
});
});
});
</script>