|
|
@@ -279,6 +279,9 @@
|
|
|
calculateTotals();
|
|
|
});
|
|
|
|
|
|
+ $('form#sale_form').bind('ajax:complete', function() {
|
|
|
+ $('#save_sale').attr('disabled', false);
|
|
|
+ });
|
|
|
|
|
|
$('#sale_customer_id').on('change', function() {
|
|
|
$(this).attr('disabled', true);
|
|
|
@@ -512,6 +515,7 @@
|
|
|
if ($form[0].checkValidity()) {
|
|
|
if(table.fnGetData().length > 0) {
|
|
|
$('#sale_form').submit();
|
|
|
+ $('#save_sale').attr('disabled', true);
|
|
|
} else {
|
|
|
toastr["error"]("Error, Se debe agregar al menos un producto.");
|
|
|
}
|