Sha256: 07044a9b581da8ba10d3220f7f73604537f30dd45824cf38ad1a9fe4f3f45370

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

# encoding: utf-8
require 'polish_invoicer'

i = PolishInvoicer::Invoice.new({
  number: '1/2014', create_date: Date.today, trade_date: Date.today,
  seller: ['Abaka sp. z o.o.', 'ul. Jasna 10', '10-234 Kraków'],
  buyer: ['Fabryki słodyczy S.A.', 'ul. Słodka 12/34', '12-345 Warszawa'],
  item_name: 'Jakiś długi tytuł i jeszcze jakieś informacje na różne tematy oraz dodatkowy komentarz w sprawie różnej.',
  price: 123.45, payment_date: Date.today,
  comments: 'Test uwag', footer: 'Stopka faktury plus tekst promocyjny',
  seller_nip: '123-456-78-90', buyer_nip: '987-654-32-10'
})

i.save_to_pdf('/tmp/invoice-default.pdf')
i.paid = false
i.save_to_pdf('/tmp/invoice-not-paid.pdf')
i.proforma = true
i.save_to_pdf('/tmp/invoice-proforma.pdf')
i.comments = ['Ala ma kota', 'Ula ma psa']
i.save_to_pdf('/tmp/invoice-array-comments.pdf')
i.pkwiu = '82.3.2'
i.save_to_pdf('/tmp/invoice-pkwiu-proforma.pdf')
i.proforma = false
i.save_to_pdf('/tmp/invoice-pkwiu-fv.pdf')
i.vat = -1
i.no_vat_reason = 'Zwolnienie przedmiotowe na podstawie art. 123 ust. 3 pkt. 10'
i.save_to_pdf('/tmp/invoice-pkwiu-fv-reason.pdf')

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polish_invoicer-0.0.5 test/test_generator.rb
polish_invoicer-0.0.4 test/test_generator.rb
polish_invoicer-0.0.3 test/test_generator.rb