Kaynağa Gözat

161107
Fixed:
load sync saved pdf crash.

Ray Zhang 9 yıl önce
ebeveyn
işleme
c628a3017f

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


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

@@ -245,10 +245,13 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
              {
                  line_note=valueitem[@"linenotes"];
                  qty=[valueitem[@"available_qty"] intValue];
-                 s_qty=[valueitem[@"available_qty"] stringValue] ;
+                 if([[valueitem allKeys] containsObject:@"available_qty"])
+                     s_qty=[NSString stringWithFormat:@"%d",qty];
+                 else
+                     s_qty=@"null";
                  if(valueitem[@"regular_price"]!=nil)
                  gprice=[NSString stringWithFormat:@"%.2f",[valueitem[@"regular_price"] floatValue]];
-                 s_price=[valueitem[@"special_price"] stringValue];
+                 s_price=valueitem[@"special_price"];
                  price=[valueitem[@"special_price"] floatValue];
                  discount=0;