Subversion Repositories SmartDukaan

Rev

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

Rev 30638 Rev 30957
Line 616... Line 616...
616
			int mopdpdiff = pc.getMop() - pc.getSellingPrice();
616
			int mopdpdiff = pc.getMop() - pc.getSellingPrice();
617
			pc.setMopdp(mopdpdiff);
617
			pc.setMopdp(mopdpdiff);
618
			pc.setNetPrice2((int) pc.getNetPrice() - pc.getMopdp());
618
			pc.setNetPrice2((int) pc.getNetPrice() - pc.getMopdp());
619
			long totalProfit = totalScheme + mopdpdiff;
619
			long totalProfit = totalScheme + mopdpdiff;
620
			pc.setTotalProfit((int) totalProfit);
620
			pc.setTotalProfit((int) totalProfit);
-
 
621
			//Total profit margin inculding tax
621
			double rouoff = totalProfit / (pc.getSellingPrice() / 1.18) * 100;
622
			double rouoff = totalProfit / (pc.getSellingPrice()) * 100;
622
			double roundOff = Math.round(rouoff * 100.0) / 100.0;
623
			double roundOff = Math.round(rouoff * 100.0) / 100.0;
623
			pc.setNetMargin(roundOff);
624
			pc.setNetMargin(roundOff);
624
 
625
 
625
		}
626
		}
626
		model.addAttribute("date", LocalDate.now());
627
		model.addAttribute("date", LocalDate.now());