Class: Backend::DeliveriesController

Inherits:
BaseController show all
Defined in:
app/controllers/backend/deliveries_controller.rb

Instance Attribute Summary

Attributes inherited from ApplicationController

#current_theme

Instance Method Summary collapse

Methods inherited from BaseController

accounts_range_crit, crit_params, journal_entries_states_crit, journal_period_crit, journals_crit, search_conditions

Methods inherited from ApplicationController

#after_sign_in_path_for, #authorized?, human_action_name, #human_action_name

Instance Method Details

#showObject

Displays details of one sale selected with params


55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'app/controllers/backend/deliveries_controller.rb', line 55

def show
  @entity_of_company_picture_path = Entity.of_company.picture_path
  return unless @delivery = find_and_check
  respond_with(@delivery, methods: [:all_parcels_prepared, :human_delivery_mode],
                          include: {
                            parcels: {
                              methods: [:human_delivery_mode, :human_delivery_nature],
                              include: {
                                items: {
                                  include: [:variant, :product]
                                },
                                address: {},
                                sender: {},
                                recipient: {}
                              }
                            },
                            transporter: {},
                            responsible: {}
                          }) do |format|
    format.html do
      t3e @delivery.attributes
    end
  end
end