Created
October 22, 2009 03:56
-
-
Save kossnocorp/215721 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 generate_ra_form_prawn pdf, ra | |
pdf.text "RA DESCRIPTION FORM", :size => 12, :align => :center | |
pdf.text "#{ra.technician.company.name}", :size => 10, :align => :center | |
pdf.text "#{ra.technician.company.address_line1} #{ra.technician.company.city} #{ra.technician.company.state}, #{ra.technician.company.zip}", :size => 10, :align => :center | |
pdf.text "TECH # #{ra.technician.company.tech_number} PROVIDER # #{ra.technician.company.provider_number} ", :size => 10, :align => :center | |
pdf.text "PHONE #: #{ra.technician.company.phone} FAX #: #{ra.technician.company.fax} EMAIL:#{ra.technician.company.email} ", :size => 10, :align => :center | |
pdf.move_down 40 | |
pdf.table [ | |
["DATE", utc2user(Time.now).strftime('%m/%d/%y')], | |
["RA NUMBER", ra.ra_number], | |
["ACCOUNT NUMBER", "#{ra.work_order.acct_number}"], | |
["WORK ORDER NUMBER", "#{ra.work_order.number}"], | |
["CUSTOMER NAME", "#{ra.work_order.customer_name} - #{ra.work_order.customer_phone}"], | |
["TECHNICIAN NAME", "#{ra.technician.name}"], | |
["RECEIVER MODEL", "#{ra.equipment.name}"], | |
["RECEIVER ROO #", "#{ra.roo_number}"], | |
["SERIAL #", "#{ra.serial_number}"], | |
["SMART CARD", "#{ra.smart_card_num}"], | |
[" ", " "], | |
["CIRCLE ONE:", " GOOD RECEIVER BAD RECEIVER"] | |
], | |
:width => 540, | |
:font_size => 9, | |
:border_color => 'cccccc', | |
:border_style => :grid, | |
:align => :left, | |
:vertical_padding => 2.1 | |
pdf.move_down 10 | |
pdf.text "CIRCLE ONE OR ALL THAT APPLY: RETURN REASON CODE ", :size => 10, :align => :left | |
pdf.table [ | |
["No Power", "Access Card Fail"], | |
["Freezing Video", "SFSS-Bad LNB Supply V"], | |
["Bad Remote Sensor", "DOS Dead Out of Box"], | |
["Modem Fail", "No 119 Services"], | |
["Bad or No Picture(chan. 3/4)", "No 110 Services"], | |
["Power Light Blinks", "Swapped out with good receiver"], | |
["Dead with LED On", ""], | |
["Bad or No Sound", "#{ra.problem}"], | |
["Searching for Satellite Signal(SFSS)", ""], | |
[" ", " "], | |
["IS THIS PROBLEM CONSTANT OR INTERMITTENT? ", " CONSTANT INTERMITTENT"], | |
["IS THERE SURGE DAMAGE? ", " YES NO" ], | |
["IS THERE SUBSTANCE OR PHYSICAL DAMAGE? ", " YES NO"], | |
["IS THERE ERROR MESSAGE DISPLAYED ON THE SCREEN? " , " YES NO"], | |
["What was the error message number? " , " "], | |
], | |
:width => 540, | |
:font_size => 9, | |
:border_color => 'cccccc', | |
:border_style => :grid, | |
:align => :left, | |
:vertical_padding => 2.1 | |
pdf.move_down 20 | |
pdf.text "COMMENTS: ", :size => 10, :align => :left | |
pdf.table [[" "], [" "], [" "]], | |
:width => 540, | |
:font_size => 9, | |
:border_color => 'cccccc', | |
:border_style => :grid, | |
:align => :left, | |
:vertical_padding => 2.1 | |
if ra.shipping_location | |
pdf.move_down 20 | |
pdf.text "SHIP TO: ", :size => 10, :align => :left | |
pdf.table [["#{ra.shipping_location.full_address } "]], | |
:width => 540, | |
:font_size => 10, | |
:border_color => 'cccccc', | |
:border_style => :grid, | |
:align => :left, | |
:vertical_padding => 2.1 | |
end | |
pdf.move_down 100 | |
pdf.table [[" RA Receiver: #{ra.equipment.name} "]], | |
:width => 300, | |
:font_size => 15, | |
:border_color => 'ffffff', | |
:row_colors => ['cccccc'], | |
:border_style => :grid, | |
:align => :left, | |
:vertical_padding => 2.1, | |
:position => :center | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment