Subversion Repositories SmartDukaan

Rev

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

Rev 36176 Rev 36177
Line 1241... Line 1241...
1241
    /**
1241
    /**
1242
     * Format amount in Indian comma style: 1,25,129.00
1242
     * Format amount in Indian comma style: 1,25,129.00
1243
     */
1243
     */
1244
    static String formatIndianCurrency(double amount) {
1244
    static String formatIndianCurrency(double amount) {
1245
        String formatted = indianCurrencyFormat.format(amount);
1245
        String formatted = indianCurrencyFormat.format(amount);
1246
        // Strip currency symbol prefix (Rs., ₹, etc.) — keep only digits, commas, dots, minus
1246
        // Java 8 en_IN produces "Rs." prefix (e.g. "Rs.17,618.00", "-Rs.500.50")
1247
        return formatted.replaceFirst("^[^0-9-]+", "");
1247
        return formatted.replace("Rs.", "").replace("\u20B9", "").trim();
1248
    }
1248
    }
1249
 
1249
 
1250
    public static void generateAndWriteCustomerCreditNotes(List<CreditNotePdfModel> creditNotes, OutputStream outputStream) {
1250
    public static void generateAndWriteCustomerCreditNotes(List<CreditNotePdfModel> creditNotes, OutputStream outputStream) {
1251
        Document document = new Document();
1251
        Document document = new Document();
1252
        document.setMargins(0, 0, 25, 0);
1252
        document.setMargins(0, 0, 25, 0);