Class: T4SummaryPdfForm

Inherits:
PdfForm show all
Defined in:
app/pdf_forms/t4_summary_pdf_form.rb

Instance Attribute Summary

Attributes inherited from PdfForm

#data, #path, #pdf

Class Method Summary collapse

Methods inherited from PdfForm

#initialize, #save_as, #to_file

Constructor Details

This class inherits a constructor from PdfForm

Class Method Details

.boxes_by_field_nameObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'app/pdf_forms/t4_summary_pdf_form.rb', line 13

def boxes_by_field_name
  {
    date: 'Date[0]',
    account: 'Border[0].EmployerInfo[0].EmployerAccount[0]',
    name: 'Border[0].EmployerInfo[0].EmployerName[0]',
    box_88: 'Border[0].LeftFields[0].Line88[0].Box88[0]',
    box_14: 'Border[0].LeftFields[0].Line14[0].Box14[0]',
    box_20: 'Border[0].LeftFields[0].Line20[0].Box20[0]',
    box_52: 'Border[0].LeftFields[0].Line52[0].Box52[0]',
    box_16: 'Border[0].MiddleFields[0].Line16[0].Box16[0]',
    box_16A: 'Border[0].MiddleFields[0].Line16A[0].Box16A[0]',
    box_27: 'Border[0].MiddleFields[0].Line27[0].Box27[0]',
    box_27A: 'Border[0].MiddleFields[0].Line27A[0].Box27A[0]',
    box_18: 'Border[0].MiddleFields[0].Line18[0].Box18[0]',
    box_19: 'Border[0].MiddleFields[0].Line19[0].Box19[0]',
    box_22: 'Border[0].MiddleFields[0].Line22[0].Box22[0]',
    box_80: 'Border[0].MiddleFields[0].Line80[0].Box80[0]',
    box_82: 'Border[0].MiddleFields[0].Line82[0].Box82[0]',
    difference: 'Border[0].MiddleFields[0].Difference[0]',
    box_84: 'Border[0].MiddleFields[0].Line84[0].Box84[0]',
    box_86: 'Border[0].MiddleFields[0].Line86[0].Box86[0]',
    box_74: 'Border[0].SIN[0].Box74[0].Box74[0]',
    box_75: 'Border[0].SIN[0].Box75[0].Box74[0]',
    box_76: 'Border[0].Line76[0].Box76[0]',
    box_78: 'Border[0].Box78[0].Box78[0]',
    extention: 'Border[0].Extention[0].Extention[0]',
    certification_date: 'Border[0].CertificationDate[0]',
    signature: 'Border[0].Extention[0]',
    position: 'Border[0].Box76[0]'
  }
end

.dummyObject



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'app/pdf_forms/t4_summary_pdf_form.rb', line 55

def dummy
  new({
        date: '24',
        account: '123456789',
        name: 'Dummy Company Inc.',
        box_88: '1000.00',
        box_14: '2000.00',
        box_20: '3000.00',
        box_52: '4000.00',
        box_16: '5000.00',
        box_16A: '6000.00',
        box_27: '7000.00',
        box_27A: '8000.00',
        box_18: '9000.00',
        box_19: '10000.00',
        box_22: '11000.00',
        box_80: '12000.00',
        box_82: '13000.00',
        difference: '14000.00',
        box_84: '15000.00',
        box_86: '16000.00',
        box_74: '777777777',
        box_75: '123123123',
        box_76: 'charbel',
        box_78: '19000.00',
        extention: 'CEO',
        certification_date: '2023-12-31',
        signature: 'SIGNATURE HERE',
        position: 'charbel'
      })
end

.field_name_prefixesObject



7
8
9
10
11
# File 'app/pdf_forms/t4_summary_pdf_form.rb', line 7

def field_name_prefixes
  [
    'form1[0].Page1[0].'
  ]
end

.signature_parametersObject



45
46
47
48
49
50
51
52
53
# File 'app/pdf_forms/t4_summary_pdf_form.rb', line 45

def signature_parameters
  {
    page: 0,
    x: 147,
    y: 83,
    width: 260,
    height: 100
  }
end

.template_pathObject



3
4
5
# File 'app/pdf_forms/t4_summary_pdf_form.rb', line 3

def template_path
  './app/assets/pdfs/t4sum-fill-24.pdf'
end