Kaynağa Gözat

hmlg scan order 1.17, 修复bug,修改购物车价格显示。

Ray Zhang 3 yıl önce
ebeveyn
işleme
781d102d85
30 değiştirilmiş dosya ile 811 ekleme ve 239 silme
  1. 2 2
      RedAnt ERP Mobile/HMLG Scan Order.xcodeproj/project.pbxproj
  2. 1 1
      RedAnt ERP Mobile/HMLG Scan Order.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcschemes/xcschememanagement.plist
  3. 0 2
      RedAnt ERP Mobile/HMLG Scan Order/HMLG Scan Order-Info.plist
  4. 46 42
      RedAnt ERP Mobile/HMLG Scan Order/SO.storyboard
  5. 3 0
      RedAnt ERP Mobile/HMLG Scan Order/ServerSettingViewController.m
  6. 2 1
      RedAnt ERP Mobile/HMLG Scan Order/config.h
  7. 2 2
      RedAnt ERP Mobile/common/AppDelegateBase.m
  8. 142 56
      RedAnt ERP Mobile/common/ERP_Mobile_Cart.storyboard
  9. 1 0
      RedAnt ERP Mobile/common/Functions/cart/CartViewController.h
  10. 195 4
      RedAnt ERP Mobile/common/Functions/cart/CartViewController.m
  11. 19 0
      RedAnt ERP Mobile/common/Functions/cart/OrderDiscountViewController.h
  12. 68 0
      RedAnt ERP Mobile/common/Functions/cart/OrderDiscountViewController.m
  13. 1 1
      RedAnt ERP Mobile/common/Functions/category/CategorySearchFilterViewController.m
  14. 6 1
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m
  15. 7 1
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m
  16. 3 1
      RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.h
  17. 130 5
      RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m
  18. 1 1
      RedAnt ERP Mobile/common/Functions/offline/OfflineSettingViewController.m
  19. 1 1
      RedAnt ERP Mobile/common/Functions/offline/SyncControlPanelViewController.m
  20. 7 2
      RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m
  21. 91 78
      RedAnt ERP Mobile/common/data_provider/RADataProvider.m
  22. 1 1
      RedAnt ERP Mobile/common/data_provider/RANetwork.h
  23. 42 0
      RedAnt ERP Mobile/common/data_provider/RANetwork.m
  24. 2 2
      RedAnt ERP Mobile/common/data_provider/iSalesDB.m
  25. 10 4
      RedAnt ERP Mobile/iSales-CONTRAST.xcodeproj/project.pbxproj
  26. 1 1
      RedAnt ERP Mobile/iSales-CONTRAST.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcschemes/xcschememanagement.plist
  27. 10 5
      RedAnt ERP Mobile/iSales-CONTRAST/config.h
  28. 0 4
      RedAnt ERP Mobile/iSales-CONTRAST/iSales-CONTRAST-Info.plist
  29. 17 17
      RedAnt ERP Mobile/iSales-NPD/Base.lproj/OLM.storyboard
  30. 0 4
      RedAnt ERP Mobile/iSales-USAI/iSales-USAI-Info.plist

+ 2 - 2
RedAnt ERP Mobile/HMLG Scan Order.xcodeproj/project.pbxproj

@@ -2734,7 +2734,7 @@
 					"$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib",
 					"$(PROJECT_DIR)/GoogleAnalytics/GoogleAnalytics/Libraries",
 				);
-				MARKETING_VERSION = 1.16;
+				MARKETING_VERSION = 1.17;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -2778,7 +2778,7 @@
 					"$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib",
 					"$(PROJECT_DIR)/GoogleAnalytics/GoogleAnalytics/Libraries",
 				);
-				MARKETING_VERSION = 1.16;
+				MARKETING_VERSION = 1.17;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",

+ 1 - 1
RedAnt ERP Mobile/HMLG Scan Order.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -7,7 +7,7 @@
 		<key>HMLG Scan Order.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>6</integer>
+			<integer>1</integer>
 		</dict>
 	</dict>
 </dict>

+ 0 - 2
RedAnt ERP Mobile/HMLG Scan Order/HMLG Scan Order-Info.plist

@@ -52,8 +52,6 @@
 	</array>
 	<key>UIRequiresFullScreen</key>
 	<true/>
-	<key>UISupportedExternalAccessoryProtocols</key>
-	<array/>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>

+ 46 - 42
RedAnt ERP Mobile/HMLG Scan Order/SO.storyboard

@@ -455,19 +455,13 @@
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Available:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DCw-ex-OTc" userLabel="available">
-                                                    <rect key="frame" x="581" y="44.5" width="72" height="21"/>
+                                                    <rect key="frame" x="581" y="49" width="72" height="21"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Now" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JnV-5P-IrG" userLabel="item label">
-                                                    <rect key="frame" x="663" y="44.5" width="35" height="21"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Description" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZgQ-DK-Xnp" userLabel="description">
-                                                    <rect key="frame" x="96.5" y="13" width="87.5" height="21"/>
+                                                    <rect key="frame" x="663" y="49" width="35" height="21"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
@@ -705,7 +699,7 @@
                                                     </userDefinedRuntimeAttributes>
                                                 </label>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qoy-vW-xRS">
-                                                    <rect key="frame" x="603" y="8" width="96" height="31"/>
+                                                    <rect key="frame" x="603" y="3" width="96" height="41"/>
                                                     <state key="normal" title="Button"/>
                                                     <buttonConfiguration key="configuration" style="plain" title="Add to cart"/>
                                                     <connections>
@@ -713,7 +707,7 @@
                                                     </connections>
                                                 </button>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="42.8 x 68.3 x 30.5H" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qAW-4E-Lac" userLabel="item label">
-                                                    <rect key="frame" x="16" y="46" width="135" height="18"/>
+                                                    <rect key="frame" x="86.5" y="14.5" width="135" height="18"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
@@ -733,20 +727,28 @@
                                                         <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
                                                     </userDefinedRuntimeAttributes>
                                                 </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Description" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZgQ-DK-Xnp" userLabel="description">
+                                                    <rect key="frame" x="16" y="49" width="682" height="21"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
                                             </subviews>
                                             <constraints>
                                                 <constraint firstAttribute="trailing" secondItem="qoy-vW-xRS" secondAttribute="trailing" constant="15" id="0N9-nj-8aK"/>
                                                 <constraint firstItem="Pyr-9z-nFr" firstAttribute="height" secondItem="ybo-Ex-ZSL" secondAttribute="height" id="219-Ca-b6P"/>
-                                                <constraint firstItem="DCw-ex-OTc" firstAttribute="centerY" secondItem="qAW-4E-Lac" secondAttribute="centerY" id="2fs-rP-a5v"/>
+                                                <constraint firstItem="DCw-ex-OTc" firstAttribute="centerY" secondItem="ZgQ-DK-Xnp" secondAttribute="centerY" id="5Uo-Nq-UML"/>
                                                 <constraint firstItem="bh0-td-ws6" firstAttribute="centerY" secondItem="ybo-Ex-ZSL" secondAttribute="centerY" id="5et-e0-MeZ"/>
                                                 <constraint firstAttribute="trailing" secondItem="Gl3-BN-9JK" secondAttribute="trailing" constant="16" id="6AC-6C-oeu"/>
                                                 <constraint firstItem="kwx-rV-AXC" firstAttribute="height" secondItem="ybo-Ex-ZSL" secondAttribute="height" id="6Qe-jE-RMu"/>
+                                                <constraint firstItem="ZgQ-DK-Xnp" firstAttribute="top" secondItem="qoy-vW-xRS" secondAttribute="bottom" constant="5" id="7kG-TP-8Np"/>
                                                 <constraint firstItem="JzP-1G-jcR" firstAttribute="top" secondItem="7Cf-ao-6dF" secondAttribute="top" id="8bg-Kk-zh5"/>
                                                 <constraint firstItem="xLb-sH-DDc" firstAttribute="top" secondItem="7Cf-ao-6dF" secondAttribute="top" id="9bF-pH-ksg"/>
                                                 <constraint firstItem="826-Bv-Afw" firstAttribute="height" secondItem="7Cf-ao-6dF" secondAttribute="height" id="9qz-Yc-L2Z"/>
                                                 <constraint firstItem="Pyr-9z-nFr" firstAttribute="leading" secondItem="2me-vx-6M3" secondAttribute="trailing" id="AIo-VQ-V3O"/>
                                                 <constraint firstItem="7Cf-ao-6dF" firstAttribute="leading" secondItem="ybo-Ex-ZSL" secondAttribute="leading" id="AoJ-Zy-W7D"/>
                                                 <constraint firstItem="w8x-0O-3TJ" firstAttribute="leading" secondItem="exp-Hy-y0g" secondAttribute="leading" constant="16" id="B28-7a-ruA"/>
+                                                <constraint firstItem="ZgQ-DK-Xnp" firstAttribute="leading" secondItem="w8x-0O-3TJ" secondAttribute="leading" id="B2X-Bf-Ii7"/>
                                                 <constraint firstItem="bh0-td-ws6" firstAttribute="width" secondItem="ybo-Ex-ZSL" secondAttribute="width" id="BDi-wY-Vut"/>
                                                 <constraint firstItem="kwx-rV-AXC" firstAttribute="centerY" secondItem="ybo-Ex-ZSL" secondAttribute="centerY" id="Ckk-QY-rUP"/>
                                                 <constraint firstItem="fkA-kv-8ja" firstAttribute="height" secondItem="7Cf-ao-6dF" secondAttribute="height" id="D3d-Es-XFH"/>
@@ -754,17 +756,16 @@
                                                 <constraint firstItem="fkA-kv-8ja" firstAttribute="top" secondItem="7Cf-ao-6dF" secondAttribute="top" id="Dj0-7l-Aj0"/>
                                                 <constraint firstItem="JzP-1G-jcR" firstAttribute="height" secondItem="7Cf-ao-6dF" secondAttribute="height" id="GY6-5v-Q2P"/>
                                                 <constraint firstItem="Snb-I4-W0D" firstAttribute="top" secondItem="7Cf-ao-6dF" secondAttribute="top" id="HCe-fu-Evg"/>
+                                                <constraint firstAttribute="bottom" secondItem="7Cf-ao-6dF" secondAttribute="bottom" constant="8" id="HdA-8V-nBR"/>
                                                 <constraint firstItem="xvy-YB-tpU" firstAttribute="width" secondItem="ybo-Ex-ZSL" secondAttribute="width" id="HfW-xg-Nit"/>
                                                 <constraint firstItem="JnV-5P-IrG" firstAttribute="leading" secondItem="DCw-ex-OTc" secondAttribute="trailing" constant="10" id="ILQ-lC-jca"/>
                                                 <constraint firstItem="826-Bv-Afw" firstAttribute="leading" secondItem="7Cf-ao-6dF" secondAttribute="trailing" id="IZM-5W-Tbf"/>
                                                 <constraint firstItem="w2F-g1-5dN" firstAttribute="leading" secondItem="kwx-rV-AXC" secondAttribute="trailing" id="IhS-Fq-qrb"/>
                                                 <constraint firstItem="e4y-a4-rZx" firstAttribute="top" secondItem="7Cf-ao-6dF" secondAttribute="top" id="JL4-5N-wB4"/>
-                                                <constraint firstItem="qAW-4E-Lac" firstAttribute="top" secondItem="w8x-0O-3TJ" secondAttribute="bottom" constant="12" id="JkU-ae-PBw"/>
                                                 <constraint firstItem="fkA-kv-8ja" firstAttribute="width" secondItem="7Cf-ao-6dF" secondAttribute="width" id="Lgf-eG-0mo"/>
                                                 <constraint firstAttribute="trailing" secondItem="JnV-5P-IrG" secondAttribute="trailing" constant="16" id="LhB-kg-pbC"/>
                                                 <constraint firstItem="Pyr-9z-nFr" firstAttribute="width" secondItem="ybo-Ex-ZSL" secondAttribute="width" id="Mcz-JL-fKe"/>
                                                 <constraint firstItem="xLb-sH-DDc" firstAttribute="width" secondItem="7Cf-ao-6dF" secondAttribute="width" id="N92-Iw-1dK"/>
-                                                <constraint firstItem="ZgQ-DK-Xnp" firstAttribute="leading" secondItem="w8x-0O-3TJ" secondAttribute="trailing" constant="30" id="RU5-Qm-JNk"/>
                                                 <constraint firstItem="826-Bv-Afw" firstAttribute="top" secondItem="7Cf-ao-6dF" secondAttribute="top" id="SMH-xM-Uii"/>
                                                 <constraint firstItem="Gl3-BN-9JK" firstAttribute="width" secondItem="7Cf-ao-6dF" secondAttribute="width" id="Sh5-s5-3HX"/>
                                                 <constraint firstItem="e4y-a4-rZx" firstAttribute="height" secondItem="7Cf-ao-6dF" secondAttribute="height" id="UEL-6b-SF9"/>
@@ -785,14 +786,13 @@
                                                 <constraint firstItem="xvy-YB-tpU" firstAttribute="leading" secondItem="ybo-Ex-ZSL" secondAttribute="trailing" id="cCH-iw-Sfi"/>
                                                 <constraint firstItem="kwx-rV-AXC" firstAttribute="width" secondItem="ybo-Ex-ZSL" secondAttribute="width" id="cEm-h4-PlR"/>
                                                 <constraint firstItem="7Cf-ao-6dF" firstAttribute="top" secondItem="ybo-Ex-ZSL" secondAttribute="bottom" id="d0L-nE-KbY"/>
-                                                <constraint firstItem="ybo-Ex-ZSL" firstAttribute="top" secondItem="qAW-4E-Lac" secondAttribute="bottom" constant="16" id="dM7-0R-kPL"/>
                                                 <constraint firstItem="fkA-kv-8ja" firstAttribute="leading" secondItem="Snb-I4-W0D" secondAttribute="trailing" id="ddJ-3i-Bpe"/>
                                                 <constraint firstItem="JzP-1G-jcR" firstAttribute="width" secondItem="7Cf-ao-6dF" secondAttribute="width" id="dhm-Lz-BqX"/>
                                                 <constraint firstItem="Pat-j4-mh1" firstAttribute="leading" secondItem="e4y-a4-rZx" secondAttribute="trailing" id="eN1-uK-BQ3"/>
                                                 <constraint firstItem="xLb-sH-DDc" firstAttribute="height" secondItem="7Cf-ao-6dF" secondAttribute="height" id="fSg-pP-x6w"/>
                                                 <constraint firstItem="xLb-sH-DDc" firstAttribute="leading" secondItem="826-Bv-Afw" secondAttribute="trailing" id="gWM-yd-wfK"/>
-                                                <constraint firstItem="qAW-4E-Lac" firstAttribute="leading" secondItem="w8x-0O-3TJ" secondAttribute="leading" id="gfH-7o-MrE"/>
                                                 <constraint firstItem="w2F-g1-5dN" firstAttribute="height" secondItem="ybo-Ex-ZSL" secondAttribute="height" id="gzf-dB-4kW"/>
+                                                <constraint firstItem="qAW-4E-Lac" firstAttribute="centerY" secondItem="w8x-0O-3TJ" secondAttribute="centerY" id="i1K-m7-fuH"/>
                                                 <constraint firstItem="Snb-I4-W0D" firstAttribute="width" secondItem="7Cf-ao-6dF" secondAttribute="width" id="j7b-J6-TX9"/>
                                                 <constraint firstItem="Snb-I4-W0D" firstAttribute="height" secondItem="7Cf-ao-6dF" secondAttribute="height" id="jGd-YU-YHw"/>
                                                 <constraint firstItem="w2F-g1-5dN" firstAttribute="width" secondItem="ybo-Ex-ZSL" secondAttribute="width" id="kbk-B2-LRl"/>
@@ -804,13 +804,15 @@
                                                 <constraint firstItem="w8x-0O-3TJ" firstAttribute="leading" secondItem="exp-Hy-y0g" secondAttribute="leadingMargin" id="phq-o6-o1E"/>
                                                 <constraint firstItem="Gl3-BN-9JK" firstAttribute="width" secondItem="ybo-Ex-ZSL" secondAttribute="width" id="qB1-Hj-fcM"/>
                                                 <constraint firstItem="ybo-Ex-ZSL" firstAttribute="leading" secondItem="exp-Hy-y0g" secondAttribute="leading" constant="16" id="qR7-bb-I9Y"/>
+                                                <constraint firstAttribute="trailing" secondItem="ZgQ-DK-Xnp" secondAttribute="trailing" constant="16" id="qd6-zU-HDS"/>
                                                 <constraint firstItem="w2F-g1-5dN" firstAttribute="centerY" secondItem="ybo-Ex-ZSL" secondAttribute="centerY" id="qyK-RA-Y2e"/>
                                                 <constraint firstItem="Snb-I4-W0D" firstAttribute="leading" secondItem="xLb-sH-DDc" secondAttribute="trailing" id="s1L-QR-DcJ"/>
-                                                <constraint firstItem="ZgQ-DK-Xnp" firstAttribute="centerY" secondItem="w8x-0O-3TJ" secondAttribute="centerY" id="sgU-mA-rUv"/>
+                                                <constraint firstItem="qAW-4E-Lac" firstAttribute="leading" secondItem="w8x-0O-3TJ" secondAttribute="trailing" constant="20" id="sro-cg-Ruk"/>
                                                 <constraint firstItem="Pat-j4-mh1" firstAttribute="height" secondItem="7Cf-ao-6dF" secondAttribute="height" id="tme-Ds-cUD"/>
                                                 <constraint firstItem="2me-vx-6M3" firstAttribute="centerY" secondItem="ybo-Ex-ZSL" secondAttribute="centerY" id="vhW-qI-JaW"/>
                                                 <constraint firstItem="JzP-1G-jcR" firstAttribute="leading" secondItem="fkA-kv-8ja" secondAttribute="trailing" id="wQb-My-Pz4"/>
                                                 <constraint firstItem="Gl3-BN-9JK" firstAttribute="height" secondItem="ybo-Ex-ZSL" secondAttribute="height" id="x0d-9d-JjT"/>
+                                                <constraint firstItem="bh0-td-ws6" firstAttribute="top" secondItem="ZgQ-DK-Xnp" secondAttribute="bottom" constant="10" id="xCs-Bc-QH0"/>
                                             </constraints>
                                         </tableViewCellContentView>
                                         <connections>
@@ -1136,12 +1138,6 @@
                                                         <action selector="stepChange:" destination="p2v-UD-wPL" eventType="valueChanged" id="dWZ-hh-P9l"/>
                                                     </connections>
                                                 </stepper>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Description" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DVA-Pi-NA3" userLabel="item label">
-                                                    <rect key="frame" x="76.5" y="13" width="87.5" height="21"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123.45" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ygm-0i-NY3" userLabel="item label">
                                                     <rect key="frame" x="16" y="102" width="85.5" height="24"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
@@ -1157,6 +1153,12 @@
                                                         <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
                                                     </userDefinedRuntimeAttributes>
                                                 </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="251" text="Description" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DVA-Pi-NA3" userLabel="item label">
+                                                    <rect key="frame" x="76.5" y="13" width="621.5" height="21"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
                                             </subviews>
                                             <constraints>
                                                 <constraint firstItem="dpT-CT-Ret" firstAttribute="height" secondItem="AK1-ap-AfF" secondAttribute="height" id="04f-dU-ROg"/>
@@ -1168,31 +1170,31 @@
                                                 <constraint firstItem="IEa-T1-E8F" firstAttribute="leading" secondItem="N3z-jY-g8U" secondAttribute="trailing" id="6ar-gD-UXA"/>
                                                 <constraint firstItem="vwr-od-ENo" firstAttribute="leading" secondItem="AK1-ap-AfF" secondAttribute="trailing" id="6vE-R8-Q9Z"/>
                                                 <constraint firstItem="6jj-I8-3Vs" firstAttribute="width" secondItem="ygm-0i-NY3" secondAttribute="width" id="7fw-v9-MDG"/>
+                                                <constraint firstItem="DVA-Pi-NA3" firstAttribute="leading" secondItem="Z2Y-LD-RFG" secondAttribute="trailing" constant="10" id="9UD-oQ-PLY"/>
                                                 <constraint firstItem="1kO-eZ-rr3" firstAttribute="centerY" secondItem="AK1-ap-AfF" secondAttribute="centerY" id="AzD-5f-CGX"/>
                                                 <constraint firstItem="Nnj-5b-sBF" firstAttribute="centerY" secondItem="2JG-Qa-LOy" secondAttribute="centerY" id="BCd-KL-Iio"/>
                                                 <constraint firstItem="ygm-0i-NY3" firstAttribute="height" secondItem="AK1-ap-AfF" secondAttribute="height" id="BNQ-XW-Kx6"/>
-                                                <constraint firstItem="DVA-Pi-NA3" firstAttribute="leading" secondItem="Z2Y-LD-RFG" secondAttribute="trailing" constant="10" id="BNx-tj-4Vc"/>
                                                 <constraint firstItem="uHg-xx-aR0" firstAttribute="centerY" secondItem="AK1-ap-AfF" secondAttribute="centerY" id="BP9-zJ-8Ua"/>
                                                 <constraint firstItem="4MP-XW-NEm" firstAttribute="width" secondItem="ygm-0i-NY3" secondAttribute="width" id="BVm-Cz-Dxe"/>
                                                 <constraint firstItem="2JG-Qa-LOy" firstAttribute="top" secondItem="Z2Y-LD-RFG" secondAttribute="bottom" constant="10" id="BYB-Ph-39R"/>
                                                 <constraint firstItem="dcE-Le-QMW" firstAttribute="height" secondItem="AK1-ap-AfF" secondAttribute="height" id="Be7-dQ-xAV"/>
                                                 <constraint firstAttribute="trailing" secondItem="4MP-XW-NEm" secondAttribute="trailing" constant="16" id="CW8-UG-ujQ"/>
                                                 <constraint firstItem="4MP-XW-NEm" firstAttribute="height" secondItem="AK1-ap-AfF" secondAttribute="height" id="EnZ-HX-tye"/>
+                                                <constraint firstAttribute="trailingMargin" secondItem="DVA-Pi-NA3" secondAttribute="trailing" priority="750" id="Gad-qL-6n4"/>
                                                 <constraint firstItem="Nnj-5b-sBF" firstAttribute="trailing" secondItem="Ajw-zF-nXf" secondAttribute="trailingMargin" id="HQH-Bw-1Rb"/>
                                                 <constraint firstItem="pMY-tU-GDI" firstAttribute="height" secondItem="AK1-ap-AfF" secondAttribute="height" id="Hae-sG-sj9"/>
                                                 <constraint firstItem="NfL-2K-HAE" firstAttribute="height" secondItem="ygm-0i-NY3" secondAttribute="height" id="Hhk-kU-xEg"/>
-                                                <constraint firstItem="2JG-Qa-LOy" firstAttribute="leading" secondItem="Z2Y-LD-RFG" secondAttribute="leading" id="IJk-55-4Zh"/>
                                                 <constraint firstItem="Mbc-CV-To1" firstAttribute="centerY" secondItem="ygm-0i-NY3" secondAttribute="centerY" id="Iod-6I-0YQ"/>
                                                 <constraint firstItem="dcE-Le-QMW" firstAttribute="width" secondItem="ygm-0i-NY3" secondAttribute="width" id="JyJ-18-O4p"/>
                                                 <constraint firstItem="vwr-od-ENo" firstAttribute="centerY" secondItem="AK1-ap-AfF" secondAttribute="centerY" id="LF2-9V-f02"/>
                                                 <constraint firstItem="dpT-CT-Ret" firstAttribute="centerY" secondItem="AK1-ap-AfF" secondAttribute="centerY" id="LUB-C9-aEV"/>
-                                                <constraint firstItem="2JG-Qa-LOy" firstAttribute="leading" secondItem="Z2Y-LD-RFG" secondAttribute="leading" id="NFm-Dj-Rd2"/>
                                                 <constraint firstItem="ygm-0i-NY3" firstAttribute="top" secondItem="AK1-ap-AfF" secondAttribute="bottom" id="Njq-Jy-icX"/>
                                                 <constraint firstItem="1kO-eZ-rr3" firstAttribute="width" secondItem="AK1-ap-AfF" secondAttribute="width" id="OLU-DB-cqj"/>
                                                 <constraint firstItem="gGf-Qb-Uc9" firstAttribute="leading" secondItem="oVz-hr-vFh" secondAttribute="trailing" constant="10" id="Ons-s6-Tr6"/>
                                                 <constraint firstItem="IEa-T1-E8F" firstAttribute="height" secondItem="ygm-0i-NY3" secondAttribute="height" id="QS4-jg-FTy"/>
                                                 <constraint firstItem="IEa-T1-E8F" firstAttribute="centerY" secondItem="ygm-0i-NY3" secondAttribute="centerY" id="RNH-TB-mMa"/>
                                                 <constraint firstItem="bVe-RI-TAM" firstAttribute="width" secondItem="AK1-ap-AfF" secondAttribute="width" id="Rf4-wO-9zn"/>
+                                                <constraint firstItem="2JG-Qa-LOy" firstAttribute="leading" secondItem="Z2Y-LD-RFG" secondAttribute="leading" id="S9c-qI-OXK"/>
                                                 <constraint firstItem="9hH-Br-ZKJ" firstAttribute="centerY" secondItem="AK1-ap-AfF" secondAttribute="centerY" id="Uxm-ni-sbR"/>
                                                 <constraint firstItem="vwr-od-ENo" firstAttribute="height" secondItem="AK1-ap-AfF" secondAttribute="height" id="UyU-FH-Q06"/>
                                                 <constraint firstItem="ygm-0i-NY3" firstAttribute="leading" secondItem="AK1-ap-AfF" secondAttribute="leading" id="V4p-9n-oLb"/>
@@ -1204,13 +1206,12 @@
                                                 <constraint firstItem="6jj-I8-3Vs" firstAttribute="leading" secondItem="IEa-T1-E8F" secondAttribute="trailing" id="YD2-WJ-wL4"/>
                                                 <constraint firstItem="IEa-T1-E8F" firstAttribute="width" secondItem="ygm-0i-NY3" secondAttribute="width" id="YOx-Yp-ZNh"/>
                                                 <constraint firstItem="bVe-RI-TAM" firstAttribute="centerY" secondItem="AK1-ap-AfF" secondAttribute="centerY" id="Zav-cy-CJ2"/>
+                                                <constraint firstItem="DVA-Pi-NA3" firstAttribute="centerY" secondItem="Z2Y-LD-RFG" secondAttribute="centerY" id="Zna-qC-4xh"/>
                                                 <constraint firstItem="1kO-eZ-rr3" firstAttribute="height" secondItem="AK1-ap-AfF" secondAttribute="height" id="aCz-0h-Qfg"/>
                                                 <constraint firstItem="IEa-T1-E8F" firstAttribute="height" secondItem="AK1-ap-AfF" secondAttribute="height" id="axG-6D-yld"/>
-                                                <constraint firstItem="Z2Y-LD-RFG" firstAttribute="leading" secondItem="Ajw-zF-nXf" secondAttribute="leading" constant="16" id="bWZ-3R-IKY"/>
                                                 <constraint firstItem="9hH-Br-ZKJ" firstAttribute="width" secondItem="AK1-ap-AfF" secondAttribute="width" id="cFb-2x-2cO"/>
                                                 <constraint firstItem="N3z-jY-g8U" firstAttribute="centerY" secondItem="ygm-0i-NY3" secondAttribute="centerY" id="cO5-zK-6cw"/>
                                                 <constraint firstItem="dcE-Le-QMW" firstAttribute="leading" secondItem="ygm-0i-NY3" secondAttribute="trailing" id="cab-cl-aar"/>
-                                                <constraint firstItem="DVA-Pi-NA3" firstAttribute="centerY" secondItem="Z2Y-LD-RFG" secondAttribute="centerY" id="cez-If-vG0"/>
                                                 <constraint firstItem="1kO-eZ-rr3" firstAttribute="leading" secondItem="9hH-Br-ZKJ" secondAttribute="trailing" id="ctc-qh-Aay"/>
                                                 <constraint firstItem="Mbc-CV-To1" firstAttribute="height" secondItem="ygm-0i-NY3" secondAttribute="height" id="cug-K3-UiG"/>
                                                 <constraint firstItem="dcE-Le-QMW" firstAttribute="centerY" secondItem="ygm-0i-NY3" secondAttribute="centerY" id="cxN-cp-q4H"/>
@@ -1223,6 +1224,7 @@
                                                 <constraint firstItem="vwr-od-ENo" firstAttribute="width" secondItem="AK1-ap-AfF" secondAttribute="width" id="kqA-mF-S4J"/>
                                                 <constraint firstItem="N3z-jY-g8U" firstAttribute="leading" secondItem="Mbc-CV-To1" secondAttribute="trailing" id="ldj-n7-udx"/>
                                                 <constraint firstItem="N3z-jY-g8U" firstAttribute="height" secondItem="ygm-0i-NY3" secondAttribute="height" id="lm9-hK-V9h"/>
+                                                <constraint firstItem="Z2Y-LD-RFG" firstAttribute="leading" secondItem="Ajw-zF-nXf" secondAttribute="leading" constant="16" id="mHY-qN-zBd"/>
                                                 <constraint firstItem="4MP-XW-NEm" firstAttribute="height" secondItem="ygm-0i-NY3" secondAttribute="height" id="nus-Gg-DnE"/>
                                                 <constraint firstItem="pMY-tU-GDI" firstAttribute="width" secondItem="AK1-ap-AfF" secondAttribute="width" id="nvI-dk-FGN"/>
                                                 <constraint firstAttribute="trailing" secondItem="pMY-tU-GDI" secondAttribute="trailing" constant="16" id="nyY-7h-uqk"/>
@@ -1304,7 +1306,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="Hy3-80-z6R" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="-828" y="131"/>
+            <point key="canvasLocation" x="-828.22580645161293" y="130.53839364518976"/>
         </scene>
         <!--Cart View Controller-->
         <scene sceneID="202-v9-HZP">
@@ -2153,7 +2155,7 @@ Stock</string>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Description" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="H92-P3-tCf" userLabel="description">
-                                                    <rect key="frame" x="96.5" y="13" width="87.5" height="21"/>
+                                                    <rect key="frame" x="16" y="49" width="712" height="21"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
@@ -2391,19 +2393,13 @@ Stock</string>
                                                     </userDefinedRuntimeAttributes>
                                                 </label>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LEh-OL-gzO">
-                                                    <rect key="frame" x="633" y="8" width="96" height="31"/>
+                                                    <rect key="frame" x="633" y="3" width="96" height="41"/>
                                                     <state key="normal" title="Button"/>
                                                     <buttonConfiguration key="configuration" style="plain" title="Add to cart"/>
                                                     <connections>
                                                         <action selector="onAddToCart:" destination="RBD-TT-DqV" eventType="touchUpInside" id="rkh-1Q-1AH"/>
                                                     </connections>
                                                 </button>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="42.8 x 68.3 x 30.5H" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CXZ-rU-fI4" userLabel="item label">
-                                                    <rect key="frame" x="16" y="46" width="135" height="18"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="234.56" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ua7-Qu-TE2" userLabel="item label">
                                                     <rect key="frame" x="550" y="104" width="89" height="24"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
@@ -2419,25 +2415,31 @@ Stock</string>
                                                         <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
                                                     </userDefinedRuntimeAttributes>
                                                 </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="42.8 x 68.3 x 30.5H" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CXZ-rU-fI4" userLabel="item label">
+                                                    <rect key="frame" x="76.5" y="14.5" width="135" height="18"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
                                             </subviews>
                                             <constraints>
                                                 <constraint firstItem="dvh-cr-GdM" firstAttribute="top" secondItem="P0q-Yt-GXv" secondAttribute="top" id="0Y4-ez-Yv5"/>
-                                                <constraint firstItem="rL8-9w-zqg" firstAttribute="top" secondItem="CXZ-rU-fI4" secondAttribute="bottom" constant="16" id="0j8-Ty-ea7"/>
                                                 <constraint firstItem="Raa-F8-Tim" firstAttribute="leading" secondItem="rL8-9w-zqg" secondAttribute="trailing" id="0yz-qa-W3N"/>
                                                 <constraint firstItem="6Or-u7-4VU" firstAttribute="height" secondItem="rL8-9w-zqg" secondAttribute="height" id="2j5-xK-hTt"/>
                                                 <constraint firstItem="51Y-wy-2ET" firstAttribute="height" secondItem="rL8-9w-zqg" secondAttribute="height" id="47y-9B-Agq"/>
                                                 <constraint firstAttribute="trailing" secondItem="51Y-wy-2ET" secondAttribute="trailing" constant="16" id="4ue-jy-ex5"/>
                                                 <constraint firstItem="dPf-p7-b3A" firstAttribute="top" secondItem="P0q-Yt-GXv" secondAttribute="top" id="56B-OM-0Va"/>
+                                                <constraint firstAttribute="trailing" secondItem="H92-P3-tCf" secondAttribute="trailing" constant="16" id="7JM-do-2Ot"/>
                                                 <constraint firstItem="dPf-p7-b3A" firstAttribute="leading" secondItem="TEW-3R-q3j" secondAttribute="trailing" id="83R-5x-6dD"/>
                                                 <constraint firstItem="MB0-nt-BnH" firstAttribute="leading" secondItem="6Or-u7-4VU" secondAttribute="trailing" id="8gj-lP-RRH"/>
                                                 <constraint firstItem="Ua7-Qu-TE2" firstAttribute="width" secondItem="P0q-Yt-GXv" secondAttribute="width" id="A9e-Ig-BKf"/>
                                                 <constraint firstItem="W0g-JU-H8J" firstAttribute="top" secondItem="P0q-Yt-GXv" secondAttribute="top" id="AgZ-NT-RlH"/>
                                                 <constraint firstItem="W0g-JU-H8J" firstAttribute="height" secondItem="P0q-Yt-GXv" secondAttribute="height" id="B3C-K6-RX7"/>
-                                                <constraint firstItem="uDf-2P-7UC" firstAttribute="centerY" secondItem="CXZ-rU-fI4" secondAttribute="centerY" id="BpY-89-uOL"/>
                                                 <constraint firstItem="Fgw-LJ-KR5" firstAttribute="leading" secondItem="dvh-cr-GdM" secondAttribute="trailing" id="C7O-Mr-ykC"/>
                                                 <constraint firstItem="MB0-nt-BnH" firstAttribute="height" secondItem="rL8-9w-zqg" secondAttribute="height" id="Cod-eG-vaK"/>
                                                 <constraint firstItem="CZn-lW-zFb" firstAttribute="centerY" secondItem="rL8-9w-zqg" secondAttribute="centerY" id="DGn-BE-YVL"/>
                                                 <constraint firstItem="8er-u1-DZo" firstAttribute="leading" secondItem="uDf-2P-7UC" secondAttribute="trailing" constant="10" id="DUP-Tp-IQ3"/>
+                                                <constraint firstItem="56k-bL-ui2" firstAttribute="top" secondItem="H92-P3-tCf" secondAttribute="bottom" constant="10" id="DZi-NE-yda"/>
                                                 <constraint firstAttribute="trailing" secondItem="LEh-OL-gzO" secondAttribute="trailing" constant="15" id="DqL-Np-Nm4"/>
                                                 <constraint firstItem="Raa-F8-Tim" firstAttribute="centerY" secondItem="rL8-9w-zqg" secondAttribute="centerY" id="Dvz-DX-hzb"/>
                                                 <constraint firstItem="TEW-3R-q3j" firstAttribute="leading" secondItem="qLh-8g-4bz" secondAttribute="trailing" id="E6P-UU-Gab"/>
@@ -2452,7 +2454,7 @@ Stock</string>
                                                 <constraint firstItem="dvh-cr-GdM" firstAttribute="height" secondItem="P0q-Yt-GXv" secondAttribute="height" id="MXn-o5-K99"/>
                                                 <constraint firstItem="qLh-8g-4bz" firstAttribute="width" secondItem="P0q-Yt-GXv" secondAttribute="width" id="NDd-0W-VwO"/>
                                                 <constraint firstItem="ToU-Mo-Rx3" firstAttribute="top" secondItem="h6v-P5-Y6J" secondAttribute="top" constant="13" id="NJC-A5-N3y"/>
-                                                <constraint firstItem="CXZ-rU-fI4" firstAttribute="top" secondItem="ToU-Mo-Rx3" secondAttribute="bottom" constant="12" id="OEl-wW-eVv"/>
+                                                <constraint firstItem="CXZ-rU-fI4" firstAttribute="centerY" secondItem="ToU-Mo-Rx3" secondAttribute="centerY" id="P1J-ap-Uu3"/>
                                                 <constraint firstItem="Ua7-Qu-TE2" firstAttribute="leading" secondItem="Fgw-LJ-KR5" secondAttribute="trailing" id="Qqx-oE-AZR"/>
                                                 <constraint firstItem="MB0-nt-BnH" firstAttribute="width" secondItem="rL8-9w-zqg" secondAttribute="width" id="RPU-Cm-wgK"/>
                                                 <constraint firstItem="qLh-8g-4bz" firstAttribute="height" secondItem="P0q-Yt-GXv" secondAttribute="height" id="RTS-bb-hpn"/>
@@ -2473,17 +2475,18 @@ Stock</string>
                                                 <constraint firstItem="6Or-u7-4VU" firstAttribute="width" secondItem="rL8-9w-zqg" secondAttribute="width" id="aCz-bM-56r"/>
                                                 <constraint firstItem="Raa-F8-Tim" firstAttribute="height" secondItem="rL8-9w-zqg" secondAttribute="height" id="bjP-Lj-nA6"/>
                                                 <constraint firstItem="CZn-lW-zFb" firstAttribute="leading" secondItem="MB0-nt-BnH" secondAttribute="trailing" id="bkn-ff-dNy"/>
+                                                <constraint firstItem="qux-TP-f6L" firstAttribute="top" secondItem="uDf-2P-7UC" secondAttribute="bottom" constant="14.5" id="c1u-3u-kam"/>
                                                 <constraint firstItem="Ua7-Qu-TE2" firstAttribute="top" secondItem="P0q-Yt-GXv" secondAttribute="top" id="cF0-l1-1TG"/>
                                                 <constraint firstAttribute="trailing" secondItem="8er-u1-DZo" secondAttribute="trailing" constant="16" id="dJE-Tq-Zeb"/>
                                                 <constraint firstItem="6Or-u7-4VU" firstAttribute="centerY" secondItem="rL8-9w-zqg" secondAttribute="centerY" id="eRm-dB-In8"/>
+                                                <constraint firstItem="H92-P3-tCf" firstAttribute="top" secondItem="LEh-OL-gzO" secondAttribute="bottom" constant="5" id="euM-1a-bUh"/>
                                                 <constraint firstItem="Fgw-LJ-KR5" firstAttribute="height" secondItem="P0q-Yt-GXv" secondAttribute="height" id="fb2-hx-RoW"/>
                                                 <constraint firstItem="dPf-p7-b3A" firstAttribute="width" secondItem="P0q-Yt-GXv" secondAttribute="width" id="gko-un-oWF"/>
+                                                <constraint firstItem="H92-P3-tCf" firstAttribute="leading" secondItem="ToU-Mo-Rx3" secondAttribute="leading" id="hSy-MA-lRZ"/>
                                                 <constraint firstItem="ToU-Mo-Rx3" firstAttribute="leading" secondItem="h6v-P5-Y6J" secondAttribute="leadingMargin" id="iAJ-hd-n0J"/>
                                                 <constraint firstItem="dPf-p7-b3A" firstAttribute="height" secondItem="P0q-Yt-GXv" secondAttribute="height" id="iJg-7n-INN"/>
                                                 <constraint firstItem="56k-bL-ui2" firstAttribute="leading" secondItem="Raa-F8-Tim" secondAttribute="trailing" id="ikf-1J-Hsd"/>
-                                                <constraint firstItem="H92-P3-tCf" firstAttribute="leading" secondItem="ToU-Mo-Rx3" secondAttribute="trailing" constant="30" id="irR-er-TSX"/>
                                                 <constraint firstItem="Fgw-LJ-KR5" firstAttribute="width" secondItem="P0q-Yt-GXv" secondAttribute="width" id="lxe-GL-98Z"/>
-                                                <constraint firstItem="H92-P3-tCf" firstAttribute="centerY" secondItem="ToU-Mo-Rx3" secondAttribute="centerY" id="mLI-dX-fQV"/>
                                                 <constraint firstItem="qux-TP-f6L" firstAttribute="height" secondItem="rL8-9w-zqg" secondAttribute="height" id="nDc-Jf-TfN"/>
                                                 <constraint firstItem="51Y-wy-2ET" firstAttribute="width" secondItem="P0q-Yt-GXv" secondAttribute="width" id="qTj-rg-CyA"/>
                                                 <constraint firstItem="56k-bL-ui2" firstAttribute="centerY" secondItem="rL8-9w-zqg" secondAttribute="centerY" id="qXl-33-iOh"/>
@@ -2496,7 +2499,8 @@ Stock</string>
                                                 <constraint firstItem="qux-TP-f6L" firstAttribute="leading" secondItem="CZn-lW-zFb" secondAttribute="trailing" id="vxv-vd-l8B"/>
                                                 <constraint firstItem="W0g-JU-H8J" firstAttribute="leading" secondItem="Ua7-Qu-TE2" secondAttribute="trailing" id="wBR-3N-ZGg"/>
                                                 <constraint firstItem="51Y-wy-2ET" firstAttribute="leading" secondItem="qux-TP-f6L" secondAttribute="trailing" id="wO5-4P-9i6"/>
-                                                <constraint firstItem="CXZ-rU-fI4" firstAttribute="leading" secondItem="ToU-Mo-Rx3" secondAttribute="leading" id="x6q-dj-k61"/>
+                                                <constraint firstItem="CXZ-rU-fI4" firstAttribute="leading" secondItem="ToU-Mo-Rx3" secondAttribute="trailing" constant="10" id="xBH-HB-4VK"/>
+                                                <constraint firstAttribute="bottom" secondItem="P0q-Yt-GXv" secondAttribute="bottom" constant="8" id="yaZ-5a-iUt"/>
                                             </constraints>
                                         </tableViewCellContentView>
                                         <connections>

+ 3 - 0
RedAnt ERP Mobile/HMLG Scan Order/ServerSettingViewController.m

@@ -104,6 +104,9 @@
     else
         _btnSetServer.hidden = false;
     
+    
+//    _btnSetServer.hidden = false;
+    
 //    return;
     // Do any additional setup after loading the view.
 //    UIView *v = [UIView new];

+ 2 - 1
RedAnt ERP Mobile/HMLG Scan Order/config.h

@@ -213,6 +213,7 @@
 #define URL_SCAN_NEWS BASE_URL@"offlineorder_isales.php"
 #define URL_SERVER_CHECK @"offlineorder_isales.php"
 #define URL_SIGN_UP @"offlineorder_isales.php"
+#define URL_CHECK_STOCK @"offlineorder_isales.php"
 #define  URL_RETRIEVE_PASS  @"offlineorder_isales.php"
 #define  URL_UPDATE_AUTH  @"offlineorder_isales.php"
 #define  URL_SEARCH  BASE_URL@"offlineorder_isales.php"
@@ -221,7 +222,7 @@
 #define URL_CHANGE_PASSWORD @"offlineorder_isales.php"
 #define URL_SCAN_UPLOAD @"offlineorder_isales.php"
 
-
+#define URL_ORDER_DISCOUNT @""
 #define  URL_BACK_ORDER_PREVIEW  @""
 #define  URL_MOVE_TO_BACK_ORDER @""
 

+ 2 - 2
RedAnt ERP Mobile/common/AppDelegateBase.m

@@ -1806,8 +1806,8 @@ void UncaughtExceptionHandler(NSException *exception) {
         
         
         //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
-        
-        navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
+        navi.modalInPresentation = true;
+        navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
         [parent presentViewController:navi animated:YES completion:^{
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);

+ 142 - 56
RedAnt ERP Mobile/common/ERP_Mobile_Cart.storyboard

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
-    <device id="ipad12_9rounded" orientation="portrait" layout="fullscreen" appearance="light"/>
+    <device id="ipad7_9" orientation="portrait" layout="fullscreen" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
@@ -14,35 +14,35 @@
             <objects>
                 <viewController storyboardIdentifier="CartViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="K4s-dn-ekA" customClass="CartViewController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="dPU-c4-Qhu">
-                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
+                        <rect key="frame" x="0.0" y="0.0" width="744" height="1133"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EdG-w6-IAt" userLabel="cart item view">
-                                <rect key="frame" x="0.0" y="40" width="1024" height="1202"/>
+                                <rect key="frame" x="0.0" y="40" width="744" height="969"/>
                                 <subviews>
                                     <activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="hlZ-3P-GUS" userLabel="mum">
-                                        <rect key="frame" x="493.5" y="582.5" width="37" height="37"/>
+                                        <rect key="frame" x="353.5" y="466" width="37" height="37"/>
                                         <color key="color" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                     </activityIndicatorView>
                                     <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="120" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="OMD-NW-nZo">
-                                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1202"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="744" height="969"/>
                                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                         <color key="sectionIndexBackgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <prototypes>
                                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CartItemCell" rowHeight="146" id="9d9-Fh-IGR" customClass="ModelItemCell">
-                                                <rect key="frame" x="0.0" y="44.5" width="1024" height="146"/>
+                                                <rect key="frame" x="0.0" y="44.5" width="744" height="146"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9d9-Fh-IGR" id="NLP-mv-Q7E">
-                                                    <rect key="frame" x="0.0" y="0.0" width="1024" height="146"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="744" height="146"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="name aaaaaaaaaaaaa aaaaaaaaaa BBBBB  CCCCC" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Sj7-pu-c1Y" userLabel="name and description">
-                                                            <rect key="frame" x="123" y="10" width="438" height="100"/>
+                                                            <rect key="frame" x="123" y="10" width="158" height="100"/>
                                                             <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="15"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="9999" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="cfH-6d-98v" userLabel="qty">
-                                                            <rect key="frame" x="694" y="41" width="60" height="32"/>
+                                                            <rect key="frame" x="414" y="41" width="60" height="32"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="32" id="9qV-vK-2rq"/>
                                                                 <constraint firstAttribute="width" constant="60" id="Lkj-nL-CD6"/>
@@ -68,7 +68,7 @@
                                                             </connections>
                                                         </button>
                                                         <stepper opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" maximumValue="99999" translatesAutoresizingMaskIntoConstraints="NO" id="Icr-T0-BzH">
-                                                            <rect key="frame" x="769" y="41" width="94" height="32"/>
+                                                            <rect key="frame" x="489" y="41" width="94" height="32"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="32" id="8h7-sY-BPG"/>
                                                                 <constraint firstAttribute="width" constant="94" id="wmY-Eg-mTQ"/>
@@ -78,7 +78,7 @@
                                                             </connections>
                                                         </stepper>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12345678.99" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9e7-U4-taE" userLabel="unit price">
-                                                            <rect key="frame" x="569" y="46.5" width="110" height="21"/>
+                                                            <rect key="frame" x="289" y="46.5" width="110" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="110" id="W0G-CU-uww"/>
                                                             </constraints>
@@ -87,7 +87,7 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="30 bundle item with $xxx" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Z9-hg-rlD">
-                                                            <rect key="frame" x="123" y="87.5" width="704" height="21"/>
+                                                            <rect key="frame" x="123" y="87.5" width="424" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="21" id="hlq-zF-MhA"/>
                                                             </constraints>
@@ -96,7 +96,7 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12345678.99" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7zr-Zx-7tD" userLabel="price before discount" customClass="StrikethroughLabel">
-                                                            <rect key="frame" x="569" y="10" width="110" height="21"/>
+                                                            <rect key="frame" x="289" y="10" width="110" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="110" id="0wV-fW-oya"/>
                                                                 <constraint firstAttribute="height" constant="21" id="1BK-GJ-UM1"/>
@@ -106,7 +106,7 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99.99% off" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aTC-Ir-xIh" userLabel="discount">
-                                                            <rect key="frame" x="723" y="10" width="100" height="21"/>
+                                                            <rect key="frame" x="443" y="10" width="100" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="100" id="u3i-gR-l4k"/>
                                                             </constraints>
@@ -115,7 +115,7 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sold in QTY of:9999" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d6n-Fn-anV">
-                                                            <rect key="frame" x="833" y="10" width="160" height="21"/>
+                                                            <rect key="frame" x="553" y="10" width="160" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="160" id="JFg-Eg-ICy"/>
                                                                 <constraint firstAttribute="height" constant="21" id="bk0-ux-cHr"/>
@@ -125,7 +125,7 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123456789.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4CM-f3-iTa" userLabel="subtotal price">
-                                                            <rect key="frame" x="878" y="46.5" width="115" height="21"/>
+                                                            <rect key="frame" x="598" y="46.5" width="115" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="115" id="H2W-Ot-Soh"/>
                                                             </constraints>
@@ -133,7 +133,7 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ocu-RP-B0J" customClass="BundleDetailButton">
-                                                            <rect key="frame" x="835" y="83" width="50" height="30"/>
+                                                            <rect key="frame" x="555" y="83" width="50" height="30"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="30" id="DSn-b9-pka"/>
                                                                 <constraint firstAttribute="width" constant="50" id="vPF-fd-wAB"/>
@@ -146,7 +146,7 @@
                                                             </connections>
                                                         </button>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="915-GD-PCl">
-                                                            <rect key="frame" x="15" y="117" width="994" height="21"/>
+                                                            <rect key="frame" x="15" y="117" width="714" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="21" id="c0W-yh-PhV"/>
                                                             </constraints>
@@ -155,7 +155,7 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No Such Model" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FOL-ZC-Dqb">
-                                                            <rect key="frame" x="61" y="60" width="337" height="42"/>
+                                                            <rect key="frame" x="61" y="56" width="337" height="42"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="337" id="6hb-Mb-KlY"/>
                                                                 <constraint firstAttribute="height" constant="42" id="R9d-BO-jGl"/>
@@ -178,7 +178,7 @@ Stock</string>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Dh8-s0-2mU" customClass="BundleDetailButton">
-                                                            <rect key="frame" x="893" y="83" width="100" height="30"/>
+                                                            <rect key="frame" x="613" y="83" width="100" height="30"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="30" id="k4d-bv-5h4"/>
                                                                 <constraint firstAttribute="width" constant="100" id="qzO-hT-b92"/>
@@ -247,19 +247,19 @@ Stock</string>
                                                 </connections>
                                             </tableViewCell>
                                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="ScanCartItemCell" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="ScanCartItemCell" rowHeight="120" id="fca-Fb-rTa" customClass="ScanCartItemCell">
-                                                <rect key="frame" x="0.0" y="190.5" width="1024" height="120"/>
+                                                <rect key="frame" x="0.0" y="190.5" width="744" height="120"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="fca-Fb-rTa" id="efk-9P-2wE">
-                                                    <rect key="frame" x="0.0" y="0.0" width="1024" height="120"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="744" height="120"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="name aaaaaaaaaaaaa aaaaaaaaaa BBBBB  CCCCC" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XMk-Dj-kBK" userLabel="name and description">
-                                                            <rect key="frame" x="15" y="37" width="550" height="47"/>
+                                                            <rect key="frame" x="15" y="37" width="270" height="47"/>
                                                             <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="16"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="9999" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Ebf-Mu-7C8" userLabel="qty">
-                                                            <rect key="frame" x="705" y="41.5" width="60" height="32"/>
+                                                            <rect key="frame" x="425" y="41.5" width="60" height="32"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="60" id="a5J-gG-uph"/>
                                                                 <constraint firstAttribute="height" constant="32" id="cu4-ts-EDj"/>
@@ -272,7 +272,7 @@ Stock</string>
                                                             </connections>
                                                         </textField>
                                                         <stepper opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" maximumValue="99999" translatesAutoresizingMaskIntoConstraints="NO" id="V3E-hA-Dpr">
-                                                            <rect key="frame" x="780" y="41.5" width="94" height="32"/>
+                                                            <rect key="frame" x="500" y="41.5" width="94" height="32"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="32" id="BM9-FK-uOM"/>
                                                                 <constraint firstAttribute="width" constant="94" id="bzi-VK-ZnS"/>
@@ -282,7 +282,7 @@ Stock</string>
                                                             </connections>
                                                         </stepper>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12345678.99" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AMU-gk-9Zx" userLabel="unit price">
-                                                            <rect key="frame" x="580" y="47" width="110" height="21"/>
+                                                            <rect key="frame" x="300" y="47" width="110" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="110" id="JT3-Id-W3x"/>
                                                             </constraints>
@@ -291,7 +291,7 @@ Stock</string>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sold in QTY of:9999" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PK4-TS-WwU">
-                                                            <rect key="frame" x="844" y="11" width="160" height="21"/>
+                                                            <rect key="frame" x="564" y="11" width="160" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="21" id="9Bk-jh-lRa"/>
                                                                 <constraint firstAttribute="width" constant="160" id="nj0-ub-luv"/>
@@ -301,7 +301,7 @@ Stock</string>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123456789.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e5O-in-MD6" userLabel="subtotal price">
-                                                            <rect key="frame" x="889" y="47" width="115" height="21"/>
+                                                            <rect key="frame" x="609" y="47" width="115" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="115" id="k1v-RX-amw"/>
                                                             </constraints>
@@ -309,7 +309,7 @@ Stock</string>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JNY-pM-90G">
-                                                            <rect key="frame" x="15" y="91" width="994" height="21"/>
+                                                            <rect key="frame" x="15" y="91" width="714" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="21" id="vMH-cC-f7Q"/>
                                                             </constraints>
@@ -327,7 +327,7 @@ Stock</string>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kns-xs-xWh">
-                                                            <rect key="frame" x="705" y="78" width="169" height="31"/>
+                                                            <rect key="frame" x="425" y="78" width="169" height="31"/>
                                                             <state key="normal" title="Button"/>
                                                             <buttonConfiguration key="configuration" style="plain" title="Discount"/>
                                                             <connections>
@@ -372,13 +372,13 @@ Stock</string>
                                                 </connections>
                                             </tableViewCell>
                                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="section_header_cell" rowHeight="50" id="XyA-7C-sJn">
-                                                <rect key="frame" x="0.0" y="310.5" width="1024" height="50"/>
+                                                <rect key="frame" x="0.0" y="310.5" width="744" height="50"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="XyA-7C-sJn" translatesAutoresizingMaskIntoConstraints="NO" id="Ugp-AX-JtS">
-                                                    <rect key="frame" x="0.0" y="0.0" width="1024" height="50"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="744" height="50"/>
                                                     <subviews>
                                                         <label opaque="NO" userInteractionEnabled="NO" tag="8520" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Section" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ksZ-DE-RcA">
-                                                            <rect key="frame" x="15" y="0.0" width="994" height="50"/>
+                                                            <rect key="frame" x="15" y="0.0" width="714" height="50"/>
                                                             <fontDescription key="fontDescription" type="system" pointSize="21"/>
                                                             <nil key="textColor"/>
                                                             <nil key="highlightedColor"/>
@@ -406,7 +406,7 @@ Stock</string>
                                         </connections>
                                     </tableView>
                                     <label hidden="YES" opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Cannot get data from server.
Tap to try again." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c8z-jb-g0B">
-                                        <rect key="frame" x="391.5" y="578.5" width="241.5" height="45.5"/>
+                                        <rect key="frame" x="251.5" y="462" width="241.5" height="45.5"/>
                                         <fontDescription key="fontDescription" type="system" pointSize="19"/>
                                         <color key="textColor" red="0.33333333329999998" green="0.33333333329999998" blue="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <nil key="highlightedColor"/>
@@ -425,7 +425,7 @@ Stock</string>
                                 </constraints>
                             </view>
                             <toolbar hidden="YES" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JjI-8g-Zx7">
-                                <rect key="frame" x="0.0" y="1322" width="1024" height="44"/>
+                                <rect key="frame" x="0.0" y="1089" width="744" height="44"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="44" id="882-wy-gda"/>
                                 </constraints>
@@ -456,10 +456,10 @@ Stock</string>
                                 </items>
                             </toolbar>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gh3-Tt-1Iu">
-                                <rect key="frame" x="0.0" y="1242" width="1024" height="124"/>
+                                <rect key="frame" x="0.0" y="1009" width="744" height="124"/>
                                 <subviews>
                                     <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total QTY:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bJB-df-Qia" userLabel="total price">
-                                        <rect key="frame" x="767" y="10" width="110" height="20"/>
+                                        <rect key="frame" x="487" y="10" width="110" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="110" id="ASl-r2-ue5"/>
                                             <constraint firstAttribute="height" constant="20" id="nCB-t9-EXm"/>
@@ -469,7 +469,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Subtotal Price:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e8a-7k-glR" userLabel="total price">
-                                        <rect key="frame" x="767" y="62" width="110" height="20"/>
+                                        <rect key="frame" x="487" y="62" width="110" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="eys-5N-MvF"/>
                                             <constraint firstAttribute="width" constant="110" id="mjO-Mx-uZY"/>
@@ -479,7 +479,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BdK-WN-iBd" userLabel="value">
-                                        <rect key="frame" x="885" y="61.5" width="124" height="20"/>
+                                        <rect key="frame" x="605" y="61.5" width="124" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="124" id="Vtk-fK-PuB"/>
                                             <constraint firstAttribute="height" constant="20" id="att-Sj-4TY"/>
@@ -489,7 +489,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QFj-Yq-8py" userLabel="value">
-                                        <rect key="frame" x="613" y="9.5" width="124" height="20"/>
+                                        <rect key="frame" x="333" y="9.5" width="124" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="fF3-qa-JIv"/>
                                             <constraint firstAttribute="width" constant="124" id="u0P-tW-8Ag"/>
@@ -498,7 +498,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yo2-dv-uQb" userLabel="value">
-                                        <rect key="frame" x="613" y="35.5" width="124" height="20"/>
+                                        <rect key="frame" x="333" y="35.5" width="124" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="124" id="aCa-A9-n1v"/>
                                             <constraint firstAttribute="height" constant="20" id="zlU-CH-UxH"/>
@@ -507,7 +507,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oeZ-Yi-d5I" userLabel="value">
-                                        <rect key="frame" x="613" y="61.5" width="124" height="20"/>
+                                        <rect key="frame" x="333" y="61.5" width="124" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="124" id="Ri7-Tx-fGs"/>
                                             <constraint firstAttribute="height" constant="20" id="xFK-gK-N8c"/>
@@ -516,7 +516,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rdv-8s-Jy6" customClass="DefaultImageButton">
-                                        <rect key="frame" x="879" y="84" width="130" height="30"/>
+                                        <rect key="frame" x="599" y="84" width="130" height="30"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="30" id="BbJ-vM-qDn"/>
                                             <constraint firstAttribute="width" constant="130" id="Zsq-V3-xKe"/>
@@ -534,7 +534,7 @@ Stock</string>
                                         </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WY7-cp-N9a" customClass="DefaultImageButton">
-                                        <rect key="frame" x="829" y="84" width="30" height="30"/>
+                                        <rect key="frame" x="549" y="84" width="30" height="30"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="30" id="3ZM-R4-EV0"/>
                                             <constraint firstAttribute="height" constant="30" id="A0j-fv-eZx"/>
@@ -563,7 +563,7 @@ Stock</string>
                                         </connections>
                                     </button>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total CuFt:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jqa-Zp-Sg2">
-                                        <rect key="frame" x="495" y="10" width="110" height="20"/>
+                                        <rect key="frame" x="215" y="10" width="110" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="110" id="OSa-ja-uLx"/>
                                             <constraint firstAttribute="height" constant="20" id="tkj-g6-THx"/>
@@ -573,7 +573,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total Weight:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PWY-Zc-LEx">
-                                        <rect key="frame" x="495" y="36" width="110" height="20"/>
+                                        <rect key="frame" x="215" y="36" width="110" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="110" id="ImV-Hf-ek0"/>
                                             <constraint firstAttribute="height" constant="20" id="w5u-XI-iou"/>
@@ -583,7 +583,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total Carton:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1bF-Cv-KYG">
-                                        <rect key="frame" x="495" y="62" width="110" height="20"/>
+                                        <rect key="frame" x="215" y="62" width="110" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="110" id="6qd-WY-Ify"/>
                                             <constraint firstAttribute="height" constant="20" id="hcr-ZH-FNy"/>
@@ -593,7 +593,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total  Items:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4kM-vh-YbC">
-                                        <rect key="frame" x="767" y="36" width="110" height="20"/>
+                                        <rect key="frame" x="487" y="36" width="110" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="110" id="Umv-oU-RnI"/>
                                             <constraint firstAttribute="height" constant="20" id="bFa-SW-aPi"/>
@@ -614,7 +614,7 @@ Stock</string>
                                         </connections>
                                     </button>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Da-eJ-p37">
-                                        <rect key="frame" x="885" y="35.5" width="124" height="20"/>
+                                        <rect key="frame" x="605" y="35.5" width="124" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="124" id="Nup-mi-BKD"/>
                                             <constraint firstAttribute="height" constant="20" id="Oji-iQ-rBl"/>
@@ -624,7 +624,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zeq-Qm-obt">
-                                        <rect key="frame" x="885" y="9.5" width="124" height="20"/>
+                                        <rect key="frame" x="605" y="9.5" width="124" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="124" id="OMw-e6-rkf"/>
                                             <constraint firstAttribute="height" constant="20" id="Wzz-8C-fgu"/>
@@ -634,7 +634,7 @@ Stock</string>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3H2-JS-FOj">
-                                        <rect key="frame" x="135" y="89" width="574" height="20"/>
+                                        <rect key="frame" x="135" y="89" width="294" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="8fm-fp-Kxk"/>
                                         </constraints>
@@ -659,7 +659,7 @@ Stock</string>
                                         </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="y50-hu-fgy">
-                                        <rect key="frame" x="779" y="84" width="30" height="30"/>
+                                        <rect key="frame" x="499" y="84" width="30" height="30"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="30" id="aLc-U8-fS9"/>
                                             <constraint firstAttribute="height" constant="30" id="h0h-KZ-y4A"/>
@@ -670,7 +670,7 @@ Stock</string>
                                         </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Y27-jk-l1Z">
-                                        <rect key="frame" x="729" y="84" width="30" height="30"/>
+                                        <rect key="frame" x="449" y="84" width="30" height="30"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="30" id="dEP-Jv-ccc"/>
                                             <constraint firstAttribute="width" constant="30" id="tzu-IE-AXt"/>
@@ -680,6 +680,14 @@ Stock</string>
                                             <action selector="printCartButtonClick:" destination="K4s-dn-ekA" eventType="touchUpInside" id="CSU-sn-LhP"/>
                                         </connections>
                                     </button>
+                                    <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Q8b-hd-FFZ">
+                                        <rect key="frame" x="123.5" y="9.5" width="81.5" height="31"/>
+                                        <state key="normal" title="Button"/>
+                                        <buttonConfiguration key="configuration" style="plain" title="Discount"/>
+                                        <connections>
+                                            <action selector="onOrderDiscount:" destination="K4s-dn-ekA" eventType="touchUpInside" id="k2O-iA-gh7"/>
+                                        </connections>
+                                    </button>
                                 </subviews>
                                 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <constraints>
@@ -705,10 +713,12 @@ Stock</string>
                                     <constraint firstItem="y50-hu-fgy" firstAttribute="bottom" secondItem="Y27-jk-l1Z" secondAttribute="bottom" id="ejp-Ep-tEn"/>
                                     <constraint firstItem="YOv-h4-k5B" firstAttribute="top" secondItem="jbg-4H-dCx" secondAttribute="bottom" constant="7" id="fUg-rL-ofh"/>
                                     <constraint firstItem="PaU-lk-9JI" firstAttribute="top" secondItem="gh3-Tt-1Iu" secondAttribute="top" constant="10" id="g7g-XM-FCI"/>
+                                    <constraint firstItem="jqa-Zp-Sg2" firstAttribute="leading" secondItem="Q8b-hd-FFZ" secondAttribute="trailing" constant="10" id="iTM-uD-RLZ"/>
                                     <constraint firstItem="zeq-Qm-obt" firstAttribute="firstBaseline" secondItem="bJB-df-Qia" secondAttribute="firstBaseline" id="jOl-qT-Bqm"/>
                                     <constraint firstItem="YOv-h4-k5B" firstAttribute="leading" secondItem="gh3-Tt-1Iu" secondAttribute="leading" constant="15" id="je1-DO-KU5"/>
                                     <constraint firstItem="jbg-4H-dCx" firstAttribute="top" secondItem="PaU-lk-9JI" secondAttribute="bottom" constant="7" id="ji0-ci-UXf"/>
                                     <constraint firstItem="BdK-WN-iBd" firstAttribute="trailing" secondItem="zeq-Qm-obt" secondAttribute="trailing" id="kTV-cm-7kN"/>
+                                    <constraint firstItem="Q8b-hd-FFZ" firstAttribute="centerY" secondItem="PaU-lk-9JI" secondAttribute="centerY" id="lBu-3s-4J6"/>
                                     <constraint firstAttribute="trailing" secondItem="Rdv-8s-Jy6" secondAttribute="trailing" constant="15" id="lfM-1b-5eS"/>
                                     <constraint firstItem="jbg-4H-dCx" firstAttribute="leading" secondItem="gh3-Tt-1Iu" secondAttribute="leading" constant="15" id="pgS-M6-Edc"/>
                                     <constraint firstItem="e8a-7k-glR" firstAttribute="firstBaseline" secondItem="1bF-Cv-KYG" secondAttribute="firstBaseline" id="pjl-cs-jRq"/>
@@ -745,6 +755,7 @@ Stock</string>
                         </constraints>
                     </view>
                     <connections>
+                        <outlet property="btnOrderDiscount" destination="Q8b-hd-FFZ" id="ERa-DM-FlK"/>
                         <outlet property="btn_addwish" destination="T3K-rc-7ct" id="Zf7-To-GOl"/>
                         <outlet property="btn_delete" destination="dvp-3U-vbs" id="yKA-iT-A5s"/>
                         <outlet property="btn_edit_select" destination="7hG-Xr-io0" id="HYs-y7-mrB"/>
@@ -788,13 +799,13 @@ Stock</string>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                         <subviews>
                             <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="d3M-dW-oMp">
-                                <rect key="frame" x="10" y="24" width="460" height="256"/>
+                                <rect key="frame" x="10" y="24" width="460" height="236"/>
                                 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
                             </textView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2mZ-oE-Upn" customClass="DefaultImageButton">
-                                <rect key="frame" x="358" y="290" width="102" height="30"/>
+                                <rect key="frame" x="358" y="270" width="102" height="30"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="30" id="zsK-mj-wNb"/>
                                 </constraints>
@@ -981,7 +992,7 @@ Stock</string>
             <objects>
                 <viewController id="H3V-ep-3dc" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="MLp-rr-7PZ">
-                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
+                        <rect key="frame" x="0.0" y="0.0" width="744" height="1133"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <viewLayoutGuide key="safeArea" id="Rxk-rC-Cfr"/>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
@@ -1055,6 +1066,81 @@ Stock</string>
             </objects>
             <point key="canvasLocation" x="3727" y="654"/>
         </scene>
+        <!--Choose a discount rate-->
+        <scene sceneID="XUL-zW-RSQ">
+            <objects>
+                <viewController storyboardIdentifier="OrderDiscountViewController" title="Choose a discount rate" useStoryboardIdentifierAsRestorationIdentifier="YES" id="sFE-Po-McG" customClass="OrderDiscountViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="Kni-1B-aSP">
+                        <rect key="frame" x="0.0" y="0.0" width="480" height="320"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enter discount percentage" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aIX-3q-94l">
+                                <rect key="frame" x="139" y="53" width="202" height="21"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mp7-AD-fSK">
+                                <rect key="frame" x="321" y="239" width="69" height="31"/>
+                                <state key="normal" title="Button"/>
+                                <buttonConfiguration key="configuration" style="plain" title="Cancel"/>
+                                <connections>
+                                    <action selector="onCancel:" destination="sFE-Po-McG" eventType="touchUpInside" id="qem-dt-ion"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6tg-ic-Sng">
+                                <rect key="frame" x="90" y="239" width="72" height="31"/>
+                                <state key="normal" title="Button"/>
+                                <buttonConfiguration key="configuration" style="plain" title="Update"/>
+                                <connections>
+                                    <action selector="onUpdate:" destination="sFE-Po-McG" eventType="touchUpInside" id="bdf-6z-GvJ"/>
+                                </connections>
+                            </button>
+                            <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="u7E-SL-DDk">
+                                <rect key="frame" x="210" y="126" width="60" height="34"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="60" id="DJt-VA-Ivc"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits"/>
+                                <connections>
+                                    <outlet property="delegate" destination="sFE-Po-McG" id="cca-dF-EjP"/>
+                                </connections>
+                            </textField>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="% off" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n8Q-cg-B7f">
+                                <rect key="frame" x="275" y="132.5" width="41" height="21"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                        </subviews>
+                        <viewLayoutGuide key="safeArea" id="LIv-KR-8LT"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstItem="LIv-KR-8LT" firstAttribute="bottom" secondItem="6tg-ic-Sng" secondAttribute="bottom" constant="30" id="1aP-Hf-KHM"/>
+                            <constraint firstItem="LIv-KR-8LT" firstAttribute="trailing" secondItem="Mp7-AD-fSK" secondAttribute="trailing" constant="90" id="BUU-4e-eEb"/>
+                            <constraint firstItem="aIX-3q-94l" firstAttribute="centerX" secondItem="Kni-1B-aSP" secondAttribute="centerX" id="Etn-Cd-Pun"/>
+                            <constraint firstItem="aIX-3q-94l" firstAttribute="centerX" secondItem="Kni-1B-aSP" secondAttribute="centerX" id="F9h-pX-M25"/>
+                            <constraint firstItem="n8Q-cg-B7f" firstAttribute="centerY" secondItem="u7E-SL-DDk" secondAttribute="centerY" id="OEo-iX-z53"/>
+                            <constraint firstItem="LIv-KR-8LT" firstAttribute="bottom" secondItem="u7E-SL-DDk" secondAttribute="bottom" constant="140" id="UC9-w1-GBa"/>
+                            <constraint firstItem="n8Q-cg-B7f" firstAttribute="leading" secondItem="u7E-SL-DDk" secondAttribute="trailing" constant="5" id="YPl-Sw-6U8"/>
+                            <constraint firstItem="6tg-ic-Sng" firstAttribute="leading" secondItem="LIv-KR-8LT" secondAttribute="leading" constant="90" id="Z6s-YD-70b"/>
+                            <constraint firstItem="u7E-SL-DDk" firstAttribute="top" secondItem="aIX-3q-94l" secondAttribute="bottom" constant="52" id="ebS-le-wRo"/>
+                            <constraint firstItem="Mp7-AD-fSK" firstAttribute="centerY" secondItem="6tg-ic-Sng" secondAttribute="centerY" id="piy-z0-HDR"/>
+                            <constraint firstItem="u7E-SL-DDk" firstAttribute="centerX" secondItem="Kni-1B-aSP" secondAttribute="centerX" id="vID-Jz-Qba"/>
+                        </constraints>
+                    </view>
+                    <value key="contentSizeForViewInPopover" type="size" width="480" height="320"/>
+                    <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+                    <size key="freeformSize" width="480" height="320"/>
+                    <connections>
+                        <outlet property="textfieldDiscount" destination="u7E-SL-DDk" id="BOD-O4-k4A"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="gxG-Lu-qK2" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="635" y="96"/>
+        </scene>
     </scenes>
     <resources>
         <image name="btn_cancelorder" width="30" height="30"/>

+ 1 - 0
RedAnt ERP Mobile/common/Functions/cart/CartViewController.h

@@ -38,6 +38,7 @@
 @property int total_item;
 @property int total_QTY;
 @property bool edit_check;
+@property (weak, nonatomic) IBOutlet UIButton *btnOrderDiscount;
 @property (weak, nonatomic) IBOutlet UILabel *labelTotalPrice;
 @property (weak, nonatomic) IBOutlet UILabel *labelTotalSurcharge;
 

+ 195 - 4
RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

@@ -29,12 +29,24 @@
 #import "JKMessageBoxController.h"
 #import "RAPDFViewController.h"
 
+
+
 #ifdef SCANNER_ORDER
 #import "ScanCartItemCell.h"
+#import "ScanDiscountViewController.h"
+#else
+
+
+#endif
+
+
+#ifdef BUILD_CONTRAST
+#import "OrderDiscountViewController.h"
 #endif
+
 #ifdef BACKORDER_PROCESS
 #import "RAOrderEditorViewController.h"
-#import "ScanDiscountViewController.h"
+
 #endif
 
 
@@ -1084,7 +1096,7 @@
     contactlabel.tag = 5678 + 2;
     
     contactlabel.textColor=UIColorFromRGB(color);
-    contactlabel.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin;
+    contactlabel.autoresizingMask=UIViewAutoresizingFlexibleRightMargin;
     contactlabel.backgroundColor = [UIColor clearColor];
     
 #ifdef SCANNER_ORDER
@@ -1102,14 +1114,20 @@
         shortname = servername;
     switch(RASingleton.sharedInstance.price_type)
     {
-        case 0: pricename =[NSString stringWithFormat:@"%@_DDP",shortname];
+        case 0:
+//            pricename =[NSString stringWithFormat:@"%@_DDP",shortname];
+            pricename = @"DDP";
             break;;
-        case 1: pricename = [NSString stringWithFormat:@"%@_WHSE",shortname];;
+        case 1:
+//            pricename = [NSString stringWithFormat:@"%@_WHSE",shortname];;
+            pricename=@"WHSE";
             break;;
 //        case 2: pricename = @"25%";
 //            break;
     }
     contactlabel.text=pricename;
+//    contactlabel.frame= CGRectMake(x-100, 9, 90, 22);
+//    contactlabel.tran
 #else
     contactlabel.text=NSLocalizedString(@"Unit price", nil);
 #endif
@@ -1166,6 +1184,10 @@
 {
     [super viewDidLoad];
     
+#ifdef BUILD_CONTRAST
+    self.btnOrderDiscount.hidden=false;
+#endif
+    
 #ifdef SCANNER_ORDER
     self.printButton.hidden = true;
     self.emailButton.hidden = true;
@@ -1258,6 +1280,169 @@
     
     [appDelegate switchToPreviousVC];
     
+}
+- (IBAction)onOrderDiscount:(id)sender {
+    
+#ifdef BUILD_CONTRAST
+    
+    OrderDiscountViewController * vc =[[UIStoryboard storyboardWithName:@"ERP_Mobile_Cart" bundle:nil] instantiateViewControllerWithIdentifier:@"OrderDiscountViewController"];
+    
+    
+    
+    
+//    vc.discount=[[item_json valueForKey:@"discount"] floatValue];
+//    vc.price = [[item_json valueForKey:@"unit_price"] floatValue];
+//    vc.cart_id = [item_json valueForKey:@"cart_item_id"];//[NSString stringWithFormat:@"%d",[[item_json valueForKey:@"cart_item_id"] intValue]];
+//    __block NSString* cartid=[item_json valueForKey:@"cart_item_id"];
+    //    vc.delegate = parentvc.self;
+    //    loginvc.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
+    vc.onSetValue = ^(double discount){
+        
+//        bool bmodify=false;
+//        if(discount>0)
+//            bmodify=true;
+        
+//        NSString* notes = [item_json valueForKey:@"note"];
+//        if(notes.length==0)
+//            notes=@"";
+//        if(bmodify)
+//        {
+//
+//
+//           // if([notes isEqualToString:@""])
+////                notes=[NSString stringWithFormat:@"Note: discount %d%% off.",(int)discount];
+////
+////            NSRange range;
+////            range = [notes rangeOfString:@"PRICE MODIFIED"];
+////            if (range.location != NSNotFound) {
+////
+////            }else{
+////               notes= [notes stringByAppendingString:@"\nPRICE MODIFIED"];
+////            }
+//        }
+//        else
+//
+//        {
+////            notes =@"";
+//        }
+        
+        __block UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Update Discount" completion:^{
+            
+            [RANetwork request_order_discount:discount completionHandler:^(NSMutableDictionary *result) {
+                [waitalert dismissViewControllerAnimated:YES completion:^{
+                    
+                    int iresult = [result[@"result"] intValue];
+                    if(iresult==RESULT_TRUE)
+                    {
+                        [self reload_data];
+                    }
+                    else
+                    {
+                        [RAUtils message_alert:@"Can't set order discount, please contact administrator" title:@"Set Order Discount" controller:self];
+                    }
+//                                               if([[cart_json valueForKey:@"result"] intValue]==2)
+//                                               {
+//                                                   [item_json setValue:[NSNumber numberWithDouble:price ] forKey:@"unit_price"];
+//
+//                                                   [item_json setValue:[NSNumber numberWithDouble:discount ] forKey:@"discount"];
+//               //                                    [item_json setValue:notes forKey:@"note"];
+//
+//               //                                    RASingleton.sharedInstance.scan_cart[@"section_0"][[NSString stringWithFormat:@"item_%d",indexPath.row]]=item_json;
+//               //                                    if (self.back_order_flag) {
+//               //                                        [self updateItemJson:item_json atIndexPath:indexPath];
+//               //                                    } else {
+//               //                                        self.content_arr[indexPath.row ] = item_json;
+//               //                                    }
+//               //                                    tableView.editing = false;
+//                                                   //                        [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationMiddle];
+//                                                   //                        [self refresh_total];
+//
+//
+//                                                   [self reload_data];
+//
+//                           #ifdef RA_NOTIFICATION
+//                                                   [ActiveViewController Notify:@"OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+//                           #else
+//                                                   AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//                                                   [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
+//                           #endif
+//                                               }
+//                                               else
+//                                               {
+//                                                   [RAUtils message_alert:[cart_json valueForKey:@"err_msg"] title:@"Update Price" controller:self] ;
+//                                               }
+                                           }];
+            }];
+//            [RANetwork request_update_cart_modelprice:cartid price:price discount:discount notes:nil completionHandler:^(NSMutableDictionary *result) {
+//                                        NSDictionary* cart_json = result;
+//
+//                            [waitalert dismissViewControllerAnimated:YES completion:^{
+//                                if([[cart_json valueForKey:@"result"] intValue]==2)
+//                                {
+//                                    [item_json setValue:[NSNumber numberWithDouble:price ] forKey:@"unit_price"];
+//
+//                                    [item_json setValue:[NSNumber numberWithDouble:discount ] forKey:@"discount"];
+////                                    [item_json setValue:notes forKey:@"note"];
+//
+////                                    RASingleton.sharedInstance.scan_cart[@"section_0"][[NSString stringWithFormat:@"item_%d",indexPath.row]]=item_json;
+////                                    if (self.back_order_flag) {
+////                                        [self updateItemJson:item_json atIndexPath:indexPath];
+////                                    } else {
+////                                        self.content_arr[indexPath.row ] = item_json;
+////                                    }
+////                                    tableView.editing = false;
+//                                    //                        [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationMiddle];
+//                                    //                        [self refresh_total];
+//
+//
+//                                    [self reload_data];
+//
+//            #ifdef RA_NOTIFICATION
+//                                    [ActiveViewController Notify:@"OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+//            #else
+//                                    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//                                    [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
+//            #endif
+//                                }
+//                                else
+//                                {
+//                                    [RAUtils message_alert:[cart_json valueForKey:@"err_msg"] title:@"Update Price" controller:self] ;
+//                                }
+//                            }];
+//
+//
+//
+//
+//
+//
+//                        }];
+
+        }];
+   
+       
+    };
+    
+    UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:vc] ;
+    
+    
+    
+    
+    
+    //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
+    
+    navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
+    [self presentViewController:navi animated:YES completion:^{
+        
+        //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
+        
+        DebugLog(@"EditModelPriceViewController present.........");
+        
+        //   self.btop = false;
+        //  <#code#>
+    }];
+    
+#endif
+    
 }
 
 - (IBAction)onPlaceOrder:(UIButton *)sender {
@@ -3776,7 +3961,13 @@
     cell.cart_id = cart_item_id;
     
     if(/*appDelegate.user_type==USER_ROLE_CUSTOMER*/ true)
+ {
+#ifdef IGNORE_MPACK
+        [cell init_Stepper:1 max:9999 min:stockUom value:count];
+#else
         [cell init_Stepper:stockUom max:9999 min:stockUom value:count];
+#endif
+ }
 //    else
 //        [cell init_Stepper:1 max:9999 min:1 value:count];
     

+ 19 - 0
RedAnt ERP Mobile/common/Functions/cart/OrderDiscountViewController.h

@@ -0,0 +1,19 @@
+//
+//  OrderDiscountViewController.h
+//  iSales-CONTRAST
+//
+//  Created by Rui Zhang on 7/5/22.
+//  Copyright © 2022 United Software Applications, Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface OrderDiscountViewController : UIViewController
+@property (nonatomic , copy) void (^onSetValue)(double discount);
+@property (weak, nonatomic) IBOutlet UITextField *textfieldDiscount;
+@property int discount;
+@end
+
+NS_ASSUME_NONNULL_END

+ 68 - 0
RedAnt ERP Mobile/common/Functions/cart/OrderDiscountViewController.m

@@ -0,0 +1,68 @@
+//
+//  OrderDiscountViewController.m
+//  iSales-CONTRAST
+//
+//  Created by Rui Zhang on 7/5/22.
+//  Copyright © 2022 United Software Applications, Inc. All rights reserved.
+//
+
+#import "OrderDiscountViewController.h"
+#define NUMBERS @"0123456789\n"
+
+@interface OrderDiscountViewController ()
+
+@end
+
+@implementation OrderDiscountViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+}
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+- (IBAction)onUpdate:(id)sender {
+    [self dismissViewControllerAnimated:NO
+                             completion:^{
+                                 if(self.onSetValue)
+                                     self.onSetValue( [self.textfieldDiscount.text intValue]);
+    }];
+}
+- (IBAction)onCancel:(id)sender {
+    [self dismissViewControllerAnimated:NO
+                             completion:^{
+                                 
+                                 
+                             }];
+}
+
+
+-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
+    
+    
+//    DebugLog(@"text:%@",textField.text);
+    
+    
+  
+    NSCharacterSet *cs;
+    cs = [[NSCharacterSet characterSetWithCharactersInString:NUMBERS]invertedSet];
+    
+    NSString *filtered = [[string componentsSeparatedByCharactersInSet:cs]componentsJoinedByString:@""];
+    
+    BOOL canChange = [string isEqualToString:filtered];
+    
+    
+    
+    
+    return canChange;
+}
+
+@end

+ 1 - 1
RedAnt ERP Mobile/common/Functions/category/CategorySearchFilterViewController.m

@@ -62,7 +62,7 @@
     self.navigationItem.rightBarButtonItem = closeButton;
     
     
-    self.edgesForExtendedLayout = UIRectEdgeNone;
+//    self.edgesForExtendedLayout = UIRectEdgeNone;
     
     
     {

+ 6 - 1
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m

@@ -877,7 +877,7 @@
 -(void) addtocart:(int) count
 {
     AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-
+#ifdef MPACK
     if(self.cqty>0)
     {
         
@@ -1234,8 +1234,12 @@
         
     }
     else
+#endif
     {
         
+        
+        
+#ifdef MPACK
         int c=self.cqty+count;
         
         int m=c%self.step;
@@ -1395,6 +1399,7 @@
             
         }
         else
+#endif
         {
             NSString* model_name=self.model_label.text;
             

+ 7 - 1
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -140,10 +140,16 @@ dispatch_async(dispatch_get_main_queue(), ^{
             NSMutableDictionary* imgsection = [[detail_json objectForKey:@"img_section"] mutableCopy];
             //          AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
             if(/*appDelegate.user_type==USER_ROLE_CUSTOMER*/true)
+            {
+#ifdef IGNORE_MPACK
+                self.quantity = 1;
+#else
+                
                 self.quantity =[[imgsection valueForKey:@"stockUom"] intValue];
+#endif
 //            else
 //                self.quantity =1;
-            
+            }
             if(self.quantity==0)
                 self.quantity=1;
             self.step=self.quantity;

+ 3 - 1
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.h

@@ -149,7 +149,7 @@ typedef void(^resultHandler)(NSMutableDictionary *result);
 //+(void) offline_add2cartbyname :(NSMutableDictionary *) params completionHandler:(resultHandler)result;
 //+(void) offline_movewish2cart:(NSMutableDictionary *)params completionHandler:(resultHandler)result;
 //+(void) addAll:(NSMutableDictionary *) params from:(int)from completionHandler:(resultHandler)result;
-
++(NSData*) offline_cartsetallprice :(NSMutableDictionary *) params;
 
 //scan order
 +(void) saveScanCart:(NSMutableDictionary*) cart;
@@ -169,4 +169,6 @@ typedef void(^resultHandler)(NSMutableDictionary *result);
 +(void) realguestLogin;
 +(NSString*) getScanOrderPath;
 +(NSString*) getScanOrderPathByCode:(NSString*) order_code;
+
+
 @end

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

@@ -8435,6 +8435,14 @@
     return result ? result : @"";
     
 }
++ (NSString *)rchangeDateFormate:(NSString *)dateTime {
+    return [self changeDateTime:dateTime Formate:@"MM/dd/yyyy" withFormate:@"yyyy-MM-dd"];
+    //    return [self timeFormat:dateTime from:@"YYYY-MM-DD HH:mm:ss" to:@"MM/DD/YYYY HH:mm:ss"];
+}
++ (NSString *)changeDateFormate:(NSString *)dateTime {
+    return [self changeDateTime:dateTime Formate:@"yyyy-MM-dd" withFormate:@"MM/dd/yyyy"];
+    //    return [self timeFormat:dateTime from:@"YYYY-MM-DD HH:mm:ss" to:@"MM/DD/YYYY HH:mm:ss"];
+}
 
 + (NSString *)changeDateTimeFormate:(NSString *)dateTime {
     return [self changeDateTime:dateTime Formate:@"yyyy-MM-dd HH:mm:ss" withFormate:@"MM/dd/yyyy HH:mm:ss"];
@@ -9602,7 +9610,51 @@
 }
 
 #pragma mark set price
-
++(NSDictionary*) offline_cartsetallprice :(NSMutableDictionary *) params
+{
+    DebugLog(@"cart set price params: %@",params);
+    //    "cartitem_id" = 1;
+    //    discount = "0.000000";
+    //    "item_note" = "";
+    //     price = "269.000000";
+    NSString *order_code = [self valueInParams:params key:@"orderCode"];
+    //NSString *notes = [self valueInParams:params key:@"item_note"];
+    NSString *discount = [self valueInParams:params key:@"app_discount"];
+//    NSString *price = [self valueInParams:params key:@"price"];
+    
+    //    bool badd_price_changed=false;
+    //    sqlite3* db=[iSalesDB get_db];
+    //    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    //    NSNumber* default_price = [self get_model_default_price:appDelegate.contact_id product_id:nil item_id:_id db:db];
+    //    NSRange range;
+    //    range = [notes rangeOfString:@"PRICE MODIFIED"];
+    //
+    //    if((default_price.doubleValue!=price.doubleValue || discount.intValue!=0 ) && range.location == NSNotFound)
+    //        badd_price_changed=true;
+    //    [iSalesDB close_db:db];
+    //
+    //    if(badd_price_changed)
+    //    {
+    //        notes=[NSString stringWithFormat:@"%@\n%@",@"PRICE MODIFIED",notes];
+    //    }
+    //
+    
+    
+//    price = [self translateSingleQuote:[AESCrypt fastencrypt:price]];
+    
+    NSString *sql = [NSString stringWithFormat:@"update offline_cart set discount = %f  where so_no = '%@",discount.doubleValue,order_code];
+    
+    int ret = [iSalesDB execSql:sql];
+    
+    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
+    [dic setValue:[NSNumber numberWithInteger:ret] forKey:@"result"];
+    [dic setValue:@"Regular Mode" forKey:@"mode"];
+    //    [dic setValue:@"160409" forKey:@"min_ver"];
+    
+//    return [RAConvertor dict2data:dic];
+    return dic;
+    
+}
 +(NSData*) offline_cartsetprice :(NSMutableDictionary *) params
 {
     DebugLog(@"cart set price params: %@",params);
@@ -10641,7 +10693,7 @@
     NSString *orderCode = [self valueInParams:params key:@"orderCode"];
     orderCode = [self translateSingleQuote:orderCode];
     
-    NSString *sql = [NSString stringWithFormat:@"select poNumber,must_call,internal_notes,general_notes from offline_order where so_id = '%@';",orderCode];
+    NSString *sql = [NSString stringWithFormat:@"select poNumber,must_call,internal_notes,general_notes,schedule_date from offline_order where so_id = '%@';",orderCode];
     
     [iSalesDB jk_query:sql db:db close:NO completion:^(sqlite3_stmt *stmt, NSMutableDictionary *container, long *count) {
         
@@ -10649,6 +10701,7 @@
         int mustCall = sqlite3_column_int(stmt, 1);
         //        NSString *internalNotes = [self textAtColumn:2 statement:stmt];
         NSString *generalNotes = [self textAtColumn:3 statement:stmt];
+        NSString *schedule_date = [self textAtColumn:4 statement:stmt];
         
         NSDictionary *po_dic = @{
             @"aname" : @"PO#",
@@ -10657,6 +10710,18 @@
             @"name" : @"poNumber",
             @"value" : poNumber
         };
+#ifdef BUILD_CONTRAST
+        
+        NSString* nsdate = [self changeDateFormate:schedule_date]; // 与在线统一
+        NSDictionary *schedule_dict = @{
+            @"aname" : @"Schdule Date",
+            @"control" : @"datepicker",
+            @"type": @"date",
+            @"required": @"true",
+            @"name" : @"schedule_date_str",
+            @"value" : nsdate
+        };
+#endif
         NSDictionary *must_call_dic = @{
             @"aname" : @"MUST CALL BEFORE DELIVERY",
             @"control" : @"switch",
@@ -10680,12 +10745,29 @@
         //                                             @"value" : internalNotes
         //                                             };
         
+#ifdef BUILD_CONTRAST
+
+        [dic setValue:po_dic forKey:@"item_0"];
+        [dic setValue:schedule_dict forKey:@"item_1"];
+        [dic setValue:must_call_dic forKey:@"item_2"];
+        [dic setValue:general_notes_dic forKey:@"item_3"];
+
+        
+#else
+        
+        
         [dic setValue:po_dic forKey:@"item_0"];
         [dic setValue:must_call_dic forKey:@"item_1"];
         [dic setValue:general_notes_dic forKey:@"item_2"];
+#endif
         //        [dic setValue:internal_notes_dic forKey:@"item_3"];
     }];
+    
+#ifdef BUILD_CONTRAST
+    [dic setValue:[NSNumber numberWithInteger:4] forKey:@"count"];
+#else
     [dic setValue:[NSNumber numberWithInteger:3] forKey:@"count"];
+#endif
     
     return dic;
 }
@@ -11223,8 +11305,42 @@
             @"value_id" : type_id
         }.mutableCopy;
         
-        if ([type_id isEqualToString:@"Visa/Master"] || [type_id isEqualToString:@"Credit Card"]) {
-            NSDictionary *sub_item = @{
+        if ([type_id.lowercaseString isEqualToString:@"Visa/Master".lowercaseString] || [type_id.lowercaseString isEqualToString:@"Credit Card".lowercaseString]) {
+            NSDictionary *sub_item =nil;
+#ifdef BUILD_CONTRAST
+            sub_item =  @{
+                @"count" : @(3),
+                                                @"item_0" : @{
+                                    @"aname" : @"Number",
+                                    @"control" : @"edit",
+                                    @"keyboard" : @"int",
+                                    @"length" : @"16",
+                                    @"name" : @"credit_card_number",
+                                    @"required" : @"true",
+                                    @"value" : cardNumber
+                                },
+                                                               @"item_1" : @{
+                                    @"aname" : @"Expiration Date",
+                                    @"control" : @"monthpicker",
+                                    @"name" : @"credit_card_expiration",
+                                    @"required" : @"true",
+                                    @"type" : @"date",
+                                    @"value" : [month isEqualToString:@""] || [year isEqualToString:@""] ? @"" : [NSString stringWithFormat:@"%@/%@",month,year]
+                                },
+                                @"item_2" : @{
+                                    @"aname" : @"Security Code",
+                                    @"control" : @"edit",
+                                    @"keyboard" : @"int",
+                                    @"length" : @"3",
+                                    @"name" : @"credit_card_security_code",
+                                    @"required" : @"true",
+                                    @"value" : securityCode
+                                },
+               
+            };
+#else
+            
+            sub_item= @{
                 @"count" : @(3),
                 @"item_0" : @{
                     @"aname" : @"choose",
@@ -11376,6 +11492,7 @@
                     @"single_select" : @"true"
                 }
             };
+#endif;
             [val setObject:sub_item forKey:@"sub_item"];
         }
         
@@ -12022,6 +12139,14 @@
     NSString *general_notes = [self valueInParams:param key:@"comments" translateSingleQuote:YES];
     general_notes = [NSString stringWithFormat:@"general_notes = '%@',",general_notes] ;
     
+    NSString* schedule_date = [self valueInParams:param key:@"schedule_date_str"];
+    if (schedule_date.length==0 ) {
+        schedule_date = @"";
+    } else {
+        schedule_date = [self rchangeDateFormate:schedule_date];
+        schedule_date = [NSString stringWithFormat:@"schedule_date = '%@',",schedule_date];
+    }
+    
     NSString *internal_notes = [self valueInParams:param key:@"internal_notes" translateSingleQuote:YES];
     internal_notes = [NSString stringWithFormat:@"internal_notes = '%@',",internal_notes];
     
@@ -12400,7 +12525,7 @@
         sync_sql = [NSString stringWithFormat:@",sync_data = '%@' ",sync_data];
     }
     
-    NSString *orderSql = [NSString stringWithFormat:@"update offline_order set %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ so_id = '%@' %@ where so_id = '%@';",order_status,general_notes,internal_notes,poNumber,must_call,sign_picpath,total_price,paymentsAndCredits,handling_fee_placeholder,lift_gate,lift_gate_placeholder,logist,logistic_note,erpOrderStatus,paymentType,credit_card_address1,credit_card_address2,credit_card_city,credit_card_first_name,credit_card_last_name,credit_card_number,credit_card_security_code,credit_card_state,credit_card_type,credit_card_zipcode,credit_card_expiration_year,credit_card_expiration_month,customer_cid,customer_contact,customer_email,customer_phone,customer_fax,receive_cid,receive_name,receive_ext,receive_contact,receive_phone,receive_email,receive_fax,sender_cid,sender_name,sender_ext,sender_contact,sender_phone,sender_fax,sender_email,shipping_billto_cid,shipping_billto_name,shipping_billto_ext,shipping_billto_contact,shipping_billto_phone,shipping_billto_fax,shipping_billto_email,billing_cid,billing_name,billing_ext,billing_contact,billing_phone,billing_fax,billing_email,returnto_cid,returnto_name,returnto_ext,returnto_contact,returnto_phone,returnto_fax,returnto_email,so_id,sync_sql,so_id];
+    NSString *orderSql = [NSString stringWithFormat:@"update offline_order set %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ %@ so_id = '%@' %@ where so_id = '%@';",schedule_date, order_status,general_notes,internal_notes,poNumber,must_call,sign_picpath,total_price,paymentsAndCredits,handling_fee_placeholder,lift_gate,lift_gate_placeholder,logist,logistic_note,erpOrderStatus,paymentType,credit_card_address1,credit_card_address2,credit_card_city,credit_card_first_name,credit_card_last_name,credit_card_number,credit_card_security_code,credit_card_state,credit_card_type,credit_card_zipcode,credit_card_expiration_year,credit_card_expiration_month,customer_cid,customer_contact,customer_email,customer_phone,customer_fax,receive_cid,receive_name,receive_ext,receive_contact,receive_phone,receive_email,receive_fax,sender_cid,sender_name,sender_ext,sender_contact,sender_phone,sender_fax,sender_email,shipping_billto_cid,shipping_billto_name,shipping_billto_ext,shipping_billto_contact,shipping_billto_phone,shipping_billto_fax,shipping_billto_email,billing_cid,billing_name,billing_ext,billing_contact,billing_phone,billing_fax,billing_email,returnto_cid,returnto_name,returnto_ext,returnto_contact,returnto_phone,returnto_fax,returnto_email,so_id,sync_sql,so_id];
     
     DebugLog(@"save order contactSql: %@",contactSql);
     DebugLog(@"save order orderSql: %@",orderSql);

+ 1 - 1
RedAnt ERP Mobile/common/Functions/offline/OfflineSettingViewController.m

@@ -166,7 +166,7 @@
     
     
     
-    self.edgesForExtendedLayout = UIRectEdgeNone ;
+//    self.edgesForExtendedLayout = UIRectEdgeNone ;
     
     UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"close"] imageWithRenderingMode:UIImageRenderingModeAutomatic]
                                                                     style:UIBarButtonItemStylePlain

+ 1 - 1
RedAnt ERP Mobile/common/Functions/offline/SyncControlPanelViewController.m

@@ -18,7 +18,7 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    self.edgesForExtendedLayout = UIRectEdgeNone ;
+//    self.edgesForExtendedLayout = UIRectEdgeNone ;
     
     self.closeButton = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"close"] imageWithRenderingMode:UIImageRenderingModeAutomatic]
                                                                     style:UIBarButtonItemStylePlain

+ 7 - 2
RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m

@@ -16,7 +16,10 @@
 #import "CreditCardEditorViewController.h"
 #import "JKTimerManager.h"
 #import "ZipArchive.h"
+
+#ifdef SCANNER_ORDER
 #import "StockViewController.h"
+#endif
 
 #define SUBMIT_CONFIRM 123
 #define KEEP_TAIL 456
@@ -3096,6 +3099,8 @@
 //    [self clear];
 }
 
+
+#ifdef SCANNER_ORDER
 -(NSMutableDictionary*) convertScanitem :(NSMutableDictionary*) itemjson
 {
     
@@ -3719,7 +3724,7 @@
 
     return;
 }
-
+#endif
 - (void)empolyee_commit_order:(NSMutableDictionary *)upparams {
     
     
@@ -3827,7 +3832,7 @@
                 return;
                 
             }
-            else if([result[@"result"] intValue]==-4||[result[@"result"] intValue]==4-3)
+            else if([result[@"result"] intValue]==-4||[result[@"result"] intValue]==-3)
             {
                 self.fail_submit = true;
                 self.realuser = nil;

+ 91 - 78
RedAnt ERP Mobile/common/data_provider/RADataProvider.m

@@ -10,6 +10,84 @@
 #import "ZipArchive.h"
 @implementation RADataProvider
 
+#ifdef SCANNER_ORDER
+
++(NSMutableDictionary*)scan_search:(NSString*)keyword
+{
+//    NSMutableArray* arr = [NSMutableArray new];
+    
+    int count = 0;
+    NSMutableDictionary * ret = [NSMutableDictionary new];
+    ret[@"result"]=@2;
+    AppDelegate *appDelegate = nil;
+    
+    appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
+    
+//    NSArray* keys=[dict allKeys];
+    
+    for(int i=0;i<appDelegate.scan_model_key.count;i++)
+    {
+        NSString* key = appDelegate.scan_model_key[i];
+        if([key.lowercaseString containsString:keyword.lowercaseString]||keyword.length==0)
+        {
+            ret[[NSString stringWithFormat:@"item_%d",count]]=appDelegate.scan_model[key];
+//            [arr addObject:dict[key]];
+            count ++;
+        }
+        
+        
+    }
+    ret[@"count"]=@(count);
+    return ret;
+//    int a=0;
+    
+}
++(void)request_scansearch:(long ) offset limit :(long)limit keywords :(NSString*) keywords completionHandler:(resultHandler)result
+{
+
+    result([self scan_search:keywords]);
+    
+    return;
+    
+    NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
+    AppDelegate *appDelegate = nil;
+    
+    appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
+//    if(appDelegate.user!=nil)
+//        [params setValue:appDelegate.user forKey:@"user"];
+//    if(appDelegate.contact_id!=nil)
+//        [params setValue:appDelegate.contact_id forKey:@"contactId"];
+//    if(appDelegate.password!=nil)
+//        [params setValue:appDelegate.password forKey:@"password"];
+//    if(appDelegate.order_code!=nil)
+//        [params setValue:appDelegate.order_code forKey:@"orderCode"];
+    //    [params setValue:[NSString stringWithFormat:@"%d",price_template]  forKey:@"price_template"];
+    //    [params setValue:[NSString stringWithFormat:@"%d",customid]  forKey:@"custom_id"];
+    //    [params setValue:[NSString stringWithFormat:@"%@",category]  forKey:@"category"];
+    //    [params setValue:[NSString stringWithFormat:@"%d",sort_by]  forKey:@"sort_by"];
+    //    [params setValue:filter forKey:@"filter"];
+    [params setValue:keywords forKey:@"keyword"];
+    [params setValue:@"search" forKey:@"_method"];
+    params[@"site_name"]=[self getSiteName];
+    [params setValue:[NSString stringWithFormat:@"%ld",limit]  forKey:@"limit"];
+    [params setValue:[NSString stringWithFormat:@"%ld",offset]  forKey:@"offset"];
+ 
+
+    [self request_interface:URL_SEARCH parameters:params err_record_url:nil completionHandler:result retry:0];
+    //    if(appDelegate.offline_mode)
+    //    {
+    //        return [OLDataProvider offline_search:params];
+    //    }
+    //    if(![self IsNetworkAvailable])
+    //        return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
+    //
+    //    NSData* json=[self get_json:URL_SEARCH parameters:params];
+    //    if(json==nil)
+    //        return nil;
+    //    NSError *error=nil;
+    //    NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
+    //    return jsobj;
+}
 +(void)encrypt_scan_models
 {
     return;
@@ -57,11 +135,15 @@
        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
        [dateFormatter setDateFormat:@"yyyy-MM-dd"];
 
-NSDate * ddate =[dateFormatter dateFromString:@"2022-07-9"];
+NSDate * ddate =[dateFormatter dateFromString:@"2022-07-14"];
     
 //    bool review=[cdate earlierDate:ddate];
     NSTimeInterval secondsInterval= [cdate timeIntervalSinceDate:ddate];
     int sec =secondsInterval;
+    
+#ifdef DEBUG
+    return false;
+#endif
     return sec<0;
 }
 +(void) updateTemplate:(UIViewController*) vc
@@ -250,6 +332,7 @@ NSDate * ddate =[dateFormatter dateFromString:@"2022-07-9"];
     
     
 }
+
 + (NSArray*)sortedDictionary:(NSDictionary *)dict{
     
     //将所有的key放进数组
@@ -308,9 +391,13 @@ NSDate * ddate =[dateFormatter dateFromString:@"2022-07-9"];
 +(void)request_scan_stock:(NSMutableDictionary*)param completionHandler:(resultHandler)result
 {
 
-//    
+    param[@"site_name"]=[self getSiteName];
     param[@"_method"]=@"orderItemCheckStock";
-    [self request_interface:URL_SCAN_NEWS parameters:param err_record_url:nil completionHandler:result retry:0];
+    AppDelegate *appDelegate = nil;
+    
+    appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
+    NSString* url = [appDelegate.address stringByAppendingPathComponent:URL_CHECK_STOCK];
+    [self request_interface:url parameters:param err_record_url:nil completionHandler:result retry:0];
 }
 
 +(void) request_scan_server :(resultHandler)result
@@ -351,6 +438,7 @@ NSDate * ddate =[dateFormatter dateFromString:@"2022-07-9"];
     }
     return @"";
 }
+#endif
 +(void)request_change_password:(NSString*) pwd completionHandler:(resultHandler)result
 {
     
@@ -412,82 +500,7 @@ NSDate * ddate =[dateFormatter dateFromString:@"2022-07-9"];
     NSString* url = [appDelegate.address stringByAppendingPathComponent:URL_SIGN_UP];
     [self request_interface:url parameters:param err_record_url:nil completionHandler:result retry:0];
 }
-+(NSMutableDictionary*)scan_search:(NSString*)keyword
-{
-//    NSMutableArray* arr = [NSMutableArray new];
-    
-    int count = 0;
-    NSMutableDictionary * ret = [NSMutableDictionary new];
-    ret[@"result"]=@2;
-    AppDelegate *appDelegate = nil;
-    
-    appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
-    
-//    NSArray* keys=[dict allKeys];
-    
-    for(int i=0;i<appDelegate.scan_model_key.count;i++)
-    {
-        NSString* key = appDelegate.scan_model_key[i];
-        if([key.lowercaseString containsString:keyword.lowercaseString]||keyword.length==0)
-        {
-            ret[[NSString stringWithFormat:@"item_%d",count]]=appDelegate.scan_model[key];
-//            [arr addObject:dict[key]];
-            count ++;
-        }
-        
-        
-    }
-    ret[@"count"]=@(count);
-    return ret;
-//    int a=0;
-    
-}
-+(void)request_scansearch:(long ) offset limit :(long)limit keywords :(NSString*) keywords completionHandler:(resultHandler)result
-{
-
-    result([self scan_search:keywords]);
-    
-    return;
-    
-    NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
-    AppDelegate *appDelegate = nil;
-    
-    appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
-//    if(appDelegate.user!=nil)
-//        [params setValue:appDelegate.user forKey:@"user"];
-//    if(appDelegate.contact_id!=nil)
-//        [params setValue:appDelegate.contact_id forKey:@"contactId"];
-//    if(appDelegate.password!=nil)
-//        [params setValue:appDelegate.password forKey:@"password"];
-//    if(appDelegate.order_code!=nil)
-//        [params setValue:appDelegate.order_code forKey:@"orderCode"];
-    //    [params setValue:[NSString stringWithFormat:@"%d",price_template]  forKey:@"price_template"];
-    //    [params setValue:[NSString stringWithFormat:@"%d",customid]  forKey:@"custom_id"];
-    //    [params setValue:[NSString stringWithFormat:@"%@",category]  forKey:@"category"];
-    //    [params setValue:[NSString stringWithFormat:@"%d",sort_by]  forKey:@"sort_by"];
-    //    [params setValue:filter forKey:@"filter"];
-    [params setValue:keywords forKey:@"keyword"];
-    [params setValue:@"search" forKey:@"_method"];
-    params[@"site_name"]=[self getSiteName];
-    [params setValue:[NSString stringWithFormat:@"%ld",limit]  forKey:@"limit"];
-    [params setValue:[NSString stringWithFormat:@"%ld",offset]  forKey:@"offset"];
- 
 
-    [self request_interface:URL_SEARCH parameters:params err_record_url:nil completionHandler:result retry:0];
-    //    if(appDelegate.offline_mode)
-    //    {
-    //        return [OLDataProvider offline_search:params];
-    //    }
-    //    if(![self IsNetworkAvailable])
-    //        return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
-    //
-    //    NSData* json=[self get_json:URL_SEARCH parameters:params];
-    //    if(json==nil)
-    //        return nil;
-    //    NSError *error=nil;
-    //    NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
-    //    return jsobj;
-}
 +(void)request_editor:(NSString*) request_url params:(NSMutableDictionary*)params completionHandler:(resultHandler)result
 {
     //    NSMutableDictionary* params = [[NSMutableDictionary alloc] init];

+ 1 - 1
RedAnt ERP Mobile/common/data_provider/RANetwork.h

@@ -274,7 +274,7 @@ extern NSString *const ScreenCodeOfflineSync;
 + (void)request_fastupload:(NSMutableDictionary *)params filename:(NSString*)filename data:(NSData*) data url:(NSString *)url completionHandler:(resultHandler)result;
 +(void)request_err_log:(NSString*) up_params result:(NSString*)result_str module:(NSString*) module code:(int) code completionHandler:(resultHandler)result;
 
-
++(void)request_order_discount:(double)discount completionHandler:(resultHandler)result;
 
 +(int)parse_logininfo : (NSMutableDictionary *) jsobj user:(NSString*) user password:(NSString*) password;
 @end

+ 42 - 0
RedAnt ERP Mobile/common/data_provider/RANetwork.m

@@ -7390,6 +7390,48 @@ NSString *const ScreenCodeOfflineSync = @"Offline Sync Screen";
     //    else
     //        return nil;
 }
++(void)request_order_discount:(double)discount completionHandler:(resultHandler)result
+{
+    NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
+    AppDelegate *appDelegate = nil;
+    
+    
+    appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
+    
+    if(appDelegate.user!=nil)
+        [params setValue:appDelegate.user forKey:@"user"];
+    //    if(appDelegate.contact_id!=nil)
+    //        [params setValue:appDelegate.contact_id forKey:@"contactId"];
+    if(appDelegate.password!=nil)
+        [params setValue:appDelegate.password forKey:@"password"];
+    
+    if(appDelegate.order_code!=nil)
+        [params setValue:appDelegate.order_code forKey:@"orderCode"];
+    [params setValue:@(discount) forKey:@"app_discount"];
+    if(appDelegate.offline_mode)
+    {
+        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            NSMutableDictionary* json = [[OLDataProvider offline_cartsetallprice:params] mutableCopy];
+            dispatch_async(dispatch_get_main_queue(), ^{
+                result(json);
+            });
+        });
+
+        return;
+//        
+//        
+//        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+//            NSMutableDictionary* json = [[OLDataProvider offline_notimpl] mutableCopy];
+//            dispatch_async(dispatch_get_main_queue(), ^{
+//                result(json);
+//            });
+//        });
+//        
+//        return;
+        
+    }
+    [self request_interface:URL_ORDER_DISCOUNT parameters:params err_record_url:nil completionHandler:result retry:0];
+}
 +(void)request_cart:(int)sort completionHandler:(resultHandler)result
 {
     

+ 2 - 2
RedAnt ERP Mobile/common/data_provider/iSalesDB.m

@@ -700,7 +700,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
     
     NSString* create_offline_login=@"CREATE TABLE IF NOT EXISTS offline_login ( _id INTEGER PRIMARY KEY, username VARCHAR(40),password VARCHAR(40), can_show_price integer ,can_see_price integer,contact_id VARCHAR(20),user_type integer,can_cancel_order integer,can_set_cart_price integer,can_create_portfolio integer, can_delete_order integer,can_submit_order integer,can_set_tearsheet_price integer,can_create_order integer, can_update_contact_info integer, mode VARCHAR(20), default_price text, price text, user_id integer,sales_code text,first_name text,last_name text);";
     
-    NSString* create_offline_order=@"CREATE TABLE IF NOT EXISTS offline_order ( _id INTEGER PRIMARY KEY,so_id text, order_id text ,status integer, submit_as integer,general_notes TEXT ,internal_notes text,sales_rep TEXT,create_by TEXT, total_price float, erpOrderStatus integer, logist text, lift_gate integer, logistic_note text, paymentType text, credit_card_first_name text, credit_card_last_name text, credit_card_address1 text, credit_card_address2 text, credit_card_zipcode text, credit_card_type text, credit_card_number text, credit_card_security_code text, credit_card_expiration_month text , credit_card_expiration_year text,credit_card_city text, credit_card_state text,customer_cid text,customer_contact text,customer_email text,customer_phone text,customer_fax text,receive_cid text,receive_name text,receive_ext text,receive_contact text, receive_phone text,receive_fax text,receive_email text,sender_cid text,sender_name text,sender_ext text,sender_contact text, sender_phone text,sender_fax text,sender_email text,shipping_billto_cid text,shipping_billto_name text,shipping_billto_ext text,shipping_billto_contact text, shipping_billto_phone text,shipping_billto_fax text,shipping_billto_email text,billing_cid text,billing_name text,billing_ext text,billing_contact text, billing_phone text,billing_fax text,billing_email text,returnto_cid text,returnto_name text,returnto_ext text,returnto_contact text, returnto_phone text,returnto_fax text,returnto_email text, must_call int,poNumber text,comments text,comments_ext text,paymentsAndCredits float,shipping float,lift_gate_value float,handling_fee_value float,sign_picpath text,sync_data text,ship_via text,create_time TIMESTAMP default (datetime('now', 'localtime')),modify_time TIMESTAMP default (datetime('now', 'localtime')),vendor_no char,warehouse_name char,terms char,etd TIMESTAMP,carrier char ,sales_terms char,port_destination char);";
+    NSString* create_offline_order=@"CREATE TABLE IF NOT EXISTS offline_order ( _id INTEGER PRIMARY KEY,so_id text, order_id text ,status integer, submit_as integer,general_notes TEXT ,internal_notes text,sales_rep TEXT,create_by TEXT, total_price float, erpOrderStatus integer, logist text, lift_gate integer, logistic_note text, paymentType text, credit_card_first_name text, credit_card_last_name text, credit_card_address1 text, credit_card_address2 text, credit_card_zipcode text, credit_card_type text, credit_card_number text, credit_card_security_code text, credit_card_expiration_month text , credit_card_expiration_year text,credit_card_city text, credit_card_state text,customer_cid text,customer_contact text,customer_email text,customer_phone text,customer_fax text,receive_cid text,receive_name text,receive_ext text,receive_contact text, receive_phone text,receive_fax text,receive_email text,sender_cid text,sender_name text,sender_ext text,sender_contact text, sender_phone text,sender_fax text,sender_email text,shipping_billto_cid text,shipping_billto_name text,shipping_billto_ext text,shipping_billto_contact text, shipping_billto_phone text,shipping_billto_fax text,shipping_billto_email text,billing_cid text,billing_name text,billing_ext text,billing_contact text, billing_phone text,billing_fax text,billing_email text,returnto_cid text,returnto_name text,returnto_ext text,returnto_contact text, returnto_phone text,returnto_fax text,returnto_email text, must_call int,poNumber text,comments text,comments_ext text,paymentsAndCredits float,shipping float,lift_gate_value float,handling_fee_value float,sign_picpath text,sync_data text,ship_via text,create_time TIMESTAMP default (datetime('now', 'localtime')),modify_time TIMESTAMP default (datetime('now', 'localtime')),schedule_date TIMESTAMP,vendor_no char,warehouse_name char,terms char,etd TIMESTAMP,carrier char ,sales_terms char,port_destination char);";
     
     
     
@@ -825,7 +825,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
     [self alterTable:@"wishlist" columns:@"is_delete integer" rename:NO db:db];
     [self alterTable:@"wishlist" columns:@"is_dirty integer" rename:NO db:db];
     
-    [self alterTable:@"offline_order" columns:@"modify_time TIMESTAMP" rename:NO db:db];
+    [self alterTable:@"offline_order" columns:@"modify_time TIMESTAMP;schedule_date TIMESTAMP" rename:NO db:db];
     [self alterTable:@"offline_order" columns:@"ship_via text" rename:NO db:db];
     [self alterTable:@"offline_order" columns:@"vendor_no char;warehouse_name  char;terms char;etd TIMESTAMP;carrier char;sales_terms char;port_destination char" rename:NO db:db];
     

+ 10 - 4
RedAnt ERP Mobile/iSales-CONTRAST.xcodeproj/project.pbxproj

@@ -75,6 +75,7 @@
 		3CDDB268273A5A0400681F78 /* StrikethroughLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CDDB267273A5A0400681F78 /* StrikethroughLabel.m */; };
 		3CDDB26B273A5A1500681F78 /* CustomIOSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CDDB269273A5A1400681F78 /* CustomIOSAlertView.m */; };
 		3CDDB26E273A5A7800681F78 /* RAUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CDDB26C273A5A7800681F78 /* RAUtils.m */; };
+		3CE660602874167100DDB14A /* OrderDiscountViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CE6605F2874167100DDB14A /* OrderDiscountViewController.m */; };
 		423CC87521D22FDE008BD2C4 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 423CC87421D22FDE008BD2C4 /* Launch Screen.storyboard */; };
 		424A02D11FFB3A0B0088DC56 /* RABackOrderSubmitAlertController.m in Sources */ = {isa = PBXBuildFile; fileRef = 424A02D01FFB3A0B0088DC56 /* RABackOrderSubmitAlertController.m */; };
 		4254CCDE1FB1AC2B00C8B4B6 /* RAOrderEditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4254CCDD1FB1AC2B00C8B4B6 /* RAOrderEditorViewController.m */; };
@@ -431,6 +432,8 @@
 		3CDDB26A273A5A1500681F78 /* CustomIOSAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomIOSAlertView.h; path = ../../common/customUI/CustomIOSAlertView.h; sourceTree = "<group>"; };
 		3CDDB26C273A5A7800681F78 /* RAUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAUtils.m; path = ../../common/RAUtils.m; sourceTree = "<group>"; };
 		3CDDB26D273A5A7800681F78 /* RAUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAUtils.h; path = ../../common/RAUtils.h; sourceTree = "<group>"; };
+		3CE6605E2874167100DDB14A /* OrderDiscountViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OrderDiscountViewController.h; path = common/Functions/cart/OrderDiscountViewController.h; sourceTree = SOURCE_ROOT; };
+		3CE6605F2874167100DDB14A /* OrderDiscountViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = OrderDiscountViewController.m; path = common/Functions/cart/OrderDiscountViewController.m; sourceTree = SOURCE_ROOT; };
 		423CC87421D22FDE008BD2C4 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = SOURCE_ROOT; };
 		424A02CF1FFB3A0B0088DC56 /* RABackOrderSubmitAlertController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RABackOrderSubmitAlertController.h; path = common/Functions/order/RABackOrderSubmitAlertController.h; sourceTree = SOURCE_ROOT; };
 		424A02D01FFB3A0B0088DC56 /* RABackOrderSubmitAlertController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RABackOrderSubmitAlertController.m; path = common/Functions/order/RABackOrderSubmitAlertController.m; sourceTree = SOURCE_ROOT; };
@@ -1498,6 +1501,8 @@
 				712C40B81C731126000E6831 /* ItemNotesViewController.m */,
 				712C40B41C7310F4000E6831 /* CartGeneralNotesViewController.h */,
 				712C40B51C7310F4000E6831 /* CartGeneralNotesViewController.m */,
+				3CE6605E2874167100DDB14A /* OrderDiscountViewController.h */,
+				3CE6605F2874167100DDB14A /* OrderDiscountViewController.m */,
 			);
 			name = cartView;
 			sourceTree = "<group>";
@@ -2405,6 +2410,7 @@
 				71FFBBE91C60894900D91DC2 /* iSalesDB.m in Sources */,
 				7162A55B1C58724700AB630E /* ContactAdvanceSearchViewController.m in Sources */,
 				7162A5441C58719D00AB630E /* RATreeNodeInfo+Private.m in Sources */,
+				3CE660602874167100DDB14A /* OrderDiscountViewController.m in Sources */,
 				7162A5C51C5873BB00AB630E /* SearchViewController.m in Sources */,
 				7162A5191C58704600AB630E /* EditModelPriceViewController.m in Sources */,
 				3C514969273D0B1E00F78617 /* RADataProvider.m in Sources */,
@@ -2513,7 +2519,7 @@
 					"$(PROJECT_DIR)/common/qrcode",
 					"$(PROJECT_DIR)/common/CommonEditor",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
 				LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib";
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
@@ -2567,7 +2573,7 @@
 					"$(PROJECT_DIR)/common/qrcode",
 					"$(PROJECT_DIR)/common/CommonEditor",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
 				LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib";
 				SDKROOT = iphoneos;
 				TARGETED_DEVICE_FAMILY = 2;
@@ -2598,7 +2604,7 @@
 					"$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib",
 					"$(PROJECT_DIR)/GoogleAnalytics/GoogleAnalytics/Libraries",
 				);
-				MARKETING_VERSION = 1.98;
+				MARKETING_VERSION = 1.99;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -2642,7 +2648,7 @@
 					"$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib",
 					"$(PROJECT_DIR)/GoogleAnalytics/GoogleAnalytics/Libraries",
 				);
-				MARKETING_VERSION = 1.98;
+				MARKETING_VERSION = 1.99;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",

+ 1 - 1
RedAnt ERP Mobile/iSales-CONTRAST.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -7,7 +7,7 @@
 		<key>iSales-CONTRAST.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>4</integer>
+			<integer>3</integer>
 		</dict>
 		<key>iSales-USAI.xcscheme_^#shared#^_</key>
 		<dict>

+ 10 - 5
RedAnt ERP Mobile/iSales-CONTRAST/config.h

@@ -10,12 +10,14 @@
 #define RedAnt_ERP_Mobile_config_h
 #define BUILD_CONTRAST
 #define BACKORDER_PROCESS // 允许backorder process
+#define JSON_TIMEOUT 30
 
+#define IGNORE_MPACK
 
 #define RA_NOTIFICATION
 
 # ifdef DEBUG
-//#define test_server
+#define test_server
 # endif
 
 #define exception_switch 1
@@ -146,10 +148,10 @@
 #define  URL_CUSTOMER_UPDATE  @"http://192.168.0.133:80/pjHmlg/isales/updateCustomer.htm"
 #define  URL_UPDATE_CUSTOMER_BCARD  @"http://192.168.0.133:80/pjHmlg/isales/updateCustomerBusiCard.htm"
 
+#define URL_CHANGE_PASSWORD @""
+#define URL_SIGN_UP @""
 
-
-
-
+#define  URL_ORDER_DISCOUNT  @"http://192.168.0.133:80/pjHmlg/isales/setOrderItemDiscount.htm"
 
 #define  URL_ERR_LOG  @"http://192.168.0.133:80/pjHmlg/isales/er_log.htm"
 
@@ -191,10 +193,13 @@
 
 
 //------------------- NPD server-----------------------
+
+#define URL_CHANGE_PASSWORD @""
+#define URL_SIGN_UP @""
 #define  URL_UPDATE_AUTH  @"https://redant.contrast-inc.com/isales/login.htm"
 #define  URL_LOGOUT  @"https://redant.contrast-inc.com/isales/loginOut.htm"
 #define  URL_RETRIEVE_PASS  @"https://redant.contrast-inc.com/isales/forgotPassword.htm"
-
+#define  URL_ORDER_DISCOUNT  @"https://redant.contrast-inc.com/isales/setOrderItemDiscount.htm"
 #define  URL_REQUEST_CATMENU  @"https://redant.contrast-inc.com/isales/menu.htm"
 #define  URL_LOAD_HOME  @"https://redant.contrast-inc.com/isales/homePage.htm"
 #define  URL_CATEGORY @"https://redant.contrast-inc.com/isales/distinctCategory.htm"

+ 0 - 4
RedAnt ERP Mobile/iSales-CONTRAST/iSales-CONTRAST-Info.plist

@@ -52,10 +52,6 @@
 	</array>
 	<key>UIRequiresFullScreen</key>
 	<true/>
-	<key>UISupportedExternalAccessoryProtocols</key>
-	<array>
-		<string>com.socketmobile.chs</string>
-	</array>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>

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

@@ -21,87 +21,87 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Enable offline mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iMj-3v-3eE">
-                                <rect key="frame" x="20" y="25" width="181" height="21"/>
+                                <rect key="frame" x="20" y="57" width="181" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Use internal address" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Baf-ru-Ueq">
-                                <rect key="frame" x="20" y="76" width="173" height="21"/>
+                                <rect key="frame" x="20" y="108" width="173" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9fI-uo-0D5">
-                                <rect key="frame" x="217" y="20" width="51" height="31"/>
+                                <rect key="frame" x="217" y="52" width="51" height="31"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <connections>
                                     <action selector="onChangeOfflineSwitch:" destination="FG7-WW-Z5X" eventType="valueChanged" id="F0c-jb-lQb"/>
                                 </connections>
                             </switch>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Last sync" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o7T-n9-rhA">
-                                <rect key="frame" x="20" y="119" width="91" height="21"/>
+                                <rect key="frame" x="20" y="151" width="91" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mAv-YK-pnD">
-                                <rect key="frame" x="217" y="119" width="179" height="21"/>
+                                <rect key="frame" x="217" y="151" width="179" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Cache size" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4VN-I0-qDk">
-                                <rect key="frame" x="20" y="168" width="91" height="21"/>
+                                <rect key="frame" x="20" y="200" width="91" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Version" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kcI-2q-g1r">
-                                <rect key="frame" x="20" y="217" width="91" height="21"/>
+                                <rect key="frame" x="20" y="249" width="91" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Unlock offline" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MNF-V6-2fB">
-                                <rect key="frame" x="20" y="266" width="106" height="21"/>
+                                <rect key="frame" x="20" y="298" width="106" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kdt-hI-Mna">
-                                <rect key="frame" x="663" y="212" width="85" height="30"/>
+                                <rect key="frame" x="663" y="244" width="85" height="30"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                 <state key="normal" title="Submit local"/>
                             </button>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="3.22GB" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J6c-cK-Ihd">
-                                <rect key="frame" x="217" y="168" width="111" height="21"/>
+                                <rect key="frame" x="217" y="200" width="111" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="20160228231919" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Avj-sE-gE6">
-                                <rect key="frame" x="217" y="217" width="147" height="21"/>
+                                <rect key="frame" x="217" y="249" width="147" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vzg-50-bc2">
-                                <rect key="frame" x="666" y="164" width="82" height="30"/>
+                                <rect key="frame" x="666" y="196" width="82" height="30"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                 <state key="normal" title="Clear cache"/>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jns-5C-X4w">
-                                <rect key="frame" x="616" y="115" width="132" height="30"/>
+                                <rect key="frame" x="616" y="147" width="132" height="30"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                 <state key="normal" title="Sync"/>
                                 <connections>
@@ -109,11 +109,11 @@
                                 </connections>
                             </button>
                             <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="lgu-mf-cTC">
-                                <rect key="frame" x="217" y="71" width="51" height="31"/>
+                                <rect key="frame" x="217" y="103" width="51" height="31"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                             </switch>
                             <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cIN-uF-BHa">
-                                <rect key="frame" x="666" y="262" width="82" height="30"/>
+                                <rect key="frame" x="666" y="294" width="82" height="30"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                 <state key="normal" title="Unlock"/>
                                 <connections>
@@ -301,7 +301,7 @@
                                                     <rect key="frame" x="10" y="32" width="21" height="21"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <state key="normal" image="button:hrK-DY-RbO:image"/>
-                                                    <state key="selected" image="1B2873E9-F589-4E16-8D56-2F323E58F4C8"/>
+                                                    <state key="selected" image="2F089CCB-7010-4AA9-9A8E-125DB4F12EBD"/>
                                                     <connections>
                                                         <action selector="checkButtonClick:" destination="XXr-fU-67o" eventType="touchUpInside" id="KeU-ld-H4J"/>
                                                     </connections>
@@ -1091,7 +1091,7 @@
         </scene>
     </scenes>
     <resources>
-        <image name="1B2873E9-F589-4E16-8D56-2F323E58F4C8" width="24" height="24">
+        <image name="2F089CCB-7010-4AA9-9A8E-125DB4F12EBD" width="24" height="24">
             <mutableData key="keyedArchiveRepresentation">
 YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05T
 S2V5ZWRBcmNoaXZlctEICVRyb290gAGuCwwZGh8UJCkqMTQ3PUBVJG51bGzWDQ4PEBESExQVFhcYVk5T

+ 0 - 4
RedAnt ERP Mobile/iSales-USAI/iSales-USAI-Info.plist

@@ -52,10 +52,6 @@
 	</array>
 	<key>UIRequiresFullScreen</key>
 	<true/>
-	<key>UISupportedExternalAccessoryProtocols</key>
-	<array>
-		<string>com.socketmobile.chs</string>
-	</array>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>