Subversion Repositories SmartDukaan

Rev

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

Rev 9532 Rev 9533
Line 673... Line 673...
673
				row =   sheet.getRow((short) iterator);
673
				row =   sheet.getRow((short) iterator);
674
				if(allocable < 0){
674
				if(allocable < 0){
675
					allocable = 0;
675
					allocable = 0;
676
				}
676
				}
677
				if(inventoryItem.getRisky()){
677
				if(inventoryItem.getRisky()){
678
					if((Math.round(allocable*2/3) - heldorders + heldforsource) > 0){
678
					sent_inventory = Math.round(allocable*2/3) + heldforsource - heldorders ;
679
						sent_inventory = Math.round(allocable*2/3) - heldorders + heldforsource;
679
					System.out.println("allocable" + allocable + "\t2/3allocable" + Math.round(allocable*2/3) +  "\theld for source" + heldforsource + "\ttotal held" + totalheld +"\theldorders" +  heldorders + "\tFinal Value is : " + (Math.round(allocable*2/3) +  heldforsource - heldorders));
680
						System.out.println("allocable" + allocable + "\t2/3allocable" + Math.round(allocable*2/3) +  "\theld for source" + heldforsource + "\ttotal held" + totalheld +"\theldorders" +  heldorders + "\tFinal Value is : " + (Math.round(allocable*2/3) +  heldforsource - heldorders));
680
					if(sent_inventory < 0){
681
					}
-
 
682
					else{
-
 
683
						sent_inventory = 0;
681
						sent_inventory = 0;
684
					}
682
					}
685
 
-
 
686
				}
683
				}
687
				else{
684
				else{
688
					if((allocable + heldforsource) > defaultinventory){
685
					if((allocable + heldforsource + holdinventory) > defaultinventory){
689
						if((Math.round(allocable*2/3) +  inventoryItem.getHeldForSource()) > heldorders){
-
 
690
							System.out.println("actual" + allocable + "\t2/3actual" + Math.round(allocable*2/3) +  "\theld for source" + heldforsource + "\theldorders" +  heldorders + "\tFinal Value is : " + (Math.round(allocable*2/3) +  heldforsource - heldorders));
-
 
691
							sent_inventory = Math.round(allocable*2/3) +  heldforsource - heldorders;
686
						sent_inventory = Math.round(allocable*2/3) +  heldforsource - heldorders + holdinventory;
692
						}
687
						System.out.println("actual" + allocable + "\t2/3actual" + Math.round(allocable*2/3) +  "\theld for source" + heldforsource + "\theldorders" +  heldorders + "\tFinal Value is : " + (Math.round(allocable*2/3) +  heldforsource - heldorders + holdinventory));
693
						else{
688
						if(sent_inventory < 0){
694
							sent_inventory = 0;
689
							sent_inventory = 0;							
695
						}
690
						}
696
					}
691
					}
697
					else{
692
					else{
698
						if(defaultinventory > heldorders){
693
						if(defaultinventory > heldorders){
699
							sent_inventory = defaultinventory - heldorders;
694
							sent_inventory = defaultinventory - heldorders;