Subversion Repositories SmartDukaan

Rev

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

Rev 6777 Rev 6779
Line 1749... Line 1749...
1749
    	
1749
    	
1750
    	double transferPrice;
1750
    	double transferPrice;
1751
    	if(newItem.getPreferredVendor() == null && !newItem.getVendorPricesMap().isEmpty()) {
1751
    	if(newItem.getPreferredVendor() == null && !newItem.getVendorPricesMap().isEmpty()) {
1752
    		transferPrice = -1;
1752
    		transferPrice = -1;
1753
			for(VendorPricings vendorDetail : newItem.getVendorPricesMap().values()){
1753
			for(VendorPricings vendorDetail : newItem.getVendorPricesMap().values()){
1754
				if(transferPrice > vendorDetail.getTransferPrice() || transferPrice == -1){
1754
				if(transferPrice > vendorDetail.getNlc() || transferPrice == -1){
1755
					transferPrice = vendorDetail.getTransferPrice();
1755
					transferPrice = vendorDetail.getNlc();
1756
				}
1756
				}
1757
			}
1757
			}
1758
    	}
1758
    	}
1759
    	else if(!newItem.getVendorPricesMap().isEmpty() && newItem.getVendorPricesMap().containsKey(newItem.getPreferredVendor())){
1759
    	else if(!newItem.getVendorPricesMap().isEmpty() && newItem.getVendorPricesMap().containsKey(newItem.getPreferredVendor())){
1760
    		transferPrice = newItem.getVendorPricesMap().get(newItem.getPreferredVendor()).getTransferPrice();    		
1760
    		transferPrice = newItem.getVendorPricesMap().get(newItem.getPreferredVendor()).getNlc();    		
1761
    	}
1761
    	}
1762
    	else{
1762
    	else{
1763
    		Window.alert("Add vendor to Vendor Prices and then change the Selling Price.");
1763
    		Window.alert("Add vendor to Vendor Prices and then change the Selling Price.");
1764
            return message;
1764
            return message;
1765
    	}
1765
    	}