|
@@ -3301,15 +3301,15 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
appDelegate.disable_trigger=false;
|
|
appDelegate.disable_trigger=false;
|
|
|
|
|
|
|
|
NSMutableDictionary* ret = [[NSMutableDictionary alloc] init];
|
|
NSMutableDictionary* ret = [[NSMutableDictionary alloc] init];
|
|
|
-
|
|
|
|
|
|
|
+ NSString *customer_name = [self translateSingleQuote:params[@"customer_name"]];
|
|
|
NSString* customer_cid = [self translateSingleQuote:params[@"customer_cid"]];
|
|
NSString* customer_cid = [self translateSingleQuote:params[@"customer_cid"]];
|
|
|
- // NSString* customer_address1 = [self translateSingleQuote:params[@"customer_address1"]];
|
|
|
|
|
|
|
+// NSString* customer_address1 = [self translateSingleQuote:params[@"customer_address1"]];
|
|
|
// NSString* customer_address2 = [self translateSingleQuote:params[@"customer_address2"]];
|
|
// NSString* customer_address2 = [self translateSingleQuote:params[@"customer_address2"]];
|
|
|
// NSString* customer_address3 = [self translateSingleQuote:params[@"customer_address3"]];
|
|
// NSString* customer_address3 = [self translateSingleQuote:params[@"customer_address3"]];
|
|
|
// NSString* customer_address4 = [self translateSingleQuote:params[@"customer_address4"]];
|
|
// NSString* customer_address4 = [self translateSingleQuote:params[@"customer_address4"]];
|
|
|
// NSString* customer_city = [self translateSingleQuote:params[@"customer_city"]];
|
|
// NSString* customer_city = [self translateSingleQuote:params[@"customer_city"]];
|
|
|
NSString* customer_contact = [self translateSingleQuote:params[@"customer_contact"]];
|
|
NSString* customer_contact = [self translateSingleQuote:params[@"customer_contact"]];
|
|
|
- // NSString* customer_contact_ext = [self translateSingleQuote:params[@"customer_contact_ext"]];
|
|
|
|
|
|
|
+ NSString* customer_contact_ext = [self translateSingleQuote:params[@"customer_contact_ext"]];
|
|
|
// NSString* customer_contact_notes = [self translateSingleQuote:params[@"customer_contact_notes"]];
|
|
// NSString* customer_contact_notes = [self translateSingleQuote:params[@"customer_contact_notes"]];
|
|
|
// NSString* customer_country = [self translateSingleQuote:params[@"customer_country"]];
|
|
// NSString* customer_country = [self translateSingleQuote:params[@"customer_country"]];
|
|
|
NSString* customer_email = [self translateSingleQuote:params[@"customer_email"]];
|
|
NSString* customer_email = [self translateSingleQuote:params[@"customer_email"]];
|
|
@@ -3332,7 +3332,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
NSString *contact_name=[RAUtils arr2string:arr_name separator:@" " trim:true];
|
|
NSString *contact_name=[RAUtils arr2string:arr_name separator:@" " trim:true];
|
|
|
|
|
|
|
|
// default ship from
|
|
// default ship from
|
|
|
- NSString *ship_from_default_sql = @"select contact_id,decrypt(company_name),decrypt(addr_1),first_name || ' ' || last_name,email,fax,decrypt(phone) from offline_contact where contact_id = 'NPD';";
|
|
|
|
|
|
|
+ NSString *ship_from_default_sql = @"select contact_id,decrypt(company_name),decrypt(addr_1),first_name || ' ' || last_name,email,fax,decrypt(phone) from offline_contact where contact_id like '%NPD%';";
|
|
|
|
|
|
|
|
__block NSString *cid = @"";
|
|
__block NSString *cid = @"";
|
|
|
__block NSString *name = @"";
|
|
__block NSString *name = @"";
|
|
@@ -3360,7 +3360,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
if(so_id==nil)
|
|
if(so_id==nil)
|
|
|
so_id=[NSString stringWithFormat:@"OFFLINE%@",[NSUUID UUID].UUIDString ];
|
|
so_id=[NSString stringWithFormat:@"OFFLINE%@",[NSUUID UUID].UUIDString ];
|
|
|
|
|
|
|
|
- NSString* sql_neworder=[NSString stringWithFormat:@"insert into offline_order(so_id,status,customer_cid,customer_contact,customer_email,customer_fax,customer_phone,sales_rep,create_by,customer_contact,must_call,sender_cid,sender_name,sender_ext,sender_contact,sender_phone,sender_fax,sender_email) values('%@',0,'%@','%@','%@','%@','%@','%@','%@','%@',1,'%@','%@','%@','%@','%@','%@','%@')",so_id,customer_cid,customer_contact,customer_email,customer_fax,customer_phone,customer_sales_rep,create_by ,contact_name,cid,name,ext,contact,phone,fax,email];
|
|
|
|
|
|
|
+ NSString* sql_neworder=[NSString stringWithFormat:@"insert into offline_order(so_id,status,customer_cid,customer_contact,customer_email,customer_fax,customer_phone,sales_rep,create_by,customer_contact,must_call,sender_cid,sender_name,sender_ext,sender_contact,sender_phone,sender_fax,sender_email,billing_cid,billing_name,billing_ext,billing_contact,billing_phone,billing_fax,billing_email) values('%@',0,'%@','%@','%@','%@','%@','%@','%@','%@',1,'%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@')",so_id,customer_cid,customer_contact,customer_email,customer_fax,customer_phone,customer_sales_rep,create_by ,contact_name,cid,name,ext,contact,phone,fax,email,customer_cid,customer_name,customer_contact_ext,customer_contact,customer_phone,customer_fax,customer_email];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|