|
|
@@ -2619,6 +2619,7 @@
|
|
|
}
|
|
|
|
|
|
sqlite3_close(db);
|
|
|
+ [dic setValue:[NSNumber numberWithInt:dic.allKeys.count] forKey:@"count"];
|
|
|
return dic;
|
|
|
}
|
|
|
|
|
|
@@ -2650,11 +2651,12 @@
|
|
|
}
|
|
|
|
|
|
sqlite3_close(db);
|
|
|
+ [dic setValue:[NSNumber numberWithInt:dic.allKeys.count] forKey:@"count"];
|
|
|
return dic;
|
|
|
}
|
|
|
|
|
|
+ (NSDictionary *)offline_getPrice {
|
|
|
- NSMutableDictionary *priceDic = [NSMutableDictionary dictionary];
|
|
|
+ NSMutableDictionary *dic = [NSMutableDictionary dictionary];
|
|
|
|
|
|
sqlite3 *db = [iSalesDB get_db];
|
|
|
NSString *sqlQuery = [NSString stringWithFormat:@"select * from price;"];
|
|
|
@@ -2665,16 +2667,25 @@
|
|
|
char *name = (char *) sqlite3_column_text(statement, 1);
|
|
|
int type = sqlite3_column_int(statement, 2);
|
|
|
int orderBy = sqlite3_column_int(statement, 3);
|
|
|
+
|
|
|
+ NSMutableDictionary *priceDic = [NSMutableDictionary dictionary];
|
|
|
+ [priceDic setValue:[NSString stringWithUTF8String:name] forKey:@"value"];
|
|
|
+ [priceDic setValue:[NSNumber numberWithInt:type] forKey:@"value_id"];
|
|
|
+ NSString *key = [NSString stringWithFormat:@"val_%d",orderBy];
|
|
|
+ [dic setValue:priceDic forKey:key];
|
|
|
}
|
|
|
|
|
|
sqlite3_finalize(statement);
|
|
|
}
|
|
|
|
|
|
sqlite3_close(db);
|
|
|
- return priceDic;
|
|
|
+
|
|
|
+ [dic setValue:[NSNumber numberWithInt:dic.allKeys.count] forKey:@"count"];
|
|
|
+
|
|
|
+ return dic;
|
|
|
}
|
|
|
|
|
|
-+ (NSDictionary *)offline_createContact:(NSMutableDictionary *)params {
|
|
|
++ (NSData *)offline_createContact:(NSMutableDictionary *)params {
|
|
|
|
|
|
NSString *path = [[NSBundle mainBundle] pathForResource:@"createContact.json" ofType:nil];
|
|
|
NSData *data = [NSData dataWithContentsOfFile:path];
|
|
|
@@ -2713,7 +2724,7 @@
|
|
|
|
|
|
// Sales Rep
|
|
|
|
|
|
- return ret;
|
|
|
+ return [RAUtils dict2data:ret];
|
|
|
}
|
|
|
|
|
|
@end
|