Merge branch 'crm'

This commit is contained in:
Aung Myo
2017-06-16 10:21:56 +06:30
15 changed files with 221 additions and 82 deletions

View File

@@ -51,6 +51,7 @@ $(document).ready(function(){
var customer_id=$(this).find(".customer-id").text();
show_customer_details(customer_id);
$("#re-print").val(unique_id);
var cashier="";
var receipt_date="";
@@ -199,6 +200,14 @@ $(document).ready(function(){
return false;
});
$('#re-print').click(function() {
var sale_id = $(".selected-item").find(".orders-id").text();
window.location.href = '/origami/'+ sale_id + "/reprint"
return false;
});
function show_customer_details(customer_id){
if(window.location.pathname.substring(0, 12) == "/origami/SAL"){
@@ -297,19 +306,25 @@ function control_button(order_status){
$("#request_bills").prop('disabled', true);
$("#discount").prop('disabled', false);
$("#pay-bill").prop('disabled', false);
$("#re-print").prop('disabled', true);
}
else if(order_status=="new") {
$("#customer").prop('disabled', false);
$("#request_bills").prop('disabled', false);
$("#discount").prop('disabled', true);
$("#pay-bill").prop('disabled', true);
$("#re-print").prop('disabled', true);
}else if(order_status=="completed"){
$("#re-print").prop('disabled', false);
}
else {
$("#customer").prop('disabled', true);
$("#request_bills").prop('disabled', true);
$("#discount").prop('disabled', true);
$("#pay-bill").prop('disabled', true);
$("#re-print").prop('disabled', true);
}
}
/* For Receipt - Update Balance */