Skip to content

Instantly share code, notes, and snippets.

@airspeed
Last active December 20, 2015 04:29
Show Gist options
  • Save airspeed/6071182 to your computer and use it in GitHub Desktop.
Save airspeed/6071182 to your computer and use it in GitHub Desktop.
2. Mahnung Nachdruck.
# NUTZLOS!!!!
def print_invoice(invoice)
i = invoice
o = i.order_cart
l = i.customer.lang[0..1].downcase === 'de' ? 'de' : 'en' # unoptimal, reicht aber im Augenblick
params = {:@invoice_address => o.invoice_address, :@order_cart => o, :@shipments => o.shipments, :@invoice => i, :@filedate => Date.today}
Clixxie::PdfGenerator.from_template "invoice_mailer/mahnung_2_de.pdf.erb", "invoice/#{i.customer_id}", "#{i.invoice_number}_2m.pdf", params
puts "invoice/#{i.customer_id}/#{i.invoice_number}_2m.pdf geschrieben."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment