|
|
@@ -5829,9 +5829,16 @@
|
|
|
contactInfo[@"customer_phone"] = customer_phone;
|
|
|
contactInfo[@"customer_fax"] = customer_fax;
|
|
|
contactInfo[@"customer_email"] = customer_email;
|
|
|
- NSInteger first_space_index = [customer_contact rangeOfString:@" "].location;
|
|
|
- NSString *first_name = [customer_contact substringToIndex:first_space_index];
|
|
|
- NSString *last_name = [customer_contact substringFromIndex:first_space_index + 1];
|
|
|
+ NSString *first_name = @"";
|
|
|
+ NSString *last_name = @"";
|
|
|
+ if ([customer_contact isEqualToString:@""]) {
|
|
|
+
|
|
|
+ } else if ([customer_contact containsString:@" "]) {
|
|
|
+ NSInteger first_space_index = [customer_contact rangeOfString:@" "].location;
|
|
|
+ first_name = [customer_contact substringToIndex:first_space_index];
|
|
|
+ last_name = [customer_contact substringFromIndex:first_space_index + 1];
|
|
|
+ }
|
|
|
+
|
|
|
contactInfo[@"customer_first_name"] = first_name;
|
|
|
contactInfo[@"customer_last_name"] = last_name;
|
|
|
|