Bladeren bron

1.修改离线Request Cart,增加Create Back Order判断。

Pen Li 9 jaren geleden
bovenliggende
commit
60a0d8d20b

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


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

@@ -4367,7 +4367,9 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
             itemjson[@"description"]=[NSString stringWithFormat:@"%@\n%@",nsname,nsdescription ];
             itemjson[@"stockUom"]=[NSNumber numberWithInt:stockUom];
             itemjson[@"note"]=nsline_note;
-            itemjson[@"is_out_of_stock"] = [NSNumber numberWithBool:availability >= item_count ? NO : YES];
+            if (!appDelegate.can_create_backorder) {
+                itemjson[@"is_out_of_stock"] = [NSNumber numberWithBool:availability >= item_count ? NO : YES];
+            }
 //            NSDate *date2 = [NSDate date];
             itemjson[@"combine"]=[self model_bundle:item_id db:db compute_part:false contactID:appDelegate.contact_id];
 //            DebugLog(@"model_bundle time interval");