|
@@ -607,9 +607,9 @@
|
|
|
if ([obj isKindOfClass:[NSDictionary class]]) {
|
|
if ([obj isKindOfClass:[NSDictionary class]]) {
|
|
|
|
|
|
|
|
NSDictionary *item_json = (NSDictionary *)obj;
|
|
NSDictionary *item_json = (NSDictionary *)obj;
|
|
|
- BOOL isAvailable = ![[item_json valueForKey:@"available"] isEqualToString:@"In Production"] || [[item_json valueForKey:@"available"] integerValue] != 0;
|
|
|
|
|
|
|
+ BOOL isAvailable = ![[item_json valueForKey:@"is_out_of_stock"] boolValue];
|
|
|
self.available = self.available && isAvailable;
|
|
self.available = self.available && isAvailable;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}];
|
|
}];
|
|
@@ -1525,7 +1525,7 @@
|
|
|
NSDictionary * combine_json =[item_json objectForKey:@"combine"];
|
|
NSDictionary * combine_json =[item_json objectForKey:@"combine"];
|
|
|
bool isfree = [[item_json valueForKey:@"is_free"]boolValue];
|
|
bool isfree = [[item_json valueForKey:@"is_free"]boolValue];
|
|
|
NSString* notes = [item_json valueForKey:@"note"];
|
|
NSString* notes = [item_json valueForKey:@"note"];
|
|
|
-
|
|
|
|
|
|
|
+ BOOL is_out_of_stock = [[item_json valueForKey:@"is_out_of_stock"] boolValue];
|
|
|
bool noprice =[[item_json valueForKey:@"is_no_price"]boolValue];
|
|
bool noprice =[[item_json valueForKey:@"is_no_price"]boolValue];
|
|
|
cell.noprice = noprice;
|
|
cell.noprice = noprice;
|
|
|
cell.enable_longpress = true;
|
|
cell.enable_longpress = true;
|
|
@@ -1554,6 +1554,16 @@
|
|
|
else
|
|
else
|
|
|
cell.labelNoSuchModel.hidden=true;
|
|
cell.labelNoSuchModel.hidden=true;
|
|
|
|
|
|
|
|
|
|
+ if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
|
|
|
|
|
+ if (!is_out_of_stock) {
|
|
|
|
|
+ cell.labelOutOfStock.hidden = YES;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ cell.labelOutOfStock.hidden = NO;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ cell.labelOutOfStock.hidden = YES;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// discount = 5.0;
|
|
// discount = 5.0;
|
|
|
cell.discount = discount;
|
|
cell.discount = discount;
|
|
|
|
|
|