This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Payment.create({:enquiry_id=>enquiry_id,:pay_ref=>charge.id,:amount=>amount,:card_fee=>card_fee,:card_holder=>charge.source.name ,:is_refund=>false,:last_four=>charge.source.last4,:customer_id=>customer_id,:charge_by=>@currentUser,:pay_type=>payMethod,:stripe_fee =>balance.fee}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def importCustomers | |
| a = Array.new | |
| spreadsheet = open_spreadsheet(params[:file]) | |
| header = spreadsheet.row(1) | |
| if Settings.enquiryExpireIn.present? | |
| @expireDate =Time.now+Settings.enquiryExpireIn.to_i.days | |
| end | |
| (2..spreadsheet.last_row).each do |i| | |
| # sleep(1.0/24.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Passenger.find_in_batches batch_size: 1000 do |passengers| | |
| execute <<-SQL | |
| UPDATE passengers AS p | |
| SET cruise_index = crs.name, | |
| person_index = person.name | |
| FROM passengers, enquiries e, tours t, directions d, cruises crs, | |
| (SELECT id, name FROM ( | |
| SELECT p.id, concat(coalesce(par.first_name, c.first_name), ' ',coalesce(par.last_name, c.last_name)) AS name | |
| FROM passengers p | |
| LEFT JOIN partners par |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def archive | |
| ReconciliationEvent.find_or_create_by(payment_id: params[:id], reconciliation_date: Time.now) | |
| render :json =>{"msg"=>Payment.update(params[:id], is_archive: true)} | |
| end | |
| def archive_selected | |
| count=0 | |
| Payment.where(id: params[:ids]).each do |x| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 11 | |
| - 1h investigating payment error and it's consquences | |
| - 1h taking care of 31770 booking with no customer | |
| - 2h issue with reports not being generated | |
| - 4h investigating missing payment emails | |
| 12 | |
| - 1h getting rid of some cancellation fee | |
| - 4h wrong associated cruises and directions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - Для трех круизов | |
| - Посмотреть остальные дипломы | |
| ######### 1 CHAPTER ########## | |
| - Везде проставить ссылки | |
| - Списки с красной строки, перенос строки тоже | |
| - Структурная схема | |
| - Временно вырезать инфу про проект | |
| - Данный модуль разрабатывался по зaпросу туристической фирмы |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Sortable | |
| def sortable(columns=nil) | |
| @@sortable ||= columns.with_indifferent_access | |
| end | |
| def order_condition(column='id', direction='desc') | |
| direction = %w[asc desc].include?(direction) ? direction : 'desc' | |
| if sortable.keys.include?(column) | |
| column = sortable[column] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT COUNT(DISTINCT `questionnaire_answer_set_answers`.`id`) | |
| FROM `questionnaire_answer_set_answers` | |
| INNER JOIN `questionnaire_answer_set_answers_question_answer_options` | |
| ON `questionnaire_answer_set_answers_question_answer_options`.`answer_id` = `questionnaire_answer_set_answers`.`id` | |
| INNER JOIN `questionnaire_question_answer_options` | |
| ON `questionnaire_question_answer_options`.`id` = `questionnaire_answer_set_answers_question_answer_options`.`answer_option_id` | |
| LEFT OUTER JOIN `questionnaire_question_answer_option_translations` | |
| ON `questionnaire_question_answer_option_translations`.`questionnaire_question_answer_option_id` = `questionnaire_question_answer_options`.`id` | |
| WHERE `questionnaire_answer_set_answers`.`question_id` = 23 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 3) Backend plan | |
| - Add new fields for 'Feedback': crew, meals, cleanliness, representatives, booking_experience, suggestions, other. | |
| Serialize these fields. | |
| ? - Add new model 'Excursion'( name, rating, cruise_id, direction_id ) | |
| - Add new user type 'StaffMember'( first_name, last_name, email, boat_id ) | |
| - When logged in it should be redirected to the feedback form with combination of his boat and the nearest departure time for it. | |
| ? - Should we bind a 'StaffMember' to a tour? | |
| - Partial which accepts an array of hashes as a collection | |
| - Hold the hash structure in yml file | |
| The array structure is something like: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| production: | |
| solr: | |
| hostname: localhost | |
| port: 8983 | |
| log_level: WARNING | |
| path: /solr/production | |
| # read_timeout: 2 | |
| # open_timeout: 0.5 | |
| development: |