diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb
index 55295c9e..e76e0230 100644
--- a/app/views/crm/customers/index.html.erb
+++ b/app/views/crm/customers/index.html.erb
@@ -62,7 +62,7 @@
<%end %>
-
+
<%= paginate @crm_customers %>
@@ -76,8 +76,8 @@
-
+
+
-->
@@ -123,7 +123,7 @@
| <%= crm_customer.card_no rescue '-' %> |
- <% if crm_customer.membership_id.nil? && !crm_customer.membership_type.nil? && !crm_customer.membership_type =="" && !crm_customer.paypar_account_no =="" && !crm_customer.paypar_account_no.nil? %>
+ <% if crm_customer.membership_id.nil? && !crm_customer.membership_type.nil? && !crm_customer.membership_type.blank? && !crm_customer.paypar_account_no.blank? && !crm_customer.paypar_account_no.nil? %>
<%= link_to t("views.btn.sync"), crm_customer_sync_path(crm_customer), :class => "btn btn-md bg-green waves-effect" %>
<% end %>
<% if @customer_update_phone_email_membertype %>
@@ -138,7 +138,7 @@
<% end %>
-
+
<% if @create_flag %>
@@ -178,10 +178,10 @@
// QR Code Reader
$("#qr_code").on('click', function(e){
- var code = "";
+ var code = "";
setTimeout(function(){
code=getQRCode();
- setQRCode(code);
+ setQRCode(code);
},100);
});
@@ -199,12 +199,12 @@
/*new customer UI func:*/
//Initialize tooltips
$('.nav-tabs > li a[title]').tooltip();
-
+
//Wizard
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
var $target = $(e.target);
-
+
if ($target.parent().hasClass('disabled')) {
return false;
}
@@ -256,10 +256,10 @@
url: url,
data: {},
dataType: "json",
- success: function(data) {
- // Selected for Taxes
- var taxes = JSON.stringify(data.tax_profiles);
- var parse_taxes = JSON.parse(taxes);
+ success: function(data) {
+ // Selected for Taxes
+ var taxes = JSON.stringify(data.tax_profiles);
+ var parse_taxes = JSON.parse(taxes);
$.each(parse_taxes, function(i, value){
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected").css({'color':'#fff','background':'#215d9c'});
});
@@ -272,7 +272,7 @@
$('#customer_salutation').val(data.salutation);
$('#customer_nrc_no').val(data.nrc_no);
$('#customer_card_no').val(data.card_no);
- $('#customer_type').val(data.customer_type);
+ $('#customer_type').val(data.customer_type);
$('#paypar_account_no').val(data.paypar_account_no);
$('#customer_address').val(data.address);
$('#customer_date_of_birth').val(data.date_of_birth);
|