Please enable JavaScript.
Coggle requires JavaScript to display documents.
CALLBACKS - Coggle Diagram
CALLBACKS
BUDGET
before_validation
- prepare_format_of_custom_fields
- enforce_identical_value_if_attached_master
- validate_no_associated_suppliers
- enforce_dates
- enforce_budgeted_value
- enforce_pipeline_amounts
- enforce_market_effect
- enforce_pipeline_market_effect
- set_custom_repartition, if: specify_repartition_per_year?
- pipeline_set_custom_repartition, if: pipeline_specify_repartition_per_year?
- calculate_repartition_per_year, if: specify_repartition_per_year?
- pipeline_calculate_repartition_per_year, if: pipeline_specify_repartition_per_year?
after_validation
before_save
- sanitize_associated_businessunits, if: -> { Tenant.app_config("businessunits_formatfor#{self.class.table_name}") == 'main_and_associated_businessunits' }
- paper_trail_set_event_with_state_column, if: has_state_column
- set_target_amounts_to_zero
- cancelled_negotiation, if: proc { |b| b.cancelled? }
- set_savings_percentage
- compute_savings_per_period, if: -> { Tenant.app_config('thirteen_periods') == true }
- validate_specify_pipeline_amounts
- convert_object, if: Proc.new { convert_object_applicable? && convert_object_needed? }
- convert_repartitions, if: Proc.new { convert_object_applicable? && convert_repartitions_needed? }
- validate_base_repartitions
around_save
before_create
around_create
after_create
- set_reference_code
- save_attributes_for_event_notification, if: :is_notifiable
- create_timeline_event, type: :new_budget
- _update_counts_after_create
after_save
- update_parent_program
- paper_trail_reset_event, if: has_state_column
- save_attributes_for_event_notification, if: :is_notifiable
- 1 more item...
before_update
- paper_trail_set_confidentiality_backward, if: has_confidentiality_levels
around_update
after_update
-_update_counts_after_update, unless: :destroyed_for_counter_culture?
-
before_destroy
- paper_trail_set_event_on_destroy, prepend: true
- nullify_associated_suppliers!
- save_attributes_for_event_notification, if: :is_notifiable
- validate_destroy_dependencies
- _update_counts_after_destroy, unless: :destroyed_for_counter_culture?
around_destroy
after_destroy
- update_parent_program
- paper_trail_reset_event
-
NEGOTIATION
before_validation
- prepare_format_of_custom_fields
- enforce_identical_value_if_attached_master
- validate_no_associated_suppliers
- enforce_realised_amounts_and_dates
- set_custom_repartition, if: specify_repartition_per_year?
- realised_set_custom_repartition, if: realised_specify_repartition_per_year?
- calculate_repartition_per_year, if: specify_repartition_per_year?
- realised_calculate_repartition_per_year, if: realised_specify_repartition_per_year?
after_validation
before_save
- before_save :sanitize_associated_businessunits, if: -> { Tenant.app_config("businessunits_formatfor#{self.class.table_name}") == 'main_and_associated_businessunits' }
- set_program_id_with_budget_if_present
- enforce_savings_percentage
- convert_object, if: Proc.new { convert_object_applicable? && convert_object_needed? }
- convert_repartitions, if: Proc.new { convert_object_applicable? && convert_repartitions_needed? }
- validate_base_repartitions
- compute_savings_per_period, if: -> { Tenant.app_config('thirteen_periods') == true && !draft? }
- paper_trail_set_event_with_state_column, if: has_state_column
around_save
before_create
around_create
after_create
- set_reference_code
- save_attributes_for_event_notification, if: :is_notifiable
- create_timeline_event
- _update_counts_after_create
after_save
- update_parent_program
- save_attributes_for_event_notification, if: :is_notifiable
- paper_trail_reset_event, if: has_state_column
- 1 more item...
before_update
- paper_trail_set_confidentiality_backward, if: has_confidentiality_levels
around_update
after_update
- create_timeline_event
- _update_counts_after_update, unless: :destroyed_for_counter_culture?
-
before_destroy
- remove_timeline_events
- nullify_associated_suppliers!
- save_attributes_for_event_notification, if: :is_notifiable
- paper_trail_set_event_on_destroy, prepend: true
- _update_counts_after_destroy, unless: :destroyed_for_counter_culture?
around_destroy
after_destroy
- update_parent_program
- paper_trail_reset_event
- create_timeline_event
-