|
|
@@ -10420,7 +10420,7 @@
|
|
|
|
|
|
NSString *prodct_ids = [params objectForKey:@"product_id"];
|
|
|
// NSString *user = [params objectForKey:@"user"];
|
|
|
- NSString *sql = [NSString stringWithFormat:@"insert into offline_portfolio (product_id,name,description,item_id) select * from (select p.product_id,p.name,p.description,p.item_id from product as p where p.product_id in (%@));",prodct_ids];
|
|
|
+ NSString *sql = [NSString stringWithFormat:@"insert into offline_portfolio (product_id,name,description,item_id) select * from (select p.product_id,p.name,p.description,p.item_id from product as p where p.product_id in (%@) and (select count(0) from offline_portfolio where product_id in (%@) and (is_delete is null or is_delete = 0)) = 0);",prodct_ids,prodct_ids];
|
|
|
|
|
|
int result = [iSalesDB execSql:sql];
|
|
|
|
|
|
@@ -10782,7 +10782,7 @@
|
|
|
} else {
|
|
|
[item setValue:[NSNumber numberWithDouble:percent] forKey:@"percent"];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
[item setValue:[NSNumber numberWithDouble:price] forKey:@"sheet_price"];
|
|
|
[item setValue:[NSNumber numberWithDouble:discount] forKey:@"sheet_discount"];
|
|
|
|