|
@@ -1112,15 +1112,18 @@
|
|
|
NSString * shortname = arrsn[0];
|
|
NSString * shortname = arrsn[0];
|
|
|
if(shortname.length==0)
|
|
if(shortname.length==0)
|
|
|
shortname = servername;
|
|
shortname = servername;
|
|
|
|
|
+
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+
|
|
|
switch(RASingleton.sharedInstance.price_type)
|
|
switch(RASingleton.sharedInstance.price_type)
|
|
|
{
|
|
{
|
|
|
case 0:
|
|
case 0:
|
|
|
// pricename =[NSString stringWithFormat:@"%@_DDP",shortname];
|
|
// pricename =[NSString stringWithFormat:@"%@_DDP",shortname];
|
|
|
- pricename = @"DDP";
|
|
|
|
|
|
|
+ pricename = appDelegate.price0_name;;
|
|
|
break;;
|
|
break;;
|
|
|
case 1:
|
|
case 1:
|
|
|
// pricename = [NSString stringWithFormat:@"%@_WHSE",shortname];;
|
|
// pricename = [NSString stringWithFormat:@"%@_WHSE",shortname];;
|
|
|
- pricename=@"WHSE";
|
|
|
|
|
|
|
+ pricename=appDelegate.price1_name;//@"WHSE";
|
|
|
break;;
|
|
break;;
|
|
|
// case 2: pricename = @"25%";
|
|
// case 2: pricename = @"25%";
|
|
|
// break;
|
|
// break;
|
|
@@ -1630,6 +1633,9 @@
|
|
|
}
|
|
}
|
|
|
- (IBAction)onChangePrice:(id)sender {
|
|
- (IBAction)onChangePrice:(id)sender {
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+
|
|
|
if(RASingleton.sharedInstance.scan_cart ==nil)
|
|
if(RASingleton.sharedInstance.scan_cart ==nil)
|
|
|
{
|
|
{
|
|
|
// NSData* json =[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:URL_SO_CART ofType:@"json" ]];
|
|
// NSData* json =[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:URL_SO_CART ofType:@"json" ]];
|
|
@@ -1638,10 +1644,10 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:@"Change Price Type" message:nil preferredStyle:UIAlertControllerStyleAlert];
|
|
UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:@"Change Price Type" message:nil preferredStyle:UIAlertControllerStyleAlert];
|
|
|
- UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"DDP" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
|
|
|
|
|
|
+ UIAlertAction *action1 = [UIAlertAction actionWithTitle:appDelegate.price0_name style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
|
|
|
|
|
|
|
// self.btnPrice.titleLabel.text = @"FOB CTNR";
|
|
// self.btnPrice.titleLabel.text = @"FOB CTNR";
|
|
|
- [self.btnPrice setTitle: @"DDP" forState:UIControlStateNormal];
|
|
|
|
|
|
|
+ [self.btnPrice setTitle: appDelegate.price0_name forState:UIControlStateNormal];
|
|
|
RASingleton.sharedInstance.price_type=0;
|
|
RASingleton.sharedInstance.price_type=0;
|
|
|
NSMutableDictionary* section = [RASingleton.sharedInstance.scan_cart[@"section_0"] mutableCopy];
|
|
NSMutableDictionary* section = [RASingleton.sharedInstance.scan_cart[@"section_0"] mutableCopy];
|
|
|
int count = [section[@"count"] intValue];
|
|
int count = [section[@"count"] intValue];
|
|
@@ -1661,9 +1667,9 @@
|
|
|
[self.view addSubview:self.cartIndicatorBar];
|
|
[self.view addSubview:self.cartIndicatorBar];
|
|
|
[self reload_data];
|
|
[self reload_data];
|
|
|
}];
|
|
}];
|
|
|
- UIAlertAction *action2 = [UIAlertAction actionWithTitle:@"WHSE" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
|
|
|
|
|
|
+ UIAlertAction *action2 = [UIAlertAction actionWithTitle:appDelegate.price1_name style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
|
|
|
|
|
|
|
- [self.btnPrice setTitle: @"WHSE" forState:UIControlStateNormal];
|
|
|
|
|
|
|
+ [self.btnPrice setTitle: appDelegate.price1_name forState:UIControlStateNormal];
|
|
|
RASingleton.sharedInstance.price_type=1;
|
|
RASingleton.sharedInstance.price_type=1;
|
|
|
NSMutableDictionary* section = [RASingleton.sharedInstance.scan_cart[@"section_0"] mutableCopy];
|
|
NSMutableDictionary* section = [RASingleton.sharedInstance.scan_cart[@"section_0"] mutableCopy];
|
|
|
int count = [section[@"count"] intValue];
|
|
int count = [section[@"count"] intValue];
|
|
@@ -2830,11 +2836,13 @@
|
|
|
NSString * shortname = arrsn[0];
|
|
NSString * shortname = arrsn[0];
|
|
|
if(shortname.length==0)
|
|
if(shortname.length==0)
|
|
|
shortname = servername;
|
|
shortname = servername;
|
|
|
|
|
+
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
switch(RASingleton.sharedInstance.price_type )
|
|
switch(RASingleton.sharedInstance.price_type )
|
|
|
{
|
|
{
|
|
|
- case 0: pricename =@"DDP";//[NSString stringWithFormat:@"%@_DDP",shortname];
|
|
|
|
|
|
|
+ case 0: pricename =appDelegate.price0_name;//@"DDP";//[NSString stringWithFormat:@"%@_DDP",shortname];
|
|
|
break;;
|
|
break;;
|
|
|
- case 1: pricename = @"WHSE";//[NSString stringWithFormat:@"%@_WHSE",shortname];;
|
|
|
|
|
|
|
+ case 1: pricename =appDelegate.price1_name;//@"WHSE";//[NSString stringWithFormat:@"%@_WHSE",shortname];;
|
|
|
break;;
|
|
break;;
|
|
|
// case 2: pricename = @"25%";
|
|
// case 2: pricename = @"25%";
|
|
|
// break;
|
|
// break;
|
|
@@ -2947,7 +2955,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
#else
|
|
|
- AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
|
|
+// AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
[OLDataProvider updateScanOrder:appDelegate.order_code];
|
|
[OLDataProvider updateScanOrder:appDelegate.order_code];
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|