Class: SAPOCI::Item

Inherits:
Object show all
Defined in:
lib/sapoci/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index) ⇒ Item

Initializes the item.



92
93
94
# File 'lib/sapoci/item.rb', line 92

def initialize(index)
  @index = index
end

Instance Attribute Details

#attachmentObject

Returns the value of attribute attachment.



27
28
29
# File 'lib/sapoci/item.rb', line 27

def attachment
  @attachment
end

#attachment_purposeObject

Returns the value of attribute attachment_purpose.



29
30
31
# File 'lib/sapoci/item.rb', line 29

def attachment_purpose
  @attachment_purpose
end

#attachment_titleObject

Returns the value of attribute attachment_title.



28
29
30
# File 'lib/sapoci/item.rb', line 28

def attachment_title
  @attachment_title
end

#contractObject

Returns the value of attribute contract.



22
23
24
# File 'lib/sapoci/item.rb', line 22

def contract
  @contract
end

#contract_itemObject

Returns the value of attribute contract_item.



23
24
25
# File 'lib/sapoci/item.rb', line 23

def contract_item
  @contract_item
end

#currencyObject

Returns the value of attribute currency.



14
15
16
# File 'lib/sapoci/item.rb', line 14

def currency
  @currency
end

#cust_field1Object

Returns the value of attribute cust_field1.



40
41
42
# File 'lib/sapoci/item.rb', line 40

def cust_field1
  @cust_field1
end

#cust_field10Object

Returns the value of attribute cust_field10.



49
50
51
# File 'lib/sapoci/item.rb', line 49

def cust_field10
  @cust_field10
end

#cust_field11Object

Returns the value of attribute cust_field11.



50
51
52
# File 'lib/sapoci/item.rb', line 50

def cust_field11
  @cust_field11
end

#cust_field12Object

Returns the value of attribute cust_field12.



51
52
53
# File 'lib/sapoci/item.rb', line 51

def cust_field12
  @cust_field12
end

#cust_field13Object

Returns the value of attribute cust_field13.



52
53
54
# File 'lib/sapoci/item.rb', line 52

def cust_field13
  @cust_field13
end

#cust_field14Object

Returns the value of attribute cust_field14.



53
54
55
# File 'lib/sapoci/item.rb', line 53

def cust_field14
  @cust_field14
end

#cust_field15Object

Returns the value of attribute cust_field15.



54
55
56
# File 'lib/sapoci/item.rb', line 54

def cust_field15
  @cust_field15
end

#cust_field16Object

Returns the value of attribute cust_field16.



55
56
57
# File 'lib/sapoci/item.rb', line 55

def cust_field16
  @cust_field16
end

#cust_field17Object

Returns the value of attribute cust_field17.



56
57
58
# File 'lib/sapoci/item.rb', line 56

def cust_field17
  @cust_field17
end

#cust_field18Object

Returns the value of attribute cust_field18.



57
58
59
# File 'lib/sapoci/item.rb', line 57

def cust_field18
  @cust_field18
end

#cust_field19Object

Returns the value of attribute cust_field19.



58
59
60
# File 'lib/sapoci/item.rb', line 58

def cust_field19
  @cust_field19
end

#cust_field2Object

Returns the value of attribute cust_field2.



41
42
43
# File 'lib/sapoci/item.rb', line 41

def cust_field2
  @cust_field2
end

#cust_field20Object

Returns the value of attribute cust_field20.



59
60
61
# File 'lib/sapoci/item.rb', line 59

def cust_field20
  @cust_field20
end

#cust_field21Object

Returns the value of attribute cust_field21.



60
61
62
# File 'lib/sapoci/item.rb', line 60

def cust_field21
  @cust_field21
end

#cust_field22Object

Returns the value of attribute cust_field22.



61
62
63
# File 'lib/sapoci/item.rb', line 61

def cust_field22
  @cust_field22
end

#cust_field23Object

Returns the value of attribute cust_field23.



62
63
64
# File 'lib/sapoci/item.rb', line 62

def cust_field23
  @cust_field23
end

#cust_field24Object

Returns the value of attribute cust_field24.



63
64
65
# File 'lib/sapoci/item.rb', line 63

def cust_field24
  @cust_field24
end

#cust_field25Object

Returns the value of attribute cust_field25.



64
65
66
# File 'lib/sapoci/item.rb', line 64

def cust_field25
  @cust_field25
end

#cust_field26Object

Returns the value of attribute cust_field26.



65
66
67
# File 'lib/sapoci/item.rb', line 65

def cust_field26
  @cust_field26
end

#cust_field27Object

Returns the value of attribute cust_field27.



66
67
68
# File 'lib/sapoci/item.rb', line 66

def cust_field27
  @cust_field27
end

#cust_field28Object

Returns the value of attribute cust_field28.



67
68
69
# File 'lib/sapoci/item.rb', line 67

def cust_field28
  @cust_field28
end

#cust_field29Object

Returns the value of attribute cust_field29.



68
69
70
# File 'lib/sapoci/item.rb', line 68

def cust_field29
  @cust_field29
end

#cust_field3Object

Returns the value of attribute cust_field3.



42
43
44
# File 'lib/sapoci/item.rb', line 42

def cust_field3
  @cust_field3
end

#cust_field30Object

Returns the value of attribute cust_field30.



69
70
71
# File 'lib/sapoci/item.rb', line 69

def cust_field30
  @cust_field30
end

#cust_field31Object

Returns the value of attribute cust_field31.



70
71
72
# File 'lib/sapoci/item.rb', line 70

def cust_field31
  @cust_field31
end

#cust_field32Object

Returns the value of attribute cust_field32.



71
72
73
# File 'lib/sapoci/item.rb', line 71

def cust_field32
  @cust_field32
end

#cust_field33Object

Returns the value of attribute cust_field33.



72
73
74
# File 'lib/sapoci/item.rb', line 72

def cust_field33
  @cust_field33
end

#cust_field34Object

Returns the value of attribute cust_field34.



73
74
75
# File 'lib/sapoci/item.rb', line 73

def cust_field34
  @cust_field34
end

#cust_field35Object

Returns the value of attribute cust_field35.



74
75
76
# File 'lib/sapoci/item.rb', line 74

def cust_field35
  @cust_field35
end

#cust_field36Object

Returns the value of attribute cust_field36.



75
76
77
# File 'lib/sapoci/item.rb', line 75

def cust_field36
  @cust_field36
end

#cust_field37Object

Returns the value of attribute cust_field37.



76
77
78
# File 'lib/sapoci/item.rb', line 76

def cust_field37
  @cust_field37
end

#cust_field38Object

Returns the value of attribute cust_field38.



77
78
79
# File 'lib/sapoci/item.rb', line 77

def cust_field38
  @cust_field38
end

#cust_field39Object

Returns the value of attribute cust_field39.



78
79
80
# File 'lib/sapoci/item.rb', line 78

def cust_field39
  @cust_field39
end

#cust_field4Object

Returns the value of attribute cust_field4.



43
44
45
# File 'lib/sapoci/item.rb', line 43

def cust_field4
  @cust_field4
end

#cust_field40Object

Returns the value of attribute cust_field40.



79
80
81
# File 'lib/sapoci/item.rb', line 79

def cust_field40
  @cust_field40
end

#cust_field41Object

Returns the value of attribute cust_field41.



80
81
82
# File 'lib/sapoci/item.rb', line 80

def cust_field41
  @cust_field41
end

#cust_field42Object

Returns the value of attribute cust_field42.



81
82
83
# File 'lib/sapoci/item.rb', line 81

def cust_field42
  @cust_field42
end

#cust_field43Object

Returns the value of attribute cust_field43.



82
83
84
# File 'lib/sapoci/item.rb', line 82

def cust_field43
  @cust_field43
end

#cust_field44Object

Returns the value of attribute cust_field44.



83
84
85
# File 'lib/sapoci/item.rb', line 83

def cust_field44
  @cust_field44
end

#cust_field45Object

Returns the value of attribute cust_field45.



84
85
86
# File 'lib/sapoci/item.rb', line 84

def cust_field45
  @cust_field45
end

#cust_field46Object

Returns the value of attribute cust_field46.



85
86
87
# File 'lib/sapoci/item.rb', line 85

def cust_field46
  @cust_field46
end

#cust_field47Object

Returns the value of attribute cust_field47.



86
87
88
# File 'lib/sapoci/item.rb', line 86

def cust_field47
  @cust_field47
end

#cust_field48Object

Returns the value of attribute cust_field48.



87
88
89
# File 'lib/sapoci/item.rb', line 87

def cust_field48
  @cust_field48
end

#cust_field49Object

Returns the value of attribute cust_field49.



88
89
90
# File 'lib/sapoci/item.rb', line 88

def cust_field49
  @cust_field49
end

#cust_field5Object

Returns the value of attribute cust_field5.



44
45
46
# File 'lib/sapoci/item.rb', line 44

def cust_field5
  @cust_field5
end

#cust_field50Object

Returns the value of attribute cust_field50.



89
90
91
# File 'lib/sapoci/item.rb', line 89

def cust_field50
  @cust_field50
end

#cust_field6Object

Returns the value of attribute cust_field6.



45
46
47
# File 'lib/sapoci/item.rb', line 45

def cust_field6
  @cust_field6
end

#cust_field7Object

Returns the value of attribute cust_field7.



46
47
48
# File 'lib/sapoci/item.rb', line 46

def cust_field7
  @cust_field7
end

#cust_field8Object

Returns the value of attribute cust_field8.



47
48
49
# File 'lib/sapoci/item.rb', line 47

def cust_field8
  @cust_field8
end

#cust_field9Object

Returns the value of attribute cust_field9.



48
49
50
# File 'lib/sapoci/item.rb', line 48

def cust_field9
  @cust_field9
end

#descriptionObject

Returns the value of attribute description.



11
12
13
# File 'lib/sapoci/item.rb', line 11

def description
  @description
end

#ext_categoryObject

Returns the value of attribute ext_category.



32
33
34
# File 'lib/sapoci/item.rb', line 32

def ext_category
  @ext_category
end

#ext_category_idObject

Returns the value of attribute ext_category_id.



31
32
33
# File 'lib/sapoci/item.rb', line 31

def ext_category_id
  @ext_category_id
end

#ext_product_idObject

Returns the value of attribute ext_product_id.



26
27
28
# File 'lib/sapoci/item.rb', line 26

def ext_product_id
  @ext_product_id
end

#ext_quote_idObject

Returns the value of attribute ext_quote_id.



24
25
26
# File 'lib/sapoci/item.rb', line 24

def ext_quote_id
  @ext_quote_id
end

#ext_quote_itemObject

Returns the value of attribute ext_quote_item.



25
26
27
# File 'lib/sapoci/item.rb', line 25

def ext_quote_item
  @ext_quote_item
end

#ext_schema_typeObject

Returns the value of attribute ext_schema_type.



30
31
32
# File 'lib/sapoci/item.rb', line 30

def ext_schema_type
  @ext_schema_type
end

#fulfilled_byObject

Returns the value of attribute fulfilled_by.



38
39
40
# File 'lib/sapoci/item.rb', line 38

def fulfilled_by
  @fulfilled_by
end

#gtinObject

Returns the value of attribute gtin.



39
40
41
# File 'lib/sapoci/item.rb', line 39

def gtin
  @gtin
end

#indexObject (readonly)

Returns the value of attribute index.



10
11
12
# File 'lib/sapoci/item.rb', line 10

def index
  @index
end

#longtextObject

Returns the value of attribute longtext.



15
16
17
# File 'lib/sapoci/item.rb', line 15

def longtext
  @longtext
end

#manufactcodeObject

Returns the value of attribute manufactcode.



18
19
20
# File 'lib/sapoci/item.rb', line 18

def manufactcode
  @manufactcode
end

#manufactmatObject

Returns the value of attribute manufactmat.



19
20
21
# File 'lib/sapoci/item.rb', line 19

def manufactmat
  @manufactmat
end

#matgroupObject

Returns the value of attribute matgroup.



20
21
22
# File 'lib/sapoci/item.rb', line 20

def matgroup
  @matgroup
end

#matnrObject

Returns the value of attribute matnr.



12
13
14
# File 'lib/sapoci/item.rb', line 12

def matnr
  @matnr
end

#mps_sage_contractObject

Returns the value of attribute mps_sage_contract.



35
36
37
# File 'lib/sapoci/item.rb', line 35

def mps_sage_contract
  @mps_sage_contract
end

#mps_sage_numberObject

Returns the value of attribute mps_sage_number.



34
35
36
# File 'lib/sapoci/item.rb', line 34

def mps_sage_number
  @mps_sage_number
end

#serviceObject

Returns the value of attribute service.



21
22
23
# File 'lib/sapoci/item.rb', line 21

def service
  @service
end

#sld_sys_nameObject

Returns the value of attribute sld_sys_name.



33
34
35
# File 'lib/sapoci/item.rb', line 33

def sld_sys_name
  @sld_sys_name
end

#sold_byObject

Returns the value of attribute sold_by.



37
38
39
# File 'lib/sapoci/item.rb', line 37

def sold_by
  @sold_by
end

#tax_codeObject

Returns the value of attribute tax_code.



36
37
38
# File 'lib/sapoci/item.rb', line 36

def tax_code
  @tax_code
end

#unitObject

Returns the value of attribute unit.



13
14
15
# File 'lib/sapoci/item.rb', line 13

def unit
  @unit
end

#vendorObject

Returns the value of attribute vendor.



16
17
18
# File 'lib/sapoci/item.rb', line 16

def vendor
  @vendor
end

#vendormatObject

Returns the value of attribute vendormat.



17
18
19
# File 'lib/sapoci/item.rb', line 17

def vendormat
  @vendormat
end

Instance Method Details

#decimal(s) ⇒ Object



96
97
98
99
100
101
102
# File 'lib/sapoci/item.rb', line 96

def decimal(s)
  if RUBY_VERSION >= '2.5'
    BigDecimal(s)
  else
    BigDecimal.new(s)
  end
end

#leadtimeObject



152
153
154
155
156
157
158
# File 'lib/sapoci/item.rb', line 152

def leadtime
  if defined?(@leadtime) && @leadtime
    @leadtime.to_i
  else
    0
  end
end

#leadtime=(value) ⇒ Object



160
161
162
# File 'lib/sapoci/item.rb', line 160

def leadtime=(value)
  @leadtime = value
end

#leadtime_before_type_castObject



164
165
166
# File 'lib/sapoci/item.rb', line 164

def leadtime_before_type_cast
  @leadtime
end

#priceObject



120
121
122
123
124
125
126
# File 'lib/sapoci/item.rb', line 120

def price
  if defined?(@price)
    decimal("0#{@price.to_s.strip.gsub(/,/,'.')}")
  else
    decimal("0.0")
  end
end

#price=(value) ⇒ Object



128
129
130
# File 'lib/sapoci/item.rb', line 128

def price=(value)
  @price = value
end

#price_before_type_castObject



132
133
134
# File 'lib/sapoci/item.rb', line 132

def price_before_type_cast
  @price
end

#priceunitObject



136
137
138
139
140
141
142
# File 'lib/sapoci/item.rb', line 136

def priceunit
  if defined?(@priceunit)
    decimal("0#{@priceunit.to_s.strip.gsub(/,/,'.')}").nonzero? || 1
  else
    1
  end
end

#priceunit=(value) ⇒ Object



144
145
146
# File 'lib/sapoci/item.rb', line 144

def priceunit=(value)
  @priceunit = value
end

#priceunit_before_type_castObject



148
149
150
# File 'lib/sapoci/item.rb', line 148

def priceunit_before_type_cast
  @priceunit
end

#quantityObject



104
105
106
107
108
109
110
# File 'lib/sapoci/item.rb', line 104

def quantity
  if defined?(@quantity)
    decimal("0#{@quantity.to_s.strip.gsub(/,/,'.')}")
  else
    decimal("0.0")
  end
end

#quantity=(value) ⇒ Object



112
113
114
# File 'lib/sapoci/item.rb', line 112

def quantity=(value)
  @quantity = value
end

#quantity_before_type_castObject



116
117
118
# File 'lib/sapoci/item.rb', line 116

def quantity_before_type_cast
  @quantity
end

#service?Boolean

Returns:

  • (Boolean)


168
169
170
# File 'lib/sapoci/item.rb', line 168

def service?
  self.service == "X"
end

#tax_rateObject



172
173
174
175
176
177
178
# File 'lib/sapoci/item.rb', line 172

def tax_rate
  if defined?(@tax_rate)
    decimal("0#{@tax_rate.to_s.strip.gsub(/,/,'.')}")
  else
    decimal("0.0")
  end
end

#tax_rate=(value) ⇒ Object



180
181
182
# File 'lib/sapoci/item.rb', line 180

def tax_rate=(value)
  @tax_rate = value
end

#tax_rate_before_type_castObject



184
185
186
# File 'lib/sapoci/item.rb', line 184

def tax_rate_before_type_cast
  @tax_rate
end

#to_html(options = {}) ⇒ Object

Returns the item properties as HTML hidden field tags.



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/sapoci/item.rb', line 189

def to_html(options = {})
  html = []
  html << hidden_field_tag("DESCRIPTION",     self.description)     unless self.description.blank?
  html << hidden_field_tag("MATNR",           self.matnr)           unless self.matnr.blank?
  html << hidden_field_tag("QUANTITY",        "%015.3f" % self.quantity)
  html << hidden_field_tag("UNIT",            self.unit)            unless self.unit.blank?
  html << hidden_field_tag("PRICE",           "%015.3f" % self.price)
  html << hidden_field_tag("CURRENCY",        self.currency)        unless self.currency.blank?
  html << hidden_field_tag("PRICEUNIT",       self.priceunit.to_i)  if self.priceunit.to_i > 0
  html << hidden_field_tag("LEADTIME",        "%05d" % self.leadtime) if self.leadtime.to_i > 0
  html << hidden_field_tag("VENDOR",          self.vendor)          unless self.vendor.blank?
  html << hidden_field_tag("VENDORMAT",       self.vendormat)       unless self.vendormat.blank?
  html << hidden_field_tag("MANUFACTCODE",    self.manufactcode)    unless self.manufactcode.blank?
  html << hidden_field_tag("MANUFACTMAT",     self.manufactmat)     unless self.manufactmat.blank?
  html << hidden_field_tag("MATGROUP",        self.matgroup)        unless self.matgroup.blank?
  html << hidden_field_tag("SERVICE",         "X")                  if     self.service?
  html << hidden_field_tag("CONTRACT",        self.contract)        unless self.contract.blank?
  html << hidden_field_tag("CONTRACT_ITEM",   self.contract_item)   unless self.contract_item.blank?
  html << hidden_field_tag("EXT_QUOTE_ID",    self.ext_quote_id)    unless self.ext_quote_id.blank?
  html << hidden_field_tag("EXT_QUOTE_ITEM",  self.ext_quote_item)  unless self.ext_quote_item.blank?
  html << hidden_field_tag("EXT_PRODUCT_ID",  self.ext_product_id)  unless self.ext_product_id.blank?
  html << hidden_field_tag("ATTACHMENT",      self.attachment)      unless self.attachment.blank?
  html << hidden_field_tag("ATTACHMENT_TITLE", self.attachment_title) unless self.attachment_title.blank?
  html << hidden_field_tag("ATTACHMENT_PURPOSE", self.attachment_purpose) unless self.attachment_purpose.blank?
  html << hidden_field_tag("EXT_SCHEMA_TYPE", self.ext_schema_type) unless self.ext_schema_type.blank?
  html << hidden_field_tag("EXT_CATEGORY_ID", self.ext_category_id) unless self.ext_category_id.blank?
  html << hidden_field_tag("EXT_CATEGORY",    self.ext_category)    unless self.ext_category.blank?
  html << hidden_field_tag("SLD_SYS_NAME",    self.sld_sys_name)    unless self.sld_sys_name.blank?
  html << hidden_field_tag("MPS_SAGE_NUMBER",   self.mps_sage_number)    unless self.mps_sage_number.blank?
  html << hidden_field_tag("MPS_SAGE_CONTRACT", self.mps_sage_contract)  unless self.mps_sage_contract.blank?
  html << hidden_field_tag("TAX_RATE",        "%.5f" % self.tax_rate)  if self.tax_rate.to_f > 0
  html << hidden_field_tag("TAX_CODE",        self.tax_code)        unless self.tax_code.blank?
  html << hidden_field_tag("SOLD_BY",         self.sold_by)         unless self.sold_by.blank?
  html << hidden_field_tag("FULFILLED_BY",    self.fulfilled_by)    unless self.fulfilled_by.blank?
  html << hidden_field_tag("GTIN",            self.gtin)            unless self.gtin.blank?
  html << hidden_field_tag("CUST_FIELD1",     self.cust_field1)     unless self.cust_field1.blank?
  html << hidden_field_tag("CUST_FIELD2",     self.cust_field2)     unless self.cust_field2.blank?
  html << hidden_field_tag("CUST_FIELD3",     self.cust_field3)     unless self.cust_field3.blank?
  html << hidden_field_tag("CUST_FIELD4",     self.cust_field4)     unless self.cust_field4.blank?
  html << hidden_field_tag("CUST_FIELD5",     self.cust_field5)     unless self.cust_field5.blank?
  html << hidden_field_tag("CUST_FIELD6",     self.cust_field6)     unless self.cust_field6.blank?
  html << hidden_field_tag("CUST_FIELD7",     self.cust_field7)     unless self.cust_field7.blank?
  html << hidden_field_tag("CUST_FIELD8",     self.cust_field8)     unless self.cust_field8.blank?
  html << hidden_field_tag("CUST_FIELD9",     self.cust_field9)     unless self.cust_field9.blank?
  html << hidden_field_tag("CUST_FIELD10",    self.cust_field10)    unless self.cust_field10.blank?
  html << hidden_field_tag("CUST_FIELD11",    self.cust_field11)    unless self.cust_field11.blank?
  html << hidden_field_tag("CUST_FIELD12",    self.cust_field12)    unless self.cust_field12.blank?
  html << hidden_field_tag("CUST_FIELD13",    self.cust_field13)    unless self.cust_field13.blank?
  html << hidden_field_tag("CUST_FIELD14",    self.cust_field14)    unless self.cust_field14.blank?
  html << hidden_field_tag("CUST_FIELD15",    self.cust_field15)    unless self.cust_field15.blank?
  html << hidden_field_tag("CUST_FIELD16",    self.cust_field16)    unless self.cust_field16.blank?
  html << hidden_field_tag("CUST_FIELD17",    self.cust_field17)    unless self.cust_field17.blank?
  html << hidden_field_tag("CUST_FIELD18",    self.cust_field18)    unless self.cust_field18.blank?
  html << hidden_field_tag("CUST_FIELD19",    self.cust_field19)    unless self.cust_field19.blank?
  html << hidden_field_tag("CUST_FIELD20",    self.cust_field20)    unless self.cust_field20.blank?
  html << hidden_field_tag("CUST_FIELD21",    self.cust_field21)    unless self.cust_field21.blank?
  html << hidden_field_tag("CUST_FIELD22",    self.cust_field22)    unless self.cust_field22.blank?
  html << hidden_field_tag("CUST_FIELD23",    self.cust_field23)    unless self.cust_field23.blank?
  html << hidden_field_tag("CUST_FIELD24",    self.cust_field24)    unless self.cust_field24.blank?
  html << hidden_field_tag("CUST_FIELD25",    self.cust_field25)    unless self.cust_field25.blank?
  html << hidden_field_tag("CUST_FIELD26",    self.cust_field26)    unless self.cust_field26.blank?
  html << hidden_field_tag("CUST_FIELD27",    self.cust_field27)    unless self.cust_field27.blank?
  html << hidden_field_tag("CUST_FIELD28",    self.cust_field28)    unless self.cust_field28.blank?
  html << hidden_field_tag("CUST_FIELD29",    self.cust_field29)    unless self.cust_field29.blank?
  html << hidden_field_tag("CUST_FIELD30",    self.cust_field30)    unless self.cust_field30.blank?
  html << hidden_field_tag("CUST_FIELD31",    self.cust_field31)    unless self.cust_field31.blank?
  html << hidden_field_tag("CUST_FIELD32",    self.cust_field32)    unless self.cust_field32.blank?
  html << hidden_field_tag("CUST_FIELD33",    self.cust_field33)    unless self.cust_field33.blank?
  html << hidden_field_tag("CUST_FIELD34",    self.cust_field34)    unless self.cust_field34.blank?
  html << hidden_field_tag("CUST_FIELD35",    self.cust_field35)    unless self.cust_field35.blank?
  html << hidden_field_tag("CUST_FIELD36",    self.cust_field36)    unless self.cust_field36.blank?
  html << hidden_field_tag("CUST_FIELD37",    self.cust_field37)    unless self.cust_field37.blank?
  html << hidden_field_tag("CUST_FIELD38",    self.cust_field38)    unless self.cust_field38.blank?
  html << hidden_field_tag("CUST_FIELD39",    self.cust_field39)    unless self.cust_field39.blank?
  html << hidden_field_tag("CUST_FIELD40",    self.cust_field40)    unless self.cust_field40.blank?
  html << hidden_field_tag("CUST_FIELD41",    self.cust_field41)    unless self.cust_field41.blank?
  html << hidden_field_tag("CUST_FIELD42",    self.cust_field42)    unless self.cust_field42.blank?
  html << hidden_field_tag("CUST_FIELD43",    self.cust_field43)    unless self.cust_field43.blank?
  html << hidden_field_tag("CUST_FIELD44",    self.cust_field44)    unless self.cust_field44.blank?
  html << hidden_field_tag("CUST_FIELD45",    self.cust_field45)    unless self.cust_field45.blank?
  html << hidden_field_tag("CUST_FIELD46",    self.cust_field46)    unless self.cust_field46.blank?
  html << hidden_field_tag("CUST_FIELD47",    self.cust_field47)    unless self.cust_field47.blank?
  html << hidden_field_tag("CUST_FIELD48",    self.cust_field48)    unless self.cust_field48.blank?
  html << hidden_field_tag("CUST_FIELD49",    self.cust_field49)    unless self.cust_field49.blank?
  html << hidden_field_tag("CUST_FIELD50",    self.cust_field50)    unless self.cust_field50.blank?
  html << "<input type=\"hidden\" name=\"NEW_ITEM-LONGTEXT_#{index + 1}:132[]\" value=\"#{escape_html(self.longtext)}\" />" unless self.longtext.blank?
  html.join
end