Class: PurchaseOrder

Inherits:
ApplicationRecord show all
Defined in:
app/models/purchase_order.rb

Instance Method Summary collapse

Methods inherited from ApplicationRecord

define_decrypted_attribute, define_decrypted_attributes, #errors_in_bullet_points, primary_connection, special_connection

Instance Method Details

#stage_descriptionObject



12
13
14
# File 'app/models/purchase_order.rb', line 12

def stage_description
  TypesMaster.find_by(type: po_stage, element: 'PO STAGES')&.type_description
end

#supplier_descriptionObject



16
17
18
# File 'app/models/purchase_order.rb', line 16

def supplier_description
  supplier&.description || ''
end

#type_descriptionObject



8
9
10
# File 'app/models/purchase_order.rb', line 8

def type_description
  TypesMaster.find_by(type: po_type, element: 'PO TYPES')&.type_description
end