|
@@ -1485,6 +1485,7 @@
|
|
|
NSMutableDictionary* orderitem = [NSMutableDictionary new];
|
|
NSMutableDictionary* orderitem = [NSMutableDictionary new];
|
|
|
orderitem[@"create_by"] = appDelegate.user;
|
|
orderitem[@"create_by"] = appDelegate.user;
|
|
|
orderitem[@"price"] = upparams[@"totalPrice"];
|
|
orderitem[@"price"] = upparams[@"totalPrice"];
|
|
|
|
|
+// NSString*
|
|
|
orderitem[@"customer_name"] = upparams[@"customer_contact"];
|
|
orderitem[@"customer_name"] = upparams[@"customer_contact"];
|
|
|
orderitem[@"purchase_time"] = [RAUtils current_date_time];
|
|
orderitem[@"purchase_time"] = [RAUtils current_date_time];
|
|
|
if(self.fail_submit)
|
|
if(self.fail_submit)
|
|
@@ -1492,7 +1493,15 @@
|
|
|
else
|
|
else
|
|
|
orderitem[@"order_status"] = @"Saved Order";
|
|
orderitem[@"order_status"] = @"Saved Order";
|
|
|
orderitem[@"order_code"] = appDelegate.order_code;
|
|
orderitem[@"order_code"] = appDelegate.order_code;
|
|
|
- orderitem[@"model_count"] =[ NSString stringWithFormat:@"%@",RASingleton.sharedInstance.scan_cart[@"section_0"][@"count"] ];
|
|
|
|
|
|
|
+ NSMutableDictionary* section =RASingleton.sharedInstance.scan_cart[@"section_0"];
|
|
|
|
|
+ int order_qty=0;
|
|
|
|
|
+ for(int c=0;c<[section[@"count"] intValue];c++)
|
|
|
|
|
+ {
|
|
|
|
|
+ NSDictionary* item = section[[NSString stringWithFormat:@"item_%d",c]];
|
|
|
|
|
+ order_qty+=[item[@"count"] intValue];
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ orderitem[@"model_count"] =[ NSString stringWithFormat:@"%d",order_qty];//RASingleton.sharedInstance.scan_cart[@"section_0"][@"count"] ];
|
|
|
|
|
|
|
|
|
|
|
|
|
int count = [orderlist[@"count"] intValue];
|
|
int count = [orderlist[@"count"] intValue];
|
|
@@ -1550,7 +1559,7 @@
|
|
|
|
|
|
|
|
[self scanSave:upparams];
|
|
[self scanSave:upparams];
|
|
|
|
|
|
|
|
- [RAUtils message_alert:@"Save Successful" title:@"Message" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
|
|
+ [RAUtils message_alert:@"Save Successfully" title:@"Message" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
|
|
|
[self.navigationController popViewControllerAnimated:true];
|
|
[self.navigationController popViewControllerAnimated:true];
|
|
|
} completion:nil];
|
|
} completion:nil];
|
|
|
return;
|
|
return;
|
|
@@ -3547,7 +3556,9 @@
|
|
|
self.content_data_download[@"readonly"]=@1;
|
|
self.content_data_download[@"readonly"]=@1;
|
|
|
}
|
|
}
|
|
|
[self scanSave:upparams];
|
|
[self scanSave:upparams];
|
|
|
- NSString* company = upparams[@"customer_name"];
|
|
|
|
|
|
|
+ NSString* company = upparams[@"customer_cid"];
|
|
|
|
|
+ if(company.length==0)
|
|
|
|
|
+ company = upparams[@"customer_name"];
|
|
|
[OLDataProvider save2submitScanOrder:soid company:company];
|
|
[OLDataProvider save2submitScanOrder:soid company:company];
|
|
|
[appDelegate closeOrder];
|
|
[appDelegate closeOrder];
|
|
|
RASingleton.sharedInstance.scan_cart = nil;
|
|
RASingleton.sharedInstance.scan_cart = nil;
|