Subversion Repositories SmartDukaan

Rev

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

Rev 5856 Rev 5872
Line 131... Line 131...
131
    
131
    
132
    private static final String delhiPincodePrefix = "11";
132
    private static final String delhiPincodePrefix = "11";
133
    
133
    
134
    private static final double salesTaxLowRate = Double.parseDouble(properties.getProperty("sales_tax_low_rate", "5.0"));
134
    private static final double salesTaxLowRate = Double.parseDouble(properties.getProperty("sales_tax_low_rate", "5.0"));
135
    private static final double salesTaxHighRate = Double.parseDouble(properties.getProperty("sales_tax_high_rate", "12.5"));
135
    private static final double salesTaxHighRate = Double.parseDouble(properties.getProperty("sales_tax_high_rate", "12.5"));
136
    private static final double salesTaxCutOff = (Double.parseDouble(properties.getProperty("sales_tax_cutoff", "10000")) * (100 + salesTaxLowRate))/100;
136
    private static final double salesTaxCutOff = Double.parseDouble(properties.getProperty("sales_tax_cutoff", "10000"));
137
    
137
    
138
    private static Properties readProperties(){
138
    private static Properties readProperties(){
139
        ResourceBundle resource = ResourceBundle.getBundle(InvoiceGenerationService.class.getName());
139
        ResourceBundle resource = ResourceBundle.getBundle(InvoiceGenerationService.class.getName());
140
        Properties props = new Properties();
140
        Properties props = new Properties();
141
        
141
        
Line 610... Line 610...
610
        return invoiceTableHeader;
610
        return invoiceTableHeader;
611
    }
611
    }
612
 
612
 
613
    private double getTaxRate(double orderAmount) {
613
    private double getTaxRate(double orderAmount) {
614
        double rate;
614
        double rate;
615
        if(orderAmount <= salesTaxCutOff){
615
        if(orderAmount < salesTaxCutOff){
616
            rate = salesTaxLowRate;
616
            rate = salesTaxLowRate;
617
        } else {
617
        } else {
618
            rate = salesTaxHighRate;
618
            rate = salesTaxHighRate;
619
        }
619
        }
620
        return rate;
620
        return rate;