|
@@ -3500,6 +3500,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
|
|
|
|
|
appDelegate.disable_trigger=true;
|
|
appDelegate.disable_trigger=true;
|
|
|
|
|
+ [iSalesDB execSql:@"delete from offline_cart where so_no in (select so_id from offline_order where status = 0);"];
|
|
|
[iSalesDB execSql:@"delete from offline_order where status=0;"];
|
|
[iSalesDB execSql:@"delete from offline_order where status=0;"];
|
|
|
appDelegate.disable_trigger=false;
|
|
appDelegate.disable_trigger=false;
|
|
|
//
|
|
//
|
|
@@ -3651,6 +3652,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
|
|
|
|
|
appDelegate.disable_trigger=true;
|
|
appDelegate.disable_trigger=true;
|
|
|
|
|
+ [iSalesDB execSql:@"delete from offline_cart where so_no in (select so_id from offline_order where status = 0);"];
|
|
|
[iSalesDB execSql:@"delete from offline_order where status=0;"];
|
|
[iSalesDB execSql:@"delete from offline_order where status=0;"];
|
|
|
appDelegate.disable_trigger=false;
|
|
appDelegate.disable_trigger=false;
|
|
|
|
|
|
|
@@ -3777,6 +3779,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
if(![appDelegate.order_code isEqualToString:orderCode]&& appDelegate.order_code.length!=0)
|
|
if(![appDelegate.order_code isEqualToString:orderCode]&& appDelegate.order_code.length!=0)
|
|
|
{
|
|
{
|
|
|
appDelegate.disable_trigger=true;
|
|
appDelegate.disable_trigger=true;
|
|
|
|
|
+ [iSalesDB execSql:@"delete from offline_cart where so_no in (select so_id from offline_order where status = 0);"];
|
|
|
[iSalesDB execSql:@"delete from offline_order where status=0;"];
|
|
[iSalesDB execSql:@"delete from offline_order where status=0;"];
|
|
|
appDelegate.disable_trigger=false;
|
|
appDelegate.disable_trigger=false;
|
|
|
}
|
|
}
|
|
@@ -5665,7 +5668,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
|
|
|
|
|
+ (NSDictionary *)offline_getPrice {
|
|
+ (NSDictionary *)offline_getPrice {
|
|
|
|
|
|
|
|
- NSString *sql = [NSString stringWithFormat:@"select _id,name,type,order_by from price;"];
|
|
|
|
|
|
|
+ NSString *sql = [NSString stringWithFormat:@"select _id,name,type,order_by from price where is_show = 1;"];
|
|
|
|
|
|
|
|
NSMutableDictionary *ret = [[iSalesDB jk_query:sql completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
|
|
NSMutableDictionary *ret = [[iSalesDB jk_query:sql completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
|
|
|
|
|
|
|
@@ -5698,7 +5701,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ (NSDictionary *)offline_getContactTypeChecked:(NSString *)type {
|
|
+ (NSDictionary *)offline_getContactTypeChecked:(NSString *)type {
|
|
|
- NSString *sql = @"select _id,type_name from contact_type";
|
|
|
|
|
|
|
+ NSString *sql = @"select _id,type_name from contact_type where is_show = 1";
|
|
|
__block NSMutableDictionary *ret = [NSMutableDictionary dictionary];
|
|
__block NSMutableDictionary *ret = [NSMutableDictionary dictionary];
|
|
|
[ret setValue:[NSNumber numberWithInt:0] forKey:@"count"];
|
|
[ret setValue:[NSNumber numberWithInt:0] forKey:@"count"];
|
|
|
|
|
|
|
@@ -11329,6 +11332,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
|
|
|
|
|
appDelegate.disable_trigger=true;
|
|
appDelegate.disable_trigger=true;
|
|
|
|
|
+ [iSalesDB execSql:@"delete from offline_cart where so_no in (select so_id from offline_order where status = 0);"];
|
|
|
[iSalesDB execSql:@"delete from offline_order where status=0;"];
|
|
[iSalesDB execSql:@"delete from offline_order where status=0;"];
|
|
|
appDelegate.disable_trigger=false;
|
|
appDelegate.disable_trigger=false;
|
|
|
|
|
|