Subversion Repositories SmartDukaan

Rev

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

Rev 9522 Rev 9523
Line 663... Line 663...
663
				}
663
				}
664
				System.out.println("itemId: " + inventoryItem.getId() + "\trisky: " + inventoryItem.getRisky()+ "\tavailable: " + inventoryItem.getAvailability() + "\treserve: " + inventoryItem.getReserve() + "\theldForSource:" + inventoryItem.getHeldForSource() + "\twebsite_hold: " + inventoryItem.getHoldInventory() + "\tdefault_inv: " +inventoryItem.getDefaultInventory() + "\theldorders " + heldorders);
664
				System.out.println("itemId: " + inventoryItem.getId() + "\trisky: " + inventoryItem.getRisky()+ "\tavailable: " + inventoryItem.getAvailability() + "\treserve: " + inventoryItem.getReserve() + "\theldForSource:" + inventoryItem.getHeldForSource() + "\twebsite_hold: " + inventoryItem.getHoldInventory() + "\tdefault_inv: " +inventoryItem.getDefaultInventory() + "\theldorders " + heldorders);
665
				row =   sheet.getRow((short) iterator);
665
				row =   sheet.getRow((short) iterator);
666
				long inventoryForRiskyItem = actualavailability - holdinventory;
666
				long inventoryForRiskyItem = actualavailability - holdinventory;
667
				if(inventoryItem.getRisky()){
667
				if(inventoryItem.getRisky()){
668
					if(inventoryForRiskyItem > 0){
-
 
669
						if((Math.round(inventoryForRiskyItem*2/3) - heldorders + inventoryItem.getHeldForSource()) > 0){
668
					if((Math.round(inventoryForRiskyItem*2/3) - heldorders + inventoryItem.getHeldForSource()) > 0){
670
							sent_inventory = Math.round(inventoryForRiskyItem*2/3) - heldorders + inventoryItem.getHeldForSource();
669
						sent_inventory = Math.round(inventoryForRiskyItem*2/3) - heldorders + inventoryItem.getHeldForSource();
671
							System.out.println("actual" + actualavailability + "\t2/3actual" + Math.round(actualavailability*2/3) +  "\theld for source" + inventoryItem.getHeldForSource() + "\theldorders" +  heldorders + "\tFinal Value is : " + (Math.round(actualavailability*2/3) +  inventoryItem.getHeldForSource() - heldorders));
670
						System.out.println("actual" + actualavailability + "\t2/3actual" + Math.round(actualavailability*2/3) +  "\theld for source" + inventoryItem.getHeldForSource() + "\theldorders" +  heldorders + "\tFinal Value is : " + (Math.round(actualavailability*2/3) +  inventoryItem.getHeldForSource() - heldorders));
672
						}
-
 
673
						else{
-
 
674
							sent_inventory = 0;
-
 
675
						}
-
 
676
					}
671
					}
677
					else{
672
					else{
678
						sent_inventory = 0;
673
						sent_inventory = 0;
679
					}
674
					}
-
 
675
					
680
				}
676
				}
681
				else{
677
				else{
682
					if(actualavailability > defaultinventory){
678
					if(actualavailability > defaultinventory){
683
						if((Math.round(actualavailability*2/3) +  inventoryItem.getHeldForSource()) > heldorders){
679
						if((Math.round(actualavailability*2/3) +  inventoryItem.getHeldForSource()) > heldorders){
684
							System.out.println("actual" + actualavailability + "\t2/3actual" + Math.round(actualavailability*2/3) +  "\theld for source" + inventoryItem.getHeldForSource() + "\theldorders" +  heldorders + "\tFinal Value is : " + (Math.round(actualavailability*2/3) +  inventoryItem.getHeldForSource() - heldorders));
680
							System.out.println("actual" + actualavailability + "\t2/3actual" + Math.round(actualavailability*2/3) +  "\theld for source" + inventoryItem.getHeldForSource() + "\theldorders" +  heldorders + "\tFinal Value is : " + (Math.round(actualavailability*2/3) +  inventoryItem.getHeldForSource() - heldorders));