Subversion Repositories SmartDukaan

Rev

Rev 11875 | Rev 11882 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11875 Rev 11876
Line 239... Line 239...
239
									if(nlc !=0 && (maxnlcSD >= nlc)){
239
									if(nlc !=0 && (maxnlcSD >= nlc)){
240
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 0);
240
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 0);
241
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 7);
241
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 7);
242
										available = available + itemavailability.get(warehouse.getId());
242
										available = available + itemavailability.get(warehouse.getId());
243
										total_held = total_held + total_warehouse_held;*/ 
243
										total_held = total_held + total_warehouse_held;*/ 
244
										continue;
244
										//continue;
245
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
245
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
246
									}
246
									}
247
									else if(maxnlcSD==0){
247
									else if(maxnlcSD==0){
248
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 0);
248
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 0);
249
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 7);
249
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 7);
250
										available = available + itemavailability.get(warehouse.getId());
250
										available = available + itemavailability.get(warehouse.getId());
251
										total_held = total_held + total_warehouse_held;*/
251
										total_held = total_held + total_warehouse_held;*/
252
										continue;
252
										//continue;
253
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
253
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
254
									}
254
									}
255
									else{
255
									else{
256
										long available = itemavailability.get(warehouse.getId());
256
										long available = itemavailability.get(warehouse.getId());
257
										if(available>0){
257
										if(available>0){
Line 272... Line 272...
272
									if(nlc !=0 && (maxnlcFK >= nlc)){
272
									if(nlc !=0 && (maxnlcFK >= nlc)){
273
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 0);
273
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 0);
274
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 8);
274
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 8);
275
										available = available + itemavailability.get(warehouse.getId());
275
										available = available + itemavailability.get(warehouse.getId());
276
										total_held = total_held + total_warehouse_held; */
276
										total_held = total_held + total_warehouse_held; */
277
										continue;
277
										//continue;
278
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
278
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
279
									}
279
									}
280
									else if(maxnlcFK==0){
280
									else if(maxnlcFK==0){
281
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 0);
281
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 0);
282
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 8);
282
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), warehouse.getId(), 8);
283
										available = available + itemavailability.get(warehouse.getId());
283
										available = available + itemavailability.get(warehouse.getId());
284
										total_held = total_held + total_warehouse_held;*/
284
										total_held = total_held + total_warehouse_held;*/
285
										continue;
285
										//continue;
286
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
286
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
287
									}
287
									}
288
									else{
288
									else{
289
										long available = itemavailability.get(warehouse.getId());
289
										long available = itemavailability.get(warehouse.getId());
290
										if(available>0){
290
										if(available>0){
Line 327... Line 327...
327
									if(nlc !=0 && (maxnlcSD >= nlc)){
327
									if(nlc !=0 && (maxnlcSD >= nlc)){
328
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 0);
328
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 0);
329
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 7);
329
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 7);
330
										available =  available + entry.getValue();
330
										available =  available + entry.getValue();
331
										total_held = total_held + total_warehouse_held;*/
331
										total_held = total_held + total_warehouse_held;*/
332
										continue;
332
										//continue;
333
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
333
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
334
									}
334
									}
335
									else if(maxnlcSD==0){
335
									else if(maxnlcSD==0){
336
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 0);
336
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 0);
337
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 7);
337
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 7);
338
										available = available + itemavailability.get(entry.getKey());
338
										available = available + itemavailability.get(entry.getKey());
339
										total_held = total_held + total_warehouse_held;*/
339
										total_held = total_held + total_warehouse_held;*/
340
 
340
 
341
										continue;
341
										//continue;
342
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
342
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
343
									}
343
									}
344
									else{
344
									else{
345
										long available = itemavailability.get(entry.getKey());
345
										long available = itemavailability.get(entry.getKey());
346
										if(available>0){
346
										if(available>0){
Line 361... Line 361...
361
									if(nlc !=0 && (maxnlcFK >= nlc)){
361
									if(nlc !=0 && (maxnlcFK >= nlc)){
362
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 0);
362
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 0);
363
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 8);
363
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 8);
364
										available =  available + entry.getValue();
364
										available =  available + entry.getValue();
365
										total_held = total_held + total_warehouse_held;*/
365
										total_held = total_held + total_warehouse_held;*/
366
										continue;
366
										//continue;
367
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
367
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
368
									}
368
									}
369
									else if(maxnlcFK==0){
369
									else if(maxnlcFK==0){
370
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 0);
370
										/*total_warehouse_held = inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 0);
371
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 8);
371
										heldForSource = heldForSource + total_warehouse_held - inventoryClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource(thriftItem.getId(), entry.getKey(), 8);
372
										available = available + itemavailability.get(entry.getKey());
372
										available = available + itemavailability.get(entry.getKey());
373
										total_held = total_held + total_warehouse_held;*/
373
										total_held = total_held + total_warehouse_held;*/
374
										continue;
374
										//continue;
375
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
375
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\tavailable:" + available);
376
									}
376
									}
377
									else{
377
									else{
378
										long available = itemavailability.get(entry.getKey());
378
										long available = itemavailability.get(entry.getKey());
379
										if(available>0){
379
										if(available>0){
Line 417... Line 417...
417
								//System.out.println("itemId:" + thriftItem.getId() + "\tmaxnlc: " + maxnlc + "\tnlc:" + nlc + "\twid:" + warehouse.getId() );
417
								//System.out.println("itemId:" + thriftItem.getId() + "\tmaxnlc: " + maxnlc + "\tnlc:" + nlc + "\twid:" + warehouse.getId() );
418
								if(snapdealItem!=null){
418
								if(snapdealItem!=null){
419
									if(nlc !=0 && (maxnlcSD >= nlc)){
419
									if(nlc !=0 && (maxnlcSD >= nlc)){
420
										//reserve = reserve + itemreserve.get(warehouse.getId());
420
										//reserve = reserve + itemreserve.get(warehouse.getId());
421
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
421
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
422
										continue;
422
										//continue;
423
									}
423
									}
424
									else if(maxnlcSD==0){
424
									else if(maxnlcSD==0){
425
										//reserve = reserve + itemreserve.get(warehouse.getId());
425
										//reserve = reserve + itemreserve.get(warehouse.getId());
426
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
426
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
427
										continue;
427
										//continue;
428
									}
428
									}
429
									else{
429
									else{
430
										if(snapdealLeftInvDataMap.containsKey(snapdealItem.getSkuAtSnapdeal()+warehouse.getId())){
430
										if(snapdealLeftInvDataMap.containsKey(snapdealItem.getSkuAtSnapdeal()+warehouse.getId())){
431
											NlcLeftOutInventory newObj = snapdealLeftInvDataMap.get(snapdealItem.getSkuAtSnapdeal()+warehouse.getId());
431
											NlcLeftOutInventory newObj = snapdealLeftInvDataMap.get(snapdealItem.getSkuAtSnapdeal()+warehouse.getId());
432
											newObj.setReserved(itemreserve.get(warehouse.getId()));
432
											newObj.setReserved(itemreserve.get(warehouse.getId()));
Line 438... Line 438...
438
 
438
 
439
								if(flipkartItem!=null){
439
								if(flipkartItem!=null){
440
									if(nlc !=0 && (maxnlcFK >= nlc)){
440
									if(nlc !=0 && (maxnlcFK >= nlc)){
441
										//reserve = reserve + itemreserve.get(warehouse.getId());
441
										//reserve = reserve + itemreserve.get(warehouse.getId());
442
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
442
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
443
										continue;
443
										//continue;
444
									}
444
									}
445
									else if(maxnlcFK==0){
445
									else if(maxnlcFK==0){
446
										//reserve = reserve + itemreserve.get(warehouse.getId());
446
										//reserve = reserve + itemreserve.get(warehouse.getId());
447
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
447
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
448
										continue;
448
										//continue;
449
									}
449
									}
450
									else{
450
									else{
451
										if(flipkartLeftInvDataMap.containsKey(flipkartItem.getSkuAtFlipkart()+warehouse.getId())){
451
										if(flipkartLeftInvDataMap.containsKey(flipkartItem.getSkuAtFlipkart()+warehouse.getId())){
452
											NlcLeftOutInventory newObj = flipkartLeftInvDataMap.get(flipkartItem.getSkuAtFlipkart()+warehouse.getId());
452
											NlcLeftOutInventory newObj = flipkartLeftInvDataMap.get(flipkartItem.getSkuAtFlipkart()+warehouse.getId());
453
											newObj.setReserved(itemreserve.get(warehouse.getId()));
453
											newObj.setReserved(itemreserve.get(warehouse.getId()));
Line 478... Line 478...
478
								//System.out.println("itemId:" + thriftItem.getId() + "\tmaxnlc: " + maxnlc + "\tnlc:" + nlc + "\twid:" + entry.getKey() );
478
								//System.out.println("itemId:" + thriftItem.getId() + "\tmaxnlc: " + maxnlc + "\tnlc:" + nlc + "\twid:" + entry.getKey() );
479
								if(snapdealItem!=null){
479
								if(snapdealItem!=null){
480
									if(nlc !=0 && (maxnlcSD >= nlc)){
480
									if(nlc !=0 && (maxnlcSD >= nlc)){
481
										//reserve =  reserve + entry.getValue();
481
										//reserve =  reserve + entry.getValue();
482
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
482
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
483
										continue;
483
										//continue;
484
									}
484
									}
485
									else if(maxnlcSD==0){
485
									else if(maxnlcSD==0){
486
										//reserve =  reserve + entry.getValue();
486
										//reserve =  reserve + entry.getValue();
487
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
487
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
488
										continue;
488
										//continue;
489
									}
489
									}
490
									else{
490
									else{
491
										if(snapdealLeftInvDataMap.containsKey(snapdealItem.getSkuAtSnapdeal()+entry.getKey())){
491
										if(snapdealLeftInvDataMap.containsKey(snapdealItem.getSkuAtSnapdeal()+entry.getKey())){
492
											NlcLeftOutInventory newObj = snapdealLeftInvDataMap.get(snapdealItem.getSkuAtSnapdeal()+entry.getKey());
492
											NlcLeftOutInventory newObj = snapdealLeftInvDataMap.get(snapdealItem.getSkuAtSnapdeal()+entry.getKey());
493
											newObj.setReserved(itemreserve.get(entry.getKey()));
493
											newObj.setReserved(itemreserve.get(entry.getKey()));
Line 498... Line 498...
498
								}
498
								}
499
								if(flipkartItem!=null){
499
								if(flipkartItem!=null){
500
									if(nlc !=0 && (maxnlcFK >= nlc)){
500
									if(nlc !=0 && (maxnlcFK >= nlc)){
501
										//reserve =  reserve + entry.getValue();
501
										//reserve =  reserve + entry.getValue();
502
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
502
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
503
										continue;
503
										//continue;
504
									}
504
									}
505
									else if(maxnlcFK==0){
505
									else if(maxnlcFK==0){
506
										//reserve =  reserve + entry.getValue();
506
										//reserve =  reserve + entry.getValue();
507
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
507
										//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
508
										continue;
508
										//continue;
509
									}
509
									}
510
									else{
510
									else{
511
										if(flipkartLeftInvDataMap.containsKey(flipkartItem.getSkuAtFlipkart()+entry.getKey())){
511
										if(flipkartLeftInvDataMap.containsKey(flipkartItem.getSkuAtFlipkart()+entry.getKey())){
512
											NlcLeftOutInventory newObj = flipkartLeftInvDataMap.get(flipkartItem.getSkuAtFlipkart()+entry.getKey());
512
											NlcLeftOutInventory newObj = flipkartLeftInvDataMap.get(flipkartItem.getSkuAtFlipkart()+entry.getKey());
513
											newObj.setReserved(itemreserve.get(entry.getKey()));
513
											newObj.setReserved(itemreserve.get(entry.getKey()));