Subversion Repositories SmartDukaan

Rev

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

Rev 22667 Rev 22668
Line 1073... Line 1073...
1073
		Set<CustomFofoOrderItem> customerFofoOrderItems = new HashSet<>();
1073
		Set<CustomFofoOrderItem> customerFofoOrderItems = new HashSet<>();
1074
		for(FofoLineItem fofoLineItem : fofoLineItems){
1074
		for(FofoLineItem fofoLineItem : fofoLineItems){
1075
			CustomFofoOrderItem customFofoOrderItem = new CustomFofoOrderItem();
1075
			CustomFofoOrderItem customFofoOrderItem = new CustomFofoOrderItem();
1076
			float totalTaxRate = fofoLineItem.getIgstRate() + fofoLineItem.getSgstRate() + fofoLineItem.getCgstRate();
1076
			float totalTaxRate = fofoLineItem.getIgstRate() + fofoLineItem.getSgstRate() + fofoLineItem.getCgstRate();
1077
			float taxableSellingPrice = fofoLineItem.getSellingPrice() / (1 + totalTaxRate / 100);
1077
			float taxableSellingPrice = fofoLineItem.getSellingPrice() / (1 + totalTaxRate / 100);
-
 
1078
			float taxableDiscountPrice = fofoLineItem.getDiscount() / (1 + totalTaxRate / 100);
1078
			
1079
			
1079
			customFofoOrderItem.setAmount(fofoLineItem.getQuantity() * taxableSellingPrice);
1080
			customFofoOrderItem.setAmount(fofoLineItem.getQuantity() * (taxableSellingPrice-taxableDiscountPrice));
1080
			customFofoOrderItem.setDescription(fofoLineItem.getBrand() + " " + fofoLineItem.getModelName() + " " + fofoLineItem.getModelNumber() + " " + fofoLineItem.getColor() + " (" + String.join(", ",this.toSerialNumbers(fofoLineItem.getFofoLineItemSerialNumbers())) + ")");
1081
			customFofoOrderItem.setDescription(fofoLineItem.getBrand() + " " + fofoLineItem.getModelName() + " " + fofoLineItem.getModelNumber() + " " + fofoLineItem.getColor() + " (" + String.join(", ",this.toSerialNumbers(fofoLineItem.getFofoLineItemSerialNumbers())) + ")");
1081
			customFofoOrderItem.setRate(taxableSellingPrice);
1082
			customFofoOrderItem.setRate(taxableSellingPrice);
-
 
1083
			customFofoOrderItem.setDiscount(taxableDiscountPrice);
1082
			customFofoOrderItem.setQuantity(fofoLineItem.getQuantity());
1084
			customFofoOrderItem.setQuantity(fofoLineItem.getQuantity());
1083
			float igstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getIgstRate()) / 100;
1085
			float igstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getIgstRate()) / 100;
1084
			float cgstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getCgstRate()) / 100;
1086
			float cgstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getCgstRate()) / 100;
1085
			float sgstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getSgstRate()) / 100;
1087
			float sgstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getSgstRate()) / 100;
1086
			customFofoOrderItem.setIgstRate(fofoLineItem.getIgstRate());
1088
			customFofoOrderItem.setIgstRate(fofoLineItem.getIgstRate());