|
|
@@ -6348,7 +6348,7 @@
|
|
|
// password = 123456;
|
|
|
// user = EvanK;
|
|
|
|
|
|
- NSString *sql = [NSString stringWithFormat:@"update offline_order set general_notes = '%@' where so_id = '%@';",[self valueInParams:params key:@"comments"],[self valueInParams:params key:@"orderCode"]];
|
|
|
+ NSString *sql = [NSString stringWithFormat:@"update offline_order set general_notes = '%@' where so_id = '%@';",[self valueInParams:params key:@"comments" translateSingleQuote:YES],[self valueInParams:params key:@"orderCode" translateSingleQuote:YES]];
|
|
|
int ret = [iSalesDB execSql:sql];
|
|
|
|
|
|
NSMutableDictionary *dic = [NSMutableDictionary dictionary];
|
|
|
@@ -6544,7 +6544,7 @@
|
|
|
|
|
|
__block NSMutableDictionary *customer_dic = [NSMutableDictionary dictionary];
|
|
|
|
|
|
- NSString *customerSql = [NSString stringWithFormat:@"select c.contact_id,c.img_0,c.img_1,c.img_2,decrypt(c.company_name),decrypt(c.addr_1),c.addr_2,c.addr_3,c.addr_4,c.first_name,c.last_name,c.email,decrypt(c.phone),c.fax,c.zipcode,c.city,c.state,c.country from offline_contact as c join offline_order as o on c.contact_id = o.customer_cid where o.so_id = '%@';",orderCode];
|
|
|
+ NSString *customerSql = [NSString stringWithFormat:@"select c.contact_id,c.img_0,c.img_1,c.img_2,decrypt(c.company_name),decrypt(c.addr_1),c.addr_2,c.addr_3,c.addr_4,c.first_name,c.last_name,o.customer_email,o.customer_phone,o.customer_fax,c.zipcode,c.city,c.state,c.country,o.customer_contact from offline_contact as c join offline_order as o on c.contact_id = o.customer_cid where o.so_id = '%@';",orderCode];
|
|
|
[iSalesDB jk_query:customerSql db:db close:NO completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
|
|
|
|
|
|
NSString *contact_id = [self textAtColumn:0 statement:stmt];
|
|
|
@@ -6556,8 +6556,8 @@
|
|
|
NSString *addr2 = [self textAtColumn:6 statement:stmt];
|
|
|
NSString *addr3 = [self textAtColumn:7 statement:stmt];
|
|
|
NSString *addr4 = [self textAtColumn:8 statement:stmt];
|
|
|
- NSString *first_name = [self textAtColumn:9 statement:stmt];
|
|
|
- NSString *last_name = [self textAtColumn:10 statement:stmt];
|
|
|
+// NSString *first_name = [self textAtColumn:9 statement:stmt];
|
|
|
+// NSString *last_name = [self textAtColumn:10 statement:stmt];
|
|
|
NSString *email = [self textAtColumn:11 statement:stmt];
|
|
|
NSString *phone = [self textAtColumn:12 statement:stmt];
|
|
|
NSString *fax = [self textAtColumn:13 statement:stmt];
|
|
|
@@ -6566,7 +6566,7 @@
|
|
|
NSString *state = [self textAtColumn:16 statement:stmt];
|
|
|
NSString *country = [self textAtColumn:17 statement:stmt];
|
|
|
|
|
|
- NSString *name = [first_name stringByAppendingFormat:@" %@",last_name];
|
|
|
+ NSString *name = [self textAtColumn:18 statement:stmt];
|
|
|
|
|
|
// contact id
|
|
|
NSMutableDictionary *contact_id_dic = [NSMutableDictionary dictionary];
|