Last active
December 22, 2015 22:39
-
-
Save airspeed/6540993 to your computer and use it in GitHub Desktop.
Erstellt einen Lieferschein.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_delivery_note(shipments, folder) | |
app_signature = AppSignature.new.app_signature(shipments.first.app_id) | |
params = {:@invoice_address => shipments.first.invoice_address, :@delivery_address => shipments.first.delivery_address, :@shipments => shipments, :@filedate => Date.today} | |
Clixxie::PdfGenerator.from_template("invoice_mailer/lieferschein.pdf.erb", folder, "#{app_signature}#{shipments.first.order_cart_id}_#{app_signature}#{shipments.first.delivery_address_id}_LS.pdf", params) | |
end | |
class AppSignature | |
include Clixxie::ShipmentTools | |
end | |
#print_delivery_note(Shipment.where(:ship_id => Shipment.last.ship_id), "/home/fpuglisi/Downloads") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment