|
@@ -426,7 +426,7 @@
|
|
|
|
|
|
|
|
int status_code = [[self.content_data valueForKey:@"orderStatus"] intValue];
|
|
int status_code = [[self.content_data valueForKey:@"orderStatus"] intValue];
|
|
|
NSString* alertthreetitle=@"Without Thumbnails";
|
|
NSString* alertthreetitle=@"Without Thumbnails";
|
|
|
- if(appDelegate.user_type==USER_ROLE_CUSTOMER&& (status_code==1 ||status_code==0))
|
|
|
|
|
|
|
+ if(appDelegate.user_type==USER_ROLE_CUSTOMER&&self.is_shoporder&& (status_code==1 /*||status_code==0*/||status_code==30))
|
|
|
{
|
|
{
|
|
|
alertthreetitle=@"Print Receipt";
|
|
alertthreetitle=@"Print Receipt";
|
|
|
}
|
|
}
|
|
@@ -470,7 +470,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- if(appDelegate.user_type==USER_ROLE_CUSTOMER&& (status_code==1 ||status_code==0))//[status isEqualToString:@"Saved Order"])
|
|
|
|
|
|
|
+ if(appDelegate.user_type==USER_ROLE_CUSTOMER&&self.is_shoporder&& (status_code==1 /*||status_code==0*/||status_code==30))//[status isEqualToString:@"Saved Order"])
|
|
|
{
|
|
{
|
|
|
[alertControl addAction:alertthree];
|
|
[alertControl addAction:alertthree];
|
|
|
[alertControl addAction:alertCancel];
|
|
[alertControl addAction:alertCancel];
|
|
@@ -926,15 +926,33 @@
|
|
|
self.btnCopy.enabled = false;
|
|
self.btnCopy.enabled = false;
|
|
|
else
|
|
else
|
|
|
self.btnCopy.enabled = true;
|
|
self.btnCopy.enabled = true;
|
|
|
-
|
|
|
|
|
|
|
+ int status_code = [[self.content_data valueForKey:@"orderStatus"] intValue];
|
|
|
AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
int model_count =[[self.content_data valueForKey:@"model_count"] intValue];
|
|
int model_count =[[self.content_data valueForKey:@"model_count"] intValue];
|
|
|
- if(model_count>0/*&& ! appDelegate.offline_mode*/)
|
|
|
|
|
- self.btnPDF.enabled =true;
|
|
|
|
|
|
|
+ if(model_count>0)/*&& ! appDelegate.offline_mode*/
|
|
|
|
|
+ {
|
|
|
|
|
+ if(appDelegate.user_type== USER_ROLE_EMPLOYEE)
|
|
|
|
|
+ self.btnPDF.enabled =true;
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ // || appDelegate.user_type==USER_ROLE_CUSTOMER
|
|
|
|
|
+ if(self.is_shoporder)
|
|
|
|
|
+ {
|
|
|
|
|
+ if(status_code==1||status_code==30)
|
|
|
|
|
+ self.btnPDF.enabled =true;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ if(status_code==2)
|
|
|
|
|
+ self.btnPDF.enabled =true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// [self.btnPDF setImage:[[UIImage imageNamed:@"download"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
|
// [self.btnPDF setImage:[[UIImage imageNamed:@"download"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
|
|
|
|
|
|
|
NSString* status = [self.content_data valueForKey:@"order_status"];
|
|
NSString* status = [self.content_data valueForKey:@"order_status"];
|
|
|
- int status_code = [[self.content_data valueForKey:@"orderStatus"] intValue];
|
|
|
|
|
|
|
+
|
|
|
NSString* lock_user = [self.content_data valueForKey:@"opened_customer"];
|
|
NSString* lock_user = [self.content_data valueForKey:@"opened_customer"];
|
|
|
|
|
|
|
|
bool offline_edit =[[self.content_data valueForKey:@"offline_edit"] boolValue];
|
|
bool offline_edit =[[self.content_data valueForKey:@"offline_edit"] boolValue];
|
|
@@ -973,7 +991,7 @@
|
|
|
// self.btnCommit.enabled =false;
|
|
// self.btnCommit.enabled =false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if([lock_user isEqualToString:appDelegate.user])
|
|
|
|
|
|
|
+ if([lock_user isEqualToString:appDelegate.user]&& (status_code==1||status_code==0))
|
|
|
{
|
|
{
|
|
|
// [self.btnRelease setImage:[[UIImage imageNamed:@"order"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
|
// [self.btnRelease setImage:[[UIImage imageNamed:@"order"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
|
|
|
|
|
|