|
|
@@ -8777,8 +8777,13 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
NSArray *order_status_array = [orderStatus componentsSeparatedByString:@","];
|
|
|
if (order_status_array.count == 1) {
|
|
|
int status_value = [[order_status_array firstObject] integerValue];
|
|
|
- if (status_value <= 1 || status_value == 3) {
|
|
|
- where = [where stringByAppendingString:[NSString stringWithFormat:@" and o.status = %d",status_value]];
|
|
|
+ if (status_value <= 1 || status_value == 3 || status_value == 15) {
|
|
|
+
|
|
|
+ if (status_value == 15 || status_value == 3) {
|
|
|
+ where = [where stringByAppendingString:[NSString stringWithFormat:@" and (o.status = 3 or o.erpOrderStatus = 15)"]];
|
|
|
+ } else {
|
|
|
+ where = [where stringByAppendingString:[NSString stringWithFormat:@" and o.status = %d",status_value]];
|
|
|
+ }
|
|
|
} else {
|
|
|
where = [where stringByAppendingString:[NSString stringWithFormat:@" and o.erpOrderStatus = %d",status_value]];
|
|
|
}
|
|
|
@@ -8794,8 +8799,13 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
|
|
|
// where = [where stringByAppendingString:[NSString stringWithFormat:@"%@ o.status = %@",condition,status]];
|
|
|
|
|
|
int status_value = [status integerValue];
|
|
|
- if (status_value <= 1 || status_value == 3) {
|
|
|
- where = [where stringByAppendingString:[NSString stringWithFormat:@"%@ o.status = %d",condition,status_value]];
|
|
|
+ if (status_value <= 1 || status_value == 3 || status_value == 15) {
|
|
|
+
|
|
|
+ if (status_value == 15 || status_value == 3) {
|
|
|
+ where = [where stringByAppendingString:[NSString stringWithFormat:@" %@ (o.status = 3 or o.erpOrderStatus = 15)",condition]];
|
|
|
+ } else {
|
|
|
+ where = [where stringByAppendingString:[NSString stringWithFormat:@"%@ o.status = %d",condition,status_value]];
|
|
|
+ }
|
|
|
} else {
|
|
|
where = [where stringByAppendingString:[NSString stringWithFormat:@" %@ o.erpOrderStatus = %d",condition,status_value]];
|
|
|
}
|