Просмотр исходного кода

修复place order 编辑联系人信息后,再次查询依旧没更改的情况(查询直接查询的contact,没查询order)

Pen Li 9 лет назад
Родитель
Сommit
900832f9b4

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 5 - 5
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -6348,7 +6348,7 @@
 //    password = 123456;
 //    password = 123456;
 //    user = EvanK;
 //    user = EvanK;
     
     
-    NSString *sql = [NSString stringWithFormat:@"update offline_order set general_notes = '%@' where so_id = '%@';",[self valueInParams:params key:@"comments"],[self valueInParams:params key:@"orderCode"]];
+    NSString *sql = [NSString stringWithFormat:@"update offline_order set general_notes = '%@' where so_id = '%@';",[self valueInParams:params key:@"comments" translateSingleQuote:YES],[self valueInParams:params key:@"orderCode" translateSingleQuote:YES]];
     int ret = [iSalesDB execSql:sql];
     int ret = [iSalesDB execSql:sql];
     
     
     NSMutableDictionary *dic = [NSMutableDictionary dictionary];
     NSMutableDictionary *dic = [NSMutableDictionary dictionary];
@@ -6544,7 +6544,7 @@
     
     
     __block NSMutableDictionary *customer_dic = [NSMutableDictionary dictionary];
     __block NSMutableDictionary *customer_dic = [NSMutableDictionary dictionary];
     
     
-    NSString *customerSql = [NSString stringWithFormat:@"select c.contact_id,c.img_0,c.img_1,c.img_2,decrypt(c.company_name),decrypt(c.addr_1),c.addr_2,c.addr_3,c.addr_4,c.first_name,c.last_name,c.email,decrypt(c.phone),c.fax,c.zipcode,c.city,c.state,c.country from offline_contact as c join offline_order as o on c.contact_id = o.customer_cid where o.so_id = '%@';",orderCode];
+    NSString *customerSql = [NSString stringWithFormat:@"select c.contact_id,c.img_0,c.img_1,c.img_2,decrypt(c.company_name),decrypt(c.addr_1),c.addr_2,c.addr_3,c.addr_4,c.first_name,c.last_name,o.customer_email,o.customer_phone,o.customer_fax,c.zipcode,c.city,c.state,c.country,o.customer_contact from offline_contact as c join offline_order as o on c.contact_id = o.customer_cid where o.so_id = '%@';",orderCode];
     [iSalesDB jk_query:customerSql db:db close:NO completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
     [iSalesDB jk_query:customerSql db:db close:NO completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
         
         
         NSString *contact_id = [self textAtColumn:0 statement:stmt];
         NSString *contact_id = [self textAtColumn:0 statement:stmt];
@@ -6556,8 +6556,8 @@
         NSString *addr2 = [self textAtColumn:6 statement:stmt];
         NSString *addr2 = [self textAtColumn:6 statement:stmt];
         NSString *addr3 = [self textAtColumn:7 statement:stmt];
         NSString *addr3 = [self textAtColumn:7 statement:stmt];
         NSString *addr4 = [self textAtColumn:8 statement:stmt];
         NSString *addr4 = [self textAtColumn:8 statement:stmt];
-        NSString *first_name = [self textAtColumn:9 statement:stmt];
-        NSString *last_name = [self textAtColumn:10 statement:stmt];
+//        NSString *first_name = [self textAtColumn:9 statement:stmt];
+//        NSString *last_name = [self textAtColumn:10 statement:stmt];
         NSString *email = [self textAtColumn:11 statement:stmt];
         NSString *email = [self textAtColumn:11 statement:stmt];
         NSString *phone = [self textAtColumn:12 statement:stmt];
         NSString *phone = [self textAtColumn:12 statement:stmt];
         NSString *fax = [self textAtColumn:13 statement:stmt];
         NSString *fax = [self textAtColumn:13 statement:stmt];
@@ -6566,7 +6566,7 @@
         NSString *state = [self textAtColumn:16 statement:stmt];
         NSString *state = [self textAtColumn:16 statement:stmt];
         NSString *country = [self textAtColumn:17 statement:stmt];
         NSString *country = [self textAtColumn:17 statement:stmt];
         
         
-        NSString *name = [first_name stringByAppendingFormat:@" %@",last_name];
+        NSString *name = [self textAtColumn:18 statement:stmt];
         
         
         // contact id
         // contact id
         NSMutableDictionary *contact_id_dic = [NSMutableDictionary dictionary];
         NSMutableDictionary *contact_id_dic = [NSMutableDictionary dictionary];

+ 4 - 4
RedAnt ERP Mobile/iSales-NPD/Base.lproj/OLM.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15C50" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
     <dependencies>
     <dependencies>
         <deployment identifier="iOS"/>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
@@ -199,7 +199,7 @@
                                         <rect key="frame" x="0.0" y="28" width="768" height="44"/>
                                         <rect key="frame" x="0.0" y="28" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XXr-fU-67o" id="Ohn-hG-mj9">
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XXr-fU-67o" id="Ohn-hG-mj9">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="AIn-eK-sCn">
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="AIn-eK-sCn">
@@ -227,7 +227,7 @@
                             </tableView>
                             </tableView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="NKA-5N-u0m">
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="NKA-5N-u0m">
                                 <rect key="frame" x="654" y="974" width="81" height="30"/>
                                 <rect key="frame" x="654" y="974" width="81" height="30"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                                 <state key="normal" title="Button"/>
                                 <state key="normal" title="Button"/>
                             </button>
                             </button>
                         </subviews>
                         </subviews>
@@ -236,7 +236,7 @@
                 </viewController>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="krm-rW-vWy" userLabel="First Responder" sceneMemberID="firstResponder"/>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="krm-rW-vWy" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
             </objects>
-            <point key="canvasLocation" x="2903" y="794"/>
+            <point key="canvasLocation" x="2762" y="754"/>
         </scene>
         </scene>
     </scenes>
     </scenes>
 </document>
 </document>