invoice_bar 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: ca239e980dfd0d0e5fc9117a5afe2babeb7a389a
         | 
| 4 | 
            +
              data.tar.gz: e4ca5ceb427c9172102cae464f406f87e2aab348
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: aa12c27f18e8c1b9145842e039fa16a8c724c83a13acf2eeba45095aeb6f88d67c2ed7a40a8ac71bd93e204fb75dccee69d61ee7345ea70f962764125d93b737
         | 
| 7 | 
            +
              data.tar.gz: 79d3990104653757d57ebbf8e8ff19b98801a3f1fe153ddf05b61c441f78931c0f46b5957d5f6b0ade0126c6c023e943befeb7d0ab8008516560f1a0c69b802b
         | 
| @@ -3,6 +3,7 @@ require 'invoice_printer' | |
| 3 3 | 
             
            module InvoiceBar
         | 
| 4 4 | 
             
              class InvoicePDF
         | 
| 5 5 | 
             
                include ActionView::Helpers::TranslationHelper
         | 
| 6 | 
            +
                include InvoiceBar::InvoiceBarHelper
         | 
| 6 7 |  | 
| 7 8 | 
             
                def initialize(invoice)
         | 
| 8 9 | 
             
                  @invoice = invoice
         | 
| @@ -39,7 +40,7 @@ module InvoiceBar | |
| 39 40 | 
             
                    purchaser_extra_address_line: @invoice.address_extra_address_line.to_s,
         | 
| 40 41 | 
             
                    issue_date: l(@invoice.issue_date, format: :invoice).to_s,
         | 
| 41 42 | 
             
                    due_date: l(@invoice.due_date, format: :invoice).to_s,
         | 
| 42 | 
            -
                    total: @invoice.amount. | 
| 43 | 
            +
                    total: formatted_amount(@invoice.amount, @invoice.try(:account).try(:currency_symbol)),
         | 
| 43 44 | 
             
                    bank_account_number: @invoice.account_bank_account_number.to_s,
         | 
| 44 45 | 
             
                    account_iban: @invoice.account_iban.to_s,
         | 
| 45 46 | 
             
                    account_swift: @invoice.account_swift.to_s,
         | 
| @@ -55,8 +56,8 @@ module InvoiceBar | |
| 55 56 | 
             
                      name: item.name.to_s,
         | 
| 56 57 | 
             
                      quantity: item.number.to_s,
         | 
| 57 58 | 
             
                      unit: item.unit.to_s,
         | 
| 58 | 
            -
                      price: item.price | 
| 59 | 
            -
                      amount: item.amount | 
| 59 | 
            +
                      price: formatted_amount(item.price),
         | 
| 60 | 
            +
                      amount: formatted_amount(item.amount)
         | 
| 60 61 | 
             
                    )
         | 
| 61 62 | 
             
                  end
         | 
| 62 63 | 
             
                  printable_items
         | 
| @@ -3,6 +3,7 @@ require 'invoice_printer' | |
| 3 3 | 
             
            module InvoiceBar
         | 
| 4 4 | 
             
              class ReceiptPDF
         | 
| 5 5 | 
             
                include ActionView::Helpers::TranslationHelper
         | 
| 6 | 
            +
                include InvoiceBar::InvoiceBarHelper
         | 
| 6 7 |  | 
| 7 8 | 
             
                def initialize(receipt)
         | 
| 8 9 | 
             
                  @receipt = receipt
         | 
| @@ -38,7 +39,7 @@ module InvoiceBar | |
| 38 39 | 
             
                    purchaser_city_part: @receipt.address_city_part.to_s,
         | 
| 39 40 | 
             
                    purchaser_extra_address_line: @receipt.address_extra_address_line.to_s,
         | 
| 40 41 | 
             
                    issue_date: l(@receipt.issue_date, format: :invoice).to_s,
         | 
| 41 | 
            -
                    total: @receipt.amount. | 
| 42 | 
            +
                    total: formatted_amount(@receipt.amount, @invoice.try(:account).try(:currency_symbol)),
         | 
| 42 43 | 
             
                    bank_account_number: @receipt.account_bank_account_number.to_s,
         | 
| 43 44 | 
             
                    account_iban: @receipt.account_iban.to_s,
         | 
| 44 45 | 
             
                    account_swift: @receipt.account_swift.to_s,
         | 
| @@ -54,8 +55,8 @@ module InvoiceBar | |
| 54 55 | 
             
                      name: item.name.to_s,
         | 
| 55 56 | 
             
                      quantity: item.number.to_s,
         | 
| 56 57 | 
             
                      unit: item.unit.to_s,
         | 
| 57 | 
            -
                      price: item.price | 
| 58 | 
            -
                      amount: item.amount | 
| 58 | 
            +
                      price: formatted_amount(item.price),
         | 
| 59 | 
            +
                      amount: formatted_amount(item.amount)
         | 
| 59 60 | 
             
                    )
         | 
| 60 61 | 
             
                  end
         | 
| 61 62 | 
             
                  printable_items
         | 
    
        data/lib/invoice_bar/version.rb
    CHANGED