crm update

This commit is contained in:
Aung Myo
2017-06-11 18:00:34 +06:30
parent 9c228dce5c
commit d65882ac5b
10 changed files with 146 additions and 75 deletions

View File

@@ -33,6 +33,10 @@ $(document).ready(function(){
$("#customer").attr('disabled','disabled');
}
var customer_id=$(this).find(".customer-id").text();
show_customer_details(customer_id);
var cashier="";
var receipt_date="";
var sub_total=0;
@@ -142,6 +146,7 @@ $(document).ready(function(){
});
});
// Payment for Bill
$('#pay-bill').click(function() {
var sale_id=$(".selected-item").find(".orders-id").text();
@@ -157,10 +162,27 @@ $(document).ready(function(){
$('#customer').click(function() {
var sale_id=$(".selected-item").find(".orders-id").text();
window.location.href = '/crm/customers/'+ sale_id + "/assign_sale_id"
window.location.href = '/origami/'+ sale_id + "/add_customer"
return false;
});
function show_customer_details(customer_id){
$('.customer_detail').removeClass('hide');
//Start Ajax
$.ajax({
type: "GET",
url: "origami/"+customer_id+"/get_customer/",
data: {},
dataType: "json",
success: function(data) {
$("#customer_name").text(data.name);
$("#customer_name").text(data.name);
}
});
//End Ajax
}
/* For Receipt - Calculate discount or tax */
$('.cashier_number').on('click', function(event){
if(event.handled !== true) {