01 2020
This commit is contained in:
parent
bed91c4f4a
commit
c8948338bb
122 changed files with 7911 additions and 1639 deletions
2
.env
2
.env
|
|
@ -3,7 +3,7 @@ APP_ENV=local
|
|||
APP_KEY=base64:cxq+xNckU1xLwp8V9Bfj9+nOK5iZL6urcZ1EBO8usXg=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://mein.sterntours.local
|
||||
APP_OLD_URL = http://cms-stern-tours.local
|
||||
APP_OLD_URL=https://cms-stern-tours.local
|
||||
|
||||
#APP_URL_V2=https://v2.stern-tours.de
|
||||
APP_URL_V2=http://v2-sterntours.local
|
||||
|
|
|
|||
1
.idea/mein.sterntours.iml
generated
1
.idea/mein.sterntours.iml
generated
|
|
@ -29,6 +29,7 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpoffice/phpspreadsheet" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpoption/phpoption" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpseclib/phpseclib" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-invoker" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-factory" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/ralouphie/getallheaders" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/reliese/laravel" />
|
||||
|
|
|
|||
1
.idea/php.xml
generated
1
.idea/php.xml
generated
|
|
@ -128,6 +128,7 @@
|
|||
<path value="$PROJECT_DIR$/vendor/sebastian/type" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/error-handler" />
|
||||
<path value="$PROJECT_DIR$/vendor/barryvdh/laravel-debugbar" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-invoker" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
|
||||
|
|
|
|||
224
.idea/workspace.xml
generated
224
.idea/workspace.xml
generated
|
|
@ -2,7 +2,62 @@
|
|||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e1ac1cea-a1a5-4c16-b5f0-5908c7d368de" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/API/CMSContentInfoController.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Exports/ReportCollectionExport.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/API/BookingController.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/Admin/ReportController.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/SyS/Tools/ContentLinkController.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Http/Middleware/SysAdmin.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Arrangement.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/ArrangementTemplate.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/ArrangementType.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/BookingServiceItem.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Coupon.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/CreditCardType.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Customer.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/InitialContactType.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Inquiry.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/InquiryTemplate.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/InquiryType.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/InsuranceCertificate.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/LeadParticipant.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Offer.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Participant.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Salutation.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Searchengine.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/ServiceProvider.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/ServiceProviderEntry.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/StatusHistory.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Sym/_Booking.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/TravelBooking.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/TravelCategory.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/TravelCompany.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/Website.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Repositories/DraftRepository.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/config/debugbar.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_143834_create_travel_booking_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_150706_create_customer_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_151231_create_initial_contact_type_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_151258_create_salutation_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_151309_create_searchengine_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_151330_create_travel_category_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_151358_create_inquiry_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_151358_create_lead_participant_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_151358_create_offer_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_151358_create_status_history_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_151359_create_website_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_152708_create_coupon_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_152708_create_credit_card_type_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_152708_create_inquiry_template_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_152709_create_inquiry_type_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_152709_create_insurance_certificate_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_152709_create_participant_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_153723_create_arrangement_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_153723_create_arrangement_template_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_153723_create_arrangement_type_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_154358_create_booking_service_item_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_154619_create_travel_company_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_02_04_160054_create_service_provider_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2020_02_04_160055_create_service_provider_entry_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/database/migrations/2019_08_05_171716_create_i_q_content_folders_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/database/migrations/2019_08_05_171717_create_i_q_content_files_table.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/database/migrations/2019_08_05_171718_create_i_q_content_categories_table.php" afterDir="false" />
|
||||
|
|
@ -22,8 +77,11 @@
|
|||
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/colors.blade.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/file.blade.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/move-item.blade.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/storage/debugbar/.gitignore" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/which" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/resources/views/_empty.blade.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/resources/views/admin/report/index.blade.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/resources/views/sys/tools/links.blade.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/resources/views/sys/tools/trees.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.env" beforeDir="false" afterPath="$PROJECT_DIR$/.env" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/mein.sterntours.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/mein.sterntours.iml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/php.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
|
|
@ -31,36 +89,30 @@
|
|||
<change beforePath="$PROJECT_DIR$/_ide_helper.php" beforeDir="false" afterPath="$PROJECT_DIR$/_ide_helper.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/_ide_helper_models.php" beforeDir="false" afterPath="$PROJECT_DIR$/_ide_helper_models.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/API/CMSContentController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/API/CMSContentController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/API/FewoController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/API/FewoController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/CMS/CMSContentInfoController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/CMS/CMSContentInfoController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/API/CMSContentInfoController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/API/CMSContentInfoController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/API/DraftController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/API/DraftController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/AdminUserController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/AdminUserController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/DataTableController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/DataTableController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/RequestController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/RequestController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/TravelUserBookingFewoController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/TravelUserBookingFewoController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/TravelUserController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/TravelUserController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/UserUpdateEmailController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/UserUpdateEmailController.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Http/Kernel.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Kernel.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/Booking.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Booking.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/CMSInfo.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/CMSInfo.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/CMSInfoAvailable.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/CMSInfoAvailable.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/Draft.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Draft.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/DraftType.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/DraftType.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/Feedback.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Feedback.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/FewoLodging.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/FewoLodging.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/FewoLodgingGroup.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/FewoLodgingGroup.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/FewoLodgingType.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/FewoLodgingType.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/FewoSeason.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/FewoSeason.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/IQContentTree.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/IQContentTree.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/IQContentTreeNode.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/IQContentTreeNode.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/Page.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Page.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/Sym/ArrangementTemplate.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Sym/ArrangementTemplate.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/TravelBookingFewoChannel.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelBookingFewoChannel.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/TravelClass.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelClass.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/TravelCountry.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelCountry.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/TravelGuide.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelGuide.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/TravelPageGuide.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelPageGuide.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/TravelProgram.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelProgram.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/TravelUser.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelUser.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/Lead.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Lead.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/Sym/TravelCountry.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Sym/TravelCountry.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Models/TravelUserBookingFewo.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelUserBookingFewo.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Services/HTMLHelper.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/HTMLHelper.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/Services/Util.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/Util.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/User.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/User.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bootstrap/cache/packages.php" beforeDir="false" afterPath="$PROJECT_DIR$/bootstrap/cache/packages.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bootstrap/cache/services.php" beforeDir="false" afterPath="$PROJECT_DIR$/bootstrap/cache/services.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/helpers.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/helpers.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/composer.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/composer.lock" beforeDir="false" afterPath="$PROJECT_DIR$/composer.lock" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/database/migrations/2019_12_11_171859_create_c_m_s_info_availables_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_12_11_171859_create_c_m_s_info_availables_table.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/config/permissions.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/permissions.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/database/migrations/2018_10_29_202123_create_booking_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2018_10_29_202123_create_booking_table.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/database/migrations/2018_10_29_202125_create_lead_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2018_10_29_202125_create_lead_table.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/database/migrations/2019_07_19_155853_create_i_q_content_tree_nodes_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_07_19_155853_create_i_q_content_tree_nodes_table.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/composer.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/public/css/cropper.min.css" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/public/css/cropper.min.css" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/public/js/cropper.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/public/js/cropper.min.js" afterDir="false" />
|
||||
|
|
@ -101,19 +153,39 @@
|
|||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/LfmStorageRepository.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/LfmStorageRepository.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Middlewares/CreateDefaultFolder.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Middlewares/CreateDefaultFolder.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Middlewares/MultiUser.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Middlewares/MultiUser.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Models/IQContentCategory.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Models/IQContentCategory.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Models/IQContentFile.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Models/IQContentFile.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Models/IQContentFolder.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Models/IQContentFolder.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Models/IQContentTag.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Models/IQContentTag.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/config/lfm.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/config/lfm.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/lang/de/lfm.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/lang/de/lfm.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/crop.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/crop.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/demo.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/demo.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/move.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/move.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/css/application.css" beforeDir="false" afterPath="$PROJECT_DIR$/public/css/application.css" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/content/country/detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/content/country/detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/public/.htaccess" beforeDir="false" afterPath="$PROJECT_DIR$/public/.htaccess" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/booking/_detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/booking/_detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/booking/detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/booking/detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/booking/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/booking/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/content/all/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/content/all/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/content/country/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/content/country/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/content/info/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/content/info/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/feedback/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/feedback/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/sidebar/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/sidebar/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/travel_guide/detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/travel_guide/detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/travel_guide/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/travel_guide/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/travel_guide/page.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/travel_guide/page.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/travel_guide/tree-detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/travel_guide/tree-detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/cms/travel_guide/tree.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/travel_guide/tree.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/drafts/_detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/drafts/_detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/drafts/detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/drafts/detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/drafts/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/drafts/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/iq/content/assets/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/iq/content/assets/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/request/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/request/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/settings/travel_agenda/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/settings/travel_agenda/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/settings/travel_country/detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/settings/travel_country/detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/settings/travel_country/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/settings/travel_country/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/settings/travel_nationality/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/settings/travel_nationality/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/travel/program/detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/travel/program/detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/travel/program/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/travel/program/index.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/resources/views/travel/user/detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/travel/user/detail.blade.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/routes/api.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/api.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/web.php" afterDir="false" />
|
||||
</list>
|
||||
|
|
@ -296,6 +368,7 @@
|
|||
<path value="$PROJECT_DIR$/vendor/sebastian/type" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/error-handler" />
|
||||
<path value="$PROJECT_DIR$/vendor/barryvdh/laravel-debugbar" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-invoker" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="ProjectId" id="1OVGC0t0zLFaJgjHUxM3IZZZaeh" />
|
||||
|
|
@ -315,24 +388,24 @@
|
|||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="database.console.LAST_STATE" value="false" />
|
||||
<property name="js.buildTools.grunt.grunt-cli.package" value="" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/app/Http/Controllers/API" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/app/Exports" />
|
||||
<property name="nodejs_package_manager_path" value="npm" />
|
||||
<property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/resources/views/booking" />
|
||||
<recent name="$PROJECT_DIR$/resources/views/cms/content/all" />
|
||||
<recent name="$PROJECT_DIR$/app/Repositories/IQ" />
|
||||
<recent name="$PROJECT_DIR$/resources/views/travel/user" />
|
||||
<recent name="$PROJECT_DIR$/database/migrations" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/app/Http/Controllers/API" />
|
||||
<recent name="$PROJECT_DIR$/resources/views/cms/content/info" />
|
||||
<recent name="$PROJECT_DIR$/app/Http/Controllers/CMS" />
|
||||
<recent name="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views" />
|
||||
<recent name="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/Controllers" />
|
||||
<recent name="$PROJECT_DIR$/app/Exports" />
|
||||
<recent name="$PROJECT_DIR$/resources/views/admin/report" />
|
||||
<recent name="$PROJECT_DIR$/resources/views" />
|
||||
<recent name="$PROJECT_DIR$/app/Http/Controllers/Admin" />
|
||||
<recent name="$PROJECT_DIR$/app/Repositories" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/database/migrations" />
|
||||
<recent name="$PROJECT_DIR$/app/Models/Sym" />
|
||||
<recent name="$PROJECT_DIR$/app/Models" />
|
||||
<recent name="$PROJECT_DIR$/resources/views/sys/tools" />
|
||||
<recent name="$PROJECT_DIR$/app/Http/Controllers/SyS/Tools" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunAnythingCache">
|
||||
|
|
@ -596,6 +669,31 @@
|
|||
<workItem from="1577533716886" duration="2492000" />
|
||||
<workItem from="1577541571485" duration="15179000" />
|
||||
<workItem from="1577559732379" duration="538000" />
|
||||
<workItem from="1577643794116" duration="594000" />
|
||||
<workItem from="1577860958469" duration="292000" />
|
||||
<workItem from="1577966607572" duration="5000" />
|
||||
<workItem from="1577988658535" duration="238000" />
|
||||
<workItem from="1579544022247" duration="156000" />
|
||||
<workItem from="1579712784617" duration="40000" />
|
||||
<workItem from="1579768308331" duration="2454000" />
|
||||
<workItem from="1580136511668" duration="5429000" />
|
||||
<workItem from="1580304567973" duration="8717000" />
|
||||
<workItem from="1580552153217" duration="10510000" />
|
||||
<workItem from="1580573937951" duration="2975000" />
|
||||
<workItem from="1580736340512" duration="145000" />
|
||||
<workItem from="1580825126595" duration="11131000" />
|
||||
<workItem from="1581069869699" duration="3690000" />
|
||||
<workItem from="1581158720114" duration="98000" />
|
||||
<workItem from="1581245575648" duration="16000" />
|
||||
<workItem from="1581245859762" duration="118000" />
|
||||
<workItem from="1581346514055" duration="5620000" />
|
||||
<workItem from="1581357557814" duration="938000" />
|
||||
<workItem from="1581431002998" duration="74000" />
|
||||
<workItem from="1581431084083" duration="1914000" />
|
||||
<workItem from="1581433719309" duration="9175000" />
|
||||
<workItem from="1581497528788" duration="397000" />
|
||||
<workItem from="1581603048699" duration="622000" />
|
||||
<workItem from="1581668216737" duration="34000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
|
@ -622,37 +720,53 @@
|
|||
</ignored-roots>
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="743" y="388" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1576147025497">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
<state x="-1399" y="392" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1581158769046">
|
||||
<screen x="-2560" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="-1399" y="392" key="#com.intellij.execution.impl.EditConfigurationsDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@-2560.23.2560.1417" timestamp="1581158769046" />
|
||||
<state x="-1399" y="392" key="#com.intellij.execution.impl.EditConfigurationsDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581158740331" />
|
||||
<state x="743" y="388" key="#com.intellij.execution.impl.EditConfigurationsDialog/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1576147025497" />
|
||||
<state x="1018" y="488" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1576083305151">
|
||||
<state x="968" y="466" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog" timestamp="1581431073950">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="968" y="466" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581431073950" />
|
||||
<state x="723" y="54" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog" timestamp="1581351314829">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="723" y="54" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581351314829" />
|
||||
<state x="1018" y="488" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1580559086038">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="1018" y="488" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1580559086038" />
|
||||
<state x="1018" y="488" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1576083305151" />
|
||||
<state x="975" y="454" key="#composer-post-update.sh" timestamp="1576084046909">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="975" y="454" key="#composer-post-update.sh/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1576084046909" />
|
||||
<state x="1097" y="610" width="600" height="300" key="ComposerAddDependencyOutputPopupDimensionServiceKey" timestamp="1577532820637">
|
||||
<state x="1097" y="610" width="600" height="300" key="ComposerAddDependencyOutputPopupDimensionServiceKey" timestamp="1581350288912">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="1097" y="610" width="600" height="300" key="ComposerAddDependencyOutputPopupDimensionServiceKey/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581350288912" />
|
||||
<state x="1097" y="610" width="600" height="300" key="ComposerAddDependencyOutputPopupDimensionServiceKey/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577532820637" />
|
||||
<state x="1020" y="544" width="535" height="375" key="PHPComposerAddDependencyDialogDimensionKey" timestamp="1577532821964">
|
||||
<state x="1020" y="544" width="527" height="375" key="PHPComposerAddDependencyDialogDimensionKey" timestamp="1581350432217">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="1020" y="544" width="527" height="375" key="PHPComposerAddDependencyDialogDimensionKey/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581350432217" />
|
||||
<state x="1020" y="544" width="535" height="375" key="PHPComposerAddDependencyDialogDimensionKey/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577532821964" />
|
||||
<state x="1063" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1577126837332">
|
||||
<state x="1063" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1581433082391">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="1063" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581433082391" />
|
||||
<state x="1063" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577126837332" />
|
||||
<state x="938" y="488" width="1035" height="714" key="find.popup" timestamp="1577550564294">
|
||||
<state x="938" y="488" width="1405" height="940" key="find.popup" timestamp="1581439807962">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="938" y="488" width="1405" height="940" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581439807962" />
|
||||
<state x="938" y="488" width="1035" height="714" key="find.popup/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577550564294" />
|
||||
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup" timestamp="1577556651494">
|
||||
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup" timestamp="1580576197347">
|
||||
<screen x="0" y="23" width="2560" height="1417" />
|
||||
</state>
|
||||
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577556651494" />
|
||||
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1580576197347" />
|
||||
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577643900011" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -5,7 +5,7 @@ namespace PHPSTORM_META {
|
|||
|
||||
/**
|
||||
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
|
||||
* Generated on 2019-12-28 16:01:55.
|
||||
* Generated on 2020-02-10 17:24:00.
|
||||
*
|
||||
* @author Barry vd. Heuvel <barryvdh@gmail.com>
|
||||
* @see https://github.com/barryvdh/laravel-ide-helper
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/**
|
||||
* A helper file for Laravel 5, to provide autocomplete information to your IDE
|
||||
* Generated for Laravel 5.8.36 on 2019-12-28 16:01:54.
|
||||
* Generated for Laravel 5.8.36 on 2020-02-10 17:24:00.
|
||||
*
|
||||
* This file should not be included in your code, only analyzed by your IDE!
|
||||
*
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
33
app/Exports/ReportCollectionExport.php
Normal file
33
app/Exports/ReportCollectionExport.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
namespace App\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Excel;
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
|
||||
class ReportCollectionExport implements FromCollection, WithHeadings
|
||||
{
|
||||
protected $collection;
|
||||
protected $headings;
|
||||
|
||||
use Exportable;
|
||||
|
||||
|
||||
public function __construct($data,$header)
|
||||
{
|
||||
$this->collection = $data;
|
||||
$this->headings = $header;
|
||||
}
|
||||
|
||||
public function collection()
|
||||
{
|
||||
return collect($this->collection);
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return [$this->headings];
|
||||
}
|
||||
|
||||
}
|
||||
191
app/Http/Controllers/API/BookingController.php
Executable file
191
app/Http/Controllers/API/BookingController.php
Executable file
|
|
@ -0,0 +1,191 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Arrangement;
|
||||
use App\Models\Booking;
|
||||
use App\Models\BookingServiceItem;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Lead;
|
||||
use App\Models\Participant;
|
||||
use App\Models\TravelBooking;
|
||||
use App\Repositories\DraftRepository;
|
||||
|
||||
|
||||
class BookingController extends Controller
|
||||
{
|
||||
private $successStatus = 200;
|
||||
private $successKey = 'f6077389c9ce710e554763a5de02c8ec';
|
||||
|
||||
protected $draftRepo;
|
||||
|
||||
public function __construct(DraftRepository $draftRepo)
|
||||
{
|
||||
$this->draftRepo = $draftRepo;
|
||||
}
|
||||
|
||||
public function import()
|
||||
{
|
||||
|
||||
$request = \Request::all();
|
||||
if($request['key'] !== $this->successKey){
|
||||
return response()->json(['error' => "key"], 401);
|
||||
}
|
||||
$travel_booking = TravelBooking::find($request['travel_booking_id']);
|
||||
|
||||
// $travel_booking = TravelBooking::find(2458);
|
||||
if(!$travel_booking){
|
||||
return response()->json(['error' => 'no-booking-found'], $this->successStatus);
|
||||
}
|
||||
|
||||
// ---- createCustomer
|
||||
$data = [
|
||||
'salutation_id' => $travel_booking->salutation_id,
|
||||
'name' => $travel_booking->last_name,
|
||||
'firstname' => $travel_booking->first_name,
|
||||
'street' => $travel_booking->street,
|
||||
'zip' => $travel_booking->zipcode,
|
||||
'city' => $travel_booking->city,
|
||||
'country_id' => $travel_booking->country_id,
|
||||
'phone' => $travel_booking->phone,
|
||||
'phonemobile' => $travel_booking->mobile,
|
||||
'email' => $travel_booking->email
|
||||
];
|
||||
$customer = Customer::create($data);
|
||||
|
||||
// ---- createLead
|
||||
$data = [
|
||||
'customer_id' => $customer->id,
|
||||
'request_date' => $travel_booking->created,
|
||||
'travelperiod_start' => $travel_booking->selected_start_date,
|
||||
'travelperiod_end' => $travel_booking->selected_end_date,
|
||||
'remarks' => $travel_booking->comments,
|
||||
'sf_guard_user_id' => 15,
|
||||
'is_closed' => true,
|
||||
'initialcontacttype_id' => 14,
|
||||
'status_id' => 7,
|
||||
'website_id' => 1,
|
||||
];
|
||||
$lead = Lead::create($data);
|
||||
$lead->updateNextDueDate();
|
||||
|
||||
|
||||
$data = [
|
||||
'booking_date' => $travel_booking->created->format('Y-m-d'),
|
||||
'customer_id' => $customer->id,
|
||||
'lead_id' => $lead->id,
|
||||
'new_drafts' => $travel_booking->drafts === null ? 0 : 1,
|
||||
'sf_guard_user_id' => 15,
|
||||
'branch_id' => 4,
|
||||
'travel_country_id' => isset($travel_booking->selected_travel['travel_country_id'][0]) ? $travel_booking->selected_travel['travel_country_id'][0] : null,
|
||||
'travel_category_id' => isset($travel_booking->selected_travel['travel_category_id']) ? $travel_booking->selected_travel['travel_category_id'] : null,
|
||||
'pax' => $travel_booking->selected_adults,
|
||||
'title' => isset($travel_booking->selected_travel['travel_title']) ? $travel_booking->selected_travel['travel_title'] : "",
|
||||
'start_date' => $travel_booking->selected_start_date->format('Y-m-d'),
|
||||
'end_date' => $travel_booking->selected_end_date->format('Y-m-d'),
|
||||
'website_id' => 1,
|
||||
'travel_number' => isset($travel_booking->selected_travel['travel_number']) ? $travel_booking->selected_travel['travel_number'] : null,
|
||||
'participant_name' => isset($travel_booking->participants[0]['last_name']) ? $travel_booking->participants[0]['last_name'] : null,
|
||||
'participant_firstname' => isset($travel_booking->participants[0]['first_name']) ? $travel_booking->participants[0]['first_name'] : null,
|
||||
'participant_birthdate' => isset($travel_booking->participants[0]['birthday']) ? date( "Y-m-d", strtotime($travel_booking->participants[0]['birthday'])) : null,
|
||||
'participant_salutation_id' => isset($travel_booking->participants[0]['gender']) ? $travel_booking->participants[0]['gender'] : null,
|
||||
'travel_company_id' => isset($travel_booking->service_items[0]['travel_company_id']) ? $travel_booking->service_items[0]['travel_company_id'] : null,
|
||||
'price' => $travel_booking->price,
|
||||
'price_total' => $travel_booking->price_total,
|
||||
'deposit_total' => $travel_booking->deposit_total,
|
||||
'final_payment' => $travel_booking->final_payment,
|
||||
'final_payment_date' => $travel_booking->final_payment_date->format('Y-m-d'),
|
||||
'travelagenda_id' => isset($travel_booking->selected_travel['travelagenda_id']) ? $travel_booking->selected_travel['travelagenda_id'] : null,
|
||||
];
|
||||
|
||||
//createBooking
|
||||
$booking = Booking::create($data);
|
||||
|
||||
//createTraveler
|
||||
if($travel_booking->participants){
|
||||
foreach ($travel_booking->participants as $key => $participant){
|
||||
if($key > 0){
|
||||
Participant::create([
|
||||
'booking_id' => $booking->id,
|
||||
'participant_name' => $participant['last_name'],
|
||||
'participant_firstname' => $participant['first_name'],
|
||||
'participant_birthdate' => date( "Y-m-d", strtotime($participant['birthday'])),
|
||||
'participant_salutation_id' => $participant['gender'],
|
||||
'participant_child' => $participant['child'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//createServiceItem //service_items
|
||||
if($travel_booking->service_items){
|
||||
foreach ($travel_booking->service_items as $key => $service_item){
|
||||
BookingServiceItem::create([
|
||||
'booking_id' => $booking->id,
|
||||
'travel_company_id' => $service_item['travel_company_id'],
|
||||
'service_price' => $service_item['service_price'],
|
||||
'service_price_refund' => 0,
|
||||
'commission' => $service_item['commission'],
|
||||
'travel_date' => $service_item['travel_date'],
|
||||
'name' => $service_item['name'],
|
||||
'is_commission_locked' => 0,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
//createServiceItem //insurances
|
||||
if($travel_booking->insurances){
|
||||
foreach ($travel_booking->insurances as $key => $service_item){
|
||||
BookingServiceItem::create([
|
||||
'booking_id' => $booking->id,
|
||||
'travel_company_id' => $service_item['travel_company_id'],
|
||||
'service_price' => $service_item['price'],
|
||||
'service_price_refund' => 0,
|
||||
'commission' => $service_item['commission'],
|
||||
'travel_date' => $service_item['travel_date'],
|
||||
'name' => $service_item['name'],
|
||||
'is_commission_locked' => 0,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//createArrangement
|
||||
if($travel_booking->arrangements) {
|
||||
foreach ($travel_booking->arrangements as $key => $arrangement){
|
||||
Arrangement::create([
|
||||
'state' => isset($arrangement['state']) ? $arrangement['state'] : null,
|
||||
'begin' => isset($arrangement['end']) ? $arrangement['end'] : null,
|
||||
'end' => isset($arrangement['end']) ? $arrangement['end'] : null,
|
||||
'type_s' => isset($arrangement['type_s']) ? $arrangement['type_s'] : null,
|
||||
'data_s' => isset($arrangement['data_s']) ? $arrangement['data_s'] : null,
|
||||
'view_position' => isset($arrangement['view_position']) ? $arrangement['view_position'] : null,
|
||||
'booking_id' => $booking->id,
|
||||
'type_id' => $arrangement['type_id'],
|
||||
'in_pdf' => isset($arrangement['in_pdf']) ? $arrangement['in_pdf'] : null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
//createDrafts
|
||||
|
||||
if($travel_booking->drafts) {
|
||||
$this->draftRepo->create_drafts_from_booking($booking->id, $travel_booking->drafts);
|
||||
}
|
||||
|
||||
$travel_booking->crm_booking_id = $booking->id;
|
||||
$travel_booking->save();
|
||||
$ret= [
|
||||
'url_v1' => make_old_url('/index.php/booking/'.$booking->id.'/edit'),
|
||||
'url_v3' => route('booking_detail', $booking->id),
|
||||
'lead_id' => $lead->id
|
||||
];
|
||||
return response()->json(['success' => "import", "ret" => $ret], $this->successStatus);
|
||||
//return response()->json(['error' => 'no-node'], $this->successStatus);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -10,7 +10,8 @@ use App\Models\TravelGuide;
|
|||
|
||||
class CMSContentController extends Controller
|
||||
{
|
||||
public $successStatus = 200;
|
||||
private $successStatus = 200;
|
||||
private $successKey = 'f6077389c9ce710e554763a5de02c8ec';
|
||||
|
||||
|
||||
public function search()
|
||||
|
|
@ -22,7 +23,7 @@ class CMSContentController extends Controller
|
|||
return response()->json(['error' => "request no found"], $this->successStatus);
|
||||
}
|
||||
|
||||
if($request['key'] !== 'f6077389c9ce710e554763a5de02c8ec'){
|
||||
if($request['key'] !== $this->successKey){
|
||||
return response()->json(['error' => "key"], 401);
|
||||
}
|
||||
|
||||
|
|
@ -35,11 +36,13 @@ class CMSContentController extends Controller
|
|||
$tree = IQContentTree::whereIdentifier($tree_identifier)->first();
|
||||
$travel_guide = null;
|
||||
$url = "";
|
||||
$ret['title'] = "";
|
||||
$ret['description'] = "";
|
||||
if($tree){
|
||||
$lvl = 0;
|
||||
|
||||
$ret['tree'] = $tree->toArray();
|
||||
$ret['navi'] = $this->makeNaviTree($tree, $urlArray, "", 0, false);
|
||||
|
||||
$url = "/".$tree->identifier;
|
||||
$ret['bread_crumb'][$lvl] = [
|
||||
'title' => $tree->name,
|
||||
|
|
@ -51,14 +54,15 @@ class CMSContentController extends Controller
|
|||
$tree_node = IQContentTreeNode::whereTreeId($tree->id)->whereIdentifier($tree_node_identifier)->whereLvl($lvl)->whereActive(true)->first();
|
||||
|
||||
if($tree_node){
|
||||
$lvl ++;
|
||||
$ret['title'] = $tree_node->title;
|
||||
$ret['description'] = $tree_node->description;;
|
||||
$url = $url."/".$tree_node->identifier;
|
||||
$ret['bread_crumb'][$lvl] = [
|
||||
'title' => $tree_node->name,
|
||||
'url' => $url,
|
||||
];
|
||||
|
||||
$ret['nodes'][$lvl] = $tree_node->toArray();
|
||||
$lvl ++;
|
||||
}else{
|
||||
return response()->json(['error' => 'no-node'], $this->successStatus);
|
||||
}
|
||||
|
|
@ -69,12 +73,18 @@ class CMSContentController extends Controller
|
|||
if($tree_node->iq_content_sites->count()){
|
||||
foreach ($tree_node->iq_content_sites as $iq_content_site){
|
||||
if(isset($iq_content_site->travel_guide) && $iq_content_site->travel_guide && $iq_content_site->travel_guide->active){
|
||||
$ret['sites'][] = $iq_content_site->travel_guide->toArray();
|
||||
$key = ($iq_content_site->travel_guide->scope -1) *-1;
|
||||
$ret['sites'][$key] = $iq_content_site->travel_guide->toArray();
|
||||
/*if(!$travel_guide){
|
||||
//$travel_guide = $iq_content_site->travel_guide;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
if(isset($ret['sites'])){
|
||||
ksort($ret['sites']);
|
||||
$ret['sites'] = array_values($ret['sites']);
|
||||
}
|
||||
|
||||
}
|
||||
//children
|
||||
if($tree_node->iq_content_tree_node_childs->count()){
|
||||
|
|
|
|||
|
|
@ -33,35 +33,42 @@ class CMSContentInfoController extends Controller
|
|||
$locals = CMSInfoAvailable::whereType('local')->whereSpecial(false)->get();
|
||||
foreach ($locals as $value){
|
||||
$date = CMSInfoAvailable::getWeekWithDate($value->wday);
|
||||
$ret['local'][$date['date']] = [
|
||||
$ret['local'][strtotime($date['date'])] = [
|
||||
'day'=>$days[$value->wday],
|
||||
'active' => $value->active,
|
||||
'from' => $value->from,
|
||||
'to' => $value->to,
|
||||
'date' => $date['date'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
$phones = CMSInfoAvailable::whereType('phone')->whereSpecial(false)->get();
|
||||
foreach ($phones as $value){
|
||||
$date = CMSInfoAvailable::getWeekWithDate($value->wday);
|
||||
$ret['phone'][$date['date']] = [
|
||||
$ret['phone'][strtotime($date['date'])] = [
|
||||
'day'=>$days[$value->wday],
|
||||
'active' => $value->active,
|
||||
'from' => $value->from,
|
||||
'to' => $value->to,
|
||||
'date' => $date['date'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
$specials = CMSInfoAvailable::whereSpecial(true)->get();
|
||||
foreach ($specials as $special){
|
||||
$ret[$special->type][$special->date] = [
|
||||
$ret[$special->type][strtotime($special->date)] = [
|
||||
'day'=>$days[$special->wday],
|
||||
'active' => $special->active,
|
||||
'from' => $special->from,
|
||||
'to' => $special->to,
|
||||
'date' => $special->date,
|
||||
|
||||
];
|
||||
}
|
||||
// ksort($ret);
|
||||
ksort($ret['local']);
|
||||
ksort($ret['phone']);
|
||||
|
||||
$ret['info']['office_important_note_active'] = CMSInfo::getContentBySlug('office-important-note-active');
|
||||
$ret['info']['office_important_note'] = CMSInfo::getContentBySlug('office-important-note');
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ class DraftController extends Controller
|
|||
{
|
||||
public $successStatus = 200;
|
||||
public $data = "";
|
||||
public $room_str = "";
|
||||
public $room_name = "";
|
||||
public $className = "";
|
||||
public $option = "";
|
||||
|
||||
|
|
@ -23,12 +21,12 @@ class DraftController extends Controller
|
|||
{
|
||||
|
||||
|
||||
if ($action == "get_draft_list") {
|
||||
if ($action === "get_draft_list") {
|
||||
$drafts = Draft::where('active', true)->get()->sortByDesc("id");
|
||||
return response()->json(['success' => $drafts], $this->successStatus);
|
||||
}
|
||||
|
||||
if ($action == "get_draft_list_for_table") {
|
||||
if ($action === "get_draft_list_for_table") {
|
||||
$ret = [];
|
||||
if (request('program_id') && request('program_id') > 0) {
|
||||
$travel_program = TravelProgram::find(request('program_id'));
|
||||
|
|
@ -50,20 +48,19 @@ class DraftController extends Controller
|
|||
|
||||
}
|
||||
|
||||
if ($action == "create_drafts_from_fewo") {
|
||||
if ($action === "create_drafts_from_fewo") {
|
||||
$data = \Input::all();
|
||||
$start_date = Carbon::parse($data['startDateStr']);
|
||||
$end_date = Carbon::parse($data['endDateStr']);
|
||||
$pos = 0;
|
||||
if(isset($data['priceResult']) && is_array($data['priceResult'])){
|
||||
if (isset($data['priceResult']) && is_array($data['priceResult'])) {
|
||||
|
||||
if(isset($data['priceResult']['season']) && is_array($data['priceResult']['season'])){
|
||||
foreach ($data['priceResult']['season'] as $season => $values){
|
||||
|
||||
$service = '* Saison: '.$season."\n".
|
||||
'* Mindestbelegung: '.$values['minimumStay'].' '.($values['minimumStay'] < 2 ? 'Nacht' : 'Nächte')."\n".
|
||||
'* Preis: '.number_format($values['price'], 2, ',', '.').' € / '. $values['numberDays'].' '.($values['numberDays'] < 2 ? 'Nacht' : 'Nächte').' x '.number_format($values['perNight'], 2, ',', '.')." € \n";
|
||||
if (isset($data['priceResult']['season']) && is_array($data['priceResult']['season'])) {
|
||||
foreach ($data['priceResult']['season'] as $season => $values) {
|
||||
|
||||
$service = '* Saison: ' . $season . "\n" .
|
||||
'* Mindestbelegung: ' . $values['minimumStay'] . ' ' . ($values['minimumStay'] < 2 ? 'Nacht' : 'Nächte') . "\n" .
|
||||
'* Preis: ' . number_format($values['price'], 2, ',', '.') . ' € / ' . $values['numberDays'] . ' ' . ($values['numberDays'] < 2 ? 'Nacht' : 'Nächte') . ' x ' . number_format($values['perNight'], 2, ',', '.') . " € \n";
|
||||
|
||||
|
||||
$from_date = Carbon::parse($values['fromDay']);
|
||||
|
|
@ -75,7 +72,7 @@ class DraftController extends Controller
|
|||
'fewo_lodging_id' => $data['fewo_lodging_id'],
|
||||
'draft_type_id' => 38,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_duration' => $values['numberDays'],
|
||||
'days_duration' => $values['numberDays'],
|
||||
'start_date' => $from_date->format("Y-m-d"),
|
||||
'end_date' => $to_date->format("Y-m-d"),
|
||||
'service' => $service,
|
||||
|
|
@ -87,14 +84,14 @@ class DraftController extends Controller
|
|||
|
||||
}
|
||||
}
|
||||
if(isset($data['priceResult']['flatPrice'])){
|
||||
$service = '* Service-Gebühr: '.number_format($data['priceResult']['deposit'], 2, ',', '.');
|
||||
if (isset($data['priceResult']['flatPrice'])) {
|
||||
$service = '* Service-Gebühr: ' . number_format($data['priceResult']['deposit'], 2, ',', '.');
|
||||
BookingDraftItem::create([
|
||||
'booking_id' => $data['booking_id'],
|
||||
'fewo_lodging_id' => $data['fewo_lodging_id'],
|
||||
'draft_type_id' => 39,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_duration' => $data['priceResult']['days'],
|
||||
'days_duration' => $data['priceResult']['days'],
|
||||
'start_date' => $start_date->format("Y-m-d"),
|
||||
'end_date' => $end_date->format("Y-m-d"),
|
||||
'service' => $service,
|
||||
|
|
@ -106,14 +103,14 @@ class DraftController extends Controller
|
|||
|
||||
|
||||
}
|
||||
if(isset($data['priceResult']['deposit'])){
|
||||
$service = '* Kaution: '.number_format($data['priceResult']['deposit'], 2, ',', '.');
|
||||
if (isset($data['priceResult']['deposit'])) {
|
||||
$service = '* Kaution: ' . number_format($data['priceResult']['deposit'], 2, ',', '.');
|
||||
BookingDraftItem::create([
|
||||
'booking_id' => $data['booking_id'],
|
||||
'fewo_lodging_id' => $data['fewo_lodging_id'],
|
||||
'draft_type_id' => 40,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_duration' => $data['priceResult']['days'],
|
||||
'days_duration' => $data['priceResult']['days'],
|
||||
'start_date' => $start_date->format("Y-m-d"),
|
||||
'end_date' => $end_date->format("Y-m-d"),
|
||||
'service' => $service,
|
||||
|
|
@ -124,532 +121,12 @@ class DraftController extends Controller
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return response()->json(['success' => $data['booking_id']], $this->successStatus);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($action == "create_drafts_from_booking") {
|
||||
$data = \Input::all();
|
||||
$this->data = $data;
|
||||
|
||||
$weekday = date('w', strtotime($data['startDateStr']));
|
||||
$travel_program = TravelProgram::find($data['travel_program_id']);
|
||||
$draft = $this->getDraftByTravelProgramData($travel_program, $data, $weekday);
|
||||
|
||||
$start_date = Carbon::parse($data['startDateStr']);
|
||||
$end_date = Carbon::parse($data['endDateStr']);
|
||||
|
||||
|
||||
if($draft){
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//prepare rooms
|
||||
//request('rooms'); // //["rooms"]=> array(1) { [0]=> object(stdClass)#7284 (5) { ["name"]=> string(12) "Einzelzimmer" ["price_adult"]=> float(1682.16) ["adult"]=> int(1) ["children"]=> int(0) ["price_children"]=> int(0) }
|
||||
$price_info_rooms = [];
|
||||
$room_names = [];
|
||||
$room_adult = 0;
|
||||
$room_children = 0;
|
||||
$room_price_adult = 0;
|
||||
$room_price_children = 0;
|
||||
|
||||
$data['rooms'] = array_reverse($data['rooms']);
|
||||
|
||||
foreach ($data['rooms'] as $room){
|
||||
|
||||
$room_adult += $room['adult'];
|
||||
$room_children += $room['children'];
|
||||
$room_price_adult += ($room['price_adult_full'] * $room['adult']);
|
||||
$room_price_children += ($room['price_children_full'] * $room['children']);
|
||||
|
||||
if(isset($room_names[$room['name']])){
|
||||
$room_names[$room['name']] = $room_names[$room['name']]+1;
|
||||
}else{
|
||||
$room_names[$room['name']] = 1;
|
||||
}
|
||||
|
||||
$service = trans('_vorlagen.grundpreis_reise');
|
||||
$this->room_name = $room['name'];
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
$price_info_rooms[] = [
|
||||
'booking_id' => $data['booking_id'],
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 30,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => $data['startDateStr'],
|
||||
'end_date' => $data['endDateStr'],
|
||||
'service' => $service,
|
||||
'price_adult' => $room['price_adult_full'],
|
||||
'adult' => $room['adult'],
|
||||
'price_children' => $room['price_children_full'],
|
||||
'children' => $room['children'],
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$this->room_str = "";
|
||||
foreach ($room_names as $name=>$count){
|
||||
$this->room_str .= $count.' x '.$name.', ';
|
||||
}
|
||||
$this->room_str = rtrim($this->room_str, ', ');
|
||||
|
||||
|
||||
//before & after days
|
||||
|
||||
$price_info_rooms_before = [];
|
||||
$price_info_rooms_after = [];
|
||||
|
||||
if(isset($data['booking_before']) && is_array($data['booking_before'])){
|
||||
foreach ($data['booking_before'] as $booking_before){
|
||||
$start_date_before = clone $start_date;
|
||||
if(isset($booking_before['days']) && $booking_before['days'] > 0){
|
||||
$start_date_before->modify('-'.$booking_before['days'].' day');
|
||||
}
|
||||
|
||||
$price_info_rooms_before[] = [
|
||||
'booking_id' => $data['booking_id'],
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 36,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => $booking_before['days'],
|
||||
'start_date' => $start_date_before->format("Y-m-d"),
|
||||
'end_date' => $data['startDateStr'],
|
||||
'service' => $booking_before['name'],
|
||||
'price_adult' => $booking_before['price'],
|
||||
'adult' => $booking_before['adults'],
|
||||
'price_children' => $booking_before['price_children'],
|
||||
'children' => $booking_before['children'],
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($data['booking_after']) && is_array($data['booking_after'])){
|
||||
foreach ($data['booking_after'] as $booking_after){
|
||||
$end_date_after = clone $end_date;
|
||||
if(isset($booking_after['days']) && $booking_after['days'] > 0){
|
||||
$end_date_after->modify('+'.$booking_after['days'].' day');
|
||||
}
|
||||
|
||||
$price_info_rooms_after[] = [
|
||||
'booking_id' => $data['booking_id'],
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 37,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => $booking_after['days'],
|
||||
'start_date' => $data['endDateStr'],
|
||||
'end_date' => $end_date_after->format("Y-m-d"),
|
||||
'service' => $booking_after['name'],
|
||||
'price_adult' => $booking_after['price'],
|
||||
'adult' => $booking_after['adults'],
|
||||
'price_children' => $booking_after['price_children'],
|
||||
'children' => $booking_after['children'],
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//prepare extra_charge
|
||||
$price_info_extra_charge = [];
|
||||
if($data['departure_extra_charge'] > 0){
|
||||
|
||||
$service = trans('_vorlagen.aufpreis_flug');
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
$price_info_extra_charge[] = [
|
||||
'booking_id' => $data['booking_id'],
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 33,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'service' => $service,
|
||||
'price_adult' => $data['departure_extra_charge'] ,
|
||||
'adult' => $data['traveler'] ,
|
||||
'price_children' => 0,
|
||||
'children' => 0,
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//prepare $class_options
|
||||
$price_info_class_options = [];
|
||||
foreach ($data['class_options'] as $class_option){
|
||||
|
||||
$service = trans('_vorlagen.aufpreis_kategorie');
|
||||
$this->className = $class_option['name'];
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
$price_info_class_options[] = [
|
||||
'booking_id' => $data['booking_id'],
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 32,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'service' => $service,
|
||||
'price_adult' => $class_option['price'],
|
||||
'adult' => $class_option['count'],
|
||||
'price_children' => 0,
|
||||
'children' => 0,
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//prepare $travel_options
|
||||
$price_info_travel_options = [];
|
||||
foreach ($data['travel_options'] as $travel_option){
|
||||
|
||||
$service = trans('_vorlagen.aufpreis_option');
|
||||
$this->option = $travel_option['name'];
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
/*
|
||||
* if($travel_option['children'] < 1){
|
||||
$travel_option['price_children'] = 0;
|
||||
}
|
||||
*/
|
||||
$price_info_travel_options[] = [
|
||||
'booking_id' => $data['booking_id'],
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 41,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'service' => $service,
|
||||
'price_adult' => $travel_option['price_adult'],
|
||||
'adult' => $travel_option['adult'],
|
||||
'price_children' => $travel_option['price_children'],
|
||||
'children' => $travel_option['children'],
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
$price_info_travel_discounts = [];
|
||||
|
||||
foreach ($data['discount'] as $travel_discount){
|
||||
|
||||
$service = trans('_vorlagen.aufpreis_option');
|
||||
$this->option = "";
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
if($travel_discount['price'] > 0){
|
||||
$travel_discount['price'] = $travel_discount['price']*-1;
|
||||
}
|
||||
$price_info_travel_options[] = [
|
||||
'booking_id' => $data['booking_id'],
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 42,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'service' => $service,
|
||||
'price_adult' => $travel_discount['price'],
|
||||
'adult' => $travel_discount['count'],
|
||||
'price_children' => 0,
|
||||
'children' => 0,
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
$info_texts = [];
|
||||
$last_post = 0;
|
||||
foreach ($draft->draft_items as $draft_item){
|
||||
|
||||
$service = $draft_item->service;
|
||||
$price_adult = 0;
|
||||
$adult = 0;
|
||||
$price_children = 0;
|
||||
$children = 0;
|
||||
|
||||
switch ($draft_item->draft_type->id){
|
||||
case 24: //rundreise
|
||||
$price_adult = $room_price_adult;
|
||||
$adult = $room_adult;
|
||||
$price_children = $room_price_children;
|
||||
$children = $room_children;
|
||||
break;
|
||||
case 4: //flug
|
||||
// "Hinflug: Rückflug: Flugzeiten ?"
|
||||
break;
|
||||
}
|
||||
|
||||
$start_date_temp = null;
|
||||
if($draft_item->days_start > 0){
|
||||
$start_date_temp = clone $start_date;
|
||||
$start_date_temp->addDay($draft_item->days_start-1);
|
||||
}
|
||||
|
||||
$end_date_temp = null;
|
||||
if($draft_item->days_duration > 0){
|
||||
$end_date_temp = clone $start_date;
|
||||
$end_date_temp->addDay($draft_item->days_duration-1);
|
||||
}
|
||||
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
if($draft_item->draft_type->id == 27){
|
||||
//text -at last
|
||||
$info_texts[] = [
|
||||
'booking_id' => $data['booking_id'],
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => $draft_item->id,
|
||||
'draft_type_id' => $draft_item->draft_type->id,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => $draft_item->days_start,
|
||||
'days_duration' => $draft_item->days_duration,
|
||||
'start_date' => $start_date_temp ? $start_date_temp->format("Y-m-d") : null,
|
||||
'end_date' => $end_date_temp ? $end_date_temp->format("Y-m-d") : null,
|
||||
'service' => $service,
|
||||
'price_adult' => $price_adult,
|
||||
'adult' => $adult,
|
||||
'price_children' => $price_children,
|
||||
'children' => $children,
|
||||
'pos' => $draft_item->pos,
|
||||
'in_pdf' => $draft_item->in_pdf,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
|
||||
|
||||
}else{
|
||||
//create new from draft items
|
||||
BookingDraftItem::create([
|
||||
'booking_id' => $data['booking_id'],
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => $draft_item->id,
|
||||
'draft_type_id' => $draft_item->draft_type->id,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => $draft_item->days_start,
|
||||
'days_duration' => $draft_item->days_duration,
|
||||
'start_date' => $start_date_temp ? $start_date_temp->format("Y-m-d") : null,
|
||||
'end_date' => $end_date_temp ? $end_date_temp->format("Y-m-d") : null,
|
||||
'service' => $service,
|
||||
'price_adult' => $price_adult,
|
||||
'adult' => $adult,
|
||||
'price_children' => $price_children,
|
||||
'children' => $children,
|
||||
'pos' => $draft_item->pos,
|
||||
'in_pdf' => $draft_item->in_pdf,
|
||||
'comfort' => $data['comfort']
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$last_post = $draft_item->pos;
|
||||
|
||||
}
|
||||
|
||||
//set room prices
|
||||
if(count($price_info_rooms)){
|
||||
foreach ($price_info_rooms as $price_info_room){
|
||||
$last_post ++;
|
||||
$price_info_room['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_room);
|
||||
}
|
||||
}
|
||||
|
||||
//set room prices before
|
||||
if(count($price_info_rooms_before)){
|
||||
foreach ($price_info_rooms_before as $price_info_room){
|
||||
$last_post ++;
|
||||
$price_info_room['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_room);
|
||||
}
|
||||
}
|
||||
|
||||
//set room prices after
|
||||
if(count($price_info_rooms_after)){
|
||||
foreach ($price_info_rooms_after as $price_info_room){
|
||||
$last_post ++;
|
||||
$price_info_room['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_room);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//set extra charge price
|
||||
if(count($price_info_extra_charge)){
|
||||
foreach ($price_info_extra_charge as $price_info_extra){
|
||||
$last_post ++;
|
||||
$price_info_extra['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_extra);
|
||||
}
|
||||
}
|
||||
//set class options prices
|
||||
if(count($price_info_class_options)){
|
||||
foreach ($price_info_class_options as $price_info_class_option){
|
||||
$last_post ++;
|
||||
$price_info_class_option['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_class_option);
|
||||
}
|
||||
}
|
||||
|
||||
//set travel options prices
|
||||
if(count($price_info_travel_options)){
|
||||
foreach ($price_info_travel_options as $price_info_travel_option){
|
||||
$last_post ++;
|
||||
$price_info_travel_option['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_travel_option);
|
||||
}
|
||||
}
|
||||
|
||||
//set travel discount prices
|
||||
if(count($price_info_travel_discounts)){
|
||||
foreach ($price_info_travel_discounts as $price_info_travel_discount){
|
||||
$last_post ++;
|
||||
$price_info_travel_option['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_travel_option);
|
||||
}
|
||||
}
|
||||
|
||||
//set travel options prices
|
||||
if(count($info_texts)){
|
||||
foreach ($info_texts as $info_text){
|
||||
$last_post ++;
|
||||
$info_text['pos'] = $last_post;
|
||||
BookingDraftItem::create($info_text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$ret = [];
|
||||
/*
|
||||
$travel_program_id = request('travel_program_id');
|
||||
$comfort = request('comfort');
|
||||
$booking_id = request('booking_id');
|
||||
$startDateStr = request('startDateStr');
|
||||
$endDateStr = request('endDateStr');
|
||||
$departure = request('departure');
|
||||
$departure_extra_charge = request('departure_extra_charge');
|
||||
$traveler = request('traveler');
|
||||
$title = request('title');
|
||||
$number = request('number');
|
||||
$rooms = request('rooms'); // //["rooms"]=> array(1) { [0]=> object(stdClass)#7284 (5) { ["name"]=> string(12) "Einzelzimmer" ["price_adult"]=> float(1682.16) ["adults"]=> int(1) ["children"]=> int(0) ["price_children"]=> int(0) }
|
||||
$class_options = request('class_options'); //["travel_options"]=> array(2) { [0]=> array(5) { ["name"]=> string(20) "Aufpreis Halbpension" ["price_adult"]=> float(75) ["adult"]=> int(5) ["children"]=> int(0) ["price_children"]=> int(0) }
|
||||
$travel_options = request('travel_options'); //["class_options"]=> array(1) { [0]=> array(3) { ["name"]=> string(39) "zugebuchte Leistung: Komfort (4 Sterne)" ["price"]=> float(152) ["count"]=> int(1)
|
||||
*/
|
||||
|
||||
return response()->json(['success' => $draft->id], $this->successStatus);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected function replaceService($service){
|
||||
|
||||
$service = str_replace('#Name#', $this->data['title'], $service);
|
||||
$service = str_replace('#Nummer#', $this->data['number'], $service);
|
||||
$service = str_replace('#Zimmer#', $this->room_str, $service);
|
||||
$service = str_replace('#Raumname#', $this->room_name, $service);
|
||||
$service = str_replace('#Kategorie#', $this->className, $service);
|
||||
$service = str_replace('#Option#', $this->option, $service);
|
||||
$service = str_replace('#Flughafen#', $this->data['departure'], $service);
|
||||
|
||||
return $service;
|
||||
|
||||
}
|
||||
|
||||
protected function getDraftByTravelProgramData($travel_program, $data, $weekday){
|
||||
if ($travel_program && count($travel_program->travel_program_drafts)) {
|
||||
|
||||
foreach ($travel_program->travel_program_drafts as $travel_program_draft) {
|
||||
//this need an realation to travel class by booking and price
|
||||
if(in_array($weekday, $travel_program_draft->weekdays)){
|
||||
if($data['comfort'] == false && strpos(strtolower($travel_program_draft->travel_class->name), 'standard') !== false){
|
||||
return $travel_program_draft->draft;
|
||||
}
|
||||
if($data['comfort'] == true && strpos(strtolower($travel_program_draft->travel_class->name), 'komfort') !== false){
|
||||
return $travel_program_draft->draft;
|
||||
}
|
||||
}
|
||||
}
|
||||
//found non get first
|
||||
foreach ($travel_program->travel_program_drafts as $travel_program_draft) {
|
||||
return $travel_program_draft->draft;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/*
|
||||
array(14) {
|
||||
["travel_program_id"]=> int(197) ["comfort"]=> bool(true) ["booking_id"]=> string(4) "8435" ["request_date"]=> string(10) "2018-10-29" ["startDateStr"]=> string(10) "2018-11-03" ["endDateStr"]=> string(10) "2018-11-10" ["departure"]=> string(7) "Hamburg" ["departure_extra_charge"]=> float(55) ["traveler"]=> int(3) ["title"]=> string(35) "Höhepunkte Jordaniens ab Nov. 2018" ["number"]=> string(16) "JOR-HOE1920018B1" ["rooms"]=> array(2) {
|
||||
[0]=> array(5) {
|
||||
["name"]=> string(12) "Doppelzimmer" ["price_adult"]=> float(1473.85) ["adults"]=> int(2) ["children"]=> int(0) ["price_children"]=> int(0) } [1]=> array(5) {
|
||||
["name"]=> string(12) "Einzelzimmer" ["price_adult"]=> float(1682.16) ["adults"]=> int(1) ["children"]=> int(0) ["price_children"]=> int(0) } } ["class_options"]=> array(2) {
|
||||
[0]=> array(3) {
|
||||
["name"]=> string(39) "zugebuchte Leistung: Komfort (4 Sterne)" ["price"]=> float(122) ["count"]=> int(2) } [1]=> array(3) {
|
||||
["name"]=> string(39) "zugebuchte Leistung: Komfort (4 Sterne)" ["price"]=> float(171) ["count"]=> int(1) } } ["travel_options"]=> array(1) {
|
||||
[0]=> array(5) {
|
||||
["name"]=> string(20) "Aufpreis Halbpension" ["price_adult"]=> float(75) ["adults"]=> int(3) ["children"]=> int(0) ["price_children"]=> int(0) } } }
|
||||
*/
|
||||
}
|
||||
216
app/Http/Controllers/Admin/ReportController.php
Executable file
216
app/Http/Controllers/Admin/ReportController.php
Executable file
|
|
@ -0,0 +1,216 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Exports\ReportCollectionExport;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Models\Booking;
|
||||
use App\Models\ServiceProvider;
|
||||
use App\Models\ServiceProviderEntry;
|
||||
use App\Models\TravelAgenda;
|
||||
use App\Services\Util;
|
||||
use Carbon\Carbon;
|
||||
use HTMLHelper;
|
||||
use Illuminate\Validation\Rules\In;
|
||||
use Input;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use Request;
|
||||
use Response;
|
||||
|
||||
class ReportController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('superadmin');
|
||||
}
|
||||
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
$data = [
|
||||
'text' => "Umsetzung folgt",
|
||||
];
|
||||
return view('_empty', $data);
|
||||
}
|
||||
|
||||
public function providers()
|
||||
{
|
||||
$data = [
|
||||
'serviceProviders' => ServiceProvider::all(),
|
||||
];
|
||||
return view('admin.report.index', $data);
|
||||
}
|
||||
|
||||
public function providersExport(){
|
||||
|
||||
$query = ServiceProviderEntry::with('booking', 'service_provider', 'booking.customer');
|
||||
if(Input::get('filter_is_cleared') != ""){
|
||||
$query->where('is_cleared', '=', Input::get('filter_is_cleared'));
|
||||
}
|
||||
if(Input::get('filter_service_provider_id') != ""){
|
||||
$query->where('service_provider_id', '=', Input::get('filter_service_provider_id'));
|
||||
}
|
||||
if(Input::get('filter_travel_date_from') != ""){
|
||||
$query->whereHas('booking', function ($q) {
|
||||
$travel_date_from = Carbon::parse(Input::get('filter_travel_date_from'))->format("Y-m-d");
|
||||
$q->where("start_date", '>=', $travel_date_from);
|
||||
});
|
||||
}
|
||||
if(Input::get('filter_travel_date_to') != ""){
|
||||
$query->whereHas('booking', function ($q) {
|
||||
$travel_date_to = Carbon::parse(Input::get('filter_travel_date_to'))->format("Y-m-d");
|
||||
$q->where("start_date", '<=', $travel_date_to);
|
||||
});
|
||||
}
|
||||
|
||||
$query->whereHas('booking', function ($q) {
|
||||
$q->orderBy("lead_id", 'ASC');
|
||||
});
|
||||
|
||||
$filename = "file-".date('Y-m-d-H-i-s');
|
||||
$exports = $query->get();
|
||||
$columns = [];
|
||||
if(Input::get('export') === "export"){
|
||||
$filename = "Export_".date('Y-m-d-H-i-s');
|
||||
|
||||
$headers = array(
|
||||
'Zähler',
|
||||
'MyJack Nr.',
|
||||
'CRM Nr',
|
||||
'Kunde',
|
||||
'Reisedatum',
|
||||
'Gesamtreisepreis',
|
||||
'Reiseland',
|
||||
'Reiseprogramm',
|
||||
'Reiseteilnehmer',
|
||||
'Leistungsträger',
|
||||
'Rechnungsnummer',
|
||||
'Zahlung',
|
||||
'Zahlungsdatum',
|
||||
'Erlös',
|
||||
'Konto',
|
||||
);
|
||||
$isset = [];
|
||||
foreach($exports as $export) {
|
||||
$new = in_array($export->booking->lead_id, $isset) ? false : true;
|
||||
$columns[] = array(
|
||||
'Zähler' => $new ? $export->getCounter() : "",
|
||||
'MyJack Nr.' => $new ? $export->booking->merlin_order_number : "",
|
||||
'CRM Nr' => $new ? $export->booking->lead_id : "",
|
||||
'Kunde' => $new ? $export->booking->customer->name : "",
|
||||
'Reisedatum' => $new ? $export->booking->getStartDateFormat() : "",
|
||||
'Gesamtreisepreis' => $new ? $export->booking->price : "",
|
||||
'Reiseland' => $new ? $export->booking->travel_country->name : "",
|
||||
'Reiseprogramm' => $new ? $export->booking->travel_agenda->name : "",
|
||||
'Reiseteilnehmer' => $new ? $export->booking->pax : "",
|
||||
'Leistungsträger' => $export->service_provider->name,
|
||||
'Rechnungsnummer' => $export->invoice_number,
|
||||
'Zahlung' => $export->getAmountFinalEur(),
|
||||
'Zahlungsdatum' => $export->getPaymentDateFormat(),
|
||||
'Erlös' => $new ? $export->booking->proceeds() : "",
|
||||
'Konto' => $export->booking->getKontoNumber()
|
||||
);
|
||||
$isset[] = $export->booking->lead_id;
|
||||
}
|
||||
}
|
||||
if(Input::get('export') === "export_lt"){
|
||||
$filename = "Export_LT_".date('Y-m-d-H-i-s');
|
||||
|
||||
$headers = array(
|
||||
'Zähler',
|
||||
'MyJack Nr.',
|
||||
'CRM Nr',
|
||||
'Kunde',
|
||||
'Reisedatum',
|
||||
'Reiseland',
|
||||
'Reiseprogramm',
|
||||
'Reiseteilnehmer',
|
||||
'Leistungsträger',
|
||||
'Rechnungsnummer',
|
||||
'Zahlung',
|
||||
'ZahlungVorgang',
|
||||
);
|
||||
$isset = [];
|
||||
foreach($exports as $export) {
|
||||
$new = in_array($export->booking->lead_id, $isset) ? false : true;
|
||||
$columns[] = array(
|
||||
'Zähler' => $new ? $export->getCounter() : "",
|
||||
'MyJack Nr.' => $new ? $export->booking->merlin_order_number : "",
|
||||
'CRM Nr' => $new ? $export->booking->lead_id : "",
|
||||
'Kunde' => $new ? $export->booking->customer->name : "",
|
||||
'Reisedatum' => $new ? $export->booking->getStartDateFormat() : "",
|
||||
'Reiseland' => $new ? $export->booking->travel_country->name : "",
|
||||
'Reiseprogramm' => $new ? $export->booking->travel_agenda->name : "",
|
||||
'Reiseteilnehmer' => $new ? $export->booking->pax : "",
|
||||
'Leistungsträger' => $export->service_provider->name,
|
||||
'Rechnungsnummer' => $export->invoice_number,
|
||||
'Zahlung' => $export->getAmountFinalEur(),
|
||||
'ZahlungVorgang' => $export->booking->getServiceProviderPaymentsTotal(),
|
||||
);
|
||||
$isset[] = $export->booking->lead_id;
|
||||
}
|
||||
}
|
||||
return Excel::download(new ReportCollectionExport($columns, $headers), $filename.'.xls');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function providersDatatable()
|
||||
{
|
||||
|
||||
$query = ServiceProviderEntry::with('booking', 'service_provider', 'booking.customer');
|
||||
|
||||
if(Input::get('filter_is_cleared') != ""){
|
||||
$query->where('is_cleared', '=', Input::get('filter_is_cleared'));
|
||||
}
|
||||
if(Input::get('filter_service_provider_id') != ""){
|
||||
$query->where('service_provider_id', '=', Input::get('filter_service_provider_id'));
|
||||
}
|
||||
if(Input::get('filter_travel_date_from') != ""){
|
||||
$query->whereHas('booking', function ($q) {
|
||||
$travel_date_from = Carbon::parse(Input::get('filter_travel_date_from'))->format("Y-m-d");
|
||||
$q->where("start_date", '>=', $travel_date_from);
|
||||
});
|
||||
}
|
||||
if(Input::get('filter_travel_date_to') != ""){
|
||||
$query->whereHas('booking', function ($q) {
|
||||
$travel_date_to = Carbon::parse(Input::get('filter_travel_date_to'))->format("Y-m-d");
|
||||
$q->where("start_date", '<=', $travel_date_to);
|
||||
});
|
||||
}
|
||||
|
||||
return \DataTables::eloquent($query)
|
||||
->addColumn('booking.customer.fullName', function (ServiceProviderEntry $serviceProviderEntry) {
|
||||
return $serviceProviderEntry->booking->customer->fullName();
|
||||
})
|
||||
->addColumn('booking.proceeds', function (ServiceProviderEntry $serviceProviderEntry) {
|
||||
return $serviceProviderEntry->booking->proceeds();
|
||||
})
|
||||
->addColumn('booking.start_date', function (ServiceProviderEntry $serviceProviderEntry) {
|
||||
return $serviceProviderEntry->booking->getStartDateFormat();
|
||||
})
|
||||
->addColumn('is_cleared', function (ServiceProviderEntry $serviceProviderEntry) {
|
||||
return $serviceProviderEntry->is_cleared ? ' <span data-order="1" class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : '<span data-order="0" class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->filterColumn('booking.customer.fullName', function ($query, $keyword) {
|
||||
if ($keyword != "") {
|
||||
$query->whereHas('booking', function ($q) use ($keyword) {
|
||||
$q->whereHas('customer', function ($q) use ($keyword) {
|
||||
$q->where("name", 'LIKE', '%' . $keyword . '%')
|
||||
->orWhere('firstname', 'LIKE', '%' . $keyword . '%');
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
->orderColumn('booking.start_date', 'booking.start_date $1')
|
||||
->orderColumn('is_cleared', 'is_cleared $1')
|
||||
->rawColumns(['is_cleared'])
|
||||
->make(true);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ class AdminUserController extends Controller
|
|||
{
|
||||
$data = Input::all();
|
||||
|
||||
if($data['user_id'] == "new"){
|
||||
if($data['user_id'] === "new"){
|
||||
$rules = array(
|
||||
'name' => 'required',
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
|
|
@ -81,7 +81,7 @@ class AdminUserController extends Controller
|
|||
return back()->withInput(Input::all())->withErrors($validator);
|
||||
}
|
||||
|
||||
if($data['user_id'] == "new"){
|
||||
if($data['user_id'] === "new"){
|
||||
$user = User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
|
|
@ -165,19 +165,19 @@ class AdminUserController extends Controller
|
|||
|
||||
return \DataTables::eloquent($query)
|
||||
->addColumn('action_edit', function (User $user) {
|
||||
return '<a href="' . route('admin_user_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
|
||||
return '<a href="' . route('admin_user_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('admin', function (User $user) {
|
||||
return '<a href="#" data-url="'.route('admin_user_load_modal', $user->id).'" data-data="'.$user->id.'" class="update_modal_data_show">'.HTMLHelper::getRoleLabel($user->admin, '<i class="fa fa-edit"></i> Rechte + ','').'</a>';
|
||||
})
|
||||
->addColumn('confirmed', function (User $user) {
|
||||
return $user->confirmed ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
return $user->confirmed ? '<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->addColumn('active', function (User $user) {
|
||||
return $user->active ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
return $user->active ? ' <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->addColumn('action_delete', function (User $user) {
|
||||
return '<a href="' . route('admin_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="far fa-trash"></span></a>';
|
||||
return '<a href="' . route('admin_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a>';
|
||||
})
|
||||
->orderColumn('confirmed', 'confirmed $1')
|
||||
->orderColumn('active', 'active $1')
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ class DataTableController extends Controller
|
|||
return $user->account ? $user->account->last_name : '';
|
||||
})
|
||||
->addColumn('action', function (User $user) {
|
||||
return '<a href="' . route('admin_lead_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
|
||||
return '<a href="' . route('admin_lead_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('confirmed', function (User $user) {
|
||||
return $user->confirmed ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
return $user->confirmed ? '<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->addColumn('active', function (User $user) {
|
||||
return $user->active ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
return $user->active ? ' <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->orderColumn('confirmed', 'confirmed $1')
|
||||
->orderColumn('active', 'active $1')
|
||||
|
|
@ -52,205 +52,31 @@ class DataTableController extends Controller
|
|||
|
||||
return \DataTables::eloquent($query)
|
||||
->addColumn('action_edit', function (Booking $booking) {
|
||||
return '<a href="' . route('booking_detail', [$booking->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
|
||||
return '<a href="' . route('booking_detail', [$booking->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->id.'" href="' . route('booking_detail', [$booking->id]) . '" data-id="'.$booking->id.'">'.$booking->id.'</a>';
|
||||
})
|
||||
->addColumn('booking_date', function (Booking $booking) {
|
||||
return Carbon::parse($booking->booking_date)->format(\Util::formatDateDB());
|
||||
})
|
||||
->addColumn('start_date', function (Booking $booking) {
|
||||
return Carbon::parse($booking->start_date)->format(\Util::formatDateDB());
|
||||
})
|
||||
->addColumn('end_date', function (Booking $booking) {
|
||||
return Carbon::parse($booking->end_date)->format(\Util::formatDateDB());
|
||||
})
|
||||
->orderColumn('id', 'id $1')
|
||||
->filterColumn('id', function($query, $keyword) {
|
||||
if($keyword != ""){
|
||||
$query->where('id', 'LIKE', '%'.$keyword.'%');
|
||||
}
|
||||
})
|
||||
->rawColumns(['action_edit', 'id'])
|
||||
|
||||
->make(true);
|
||||
}
|
||||
|
||||
public function getRequests()
|
||||
{
|
||||
|
||||
$query = Booking::where('lead_id', '!=', NULL);
|
||||
|
||||
if(Input::get('full_firstname_search') != ""){
|
||||
$query->where('participant_firstname', 'LIKE', '%'.Input::get('full_firstname_search').'%');
|
||||
}
|
||||
|
||||
if(Input::get('full_lastname_search') != ""){
|
||||
$query->where('participant_name', 'LIKE', '%'.Input::get('full_lastname_search').'%');
|
||||
}
|
||||
|
||||
// $query->where('end_date', '<=', $now);
|
||||
|
||||
if(Input::get('travel_option_search')){
|
||||
$now = Carbon::now();
|
||||
|
||||
|
||||
switch (Input::get('travel_option_search')){
|
||||
case 'before_2':
|
||||
$query->whereBetween('start_date', [Carbon::now()->modify('-2 month'), $now]);
|
||||
|
||||
break;
|
||||
case 'brefore_1':
|
||||
$query->whereBetween('start_date', [Carbon::now()->modify('-1 month'), $now]);
|
||||
|
||||
break;
|
||||
case 'on_site':
|
||||
$query->where('start_date', '<=', $now);
|
||||
$query->where('end_date', '>=', $now);
|
||||
break;
|
||||
case 'after_1':
|
||||
$query->whereBetween('start_date', [$now, Carbon::now()->modify('+1 month')]);
|
||||
|
||||
break;
|
||||
case 'after_2':
|
||||
$query->whereBetween('start_date', [$now, Carbon::now()->modify('+2 month')]);
|
||||
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
$start = null;
|
||||
$end = null;
|
||||
if(Input::get('arrival_start_date') != ""){
|
||||
$arrStart = explode(".", Input::get('arrival_start_date'));
|
||||
if(count($arrStart) == 3){
|
||||
$start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0);
|
||||
}
|
||||
}
|
||||
if(Input::get('arrival_end_date') != ""){
|
||||
$arrEnd = explode(".", Input::get('arrival_end_date'));
|
||||
if(count($arrEnd) == 3){
|
||||
$end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59);
|
||||
}
|
||||
}
|
||||
if($start && $end){
|
||||
$query->whereBetween('start_date', [$start, $end]);
|
||||
}
|
||||
if($start && !$end){
|
||||
$query->where('start_date', '>=', $start);
|
||||
}
|
||||
if(!$start && $end){
|
||||
$query->where('start_date', '<=', $end);
|
||||
}
|
||||
|
||||
$start = null;
|
||||
$end = null;
|
||||
if(Input::get('departure_start_date') != ""){
|
||||
$arrStart = explode(".", Input::get('departure_start_date'));
|
||||
if(count($arrStart) == 3){
|
||||
$start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0);
|
||||
}
|
||||
}
|
||||
if(Input::get('departure_end_date') != ""){
|
||||
$arrEnd = explode(".", Input::get('departure_end_date'));
|
||||
if(count($arrEnd) == 3){
|
||||
$end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59);
|
||||
}
|
||||
}
|
||||
if($start && $end){
|
||||
$query->whereBetween('end_date', [$start, $end]);
|
||||
}
|
||||
if($start && !$end){
|
||||
$query->where('end_date', '>=', $start);
|
||||
}
|
||||
if(!$start && $end){
|
||||
$query->where('end_date', '<=', $end);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(Input::get('sort_travel_country_id') != ""){
|
||||
$query->where('travel_country_id', '=', Input::get('sort_travel_country_id'));
|
||||
}
|
||||
if(Input::get('sort_travelagenda_id') != ""){
|
||||
$query->where('travelagenda_id', '=', Input::get('sort_travelagenda_id'));
|
||||
}
|
||||
|
||||
if(Input::get('sort_sf_guard_user_id') != ""){
|
||||
$query->where('sf_guard_user_id', '=', Input::get('sort_sf_guard_user_id'));
|
||||
}
|
||||
|
||||
if(Input::get('sort_travel_documents') != ""){
|
||||
$query->where('travel_documents', '=', Input::get('sort_travel_documents'));
|
||||
}
|
||||
|
||||
|
||||
if(Input::get('full_lead_id_search') != ""){
|
||||
$query->where('lead_id', 'LIKE', '%'.Input::get('full_lead_id_search'). '%');
|
||||
}
|
||||
if(Input::get('full_booking_id_search') != ""){
|
||||
$query->where('id', 'LIKE', '%'.Input::get('full_booking_id_search').'%');
|
||||
}
|
||||
|
||||
//confirmation_code_remider is delete 2
|
||||
//
|
||||
|
||||
return \DataTables::eloquent($query)
|
||||
->addColumn('action_edit', function (Booking $booking) {
|
||||
return ''; //'<a href="' . route('booking_detail', [$booking->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('lead_id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->lead_id.'" href="'.make_old_url('leads/'.$booking->lead_id.'/edit').'" data-id="'.$booking->lead_id.'">'.$booking->lead_id.'</a>';
|
||||
})
|
||||
->addColumn('participant_firstname', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->participant_firstname.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_firstname.'</a>';
|
||||
})
|
||||
->addColumn('participant_name', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->participant_name.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_name.'</a>';
|
||||
})
|
||||
->addColumn('id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->id.'" href="'.make_old_url('booking/'.$booking->id.'/edit').'" data-id="'.$booking->id.'">'.$booking->id.'</a>';
|
||||
})
|
||||
->addColumn('travel_country_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->travel_country_id ? $booking->travel_country_id : 0).'">'.($booking->travel_country_id ? $booking->travel_country->name : "-").'</span>';
|
||||
})
|
||||
->addColumn('travelagenda_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->travelagenda_id ? $booking->travelagenda_id : 0).'">'.($booking->travelagenda_id ? $booking->travel_agenda->name : "-").'</span>';
|
||||
})
|
||||
->addColumn('start_date', function (Booking $booking) {
|
||||
return $booking->getStartDateFormat();
|
||||
})
|
||||
->addColumn('end_date', function (Booking $booking) {
|
||||
return $booking->getEndDateFormat();
|
||||
})
|
||||
->addColumn('travel_documents', function (Booking $booking) {
|
||||
return $booking->travel_documents ? ' <span data-order="1" class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span data-order="0" class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
})
|
||||
->addColumn('sf_guard_user_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->sf_guard_user_id ? $booking->sf_guard_user_id : 0).'">'.($booking->sf_guard_user_id? $booking->sf_guard_user->first_name." ".$booking->sf_guard_user->last_name : "-").'</span>';
|
||||
})
|
||||
->addColumn('lead.status_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->lead->status_id ? $booking->lead->status_id : 0).'">'.($booking->lead->status_id ? $booking->lead->status->name : "-").'</span>';
|
||||
})
|
||||
/* ->filterColumn('travel_country_id', function($query, $keyword) {
|
||||
|
||||
if($keyword != "") {
|
||||
$query->whereRaw("travel_country_id = ?", $keyword);
|
||||
}
|
||||
|
||||
})
|
||||
->filterColumn('travelagenda_id', function($query, $keyword) {
|
||||
if($keyword != ""){
|
||||
$query->whereRaw("travelagenda_id = ?", $keyword);
|
||||
|
||||
}
|
||||
})
|
||||
*/
|
||||
->orderColumn('lead_id', 'lead_id $1')
|
||||
->orderColumn('participant_firstname', 'participant_firstname $1')
|
||||
->orderColumn('participant_name', 'participant_name $1')
|
||||
->orderColumn('id', 'id $1')
|
||||
->orderColumn('travel_country_id', 'travel_country_id $1')
|
||||
->orderColumn('travelagenda_id', 'travelagenda_id $1')
|
||||
->orderColumn('sf_guard_user_id', 'sf_guard_user_id $1')
|
||||
->orderColumn('start_date', 'start_date $1')
|
||||
->orderColumn('end_date', 'end_date $1')
|
||||
->orderColumn('travel_documents', 'travel_documents $1')
|
||||
->rawColumns(['action_edit', 'lead_id', 'participant_firstname', 'participant_name', 'travel_country_id', 'travelagenda_id', 'sf_guard_user_id', 'lead.status_id', 'id', 'travel_documents'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Booking;
|
||||
use App\Models\Sym\TravelCountry;
|
||||
use App\Models\TravelAgenda;
|
||||
use Carbon\Carbon;
|
||||
use Input;
|
||||
use DataTables;
|
||||
|
||||
class RequestController extends Controller
|
||||
{
|
||||
|
|
@ -16,8 +20,13 @@ class RequestController extends Controller
|
|||
|
||||
public function index($step = false)
|
||||
{
|
||||
|
||||
|
||||
$d = Booking::join('travel_country', 'travel_country_id', '=', 'travel_country.id')->get()->pluck('name', 'travel_country_id')->unique()->toArray();
|
||||
|
||||
$data = [
|
||||
'step' => $step
|
||||
'step' => $step,
|
||||
'travel_countries' => $d,
|
||||
];
|
||||
return view('request.index', $data);
|
||||
}
|
||||
|
|
@ -36,6 +45,209 @@ class RequestController extends Controller
|
|||
}
|
||||
die();
|
||||
*/
|
||||
private function getSearchRequests(){
|
||||
|
||||
$query = Booking::where('lead_id', '!=', NULL);
|
||||
|
||||
if(Input::get('full_firstname_search') != ""){
|
||||
$query->where('participant_firstname', 'LIKE', '%'.Input::get('full_firstname_search').'%');
|
||||
}
|
||||
|
||||
if(Input::get('full_lastname_search') != ""){
|
||||
$query->where('participant_name', 'LIKE', '%'.Input::get('full_lastname_search').'%');
|
||||
}
|
||||
|
||||
|
||||
if(Input::get('travel_option_country_id') != ""){
|
||||
$country_ids = TravelCountry::where('contact_lands', 'LIKE', '%"'.Input::get('travel_option_country_id').'"%')->get()->pluck('id');
|
||||
$country_ids[] = Input::get('travel_option_country_id');
|
||||
$query->whereIn('travel_country_id', $country_ids);
|
||||
|
||||
}
|
||||
if(Input::get('travel_option_agenda_id') != ""){
|
||||
$query->where('travelagenda_id', '=', Input::get('travel_option_agenda_id'));
|
||||
|
||||
}
|
||||
|
||||
// $query->where('end_date', '<=', $now);
|
||||
|
||||
if(Input::get('travel_option_search')){
|
||||
$now = Carbon::now();
|
||||
|
||||
switch (Input::get('travel_option_search')){
|
||||
case 'before_2':
|
||||
$query->whereBetween('start_date', [Carbon::now()->modify('-2 month'), $now]);
|
||||
|
||||
break;
|
||||
case 'brefore_1':
|
||||
$query->whereBetween('start_date', [Carbon::now()->modify('-1 month'), $now]);
|
||||
|
||||
break;
|
||||
case 'on_site':
|
||||
$query->where('start_date', '<=', $now);
|
||||
$query->where('end_date', '>=', $now);
|
||||
break;
|
||||
case 'after_1':
|
||||
$query->whereBetween('start_date', [$now, Carbon::now()->modify('+1 month')]);
|
||||
|
||||
break;
|
||||
case 'after_2':
|
||||
$query->whereBetween('start_date', [$now, Carbon::now()->modify('+2 month')]);
|
||||
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
$start = null;
|
||||
$end = null;
|
||||
if(Input::get('arrival_start_date') != ""){
|
||||
$arrStart = explode(".", Input::get('arrival_start_date'));
|
||||
if(count($arrStart) == 3){
|
||||
$start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0);
|
||||
}
|
||||
}
|
||||
if(Input::get('arrival_end_date') != ""){
|
||||
$arrEnd = explode(".", Input::get('arrival_end_date'));
|
||||
if(count($arrEnd) == 3){
|
||||
$end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59);
|
||||
}
|
||||
}
|
||||
if($start && $end){
|
||||
$query->whereBetween('start_date', [$start, $end]);
|
||||
}
|
||||
if($start && !$end){
|
||||
$query->where('start_date', '>=', $start);
|
||||
}
|
||||
if(!$start && $end){
|
||||
$query->where('start_date', '<=', $end);
|
||||
}
|
||||
|
||||
$start = null;
|
||||
$end = null;
|
||||
if(Input::get('departure_start_date') != ""){
|
||||
$arrStart = explode(".", Input::get('departure_start_date'));
|
||||
if(count($arrStart) == 3){
|
||||
$start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0);
|
||||
}
|
||||
}
|
||||
if(Input::get('departure_end_date') != ""){
|
||||
$arrEnd = explode(".", Input::get('departure_end_date'));
|
||||
if(count($arrEnd) == 3){
|
||||
$end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59);
|
||||
}
|
||||
}
|
||||
if($start && $end){
|
||||
$query->whereBetween('end_date', [$start, $end]);
|
||||
}
|
||||
if($start && !$end){
|
||||
$query->where('end_date', '>=', $start);
|
||||
}
|
||||
if(!$start && $end){
|
||||
$query->where('end_date', '<=', $end);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(Input::get('sort_travel_country_id') != ""){
|
||||
$query->where('travel_country_id', '=', Input::get('sort_travel_country_id'));
|
||||
}
|
||||
if(Input::get('sort_travelagenda_id') != ""){
|
||||
$query->where('travelagenda_id', '=', Input::get('sort_travelagenda_id'));
|
||||
}
|
||||
|
||||
if(Input::get('sort_sf_guard_user_id') != ""){
|
||||
$query->where('sf_guard_user_id', '=', Input::get('sort_sf_guard_user_id'));
|
||||
}
|
||||
|
||||
if(Input::get('sort_travel_documents') != ""){
|
||||
$query->where('travel_documents', '=', Input::get('sort_travel_documents'));
|
||||
}
|
||||
|
||||
|
||||
if(Input::get('full_lead_id_search') != ""){
|
||||
$query->where('lead_id', 'LIKE', '%'.Input::get('full_lead_id_search'). '%');
|
||||
}
|
||||
if(Input::get('full_booking_id_search') != ""){
|
||||
$query->where('id', 'LIKE', '%'.Input::get('full_booking_id_search').'%');
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
public function getAjaxRequests(){
|
||||
|
||||
$query = $this->getSearchRequests();
|
||||
$ret = $query->get()->pluck('travelagenda_id', 'id')->unique()->toArray();
|
||||
return TravelAgenda::whereIn('id', $ret)->get()->pluck('name', 'id');
|
||||
}
|
||||
|
||||
public function getRequests()
|
||||
{
|
||||
|
||||
$query = $this->getSearchRequests();
|
||||
|
||||
return \DataTables::eloquent($query)
|
||||
->addColumn('action_edit', function (Booking $booking) {
|
||||
return ''; //'<a href="' . route('booking_detail', [$booking->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('lead_id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->lead_id.'" href="'.make_old_url('leads/'.$booking->lead_id.'/edit').'" data-id="'.$booking->lead_id.'">'.$booking->lead_id.'</a>';
|
||||
})
|
||||
->addColumn('participant_firstname', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->participant_firstname.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_firstname.'</a>';
|
||||
})
|
||||
->addColumn('participant_name', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->participant_name.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_name.'</a>';
|
||||
})
|
||||
->addColumn('id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->id.'" href="'.make_old_url('booking/'.$booking->id.'/edit').'" data-id="'.$booking->id.'">'.$booking->id.'</a>';
|
||||
})
|
||||
->addColumn('travel_country_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->travel_country_id ? $booking->travel_country_id : 0).'">'.($booking->travel_country_id ? $booking->travel_country->name : "-").'</span>';
|
||||
})
|
||||
->addColumn('travelagenda_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->travelagenda_id ? $booking->travelagenda_id : 0).'">'.($booking->travelagenda_id ? $booking->travel_agenda->name : "-").'</span>';
|
||||
})
|
||||
->addColumn('start_date', function (Booking $booking) {
|
||||
return $booking->getStartDateFormat();
|
||||
})
|
||||
->addColumn('end_date', function (Booking $booking) {
|
||||
return $booking->getEndDateFormat();
|
||||
})
|
||||
->addColumn('travel_documents', function (Booking $booking) {
|
||||
return $booking->travel_documents ? ' <span data-order="1" class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : '<span data-order="0" class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->addColumn('sf_guard_user_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->sf_guard_user_id ? $booking->sf_guard_user_id : 0).'">'.($booking->sf_guard_user_id? $booking->sf_guard_user->first_name." ".$booking->sf_guard_user->last_name : "-").'</span>';
|
||||
})
|
||||
->addColumn('lead.status_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->lead->status_id ? $booking->lead->status_id : 0).'">'.($booking->lead->status_id ? $booking->lead->status->name : "-").'</span>';
|
||||
})
|
||||
/* ->filterColumn('travel_country_id', function($query, $keyword) {
|
||||
|
||||
if($keyword != "") {
|
||||
$query->whereRaw("travel_country_id = ?", $keyword);
|
||||
}
|
||||
|
||||
})
|
||||
->filterColumn('travelagenda_id', function($query, $keyword) {
|
||||
if($keyword != ""){
|
||||
$query->whereRaw("travelagenda_id = ?", $keyword);
|
||||
|
||||
}
|
||||
})
|
||||
*/
|
||||
->orderColumn('lead_id', 'lead_id $1')
|
||||
->orderColumn('participant_firstname', 'participant_firstname $1')
|
||||
->orderColumn('participant_name', 'participant_name $1')
|
||||
->orderColumn('id', 'id $1')
|
||||
->orderColumn('travel_country_id', 'travel_country_id $1')
|
||||
->orderColumn('travelagenda_id', 'travelagenda_id $1')
|
||||
->orderColumn('sf_guard_user_id', 'sf_guard_user_id $1')
|
||||
->orderColumn('start_date', 'start_date $1')
|
||||
->orderColumn('end_date', 'end_date $1')
|
||||
->orderColumn('travel_documents', 'travel_documents $1')
|
||||
->rawColumns(['action_edit', 'lead_id', 'participant_firstname', 'participant_name', 'travel_country_id', 'travelagenda_id', 'sf_guard_user_id', 'lead.status_id', 'id', 'travel_documents'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
418
app/Http/Controllers/SyS/Tools/ContentLinkController.php
Executable file
418
app/Http/Controllers/SyS/Tools/ContentLinkController.php
Executable file
|
|
@ -0,0 +1,418 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\SyS\Tools;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\IQContentSite;
|
||||
use App\Models\IQContentSiteField;
|
||||
use App\Models\IQContentTree;
|
||||
use App\Models\IQContentTreeNode;
|
||||
use App\Models\TravelGuide;
|
||||
use Input;
|
||||
use Validator;
|
||||
|
||||
class ContentLinkController extends Controller
|
||||
{
|
||||
|
||||
private $tree = [];
|
||||
/**
|
||||
* ContentSiteController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// $this->middleware('auth');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$val = [];
|
||||
$text = "";
|
||||
$travelGuides = TravelGuide::all();
|
||||
foreach ($travelGuides as $travelGuide){
|
||||
if(strpos($travelGuide->full_text, "<h1><br></h1>") !== false){
|
||||
$val[$travelGuide->id] = "<h1><br></h1>";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($travelGuides as $travelGuide){
|
||||
if(strpos($travelGuide->full_text, "<h1") !== false){
|
||||
$val[$travelGuide->id] = "<h1";
|
||||
}
|
||||
}
|
||||
|
||||
$travelGuide = TravelGuide::find(203);
|
||||
$text = $travelGuide->full_text;
|
||||
|
||||
// $new_text = preg_replace('/<h1[^>]*>([\s\S]*?)<\/h1[^>]*>/', '', $TravelGuide->full_text);
|
||||
|
||||
|
||||
$data = [
|
||||
'text' => $text,
|
||||
'values' => $val,
|
||||
];
|
||||
return view('sys.tools.links', $data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function store()
|
||||
{
|
||||
$travelGuides = TravelGuide::all();
|
||||
foreach ($travelGuides as $travelGuide){
|
||||
if(strpos($travelGuide->full_text, "<h1><br></h1>") !== false) {
|
||||
$travelGuide->full_text = str_replace("<h1><br></h1>", "", $travelGuide->full_text);
|
||||
$travelGuide->save();
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($travelGuides as $travelGuide){
|
||||
if(strpos($travelGuide->full_text, "<h1") !== false){
|
||||
$travelGuide->full_text = str_replace("<h1", "<h2", $travelGuide->full_text);
|
||||
$travelGuide->full_text = str_replace("h1>", "h2>", $travelGuide->full_text);
|
||||
$travelGuide->save();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
|
||||
//$this->readNodeAndSaveToTree();
|
||||
//$this->cleanTextTravelGuide();
|
||||
//$this->h1ToTitleTravelGuide();
|
||||
}
|
||||
|
||||
|
||||
public function treeTitle()
|
||||
{
|
||||
$text = "";
|
||||
$val = [];
|
||||
$trees = IQContentTree::all();
|
||||
foreach ($trees as $tree){
|
||||
foreach ($tree->iq_content_tree_nodes as $tree_node){
|
||||
|
||||
$text .= $tree_node->id." -- ".$tree_node->title."\n";
|
||||
foreach ($tree_node->iq_content_sites as $site){
|
||||
if(isset($site->travel_guide->meta_title)){
|
||||
if(isset($val[$tree_node->id])){
|
||||
if(strlen($site->travel_guide->meta_title) > strlen($val[$tree_node->id])){
|
||||
$val[$tree_node->id] = $site->travel_guide->meta_title;
|
||||
}
|
||||
}else{
|
||||
$val[$tree_node->id] = $site->travel_guide->meta_title;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'text' => $text,
|
||||
'values' => $val,
|
||||
];
|
||||
return view('sys.tools.trees', $data);
|
||||
}
|
||||
|
||||
public function treeTitleStore()
|
||||
{
|
||||
|
||||
$trees = IQContentTree::all();
|
||||
$val = [];
|
||||
foreach ($trees as $tree){
|
||||
foreach ($tree->iq_content_tree_nodes as $tree_node){
|
||||
foreach ($tree_node->iq_content_sites as $site){
|
||||
if(isset($site->travel_guide->meta_title)){
|
||||
if(isset($val[$tree_node->id])){
|
||||
if(strlen($site->travel_guide->meta_title) > strlen($val[$tree_node->id])){
|
||||
$val[$tree_node->id] = $site->travel_guide->meta_title;
|
||||
}
|
||||
}else{
|
||||
$val[$tree_node->id] = $site->travel_guide->meta_title;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($val[$tree_node->id])){
|
||||
$tree_node->title = $val[$tree_node->id];
|
||||
$tree_node->save();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function h1ToTitleTravelGuide()
|
||||
{
|
||||
$TravelGuides = TravelGuide::all();
|
||||
foreach ($TravelGuides as $travelGuide){
|
||||
if(strpos($travelGuide->full_text,'<html><body><h1>' )){
|
||||
$dom = new \DOMDocument('1.0', 'utf-8');
|
||||
@$dom->loadHTML(mb_convert_encoding($travelGuide->full_text, 'HTML-ENTITIES', 'UTF-8'));
|
||||
$elements = $dom->getElementsByTagName('h1');
|
||||
|
||||
foreach ($elements as $element) {
|
||||
if($element->nodeValue != ""){
|
||||
var_dump($travelGuide->id);
|
||||
var_dump($element->nodeValue);
|
||||
echo "<br>";
|
||||
var_dump($travelGuide->name);
|
||||
echo "<br>";
|
||||
echo "--";
|
||||
echo "<br>";
|
||||
|
||||
$new_text = preg_replace('/<h1[^>]*>([\s\S]*?)<\/h1[^>]*>/', '', $travelGuide->full_text);
|
||||
|
||||
$travelGuide->name = $element->nodeValue;
|
||||
$travelGuide->full_text = $new_text;
|
||||
$travelGuide->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
die("done");
|
||||
}
|
||||
|
||||
|
||||
public function cleanTextTravelGuide()
|
||||
{
|
||||
$TravelGuides = TravelGuide::all();
|
||||
foreach ($TravelGuides as $travelGuide){
|
||||
$new_text = \App\Services\Util::cleanHTML($travelGuide->full_text);
|
||||
if(strcmp($travelGuide->full_text, $new_text) != 0){
|
||||
$travelGuide->full_text = $new_text;
|
||||
$travelGuide->save();
|
||||
var_dump($travelGuide->id);
|
||||
echo "<br>";
|
||||
}
|
||||
}
|
||||
die("done");
|
||||
}
|
||||
|
||||
|
||||
public function readNodeAndSaveToTree(){
|
||||
$input = Input::all();
|
||||
$ret = [];
|
||||
if(isset($input['text'])){
|
||||
$out = $this->ul_to_array($input['text']);
|
||||
$this->array_to_nodes($out);
|
||||
}
|
||||
die("done");
|
||||
$data = [
|
||||
'text' => $input['text'],
|
||||
'values' => $ret,
|
||||
];
|
||||
return view('iq.tools.links', $data);
|
||||
}
|
||||
|
||||
public function array_to_nodes($array, $lvl = 1, $parent_id = 1, $pos=100){
|
||||
|
||||
|
||||
if(is_array($array)){
|
||||
foreach ($array as $node){
|
||||
if(isset($node['slug'])){
|
||||
|
||||
$slug = substr($node['slug'], 0, 80);
|
||||
// $slug = substr($node['slug'], 0, strrpos($slug, " "));
|
||||
|
||||
$name = substr($node['name'], 0, 255);
|
||||
// $name = substr($node['name'], 0, strrpos($name, " "));
|
||||
|
||||
|
||||
$data = [
|
||||
'tree_id' => 1,
|
||||
'parent_id' => $parent_id,
|
||||
'lvl' => $lvl,
|
||||
'name' => $name,
|
||||
'identifier' => $slug,
|
||||
'active' => false,
|
||||
'pos' => $pos++,
|
||||
];
|
||||
$tree_node = IQContentTreeNode::create($data);
|
||||
|
||||
|
||||
$travel_guides = TravelGuide::whereSlug($node['slug'])->get();
|
||||
foreach ($travel_guides as $travel_guide){
|
||||
if(IQContentSite::whereTreeNodeId($tree_node->id)->whereTravelGuideId($travel_guide->id)->count() == 0) {
|
||||
IQContentSite::create(['tree_node_id' => $tree_node->id, 'travel_guide_id' => $travel_guide->id]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(isset($node['children']) && is_array($node['children'])){
|
||||
$this->array_to_nodes($node['children'], $lvl + 1, $tree_node->id, $pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function ul_to_array($ol){
|
||||
if(is_string($ol)){
|
||||
if(!$ol = simplexml_load_string($ol)) {
|
||||
trigger_error("Syntax error in UL/LI structure");
|
||||
return FALSE;
|
||||
}
|
||||
return $this->ul_to_array($ol);
|
||||
} else if(is_object($ol)){
|
||||
$output = array();
|
||||
foreach($ol->li as $li){
|
||||
|
||||
$tmp = false;
|
||||
if(isset($li->ol)){
|
||||
$tmp = $this->ul_to_array($li->ol);
|
||||
}
|
||||
|
||||
if($li->count()){
|
||||
|
||||
$str = (string) $li;
|
||||
|
||||
$a = new \SimpleXMLElement($li->children()->asXML());
|
||||
$str = (string) $a[0]." ".$str;
|
||||
$str = str_replace("\n", "", $str);
|
||||
$str = str_replace("\r", "", $str);
|
||||
$str = str_replace("\t", "", $str);
|
||||
$str = preg_replace(array('/\s{2,}/', '/[\t\n]/'), ' ', $str);
|
||||
|
||||
if(trim($str) !== "" && $str !== null){
|
||||
$slug = (string) $a['href'];
|
||||
$link = explode("/", $slug);
|
||||
|
||||
$link1 = array_pop($link);
|
||||
$link1 = str_replace('.htm', '',$link1);
|
||||
$output[] = ['slug'=> $link1, 'name'=>$str, 'children'=>$tmp];
|
||||
}
|
||||
}else{
|
||||
$str = (string) $li;
|
||||
$str = str_replace("\n", "", $str);
|
||||
$str = str_replace("\r", "", $str);
|
||||
$str = str_replace("\t", "", $str);
|
||||
if(trim($str) !== "" && $str !== null){
|
||||
|
||||
$output[] = ['slug'=>'', 'name'=>$str, 'children'=>$tmp];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return $output;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function rindex()
|
||||
{
|
||||
$data = [
|
||||
'text' => "",
|
||||
'values' => [],
|
||||
];
|
||||
return view('iq.content.tools.redirects', $data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function rstore()
|
||||
{
|
||||
|
||||
$iqContentTree = IQContentTree::find(2);
|
||||
$this->makeTree($iqContentTree);
|
||||
$input = Input::all();
|
||||
$ret = [];
|
||||
|
||||
if(isset($input['text'])){
|
||||
|
||||
|
||||
$dom = new \DOMDocument('1.0', 'utf-8');
|
||||
@$dom->loadHTML(mb_convert_encoding($input['text'], 'HTML-ENTITIES', 'UTF-8'));
|
||||
|
||||
|
||||
|
||||
|
||||
$tags = ['ol'];
|
||||
foreach ($tags as $tag){
|
||||
$domElements = [];
|
||||
$elements = $dom->getElementsByTagName($tag)->item(0);
|
||||
|
||||
foreach($elements as $node){
|
||||
foreach($node->childNodes as $child) {
|
||||
$ret[] = array($child->nodeName => $child->nodeValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* $tags = ['a']; foreach ($tags as $tag){
|
||||
$domElements = [];
|
||||
$elements = $dom->getElementsByTagName($tag);
|
||||
foreach ($elements as $element) {
|
||||
$domElements[] = $element;
|
||||
|
||||
}
|
||||
foreach ($domElements as $domElement) {
|
||||
$r = "-----";
|
||||
$href = $domElement->getAttribute('href');
|
||||
$link = explode("/", $href);
|
||||
|
||||
$link1 = array_pop($link);
|
||||
$link1 = str_replace('.html', '',$link1);
|
||||
$link1 = str_replace('-', '',$link1);
|
||||
if(isset($this->tree[$link1])){
|
||||
$r = $this->tree[$link1];
|
||||
}else{
|
||||
$link1 = array_pop($link);
|
||||
$link1 = str_replace('.html', '',$link1);
|
||||
$link1 = str_replace('-', '',$link1);
|
||||
if(isset($this->tree[$link1])){
|
||||
$r = $this->tree[$link1];
|
||||
}
|
||||
}
|
||||
|
||||
$ret[] = "Redirect 301 /".$href." ".$r;
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
$data = [
|
||||
'text' => $input['text'],
|
||||
'values' => $ret,
|
||||
];
|
||||
|
||||
return view('iq.content.tools.redirects', $data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function makeTree(IQContentTree $iq_content_tree, $lvl = 0, $parent_id = false, $url = "")
|
||||
{
|
||||
|
||||
if ($parent_id) {
|
||||
//where('active', true)
|
||||
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->where('parent_id', $parent_id)->orderBy('pos', 'ASC')->get();
|
||||
} else {
|
||||
|
||||
$url = "/" . $iq_content_tree->identifier . "/";
|
||||
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->orderBy('pos', 'ASC')->get();
|
||||
}
|
||||
|
||||
foreach ($tree_nodes as $node) {
|
||||
$children = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl + 1)->where('active', true)->where('parent_id', $node->id)->count();
|
||||
$this->tree[str_replace('-', '', $node->identifier)] = url($url . $node->identifier);
|
||||
|
||||
if ($children) {
|
||||
$this->makeTree($iq_content_tree, $lvl + 1, $node->id, $url . $node->identifier . "/");
|
||||
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -190,7 +190,7 @@ class TravelUserBookingFewoController extends Controller
|
|||
|
||||
return \DataTables::eloquent($query)
|
||||
->addColumn('action_edit', function (TravelUserBookingFewo $travel_user_booking_fewo) {
|
||||
return '<a data-order="'.$travel_user_booking_fewo->id.'" href="' . route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
|
||||
return '<a data-order="'.$travel_user_booking_fewo->id.'" href="' . route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('fewo_lodging', function (TravelUserBookingFewo $travel_user_booking_fewo) {
|
||||
//return '<a href="' . route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->fewo_lodging_id]) . '">'.$travel_user_booking_fewo->fewo_lodging->name.'</a>';
|
||||
|
|
@ -217,7 +217,7 @@ class TravelUserBookingFewoController extends Controller
|
|||
return $travel_user_booking_fewo->getStatuesName();
|
||||
})
|
||||
->addColumn('action_delete', function (TravelUserBookingFewo $travel_user_booking_fewo) {
|
||||
return '<a href="' . route('travel_user_booking_fewo_delete', [$travel_user_booking_fewo->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="far fa-trash"></span></a>';
|
||||
return '<a href="' . route('travel_user_booking_fewo_delete', [$travel_user_booking_fewo->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a>';
|
||||
})
|
||||
->rawColumns(['action_edit', 'fewo_lodging', 'travel_user', 'is_calendar', 'is_mail', 'action_delete'])
|
||||
->make(true);
|
||||
|
|
|
|||
|
|
@ -96,11 +96,11 @@ class TravelUserController extends Controller
|
|||
|
||||
return \DataTables::eloquent($query)
|
||||
->addColumn('action_edit', function (TravelUser $user) {
|
||||
return '<a data-order="'.$user->id.'" href="' . route('travel_user_detail', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
|
||||
return '<a data-order="'.$user->id.'" href="' . route('travel_user_detail', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
|
||||
->addColumn('action_delete', function (TravelUser $user) {
|
||||
return '<a href="' . route('travel_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="far fa-trash"></span></a>';
|
||||
return '<a href="' . route('travel_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a>';
|
||||
})
|
||||
->rawColumns(['action_edit', 'action_delete'])
|
||||
->make(true);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use Carbon\Carbon;
|
|||
use Illuminate\Database\Connection;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Mail\MailActivateUser;
|
||||
use App\Mail\ReportExport;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class UserUpdateEmailController extends Controller
|
||||
|
|
@ -146,7 +146,7 @@ class UserUpdateEmailController extends Controller
|
|||
public function sendActivationMail($user, array $data)
|
||||
{
|
||||
$token = $this->createActivation($user, $data);
|
||||
Mail::to($data['email'])->send(new MailActivateUser($token, $user));
|
||||
Mail::to($data['email'])->send(new ReportExport($token, $user));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class Kernel extends HttpKernel
|
|||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'admin' => \App\Http\Middleware\Admin::class,
|
||||
'superadmin' => \App\Http\Middleware\SuperAdmin::class,
|
||||
'sysadmin' => \App\Http\Middleware\SysAdmin::class,
|
||||
'auth.permission' => \App\Http\Middleware\AuthPermission::class,
|
||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
|
|
|
|||
26
app/Http/Middleware/SysAdmin.php
Executable file
26
app/Http/Middleware/SysAdmin.php
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Auth;
|
||||
|
||||
class SysAdmin
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if ( Auth::check() && Auth::user()->isSySAdmin() )
|
||||
{
|
||||
return $next($request);
|
||||
}
|
||||
return redirect('/home');
|
||||
|
||||
}
|
||||
}
|
||||
88
app/Models/Arrangement.php
Normal file
88
app/Models/Arrangement.php
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Arrangement
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $template_id
|
||||
* @property Carbon $state
|
||||
* @property Carbon $begin
|
||||
* @property Carbon $end
|
||||
* @property string $type_s
|
||||
* @property string $data_s
|
||||
* @property int $view_position
|
||||
* @property int $booking_id
|
||||
* @property int $type_id
|
||||
* @property bool $in_pdf
|
||||
* @property Booking $booking
|
||||
* @property ArrangementTemplate $arrangement_template
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereBegin($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereBookingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereDataS($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereEnd($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereInPdf($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereState($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereTemplateId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereTypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereTypeS($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Arrangement whereViewPosition($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Arrangement extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'arrangement';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'template_id' => 'int',
|
||||
'view_position' => 'int',
|
||||
'booking_id' => 'int',
|
||||
'type_id' => 'int',
|
||||
'in_pdf' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'state',
|
||||
'begin',
|
||||
'end'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'template_id',
|
||||
'state',
|
||||
'begin',
|
||||
'end',
|
||||
'type_s',
|
||||
'data_s',
|
||||
'view_position',
|
||||
'booking_id',
|
||||
'type_id',
|
||||
'in_pdf'
|
||||
];
|
||||
|
||||
public function booking()
|
||||
{
|
||||
return $this->belongsTo(Booking::class);
|
||||
}
|
||||
|
||||
public function arrangement_template()
|
||||
{
|
||||
return $this->belongsTo(ArrangementTemplate::class, 'template_id');
|
||||
}
|
||||
}
|
||||
42
app/Models/ArrangementTemplate.php
Normal file
42
app/Models/ArrangementTemplate.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class ArrangementTemplate
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $title
|
||||
* @property Collection|Arrangement[] $arrangements
|
||||
* @package App\Models
|
||||
* @property-read int|null $arrangements_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementTemplate newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementTemplate newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementTemplate query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementTemplate whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementTemplate whereTitle($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ArrangementTemplate extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'arrangement_template';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'title'
|
||||
];
|
||||
|
||||
public function arrangements()
|
||||
{
|
||||
return $this->hasMany(Arrangement::class, 'template_id');
|
||||
}
|
||||
}
|
||||
92
app/Models/ArrangementType.php
Normal file
92
app/Models/ArrangementType.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class ArrangementType
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $notify_rel_days
|
||||
* @property int $arrangement_type_id
|
||||
* @property bool $is_unique
|
||||
* @property int $notify_rel_field_key
|
||||
* @property ArrangementType $arrangement_type
|
||||
* @property Booking $booking
|
||||
* @property DraftItem $draft_item
|
||||
* @property DraftType $draft_type
|
||||
* @property Collection|ArrangementType[] $arrangement_types
|
||||
* @property Collection|InquiryType[] $inquiry_types
|
||||
* @package App\Models
|
||||
* @property-read int|null $arrangement_types_count
|
||||
* @property-read int|null $inquiry_types_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereArrangementTypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereIsUnique($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereNotifyRelDays($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ArrangementType whereNotifyRelFieldKey($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ArrangementType extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'arrangement_type';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'notify_rel_days' => 'int',
|
||||
'arrangement_type_id' => 'int',
|
||||
'is_unique' => 'bool',
|
||||
'notify_rel_field_key' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'notify_rel_days',
|
||||
'arrangement_type_id',
|
||||
'is_unique',
|
||||
'notify_rel_field_key'
|
||||
];
|
||||
|
||||
public function arrangement_type()
|
||||
{
|
||||
return $this->belongsTo(ArrangementType::class);
|
||||
}
|
||||
|
||||
public function booking()
|
||||
{
|
||||
return $this->belongsTo(Booking::class);
|
||||
}
|
||||
|
||||
public function draft_item()
|
||||
{
|
||||
return $this->belongsTo(DraftItem::class);
|
||||
}
|
||||
|
||||
public function draft_type()
|
||||
{
|
||||
return $this->belongsTo(DraftType::class);
|
||||
}
|
||||
|
||||
public function arrangement_types()
|
||||
{
|
||||
return $this->hasMany(ArrangementType::class);
|
||||
}
|
||||
|
||||
public function inquiry_types()
|
||||
{
|
||||
return $this->hasMany(InquiryType::class);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,53 +1,85 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\Booking
|
||||
* Class Booking
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $booking_date
|
||||
* @property Carbon $booking_date
|
||||
* @property int $customer_id
|
||||
* @property int|null $lead_id
|
||||
* @property int|null $new_drafts
|
||||
* @property int $lead_id
|
||||
* @property bool $new_drafts
|
||||
* @property int $sf_guard_user_id
|
||||
* @property int $branch_id
|
||||
* @property float|null $service_fee
|
||||
* @property int|null $travel_country_id
|
||||
* @property int|null $travel_category_id
|
||||
* @property int|null $pax
|
||||
* @property int|null $coupon_id
|
||||
* @property \Illuminate\Support\Carbon $created_at
|
||||
* @property \Illuminate\Support\Carbon $updated_at
|
||||
* @property string|null $title
|
||||
* @property string|null $start_date
|
||||
* @property string|null $end_date
|
||||
* @property int|null $website_id
|
||||
* @property string|null $travel_number
|
||||
* @property string|null $participant_name
|
||||
* @property string|null $participant_firstname
|
||||
* @property string|null $participant_birthdate
|
||||
* @property int|null $participant_salutation_id
|
||||
* @property string|null $ev_number
|
||||
* @property string|null $merlin_knr
|
||||
* @property string|null $merlin_order_number
|
||||
* @property int|null $travel_company_id
|
||||
* @property int|null $travel_documents
|
||||
* @property float|null $price
|
||||
* @property float|null $price_total
|
||||
* @property float|null $deposit_total
|
||||
* @property float|null $final_payment
|
||||
* @property string|null $final_payment_date
|
||||
* @property int|null $travelagenda_id
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Sym\Arrangement[] $arrangements
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\BookingDraftItem[] $booking_draft_items
|
||||
* @property-read \App\Models\TravelCountry|null $lead
|
||||
* @property-read \App\Models\SfGuardUser $sf_guard_user
|
||||
* @property-read \App\Models\TravelAgenda|null $travel_agenda
|
||||
* @property-read \App\Models\TravelCountry|null $travel_country
|
||||
* @property float $service_fee
|
||||
* @property int $travel_country_id
|
||||
* @property int $travel_category_id
|
||||
* @property int $pax
|
||||
* @property int $coupon_id
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property string $title
|
||||
* @property Carbon $start_date
|
||||
* @property Carbon $end_date
|
||||
* @property int $website_id
|
||||
* @property string $travel_number
|
||||
* @property string $participant_name
|
||||
* @property string $participant_firstname
|
||||
* @property Carbon $participant_birthdate
|
||||
* @property int $participant_salutation_id
|
||||
* @property string $ev_number
|
||||
* @property string $merlin_knr
|
||||
* @property string $merlin_order_number
|
||||
* @property int $travel_company_id
|
||||
* @property bool $travel_documents
|
||||
* @property float $price
|
||||
* @property float $price_total
|
||||
* @property float $deposit_total
|
||||
* @property float $final_payment
|
||||
* @property Carbon $final_payment_date
|
||||
* @property int $travelagenda_id
|
||||
* @property Branch $branch
|
||||
* @property Coupon $coupon
|
||||
* @property Customer $customer
|
||||
* @property Lead $lead
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @property TravelCategory $travel_category
|
||||
* @property TravelCompany $travel_company
|
||||
* @property TravelCountry $travel_country
|
||||
* @property TravelAgenda $travel_agenda
|
||||
* @property Collection|Arrangement[] $arrangements
|
||||
* @property Collection|ArrangementType[] $arrangement_types
|
||||
* @property Collection|BookingApplication[] $booking_applications
|
||||
* @property Collection|BookingConfirmation[] $booking_confirmations
|
||||
* @property Collection|BookingDraftItem[] $booking_draft_items
|
||||
* @property Collection|BookingInvoice[] $booking_invoices
|
||||
* @property Collection|BookingServiceItem[] $booking_service_items
|
||||
* @property Collection|BookingVoucher[] $booking_vouchers
|
||||
* @property Collection|Coupon[] $coupons
|
||||
* @property Collection|InsuranceCertificate[] $insurance_certificates
|
||||
* @property Collection|Participant[] $participants
|
||||
* @property Collection|ServiceProviderEntry[] $service_provider_entries
|
||||
* @property Collection|TravelInsurance[] $travel_insurances
|
||||
* @package App\Models
|
||||
* @property-read int|null $arrangement_types_count
|
||||
* @property-read int|null $arrangements_count
|
||||
* @property-read int|null $booking_draft_items_count
|
||||
* @property-read int|null $booking_service_items_count
|
||||
* @property-read int|null $coupons_count
|
||||
* @property-read int|null $insurance_certificates_count
|
||||
* @property-read int|null $participants_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBookingDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBranchId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCouponId($value)
|
||||
|
|
@ -83,11 +115,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereWebsiteId($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking query()
|
||||
* @property-read int|null $arrangements_count
|
||||
* @property-read int|null $booking_draft_items_count
|
||||
* @property-read int|null $service_provider_entries_count
|
||||
*/
|
||||
class Booking extends Model
|
||||
{
|
||||
|
|
@ -95,40 +123,185 @@ class Booking extends Model
|
|||
|
||||
protected $table = 'booking';
|
||||
|
||||
/*protected $fillable = [
|
||||
'pos',
|
||||
];*/
|
||||
protected $casts = [
|
||||
'customer_id' => 'int',
|
||||
'lead_id' => 'int',
|
||||
'new_drafts' => 'bool',
|
||||
'sf_guard_user_id' => 'int',
|
||||
'branch_id' => 'int',
|
||||
'service_fee' => 'float',
|
||||
'travel_country_id' => 'int',
|
||||
'travel_category_id' => 'int',
|
||||
'pax' => 'int',
|
||||
'coupon_id' => 'int',
|
||||
'website_id' => 'int',
|
||||
'participant_salutation_id' => 'int',
|
||||
'travel_company_id' => 'int',
|
||||
'travel_documents' => 'bool',
|
||||
'price' => 'float',
|
||||
'price_total' => 'float',
|
||||
'deposit_total' => 'float',
|
||||
'final_payment' => 'float',
|
||||
'travelagenda_id' => 'int'
|
||||
];
|
||||
|
||||
public function booking_draft_items()
|
||||
{
|
||||
return $this->hasMany('App\Models\BookingDraftItem', 'booking_id', 'id')->orderBy('pos', 'ASC');
|
||||
}
|
||||
protected $dates = [
|
||||
'booking_date',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'participant_birthdate',
|
||||
'final_payment_date'
|
||||
];
|
||||
|
||||
//on crm
|
||||
public function travel_agenda()
|
||||
protected $fillable = [
|
||||
'booking_date',
|
||||
'customer_id',
|
||||
'lead_id',
|
||||
'new_drafts',
|
||||
'sf_guard_user_id',
|
||||
'branch_id',
|
||||
'service_fee',
|
||||
'travel_country_id',
|
||||
'travel_category_id',
|
||||
'pax',
|
||||
'coupon_id',
|
||||
'title',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'website_id',
|
||||
'travel_number',
|
||||
'participant_name',
|
||||
'participant_firstname',
|
||||
'participant_birthdate',
|
||||
'participant_salutation_id',
|
||||
'ev_number',
|
||||
'merlin_knr',
|
||||
'merlin_order_number',
|
||||
'travel_company_id',
|
||||
'travel_documents',
|
||||
'price',
|
||||
'price_total',
|
||||
'deposit_total',
|
||||
'final_payment',
|
||||
'final_payment_date',
|
||||
'travelagenda_id'
|
||||
];
|
||||
|
||||
/*public function branch()
|
||||
{
|
||||
return $this->belongsTo(Branch::class);
|
||||
}*/
|
||||
|
||||
public function coupon()
|
||||
{
|
||||
return $this->belongsTo(Coupon::class);
|
||||
}
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
|
||||
public function lead()
|
||||
{
|
||||
return $this->belongsTo(Lead::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class);
|
||||
}
|
||||
|
||||
public function travel_category()
|
||||
{
|
||||
return $this->belongsTo(TravelCategory::class);
|
||||
}
|
||||
|
||||
public function travel_company()
|
||||
{
|
||||
return $this->belongsTo(TravelCompany::class);
|
||||
}
|
||||
|
||||
/* public function travel_country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\TravelAgenda', 'travelagenda_id', 'id');
|
||||
}
|
||||
return $this->belongsTo(TravelCountry::class, 'travel_country_id', 'crm_id');
|
||||
}*/
|
||||
|
||||
|
||||
public function travel_country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\TravelCountry', 'travel_country_id', 'crm_id');
|
||||
return $this->belongsTo(\App\Models\Sym\TravelCountry::class, 'travel_country_id', 'id');
|
||||
}
|
||||
|
||||
public function lead()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Lead', 'lead_id', 'id');
|
||||
}
|
||||
public function travel_agenda()
|
||||
{
|
||||
return $this->belongsTo(TravelAgenda::class, 'travelagenda_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\SfGuardUser', 'sf_guard_user_id', 'id');
|
||||
}
|
||||
public function arrangements()
|
||||
{
|
||||
return $this->hasMany(Arrangement::class);
|
||||
}
|
||||
|
||||
public function arrangements()
|
||||
{
|
||||
return $this->hasMany('App\Models\Sym\Arrangement', 'booking_id', 'id')->orderBy('view_position', 'DESC');
|
||||
}
|
||||
public function arrangement_types()
|
||||
{
|
||||
return $this->hasMany(ArrangementType::class);
|
||||
}
|
||||
|
||||
/*public function booking_applications()
|
||||
{
|
||||
return $this->hasMany(BookingApplication::class);
|
||||
}
|
||||
|
||||
public function booking_confirmations()
|
||||
{
|
||||
return $this->hasMany(BookingConfirmation::class);
|
||||
}*/
|
||||
|
||||
public function booking_draft_items()
|
||||
{
|
||||
return $this->hasMany(BookingDraftItem::class)->orderBy('pos', 'ASC');
|
||||
}
|
||||
|
||||
/*public function booking_invoices()
|
||||
{
|
||||
return $this->hasMany(BookingInvoice::class);
|
||||
}*/
|
||||
|
||||
public function booking_service_items()
|
||||
{
|
||||
return $this->hasMany(BookingServiceItem::class);
|
||||
}
|
||||
|
||||
/*public function booking_vouchers()
|
||||
{
|
||||
return $this->hasMany(BookingVoucher::class);
|
||||
}*/
|
||||
|
||||
public function coupons()
|
||||
{
|
||||
return $this->hasMany(Coupon::class);
|
||||
}
|
||||
|
||||
public function insurance_certificates()
|
||||
{
|
||||
return $this->hasMany(InsuranceCertificate::class);
|
||||
}
|
||||
|
||||
public function participants()
|
||||
{
|
||||
return $this->hasMany(Participant::class);
|
||||
}
|
||||
|
||||
public function service_provider_entries()
|
||||
{
|
||||
return $this->hasMany(ServiceProviderEntry::class);
|
||||
}
|
||||
/*
|
||||
public function travel_insurances()
|
||||
{
|
||||
return $this->hasMany(TravelInsurance::class);
|
||||
}*/
|
||||
|
||||
|
||||
public function calculate_price_total()
|
||||
|
|
@ -152,7 +325,7 @@ class Booking extends Model
|
|||
}
|
||||
$total_adult += $prices['adult'];
|
||||
$total_children += $prices['children'];
|
||||
}
|
||||
}
|
||||
|
||||
if($travel_draft_item){
|
||||
$travel_draft_item->setPriceAdultRaw($travel_price_adult);
|
||||
|
|
@ -171,6 +344,11 @@ class Booking extends Model
|
|||
return number_format(($this->attributes['price']), 2, ',', '.');
|
||||
}
|
||||
|
||||
public function getPriceRaw()
|
||||
{
|
||||
return $this->attributes['price'];
|
||||
}
|
||||
|
||||
public function findBeforeDraftItemRelation($reid)
|
||||
{
|
||||
$before = false;
|
||||
|
|
@ -207,4 +385,56 @@ class Booking extends Model
|
|||
return Carbon::parse($this->attributes['end_date'])->format(\Util::formatDateDB());
|
||||
}
|
||||
|
||||
|
||||
//erlös #getRevenueFactor
|
||||
public function proceeds(){
|
||||
$proceeds = $this->attributes['price']
|
||||
// - $this->getServiceTotal()
|
||||
// - $this->getServiceFee()
|
||||
- $this->getServiceProviderEntriesAmountFactorTotal();
|
||||
|
||||
return number_format(($proceeds), 2, ',', '.');
|
||||
|
||||
}
|
||||
|
||||
public function getServiceProviderEntriesAmountFactorTotal()
|
||||
{
|
||||
$total = 0;
|
||||
foreach ($this->service_provider_entries as $entry)
|
||||
{
|
||||
$total += $entry->amount / $entry->factor;
|
||||
}
|
||||
return $total;
|
||||
}
|
||||
|
||||
public function getServiceProviderPaymentsTotal()
|
||||
{
|
||||
$total = 0;
|
||||
foreach ($this->service_provider_entries as $entry)
|
||||
{
|
||||
$total += $entry->amount;
|
||||
}
|
||||
return number_format(($total), 2, ',', '.');
|
||||
}
|
||||
|
||||
public function getKontoNumber(){
|
||||
|
||||
switch ($this->ev_number){
|
||||
case 'E01':
|
||||
return '4011';
|
||||
break;
|
||||
case 'E02':
|
||||
return '4012';
|
||||
break;
|
||||
case 'E03':
|
||||
return '4013';
|
||||
break;
|
||||
case 'E04':
|
||||
return '4014';
|
||||
break;
|
||||
|
||||
}
|
||||
return $this->ev_number;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
84
app/Models/BookingServiceItem.php
Normal file
84
app/Models/BookingServiceItem.php
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class BookingServiceItem
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $booking_id
|
||||
* @property int $travel_company_id
|
||||
* @property float $service_price
|
||||
* @property float $service_price_refund
|
||||
* @property float $commission
|
||||
* @property Carbon $travel_date
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property string $name
|
||||
* @property bool $is_commission_locked
|
||||
* @property Booking $booking
|
||||
* @property TravelCompany $travel_company
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereBookingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereCommission($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereIsCommissionLocked($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereServicePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereServicePriceRefund($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereTravelCompanyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereTravelDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class BookingServiceItem extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'booking_service_item';
|
||||
|
||||
protected $casts = [
|
||||
'booking_id' => 'int',
|
||||
'travel_company_id' => 'int',
|
||||
'service_price' => 'float',
|
||||
'service_price_refund' => 'float',
|
||||
'commission' => 'float',
|
||||
'is_commission_locked' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'travel_date'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'booking_id',
|
||||
'travel_company_id',
|
||||
'service_price',
|
||||
'service_price_refund',
|
||||
'commission',
|
||||
'travel_date',
|
||||
'name',
|
||||
'is_commission_locked'
|
||||
];
|
||||
|
||||
public function booking()
|
||||
{
|
||||
return $this->belongsTo(Booking::class);
|
||||
}
|
||||
|
||||
public function travel_company()
|
||||
{
|
||||
return $this->belongsTo(TravelCompany::class);
|
||||
}
|
||||
}
|
||||
92
app/Models/Coupon.php
Normal file
92
app/Models/Coupon.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Coupon
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $number
|
||||
* @property int $customer_id
|
||||
* @property int $booking_id
|
||||
* @property float $value
|
||||
* @property Carbon $issue_date
|
||||
* @property Carbon $valid_date
|
||||
* @property bool $is_redeemed
|
||||
* @property Carbon $redeem_date
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property Booking $booking
|
||||
* @property Customer $customer
|
||||
* @property Collection|Booking[] $bookings
|
||||
* @package App\Models
|
||||
* @property-read int|null $bookings_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereBookingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereCustomerId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereIsRedeemed($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereIssueDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereRedeemDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereValidDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Coupon whereValue($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Coupon extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'coupon';
|
||||
|
||||
protected $casts = [
|
||||
'customer_id' => 'int',
|
||||
'booking_id' => 'int',
|
||||
'value' => 'float',
|
||||
'is_redeemed' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'issue_date',
|
||||
'valid_date',
|
||||
'redeem_date'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'number',
|
||||
'customer_id',
|
||||
'booking_id',
|
||||
'value',
|
||||
'issue_date',
|
||||
'valid_date',
|
||||
'is_redeemed',
|
||||
'redeem_date'
|
||||
];
|
||||
|
||||
public function booking()
|
||||
{
|
||||
return $this->belongsTo(Booking::class);
|
||||
}
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
}
|
||||
}
|
||||
42
app/Models/CreditCardType.php
Normal file
42
app/Models/CreditCardType.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class CreditCardType
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Collection|Customer[] $customers
|
||||
* @package App\Models
|
||||
* @property-read int|null $customers_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CreditCardType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CreditCardType newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CreditCardType query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CreditCardType whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CreditCardType whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class CreditCardType extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'credit_card_type';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function customers()
|
||||
{
|
||||
return $this->hasMany(Customer::class);
|
||||
}
|
||||
}
|
||||
168
app/Models/Customer.php
Normal file
168
app/Models/Customer.php
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Customer
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $salutation_id
|
||||
* @property string $title
|
||||
* @property string $name
|
||||
* @property string $firstname
|
||||
* @property Carbon $birthdate
|
||||
* @property string $company
|
||||
* @property string $street
|
||||
* @property string $zip
|
||||
* @property string $city
|
||||
* @property string $email
|
||||
* @property string $phone
|
||||
* @property string $phonebusiness
|
||||
* @property string $phonemobile
|
||||
* @property string $fax
|
||||
* @property string $bank
|
||||
* @property string $bank_code
|
||||
* @property string $bank_account_number
|
||||
* @property int $credit_card_type_id
|
||||
* @property string $credit_card_number
|
||||
* @property Carbon $credit_card_expiration_date
|
||||
* @property string $participants_remarks
|
||||
* @property string $miscellaneous_remarks
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property int $country_id
|
||||
* @property TravelCountry $travel_country
|
||||
* @property CreditCardType $credit_card_type
|
||||
* @property Salutation $salutation
|
||||
* @property Collection|Booking[] $bookings
|
||||
* @property Collection|Coupon[] $coupons
|
||||
* @property Collection|Lead[] $leads
|
||||
* @package App\Models
|
||||
* @property-read int|null $bookings_count
|
||||
* @property-read int|null $coupons_count
|
||||
* @property-read int|null $leads_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereBank($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereBankAccountNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereBankCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereBirthdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereCity($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereCompany($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereCreditCardExpirationDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereCreditCardNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereCreditCardTypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereFax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereFirstname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereMiscellaneousRemarks($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereParticipantsRemarks($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer wherePhone($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer wherePhonebusiness($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer wherePhonemobile($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereStreet($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Customer whereZip($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Customer extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'customer';
|
||||
|
||||
protected $casts = [
|
||||
'salutation_id' => 'int',
|
||||
'credit_card_type_id' => 'int',
|
||||
'country_id' => 'int'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'birthdate',
|
||||
'credit_card_expiration_date'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'salutation_id',
|
||||
'title',
|
||||
'name',
|
||||
'firstname',
|
||||
'birthdate',
|
||||
'company',
|
||||
'street',
|
||||
'zip',
|
||||
'city',
|
||||
'email',
|
||||
'phone',
|
||||
'phonebusiness',
|
||||
'phonemobile',
|
||||
'fax',
|
||||
'bank',
|
||||
'bank_code',
|
||||
'bank_account_number',
|
||||
'credit_card_type_id',
|
||||
'credit_card_number',
|
||||
'credit_card_expiration_date',
|
||||
'participants_remarks',
|
||||
'miscellaneous_remarks',
|
||||
'country_id',
|
||||
|
||||
];
|
||||
|
||||
public function travel_country()
|
||||
{
|
||||
return $this->belongsTo(TravelCountry::class, 'country_id');
|
||||
}
|
||||
|
||||
public function credit_card_type()
|
||||
{
|
||||
return $this->belongsTo(CreditCardType::class);
|
||||
}
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class);
|
||||
}
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
}
|
||||
|
||||
public function coupons()
|
||||
{
|
||||
return $this->hasMany(Coupon::class);
|
||||
}
|
||||
|
||||
public function leads()
|
||||
{
|
||||
return $this->hasMany(Lead::class);
|
||||
}
|
||||
|
||||
public function fullName()
|
||||
{
|
||||
if ($this->firstname) {
|
||||
return $this->firstname . ' ' . $this->name;
|
||||
}
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -55,6 +55,8 @@ use Illuminate\Support\Str;
|
|||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_sites
|
||||
* @property-read int|null $iq_content_sites_count
|
||||
* @property-read int|null $iq_content_tree_node_childs_count
|
||||
* @property string|null $title
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereTitle($value)
|
||||
*/
|
||||
class IQContentTreeNode extends Model
|
||||
{
|
||||
|
|
@ -68,7 +70,7 @@ class IQContentTreeNode extends Model
|
|||
protected $table = 'i_q_content_tree_nodes';
|
||||
|
||||
protected $fillable = [
|
||||
'tree_id', 'parent_id', 'lvl', 'name', 'identifier', 'description', 'settings', 'pos', 'active',
|
||||
'tree_id', 'parent_id', 'lvl', 'name', 'identifier', 'title', 'description', 'settings', 'pos', 'active',
|
||||
];
|
||||
|
||||
protected $casts = ['settings' => 'array'];
|
||||
|
|
|
|||
42
app/Models/InitialContactType.php
Normal file
42
app/Models/InitialContactType.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class InitialContactType
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Collection|Lead[] $leads
|
||||
* @package App\Models
|
||||
* @property-read int|null $leads_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InitialContactType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InitialContactType newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InitialContactType query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InitialContactType whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InitialContactType whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class InitialContactType extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'initial_contact_type';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function leads()
|
||||
{
|
||||
return $this->hasMany(Lead::class, 'initialcontacttype_id');
|
||||
}
|
||||
}
|
||||
90
app/Models/Inquiry.php
Normal file
90
app/Models/Inquiry.php
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Inquiry
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $lead_id
|
||||
* @property int $template_id
|
||||
* @property bool $in_pdf
|
||||
* @property Carbon $begin
|
||||
* @property Carbon $end
|
||||
* @property int $type_id
|
||||
* @property string $type_s
|
||||
* @property string $data_s
|
||||
* @property int $view_position
|
||||
* @property Lead $lead
|
||||
* @property InquiryTemplate $inquiry_template
|
||||
* @property InquiryType $inquiry_type
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereBegin($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereDataS($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereEnd($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereInPdf($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereLeadId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereTemplateId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereTypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereTypeS($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereViewPosition($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Inquiry extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'inquiry';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'lead_id' => 'int',
|
||||
'template_id' => 'int',
|
||||
'in_pdf' => 'bool',
|
||||
'type_id' => 'int',
|
||||
'view_position' => 'int'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'begin',
|
||||
'end'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'lead_id',
|
||||
'template_id',
|
||||
'in_pdf',
|
||||
'begin',
|
||||
'end',
|
||||
'type_id',
|
||||
'type_s',
|
||||
'data_s',
|
||||
'view_position'
|
||||
];
|
||||
|
||||
public function lead()
|
||||
{
|
||||
return $this->belongsTo(Lead::class);
|
||||
}
|
||||
|
||||
public function inquiry_template()
|
||||
{
|
||||
return $this->belongsTo(InquiryTemplate::class, 'template_id');
|
||||
}
|
||||
|
||||
public function inquiry_type()
|
||||
{
|
||||
return $this->belongsTo(InquiryType::class, 'type_id');
|
||||
}
|
||||
}
|
||||
42
app/Models/InquiryTemplate.php
Normal file
42
app/Models/InquiryTemplate.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class InquiryTemplate
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $title
|
||||
* @property Collection|Inquiry[] $inquiries
|
||||
* @package App\Models
|
||||
* @property-read int|null $inquiries_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryTemplate newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryTemplate newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryTemplate query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryTemplate whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryTemplate whereTitle($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class InquiryTemplate extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'inquiry_template';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'title'
|
||||
];
|
||||
|
||||
public function inquiries()
|
||||
{
|
||||
return $this->hasMany(Inquiry::class, 'template_id');
|
||||
}
|
||||
}
|
||||
55
app/Models/InquiryType.php
Normal file
55
app/Models/InquiryType.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class InquiryType
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $arrangement_type_id
|
||||
* @property ArrangementType $arrangement_type
|
||||
* @property Collection|Inquiry[] $inquiries
|
||||
* @package App\Models
|
||||
* @property-read int|null $inquiries_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType whereArrangementTypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InquiryType whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class InquiryType extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'inquiry_type';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'arrangement_type_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'arrangement_type_id'
|
||||
];
|
||||
|
||||
public function arrangement_type()
|
||||
{
|
||||
return $this->belongsTo(ArrangementType::class);
|
||||
}
|
||||
|
||||
public function inquiries()
|
||||
{
|
||||
return $this->hasMany(Inquiry::class, 'type_id');
|
||||
}
|
||||
}
|
||||
62
app/Models/InsuranceCertificate.php
Normal file
62
app/Models/InsuranceCertificate.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class InsuranceCertificate
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $booking_id
|
||||
* @property int $internal_id
|
||||
* @property string $filename
|
||||
* @property boolean $binary_data
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property string $request_data
|
||||
* @property Booking $booking
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate whereBinaryData($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate whereBookingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate whereFilename($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate whereInternalId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate whereRequestData($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\InsuranceCertificate whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class InsuranceCertificate extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'insurance_certificate';
|
||||
|
||||
protected $casts = [
|
||||
'booking_id' => 'int',
|
||||
'internal_id' => 'int',
|
||||
'binary_data' => 'boolean'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'booking_id',
|
||||
'internal_id',
|
||||
'filename',
|
||||
'binary_data',
|
||||
'request_data'
|
||||
];
|
||||
|
||||
public function booking()
|
||||
{
|
||||
return $this->belongsTo(Booking::class);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,40 +1,68 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\Lead
|
||||
* Class Lead
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $customer_id
|
||||
* @property string $request_date
|
||||
* @property string|null $travelperiod_start
|
||||
* @property string|null $travelperiod_end
|
||||
* @property int|null $travelperiod_length
|
||||
* @property int|null $travelcountry_id
|
||||
* @property int|null $travelagenda_id
|
||||
* @property string|null $remarks
|
||||
* @property Carbon $request_date
|
||||
* @property Carbon $travelperiod_start
|
||||
* @property Carbon $travelperiod_end
|
||||
* @property int $travelperiod_length
|
||||
* @property int $travelcountry_id
|
||||
* @property int $travelagenda_id
|
||||
* @property string $remarks
|
||||
* @property int $sf_guard_user_id
|
||||
* @property int|null $is_closed
|
||||
* @property int|null $initialcontacttype_id
|
||||
* @property int|null $searchengine_id
|
||||
* @property string|null $searchengine_keywords
|
||||
* @property bool $is_closed
|
||||
* @property int $initialcontacttype_id
|
||||
* @property int $searchengine_id
|
||||
* @property string $searchengine_keywords
|
||||
* @property int $status_id
|
||||
* @property string|null $next_due_date
|
||||
* @property int|null $website_id
|
||||
* @property int|null $travelcategory_id
|
||||
* @property \Illuminate\Support\Carbon $created_at
|
||||
* @property \Illuminate\Support\Carbon $updated_at
|
||||
* @property float|null $price
|
||||
* @property int|null $pax
|
||||
* @property string|null $participant_name
|
||||
* @property string|null $participant_firstname
|
||||
* @property string|null $participant_birthdate
|
||||
* @property int|null $participant_salutation_id
|
||||
* @property-read \App\Models\SfGuardUser $sf_guard_user
|
||||
* @property-read \App\Models\Status $status
|
||||
* @property Carbon $next_due_date
|
||||
* @property int $website_id
|
||||
* @property int $travelcategory_id
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property float $price
|
||||
* @property int $pax
|
||||
* @property string $participant_name
|
||||
* @property string $participant_firstname
|
||||
* @property Carbon $participant_birthdate
|
||||
* @property int $participant_salutation_id
|
||||
* @property Customer $customer
|
||||
* @property InitialContactType $initial_contact_type
|
||||
* @property Salutation $salutation
|
||||
* @property Searchengine $searchengine
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @property Status $status
|
||||
* @property TravelAgenda $travel_agenda
|
||||
* @property TravelCategory $travel_category
|
||||
* @property TravelCountry $travel_country
|
||||
* @property Website $website
|
||||
* @property Collection|Booking[] $bookings
|
||||
* @property Collection|Inquiry[] $inquiries
|
||||
* @property Collection|LeadParticipant[] $lead_participants
|
||||
* @property Collection|Offer[] $offers
|
||||
* @property Collection|StatusHistory[] $status_histories
|
||||
* @package App\Models
|
||||
* @property-read int|null $bookings_count
|
||||
* @property-read int|null $inquiries_count
|
||||
* @property-read int|null $lead_participants_count
|
||||
* @property-read int|null $offers_count
|
||||
* @property-read int|null $status_histories_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereCustomerId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereId($value)
|
||||
|
|
@ -62,9 +90,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereWebsiteId($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead query()
|
||||
*/
|
||||
class Lead extends Model
|
||||
{
|
||||
|
|
@ -72,13 +97,146 @@ class Lead extends Model
|
|||
|
||||
protected $table = 'lead';
|
||||
|
||||
public function status()
|
||||
protected $casts = [
|
||||
'customer_id' => 'int',
|
||||
'travelperiod_length' => 'int',
|
||||
'travelcountry_id' => 'int',
|
||||
'travelagenda_id' => 'int',
|
||||
'sf_guard_user_id' => 'int',
|
||||
'is_closed' => 'bool',
|
||||
'initialcontacttype_id' => 'int',
|
||||
'searchengine_id' => 'int',
|
||||
'status_id' => 'int',
|
||||
'website_id' => 'int',
|
||||
'travelcategory_id' => 'int',
|
||||
'price' => 'float',
|
||||
'pax' => 'int',
|
||||
'participant_salutation_id' => 'int'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'request_date',
|
||||
'travelperiod_start',
|
||||
'travelperiod_end',
|
||||
'next_due_date',
|
||||
'participant_birthdate'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'customer_id',
|
||||
'request_date',
|
||||
'travelperiod_start',
|
||||
'travelperiod_end',
|
||||
'travelperiod_length',
|
||||
'travelcountry_id',
|
||||
'travelagenda_id',
|
||||
'remarks',
|
||||
'sf_guard_user_id',
|
||||
'is_closed',
|
||||
'initialcontacttype_id',
|
||||
'searchengine_id',
|
||||
'searchengine_keywords',
|
||||
'status_id',
|
||||
'next_due_date',
|
||||
'website_id',
|
||||
'travelcategory_id',
|
||||
'price',
|
||||
'pax',
|
||||
'participant_name',
|
||||
'participant_firstname',
|
||||
'participant_birthdate',
|
||||
'participant_salutation_id'
|
||||
];
|
||||
|
||||
public function updateNextDueDate($date = false){
|
||||
|
||||
if(!$date){
|
||||
$carbon = Carbon::now();
|
||||
$this->next_due_date = $carbon->modify('+ '.$this->status->handling_days.' days')->format("Y-m-d");
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
|
||||
public function initial_contact_type()
|
||||
{
|
||||
return $this->belongsTo(InitialContactType::class, 'initialcontacttype_id');
|
||||
}
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class, 'participant_salutation_id');
|
||||
}
|
||||
|
||||
public function searchengine()
|
||||
{
|
||||
return $this->belongsTo(Searchengine::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class);
|
||||
}
|
||||
|
||||
public function status()
|
||||
{
|
||||
return $this->belongsTo(Status::class);
|
||||
}
|
||||
|
||||
public function travel_agenda()
|
||||
{
|
||||
return $this->belongsTo(TravelAgenda::class, 'travelagenda_id');
|
||||
}
|
||||
|
||||
public function travel_category()
|
||||
{
|
||||
return $this->belongsTo(TravelCategory::class, 'travelcategory_id');
|
||||
}
|
||||
|
||||
//on crm
|
||||
public function travel_country_crm()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Status', 'status_id', 'id');
|
||||
return $this->belongsTo('App\Models\Sym\TravelCountry', 'travelcountry_id', 'id');
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
|
||||
//on stern other DB
|
||||
public function travel_country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\SfGuardUser', 'sf_guard_user_id', 'id');
|
||||
return $this->belongsTo('App\Models\TravelCountry', 'travelcountry_id', 'crm_id');
|
||||
}
|
||||
|
||||
|
||||
public function website()
|
||||
{
|
||||
return $this->belongsTo(Website::class);
|
||||
}
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
}
|
||||
|
||||
public function inquiries()
|
||||
{
|
||||
return $this->hasMany(Inquiry::class);
|
||||
}
|
||||
|
||||
public function lead_participants()
|
||||
{
|
||||
return $this->hasMany(LeadParticipant::class);
|
||||
}
|
||||
|
||||
public function offers()
|
||||
{
|
||||
return $this->hasMany(Offer::class);
|
||||
}
|
||||
|
||||
public function status_histories()
|
||||
{
|
||||
return $this->hasMany(StatusHistory::class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
68
app/Models/LeadParticipant.php
Normal file
68
app/Models/LeadParticipant.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class LeadParticipant
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $lead_id
|
||||
* @property string $participant_name
|
||||
* @property string $participant_firstname
|
||||
* @property Carbon $participant_birthdate
|
||||
* @property int $participant_salutation_id
|
||||
* @property Lead $lead
|
||||
* @property Salutation $salutation
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereLeadId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereParticipantBirthdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereParticipantFirstname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereParticipantName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\LeadParticipant whereParticipantSalutationId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class LeadParticipant extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'lead_participant';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'lead_id' => 'int',
|
||||
'participant_salutation_id' => 'int'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'participant_birthdate'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'lead_id',
|
||||
'participant_name',
|
||||
'participant_firstname',
|
||||
'participant_birthdate',
|
||||
'participant_salutation_id'
|
||||
];
|
||||
|
||||
public function lead()
|
||||
{
|
||||
return $this->belongsTo(Lead::class);
|
||||
}
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class, 'participant_salutation_id');
|
||||
}
|
||||
}
|
||||
56
app/Models/Offer.php
Normal file
56
app/Models/Offer.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Offer
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $lead_id
|
||||
* @property float $total
|
||||
* @property boolean $binary_data
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property Lead $lead
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Offer newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Offer newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Offer query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Offer whereBinaryData($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Offer whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Offer whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Offer whereLeadId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Offer whereTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Offer whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Offer extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'offer';
|
||||
|
||||
protected $casts = [
|
||||
'lead_id' => 'int',
|
||||
'total' => 'float',
|
||||
'binary_data' => 'boolean'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'lead_id',
|
||||
'total',
|
||||
'binary_data'
|
||||
];
|
||||
|
||||
public function lead()
|
||||
{
|
||||
return $this->belongsTo(Lead::class);
|
||||
}
|
||||
}
|
||||
72
app/Models/Participant.php
Normal file
72
app/Models/Participant.php
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Participant
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $booking_id
|
||||
* @property string $participant_name
|
||||
* @property string $participant_firstname
|
||||
* @property Carbon $participant_birthdate
|
||||
* @property int $participant_salutation_id
|
||||
* @property bool $participant_child
|
||||
* @property Booking $booking
|
||||
* @property Salutation $salutation
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereBookingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantBirthdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantChild($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantFirstname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Participant whereParticipantSalutationId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Participant extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'participant';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'booking_id' => 'int',
|
||||
'participant_salutation_id' => 'int',
|
||||
'participant_child' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'participant_birthdate'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'booking_id',
|
||||
'participant_name',
|
||||
'participant_firstname',
|
||||
'participant_birthdate',
|
||||
'participant_salutation_id',
|
||||
'participant_child'
|
||||
];
|
||||
|
||||
public function booking()
|
||||
{
|
||||
return $this->belongsTo(Booking::class);
|
||||
}
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class, 'participant_salutation_id');
|
||||
}
|
||||
}
|
||||
63
app/Models/Salutation.php
Normal file
63
app/Models/Salutation.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Salutation
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Collection|Customer[] $customers
|
||||
* @property Collection|Lead[] $leads
|
||||
* @property Collection|LeadParticipant[] $lead_participants
|
||||
* @property Collection|Participant[] $participants
|
||||
* @package App\Models
|
||||
* @property-read int|null $customers_count
|
||||
* @property-read int|null $lead_participants_count
|
||||
* @property-read int|null $leads_count
|
||||
* @property-read int|null $participants_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Salutation whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Salutation extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'salutation';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function customers()
|
||||
{
|
||||
return $this->hasMany(Customer::class);
|
||||
}
|
||||
|
||||
public function leads()
|
||||
{
|
||||
return $this->hasMany(Lead::class, 'participant_salutation_id');
|
||||
}
|
||||
|
||||
public function lead_participants()
|
||||
{
|
||||
return $this->hasMany(LeadParticipant::class, 'participant_salutation_id');
|
||||
}
|
||||
|
||||
public function participants()
|
||||
{
|
||||
return $this->hasMany(Participant::class, 'participant_salutation_id');
|
||||
}
|
||||
}
|
||||
42
app/Models/Searchengine.php
Normal file
42
app/Models/Searchengine.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Searchengine
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Collection|Lead[] $leads
|
||||
* @package App\Models
|
||||
* @property-read int|null $leads_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Searchengine newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Searchengine newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Searchengine query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Searchengine whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Searchengine whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Searchengine extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'searchengine';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function leads()
|
||||
{
|
||||
return $this->hasMany(Lead::class);
|
||||
}
|
||||
}
|
||||
50
app/Models/ServiceProvider.php
Normal file
50
app/Models/ServiceProvider.php
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class ServiceProvider
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property bool $dollar
|
||||
* @property string $type
|
||||
* @property Collection|ServiceProviderEntry[] $service_provider_entries
|
||||
* @package App\Models
|
||||
* @property-read int|null $service_provider_entries_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereDollar($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereType($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ServiceProvider extends Model
|
||||
{
|
||||
protected $table = 'service_provider';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'dollar' => 'bool'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'dollar',
|
||||
'type'
|
||||
];
|
||||
|
||||
public function service_provider_entries()
|
||||
{
|
||||
return $this->hasMany(ServiceProviderEntry::class);
|
||||
}
|
||||
}
|
||||
112
app/Models/ServiceProviderEntry.php
Normal file
112
app/Models/ServiceProviderEntry.php
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class ServiceProviderEntry
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $booking_id
|
||||
* @property int $service_provider_id
|
||||
* @property float $amount
|
||||
* @property float $amount_eur
|
||||
* @property float $factor
|
||||
* @property Carbon $payment_date
|
||||
* @property string $invoice_number
|
||||
* @property bool $is_cleared
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property string $type
|
||||
* @property Booking $booking
|
||||
* @property ServiceProvider $service_provider
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereAmountEur($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereBookingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereFactor($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereInvoiceNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereIsCleared($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry wherePaymentDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereServiceProviderId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProviderEntry whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ServiceProviderEntry extends Model
|
||||
{
|
||||
protected $table = 'service_provider_entry';
|
||||
|
||||
protected $casts = [
|
||||
'booking_id' => 'int',
|
||||
'service_provider_id' => 'int',
|
||||
'amount' => 'float',
|
||||
'amount_eur' => 'float',
|
||||
'factor' => 'float',
|
||||
'is_cleared' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'payment_date'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'booking_id',
|
||||
'service_provider_id',
|
||||
'amount',
|
||||
'amount_eur',
|
||||
'factor',
|
||||
'payment_date',
|
||||
'invoice_number',
|
||||
'is_cleared',
|
||||
'type'
|
||||
];
|
||||
|
||||
private static $counter = 0;
|
||||
private static $bookingIds = array();
|
||||
|
||||
public function booking()
|
||||
{
|
||||
return $this->belongsTo(Booking::class);
|
||||
}
|
||||
|
||||
public function service_provider()
|
||||
{
|
||||
return $this->belongsTo(ServiceProvider::class);
|
||||
}
|
||||
|
||||
public function getCounter(){
|
||||
if ($this->booking_id) {
|
||||
if (!in_array($this->booking_id, self::$bookingIds)) {
|
||||
self::$bookingIds[] = $this->booking_id;
|
||||
self::$counter++;
|
||||
}
|
||||
return self::$counter;
|
||||
}
|
||||
}
|
||||
|
||||
public function getAmountFinalEur(){
|
||||
$ret = $this->amount;
|
||||
if($this->amount_eur && $this->amount_eur > 0){
|
||||
$ret = $this->amount_eur;
|
||||
}
|
||||
return number_format($ret, 2, ',', '.');
|
||||
;
|
||||
}
|
||||
|
||||
public function getPaymentDateFormat(){
|
||||
if(!$this->attributes['payment_date']){ return ""; }
|
||||
return Carbon::parse($this->attributes['payment_date'])->format(\Util::formatDateDB());
|
||||
}
|
||||
}
|
||||
81
app/Models/StatusHistory.php
Normal file
81
app/Models/StatusHistory.php
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class StatusHistory
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $status_id
|
||||
* @property int $lead_id
|
||||
* @property int $sf_guard_user_id
|
||||
* @property Carbon $date
|
||||
* @property string $remarks
|
||||
* @property Carbon $target_date
|
||||
* @property Carbon $created_at
|
||||
* @property Lead $lead
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @property Status $status
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereLeadId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereRemarks($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereSfGuardUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereStatusId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereTargetDate($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class StatusHistory extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'status_history';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'status_id' => 'int',
|
||||
'lead_id' => 'int',
|
||||
'sf_guard_user_id' => 'int'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'date',
|
||||
'target_date'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'status_id',
|
||||
'lead_id',
|
||||
'sf_guard_user_id',
|
||||
'date',
|
||||
'remarks',
|
||||
'target_date'
|
||||
];
|
||||
|
||||
public function lead()
|
||||
{
|
||||
return $this->belongsTo(Lead::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class);
|
||||
}
|
||||
|
||||
public function status()
|
||||
{
|
||||
return $this->belongsTo(Status::class);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace App\Models\Sym;
|
||||
|
||||
use App\Models\Booking;
|
||||
use App\Models\Lead;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
||||
|
|
@ -62,5 +64,18 @@ class TravelCountry extends Model
|
|||
public $timestamps = false;
|
||||
|
||||
|
||||
/*public function leads()
|
||||
{
|
||||
return $this->hasMany(Lead::class, 'travelcountry_id', 'id');
|
||||
}*/
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class, 'travel_country_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
210
app/Models/Sym/_Booking.php
Normal file
210
app/Models/Sym/_Booking.php
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\Booking
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $booking_date
|
||||
* @property int $customer_id
|
||||
* @property int|null $lead_id
|
||||
* @property int|null $new_drafts
|
||||
* @property int $sf_guard_user_id
|
||||
* @property int $branch_id
|
||||
* @property float|null $service_fee
|
||||
* @property int|null $travel_country_id
|
||||
* @property int|null $travel_category_id
|
||||
* @property int|null $pax
|
||||
* @property int|null $coupon_id
|
||||
* @property \Illuminate\Support\Carbon $created_at
|
||||
* @property \Illuminate\Support\Carbon $updated_at
|
||||
* @property string|null $title
|
||||
* @property string|null $start_date
|
||||
* @property string|null $end_date
|
||||
* @property int|null $website_id
|
||||
* @property string|null $travel_number
|
||||
* @property string|null $participant_name
|
||||
* @property string|null $participant_firstname
|
||||
* @property string|null $participant_birthdate
|
||||
* @property int|null $participant_salutation_id
|
||||
* @property string|null $ev_number
|
||||
* @property string|null $merlin_knr
|
||||
* @property string|null $merlin_order_number
|
||||
* @property int|null $travel_company_id
|
||||
* @property int|null $travel_documents
|
||||
* @property float|null $price
|
||||
* @property float|null $price_total
|
||||
* @property float|null $deposit_total
|
||||
* @property float|null $final_payment
|
||||
* @property string|null $final_payment_date
|
||||
* @property int|null $travelagenda_id
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Sym\Arrangement[] $arrangements
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\BookingDraftItem[] $booking_draft_items
|
||||
* @property-read \App\Models\TravelCountry|null $lead
|
||||
* @property-read \App\Models\SfGuardUser $sf_guard_user
|
||||
* @property-read \App\Models\TravelAgenda|null $travel_agenda
|
||||
* @property-read \App\Models\TravelCountry|null $travel_country
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBookingDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBranchId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCouponId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCustomerId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereDepositTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereEndDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereEvNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereFinalPayment($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereFinalPaymentDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereLeadId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereMerlinKnr($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereMerlinOrderNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereNewDrafts($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantBirthdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantFirstname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePriceTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereServiceFee($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereSfGuardUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereStartDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCategoryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCompanyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelDocuments($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelagendaId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereWebsiteId($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking query()
|
||||
* @property-read int|null $arrangements_count
|
||||
* @property-read int|null $booking_draft_items_count
|
||||
*/
|
||||
class _Booking extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'booking';
|
||||
|
||||
/*protected $fillable = [
|
||||
'pos',
|
||||
];*/
|
||||
|
||||
public function booking_draft_items()
|
||||
{
|
||||
return $this->hasMany('App\Models\BookingDraftItem', 'booking_id', 'id')->orderBy('pos', 'ASC');
|
||||
}
|
||||
|
||||
//on crm
|
||||
public function travel_agenda()
|
||||
{
|
||||
return $this->belongsTo('App\Models\TravelAgenda', 'travelagenda_id', 'id');
|
||||
}
|
||||
|
||||
public function travel_country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\TravelCountry', 'travel_country_id', 'crm_id');
|
||||
}
|
||||
|
||||
public function lead()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Lead', 'lead_id', 'id');
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\SfGuardUser', 'sf_guard_user_id', 'id');
|
||||
}
|
||||
|
||||
public function arrangements()
|
||||
{
|
||||
return $this->hasMany('App\Models\Sym\Arrangement', 'booking_id', 'id')->orderBy('view_position', 'DESC');
|
||||
}
|
||||
|
||||
|
||||
public function calculate_price_total()
|
||||
{
|
||||
$travel_draft_item = false;
|
||||
$travel_price_adult = 0;
|
||||
$travel_price_children = 0;
|
||||
$total_adult = 0;
|
||||
$total_children = 0;
|
||||
foreach ($this->booking_draft_items as $booking_draft_item) {
|
||||
//24 Rundreise
|
||||
if($booking_draft_item->draft_type_id == 24){
|
||||
$travel_draft_item = $booking_draft_item;
|
||||
continue;
|
||||
}
|
||||
$prices = $booking_draft_item->getItemPrice();
|
||||
//Grundpreis Reise
|
||||
if($booking_draft_item->draft_type_id == 30){
|
||||
$travel_price_adult += $prices['adult'];
|
||||
$travel_price_children += $prices['children'];
|
||||
}
|
||||
$total_adult += $prices['adult'];
|
||||
$total_children += $prices['children'];
|
||||
}
|
||||
|
||||
if($travel_draft_item){
|
||||
$travel_draft_item->setPriceAdultRaw($travel_price_adult);
|
||||
$travel_draft_item->setPriceChildrenRaw($travel_price_children);
|
||||
$travel_draft_item->save();
|
||||
}
|
||||
|
||||
$this->price = $total_adult + $total_children;
|
||||
$this->save();
|
||||
|
||||
}
|
||||
|
||||
public function getPriceAttribute()
|
||||
{
|
||||
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
|
||||
return number_format(($this->attributes['price']), 2, ',', '.');
|
||||
}
|
||||
|
||||
public function findBeforeDraftItemRelation($reid)
|
||||
{
|
||||
$before = false;
|
||||
foreach($this->booking_draft_items as $booking_draft_items) {
|
||||
if ($booking_draft_items->id == $reid) {
|
||||
return $before;
|
||||
}
|
||||
$before = $booking_draft_items;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function findAfterDraftItemRelation($reid)
|
||||
{
|
||||
$next = false;
|
||||
foreach($this->booking_draft_items as $booking_draft_items) {
|
||||
if($next){
|
||||
return $booking_draft_items;
|
||||
}
|
||||
if ($booking_draft_items->id == $reid) {
|
||||
$next = true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getStartDateFormat(){
|
||||
if(!$this->attributes['start_date']){ return ""; }
|
||||
return Carbon::parse($this->attributes['start_date'])->format(\Util::formatDateDB());
|
||||
}
|
||||
|
||||
public function getEndDateFormat(){
|
||||
if(!$this->attributes['end_date']){ return ""; }
|
||||
return Carbon::parse($this->attributes['end_date'])->format(\Util::formatDateDB());
|
||||
}
|
||||
|
||||
}
|
||||
194
app/Models/TravelBooking.php
Normal file
194
app/Models/TravelBooking.php
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class TravelBooking
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $salutation_id
|
||||
* @property string $first_name
|
||||
* @property string $last_name
|
||||
* @property string $street
|
||||
* @property string $zipcode
|
||||
* @property string $city
|
||||
* @property int $country_id
|
||||
* @property string $fax
|
||||
* @property string $phone
|
||||
* @property string $mobile
|
||||
* @property string $comments
|
||||
* @property string $email
|
||||
* @property Carbon $created
|
||||
* @property Carbon $selected_start_date
|
||||
* @property Carbon $selected_end_date
|
||||
* @property string $program_name
|
||||
* @property string $selected_travel
|
||||
* @property string $selected_departure
|
||||
* @property int $program_id
|
||||
* @property int $period_id
|
||||
* @property string $class
|
||||
* @property int $selected_adults
|
||||
* @property int $selected_childs
|
||||
* @property int $participants_total
|
||||
* @property string $participants
|
||||
* @property string $drafts
|
||||
* @property string $service_items
|
||||
* @property string $arrangements
|
||||
* @property string $rooms
|
||||
* @property float $price
|
||||
* @property float $price_total
|
||||
* @property float $deposit_total
|
||||
* @property float $final_payment
|
||||
* @property Carbon $final_payment_date
|
||||
* @property string $insurance_name
|
||||
* @property string $insurances
|
||||
* @property int $travel_cancellation
|
||||
* @property string $options
|
||||
* @property string $class_options
|
||||
* @property string $extra_category
|
||||
* @property bool $accept_legal_rights
|
||||
* @property string $ip
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereAcceptLegalRights($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereArrangements($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereCity($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereClass($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereClassOptions($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereComments($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereCreated($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereDepositTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereDrafts($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereExtraCategory($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereFax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereFinalPayment($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereFinalPaymentDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereFirstName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereInsuranceName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereInsurances($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereIp($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereLastName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereMobile($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereOptions($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereParticipants($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereParticipantsTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking wherePeriodId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking wherePhone($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking wherePriceTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereProgramId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereProgramName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereRooms($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereSelectedAdults($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereSelectedChilds($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereSelectedDeparture($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereSelectedEndDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereSelectedStartDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereSelectedTravel($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereServiceItems($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereStreet($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereTravelCancellation($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereZipcode($value)
|
||||
* @mixin \Eloquent
|
||||
* @property int|null $crm_booking_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBooking whereCrmBookingId($value)
|
||||
*/
|
||||
class TravelBooking extends Model
|
||||
{
|
||||
protected $connection = 'mysql_stern';
|
||||
protected $table = 'travel_booking';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'salutation_id' => 'int',
|
||||
'country_id' => 'int',
|
||||
'program_id' => 'int',
|
||||
'period_id' => 'int',
|
||||
'selected_adults' => 'int',
|
||||
'selected_childs' => 'int',
|
||||
'participants_total' => 'int',
|
||||
'price' => 'float',
|
||||
'price_total' => 'float',
|
||||
'deposit_total' => 'float',
|
||||
'final_payment' => 'float',
|
||||
'travel_cancellation' => 'int',
|
||||
'accept_legal_rights' => 'bool',
|
||||
'selected_travel' => 'array',
|
||||
'selected_departure' => 'array',
|
||||
'participants' => 'array',
|
||||
'drafts' => 'array',
|
||||
'service_items' => 'array',
|
||||
'arrangements' => 'array',
|
||||
'rooms' => 'array',
|
||||
'options' => 'array',
|
||||
'class_options' => 'array',
|
||||
'extra_category' => 'array',
|
||||
'insurances' => 'array'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'created',
|
||||
'selected_start_date',
|
||||
'selected_end_date',
|
||||
'final_payment_date'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'crm_booking_id',
|
||||
'salutation_id',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'street',
|
||||
'zipcode',
|
||||
'city',
|
||||
'country_id',
|
||||
'fax',
|
||||
'phone',
|
||||
'mobile',
|
||||
'comments',
|
||||
'email',
|
||||
'created',
|
||||
'selected_start_date',
|
||||
'selected_end_date',
|
||||
'program_name',
|
||||
'selected_travel',
|
||||
'selected_departure',
|
||||
'program_id',
|
||||
'period_id',
|
||||
'class',
|
||||
'selected_adults',
|
||||
'selected_childs',
|
||||
'participants_total',
|
||||
'participants',
|
||||
'drafts',
|
||||
'service_items',
|
||||
'arrangements',
|
||||
'rooms',
|
||||
'price',
|
||||
'price_total',
|
||||
'deposit_total',
|
||||
'final_payment',
|
||||
'final_payment_date',
|
||||
'insurance_name',
|
||||
'insurances',
|
||||
'travel_cancellation',
|
||||
'options',
|
||||
'class_options',
|
||||
'extra_category',
|
||||
'accept_legal_rights',
|
||||
'ip'
|
||||
];
|
||||
}
|
||||
49
app/Models/TravelCategory.php
Normal file
49
app/Models/TravelCategory.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class TravelCategory
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Collection|Booking[] $bookings
|
||||
* @property Collection|Lead[] $leads
|
||||
* @package App\Models
|
||||
* @property-read int|null $bookings_count
|
||||
* @property-read int|null $leads_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCategory newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCategory newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCategory query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCategory whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCategory whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelCategory extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'travel_category';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
}
|
||||
|
||||
public function leads()
|
||||
{
|
||||
return $this->hasMany(Lead::class, 'travelcategory_id');
|
||||
}
|
||||
}
|
||||
64
app/Models/TravelCompany.php
Normal file
64
app/Models/TravelCompany.php
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class TravelCompany
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property float $percentage
|
||||
* @property bool $is_allowed_edit_commission
|
||||
* @property bool $is_inhouse
|
||||
* @property Collection|Booking[] $bookings
|
||||
* @property Collection|BookingServiceItem[] $booking_service_items
|
||||
* @package App\Models
|
||||
* @property-read int|null $booking_service_items_count
|
||||
* @property-read int|null $bookings_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereIsAllowedEditCommission($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereIsInhouse($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany wherePercentage($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelCompany extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'travel_company';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'percentage' => 'float',
|
||||
'is_allowed_edit_commission' => 'bool',
|
||||
'is_inhouse' => 'bool'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'percentage',
|
||||
'is_allowed_edit_commission',
|
||||
'is_inhouse'
|
||||
];
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
}
|
||||
|
||||
public function booking_service_items()
|
||||
{
|
||||
return $this->hasMany(BookingServiceItem::class);
|
||||
}
|
||||
}
|
||||
|
|
@ -211,9 +211,9 @@ class TravelUserBookingFewo extends Model
|
|||
|
||||
public function getCheckedBadgeCalendar(){
|
||||
$back = "";
|
||||
$back .= $this->is_calendar_fewo_direct ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : ' <span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
$back .= $this->is_calendar_hrs ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : ' <span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
$back .= $this->is_calendar_stern_tours ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : ' <span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
$back .= $this->is_calendar_fewo_direct ? ' <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : ' <span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
$back .= $this->is_calendar_hrs ? ' <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : ' <span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
$back .= $this->is_calendar_stern_tours ? ' <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : ' <span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
return $back;
|
||||
}
|
||||
|
||||
|
|
|
|||
42
app/Models/Website.php
Normal file
42
app/Models/Website.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Website
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Collection|Lead[] $leads
|
||||
* @package App\Models
|
||||
* @property-read int|null $leads_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Website newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Website newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Website query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Website whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Website whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Website extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'website';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function leads()
|
||||
{
|
||||
return $this->hasMany(Lead::class);
|
||||
}
|
||||
}
|
||||
519
app/Repositories/DraftRepository.php
Normal file
519
app/Repositories/DraftRepository.php
Normal file
|
|
@ -0,0 +1,519 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
|
||||
use App\Models\Booking;
|
||||
use App\Models\BookingDraftItem;
|
||||
use App\Models\TravelProgram;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class DraftRepository extends BaseRepository {
|
||||
|
||||
private $data = "";
|
||||
private $room_str = "";
|
||||
private $room_name = "";
|
||||
private $className = "";
|
||||
private $option = "";
|
||||
|
||||
public function __construct(Booking $model)
|
||||
{
|
||||
$this->model = $model;
|
||||
}
|
||||
|
||||
public function update($data)
|
||||
{
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
|
||||
public function create_drafts_from_booking($booking_id, $data) {
|
||||
|
||||
$this->data = $data;
|
||||
|
||||
$weekday = date('w', strtotime($data['startDateStr']));
|
||||
$travel_program = TravelProgram::find($data['travel_program_id']);
|
||||
$draft = $this->getDraftByTravelProgramData($travel_program, $data, $weekday);
|
||||
|
||||
$start_date = Carbon::parse($data['startDateStr']);
|
||||
$end_date = Carbon::parse($data['endDateStr']);
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//prepare rooms
|
||||
//request('rooms'); // //["rooms"]=> array(1) { [0]=> object(stdClass)#7284 (5) { ["name"]=> string(12) "Einzelzimmer" ["price_adult"]=> float(1682.16) ["adult"]=> int(1) ["children"]=> int(0) ["price_children"]=> int(0) }
|
||||
$price_info_rooms = [];
|
||||
$room_names = [];
|
||||
$room_adult = 0;
|
||||
$room_children = 0;
|
||||
$room_price_adult = 0;
|
||||
$room_price_children = 0;
|
||||
|
||||
$data['rooms'] = array_reverse($data['rooms']);
|
||||
|
||||
foreach ($data['rooms'] as $room){
|
||||
|
||||
$room_adult += $room['adult'];
|
||||
$room_children += $room['children'];
|
||||
$room_price_adult += ($room['price_adult_full'] * $room['adult']);
|
||||
$room_price_children += ($room['price_children_full'] * $room['children']);
|
||||
|
||||
if(isset($room_names[$room['name']])){
|
||||
$room_names[$room['name']] = $room_names[$room['name']]+1;
|
||||
}else{
|
||||
$room_names[$room['name']] = 1;
|
||||
}
|
||||
|
||||
$service = trans('_vorlagen.grundpreis_reise');
|
||||
$this->room_name = $room['name'];
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
$price_info_rooms[] = [
|
||||
'booking_id' => $booking_id,
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 30,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => $data['startDateStr'],
|
||||
'end_date' => $data['endDateStr'],
|
||||
'service' => $service,
|
||||
'price_adult' => $room['price_adult_full'],
|
||||
'adult' => $room['adult'],
|
||||
'price_children' => $room['price_children_full'],
|
||||
'children' => $room['children'],
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$this->room_str = "";
|
||||
foreach ($room_names as $name=>$count){
|
||||
$this->room_str .= $count.' x '.$name.', ';
|
||||
}
|
||||
$this->room_str = rtrim($this->room_str, ', ');
|
||||
|
||||
|
||||
//before & after days
|
||||
|
||||
$price_info_rooms_before = [];
|
||||
$price_info_rooms_after = [];
|
||||
|
||||
if(isset($data['booking_before']) && is_array($data['booking_before'])){
|
||||
foreach ($data['booking_before'] as $booking_before){
|
||||
$start_date_before = clone $start_date;
|
||||
if(isset($booking_before['days']) && $booking_before['days'] > 0){
|
||||
$start_date_before->modify('-'.$booking_before['days'].' day');
|
||||
}
|
||||
|
||||
$price_info_rooms_before[] = [
|
||||
'booking_id' => $booking_id,
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 36,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => $booking_before['days'],
|
||||
'start_date' => $start_date_before->format("Y-m-d"),
|
||||
'end_date' => $data['startDateStr'],
|
||||
'service' => $booking_before['name'],
|
||||
'price_adult' => $booking_before['price'],
|
||||
'adult' => $booking_before['adults'],
|
||||
'price_children' => $booking_before['price_children'],
|
||||
'children' => $booking_before['children'],
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($data['booking_after']) && is_array($data['booking_after'])){
|
||||
foreach ($data['booking_after'] as $booking_after){
|
||||
$end_date_after = clone $end_date;
|
||||
if(isset($booking_after['days']) && $booking_after['days'] > 0){
|
||||
$end_date_after->modify('+'.$booking_after['days'].' day');
|
||||
}
|
||||
|
||||
$price_info_rooms_after[] = [
|
||||
'booking_id' => $booking_id,
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 37,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => $booking_after['days'],
|
||||
'start_date' => $data['endDateStr'],
|
||||
'end_date' => $end_date_after->format("Y-m-d"),
|
||||
'service' => $booking_after['name'],
|
||||
'price_adult' => $booking_after['price'],
|
||||
'adult' => $booking_after['adults'],
|
||||
'price_children' => $booking_after['price_children'],
|
||||
'children' => $booking_after['children'],
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//prepare extra_charge
|
||||
$price_info_extra_charge = [];
|
||||
if($data['departure_extra_charge'] > 0){
|
||||
|
||||
$service = trans('_vorlagen.aufpreis_flug');
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
$price_info_extra_charge[] = [
|
||||
'booking_id' => $booking_id,
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 33,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'service' => $service,
|
||||
'price_adult' => $data['departure_extra_charge'] ,
|
||||
'adult' => $data['traveler'] ,
|
||||
'price_children' => 0,
|
||||
'children' => 0,
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//prepare $class_options
|
||||
$price_info_class_options = [];
|
||||
foreach ($data['class_options'] as $class_option){
|
||||
|
||||
$service = trans('_vorlagen.aufpreis_kategorie');
|
||||
$this->className = $class_option['name'];
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
$price_info_class_options[] = [
|
||||
'booking_id' => $booking_id,
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 32,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'service' => $service,
|
||||
'price_adult' => $class_option['price'],
|
||||
'adult' => $class_option['count'],
|
||||
'price_children' => 0,
|
||||
'children' => 0,
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//prepare $travel_options
|
||||
$price_info_travel_options = [];
|
||||
foreach ($data['travel_options'] as $travel_option){
|
||||
|
||||
$service = trans('_vorlagen.aufpreis_option');
|
||||
$this->option = $travel_option['name'];
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
/*
|
||||
* if($travel_option['children'] < 1){
|
||||
$travel_option['price_children'] = 0;
|
||||
}
|
||||
*/
|
||||
$price_info_travel_options[] = [
|
||||
'booking_id' => $booking_id,
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 41,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'service' => $service,
|
||||
'price_adult' => $travel_option['price_adult'],
|
||||
'adult' => $travel_option['adult'],
|
||||
'price_children' => $travel_option['price_children'],
|
||||
'children' => $travel_option['children'],
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
$price_info_travel_discounts = [];
|
||||
|
||||
foreach ($data['discount'] as $travel_discount){
|
||||
|
||||
$service = trans('_vorlagen.aufpreis_option');
|
||||
$this->option = "";
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
if($travel_discount['price'] > 0){
|
||||
$travel_discount['price'] = $travel_discount['price']*-1;
|
||||
}
|
||||
$price_info_travel_options[] = [
|
||||
'booking_id' => $booking_id,
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => null,
|
||||
'draft_type_id' => 42,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => null,
|
||||
'days_duration' => null,
|
||||
'start_date' => null,
|
||||
'end_date' => null,
|
||||
'service' => $service,
|
||||
'price_adult' => $travel_discount['price'],
|
||||
'adult' => $travel_discount['count'],
|
||||
'price_children' => 0,
|
||||
'children' => 0,
|
||||
'pos' => 0,
|
||||
'in_pdf' => true,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
}
|
||||
|
||||
$info_texts = [];
|
||||
$last_post = 0;
|
||||
foreach ($draft->draft_items as $draft_item){
|
||||
|
||||
$service = $draft_item->service;
|
||||
$price_adult = 0;
|
||||
$adult = 0;
|
||||
$price_children = 0;
|
||||
$children = 0;
|
||||
|
||||
switch ($draft_item->draft_type->id){
|
||||
case 24: //rundreise
|
||||
$price_adult = $room_price_adult;
|
||||
$adult = $room_adult;
|
||||
$price_children = $room_price_children;
|
||||
$children = $room_children;
|
||||
break;
|
||||
case 4: //flug
|
||||
// "Hinflug: Rückflug: Flugzeiten ?"
|
||||
break;
|
||||
}
|
||||
|
||||
$start_date_temp = null;
|
||||
if($draft_item->days_start > 0){
|
||||
$start_date_temp = clone $start_date;
|
||||
$start_date_temp->addDay($draft_item->days_start-1);
|
||||
}
|
||||
|
||||
$end_date_temp = null;
|
||||
if($draft_item->days_duration > 0){
|
||||
$end_date_temp = clone $start_date;
|
||||
$end_date_temp->addDay($draft_item->days_duration-1);
|
||||
}
|
||||
|
||||
$service = $this->replaceService($service);
|
||||
|
||||
if($draft_item->draft_type->id == 27){
|
||||
//text -at last
|
||||
$info_texts[] = [
|
||||
'booking_id' => $booking_id,
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => $draft_item->id,
|
||||
'draft_type_id' => $draft_item->draft_type->id,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => $draft_item->days_start,
|
||||
'days_duration' => $draft_item->days_duration,
|
||||
'start_date' => $start_date_temp ? $start_date_temp->format("Y-m-d") : null,
|
||||
'end_date' => $end_date_temp ? $end_date_temp->format("Y-m-d") : null,
|
||||
'service' => $service,
|
||||
'price_adult' => $price_adult,
|
||||
'adult' => $adult,
|
||||
'price_children' => $price_children,
|
||||
'children' => $children,
|
||||
'pos' => $draft_item->pos,
|
||||
'in_pdf' => $draft_item->in_pdf,
|
||||
'comfort' => $data['comfort']
|
||||
];
|
||||
|
||||
|
||||
}else{
|
||||
//create new from draft items
|
||||
BookingDraftItem::create([
|
||||
'booking_id' => $booking_id,
|
||||
'travel_program_id' => $data['travel_program_id'],
|
||||
'fewo_lodging_id' => null,
|
||||
'travel_class_id' => null,
|
||||
'draft_item_id' => $draft_item->id,
|
||||
'draft_type_id' => $draft_item->draft_type->id,
|
||||
'request_date' => $data['request_date'],
|
||||
'days_start' => $draft_item->days_start,
|
||||
'days_duration' => $draft_item->days_duration,
|
||||
'start_date' => $start_date_temp ? $start_date_temp->format("Y-m-d") : null,
|
||||
'end_date' => $end_date_temp ? $end_date_temp->format("Y-m-d") : null,
|
||||
'service' => $service,
|
||||
'price_adult' => $price_adult,
|
||||
'adult' => $adult,
|
||||
'price_children' => $price_children,
|
||||
'children' => $children,
|
||||
'pos' => $draft_item->pos,
|
||||
'in_pdf' => $draft_item->in_pdf,
|
||||
'comfort' => $data['comfort']
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$last_post = $draft_item->pos;
|
||||
|
||||
}
|
||||
|
||||
//set room prices
|
||||
if(count($price_info_rooms)){
|
||||
foreach ($price_info_rooms as $price_info_room){
|
||||
$last_post ++;
|
||||
$price_info_room['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_room);
|
||||
}
|
||||
}
|
||||
|
||||
//set room prices before
|
||||
if(count($price_info_rooms_before)){
|
||||
foreach ($price_info_rooms_before as $price_info_room){
|
||||
$last_post ++;
|
||||
$price_info_room['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_room);
|
||||
}
|
||||
}
|
||||
|
||||
//set room prices after
|
||||
if(count($price_info_rooms_after)){
|
||||
foreach ($price_info_rooms_after as $price_info_room){
|
||||
$last_post ++;
|
||||
$price_info_room['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_room);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//set extra charge price
|
||||
if(count($price_info_extra_charge)){
|
||||
foreach ($price_info_extra_charge as $price_info_extra){
|
||||
$last_post ++;
|
||||
$price_info_extra['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_extra);
|
||||
}
|
||||
}
|
||||
//set class options prices
|
||||
if(count($price_info_class_options)){
|
||||
foreach ($price_info_class_options as $price_info_class_option){
|
||||
$last_post ++;
|
||||
$price_info_class_option['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_class_option);
|
||||
}
|
||||
}
|
||||
|
||||
//set travel options prices
|
||||
if(count($price_info_travel_options)){
|
||||
foreach ($price_info_travel_options as $price_info_travel_option){
|
||||
$last_post ++;
|
||||
$price_info_travel_option['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_travel_option);
|
||||
}
|
||||
}
|
||||
|
||||
//set travel discount prices
|
||||
if(count($price_info_travel_discounts)){
|
||||
foreach ($price_info_travel_discounts as $price_info_travel_discount){
|
||||
$last_post ++;
|
||||
$price_info_travel_option['pos'] = $last_post;
|
||||
BookingDraftItem::create($price_info_travel_option);
|
||||
}
|
||||
}
|
||||
|
||||
//set travel options prices
|
||||
if(count($info_texts)){
|
||||
foreach ($info_texts as $info_text){
|
||||
$last_post ++;
|
||||
$info_text['pos'] = $last_post;
|
||||
BookingDraftItem::create($info_text);
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
|
||||
}
|
||||
|
||||
private function replaceService($service){
|
||||
|
||||
$service = str_replace('#Name#', $this->data['title'], $service);
|
||||
$service = str_replace('#Nummer#', $this->data['number'], $service);
|
||||
$service = str_replace('#Zimmer#', $this->room_str, $service);
|
||||
$service = str_replace('#Raumname#', $this->room_name, $service);
|
||||
$service = str_replace('#Kategorie#', $this->className, $service);
|
||||
$service = str_replace('#Option#', $this->option, $service);
|
||||
$service = str_replace('#Flughafen#', $this->data['departure'], $service);
|
||||
|
||||
return $service;
|
||||
|
||||
}
|
||||
|
||||
private function getDraftByTravelProgramData($travel_program, $data, $weekday){
|
||||
if ($travel_program && count($travel_program->travel_program_drafts)) {
|
||||
|
||||
foreach ($travel_program->travel_program_drafts as $travel_program_draft) {
|
||||
//this need an realation to travel class by booking and price
|
||||
if(in_array($weekday, $travel_program_draft->weekdays)){
|
||||
if($data['comfort'] == false && strpos(strtolower($travel_program_draft->travel_class->name), 'standard') !== false){
|
||||
return $travel_program_draft->draft;
|
||||
}
|
||||
if($data['comfort'] == true && strpos(strtolower($travel_program_draft->travel_class->name), 'komfort') !== false){
|
||||
return $travel_program_draft->draft;
|
||||
}
|
||||
}
|
||||
}
|
||||
//found non get first
|
||||
foreach ($travel_program->travel_program_drafts as $travel_program_draft) {
|
||||
if($travel_program_draft->draft){
|
||||
return $travel_program_draft->draft;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -61,6 +61,7 @@ class HTMLHelper
|
|||
0 => 'Kunde',
|
||||
1 => 'Admin',
|
||||
2 => 'SuperAdmin',
|
||||
3 => 'SysAdmin',
|
||||
];
|
||||
|
||||
|
||||
|
|
@ -103,6 +104,9 @@ class HTMLHelper
|
|||
case 2:
|
||||
return 'badge-primary';
|
||||
break;
|
||||
case 3:
|
||||
return 'badge-success';
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,4 +127,17 @@ class Util
|
|||
$html = $dom->saveHTML();
|
||||
return $html;
|
||||
}
|
||||
|
||||
public static function convertArrayWindowsCharset($values){
|
||||
foreach ($values as $key=>$string){
|
||||
$values[$key] = self::convertStringWindowsCharset($string);
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
public static function convertStringWindowsCharset($value) {
|
||||
|
||||
$charset = mb_detect_encoding($value, "UTF-8, ISO-8859-1, ISO-8859-15", true);
|
||||
return mb_convert_encoding($value, "Windows-1252", $charset);
|
||||
}
|
||||
}
|
||||
11
app/User.php
11
app/User.php
|
|
@ -160,6 +160,17 @@ class User extends Authenticatable
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isSySAdmin()
|
||||
{
|
||||
if($this->admin >= 3){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private function setPermissionsDefault(){
|
||||
$groups = config('permissions.groups');
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ if (! function_exists('get_active_badge')) {
|
|||
if($tooltip){
|
||||
$tooltip = 'data-toggle="tooltip" data-placement="top" data-original-title="'.$tooltip.'"';
|
||||
}
|
||||
return $active ? '<span class="badge badge-pill badge-success" '.$tooltip.'><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger" '.$tooltip.'><i class="far fa-times"></i></span>';
|
||||
return $active ? '<span class="badge badge-pill badge-success" '.$tooltip.'><i class="fa fa-check"></i></span>' : '<span class="badge badge-pill badge-danger" '.$tooltip.'><i class="fa fa-times"></i></span>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,22 +15,22 @@
|
|||
],
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"laravel/framework": "5.8.*",
|
||||
"barryvdh/laravel-dompdf": "*",
|
||||
"barryvdh/laravel-dompdf": "^0.8.5",
|
||||
"cviebrock/eloquent-sluggable": "*",
|
||||
"doctrine/dbal": "*",
|
||||
"fideloper/proxy": "*",
|
||||
"guzzlehttp/guzzle": "*",
|
||||
"intervention/image": "*",
|
||||
"iqcontent/laravel-filemanager": "*",
|
||||
"jenssegers/date": "*",
|
||||
"laracasts/flash": "*",
|
||||
"laravel/framework": "5.8.*",
|
||||
"laravel/passport": "*",
|
||||
"laravel/tinker": "*",
|
||||
"laravelcollective/html": "*",
|
||||
"maatwebsite/excel": "*",
|
||||
"maatwebsite/excel": "^3.1",
|
||||
"reliese/laravel": "*",
|
||||
"yajra/laravel-datatables-oracle": "*",
|
||||
"iqcontent/laravel-filemanager": "*"
|
||||
"yajra/laravel-datatables-oracle": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.2",
|
||||
|
|
|
|||
940
composer.lock
generated
940
composer.lock
generated
File diff suppressed because it is too large
Load diff
202
config/debugbar.php
Normal file
202
config/debugbar.php
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Debugbar Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Debugbar is enabled by default, when debug is set to true in app.php.
|
||||
| You can override the value by setting enable to true or false instead of null.
|
||||
|
|
||||
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
||||
|
|
||||
*/
|
||||
|
||||
'enabled' => env('DEBUGBAR_ENABLED', null),
|
||||
'except' => [
|
||||
'telescope*'
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| DebugBar stores data for session/ajax requests.
|
||||
| You can disable this, so the debugbar stores data in headers/session,
|
||||
| but this can cause problems with large data collectors.
|
||||
| By default, file storage (in the storage folder) is used. Redis and PDO
|
||||
| can also be used. For PDO, run the package migrations first.
|
||||
|
|
||||
*/
|
||||
'storage' => [
|
||||
'enabled' => false,
|
||||
'driver' => 'file', // redis, file, pdo, custom
|
||||
'path' => storage_path('debugbar'), // For file driver
|
||||
'connection' => null, // Leave null for default connection (Redis/PDO)
|
||||
'provider' => '' // Instance of StorageInterface for custom driver
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Vendors
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Vendor files are included by default, but can be set to false.
|
||||
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
|
||||
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
|
||||
| and for js: jquery and and highlight.js
|
||||
| So if you want syntax highlighting, set it to true.
|
||||
| jQuery is set to not conflict with existing jQuery scripts.
|
||||
|
|
||||
*/
|
||||
|
||||
'include_vendors' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Capture Ajax Requests
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
|
||||
| you can use this option to disable sending the data through the headers.
|
||||
|
|
||||
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
|
||||
*/
|
||||
|
||||
'capture_ajax' => true,
|
||||
'add_ajax_timing' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Error Handler for Deprecated warnings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When enabled, the Debugbar shows deprecated warnings for Symfony components
|
||||
| in the Messages tab.
|
||||
|
|
||||
*/
|
||||
'error_handler' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Clockwork integration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
|
||||
| Extension, without the server-side code. It uses Debugbar collectors instead.
|
||||
|
|
||||
*/
|
||||
'clockwork' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DataCollectors
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enable/disable DataCollectors
|
||||
|
|
||||
*/
|
||||
|
||||
'collectors' => [
|
||||
'phpinfo' => true, // Php version
|
||||
'messages' => true, // Messages
|
||||
'time' => true, // Time Datalogger
|
||||
'memory' => true, // Memory usage
|
||||
'exceptions' => true, // Exception displayer
|
||||
'log' => true, // Logs from Monolog (merged in messages if enabled)
|
||||
'db' => true, // Show database (PDO) queries and bindings
|
||||
'views' => true, // Views with their data
|
||||
'route' => true, // Current route information
|
||||
'auth' => false, // Display Laravel authentication status
|
||||
'gate' => true, // Display Laravel Gate checks
|
||||
'session' => true, // Display session data
|
||||
'symfony_request' => true, // Only one can be enabled..
|
||||
'mail' => true, // Catch mail messages
|
||||
'laravel' => false, // Laravel version and environment
|
||||
'events' => false, // All events fired
|
||||
'default_request' => false, // Regular or special Symfony request logger
|
||||
'logs' => false, // Add the latest log messages
|
||||
'files' => false, // Show the included files
|
||||
'config' => false, // Display config settings
|
||||
'cache' => false, // Display cache events
|
||||
'models' => false, // Display models
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Extra options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure some DataCollectors
|
||||
|
|
||||
*/
|
||||
|
||||
'options' => [
|
||||
'auth' => [
|
||||
'show_name' => true, // Also show the users name/email in the debugbar
|
||||
],
|
||||
'db' => [
|
||||
'with_params' => true, // Render SQL with the parameters substituted
|
||||
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
|
||||
'timeline' => false, // Add the queries to the timeline
|
||||
'explain' => [ // Show EXPLAIN output on queries
|
||||
'enabled' => false,
|
||||
'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
|
||||
],
|
||||
'hints' => true, // Show hints for common mistakes
|
||||
],
|
||||
'mail' => [
|
||||
'full_log' => false
|
||||
],
|
||||
'views' => [
|
||||
'data' => false, //Note: Can slow down the application, because the data can be quite large..
|
||||
],
|
||||
'route' => [
|
||||
'label' => true // show complete route on bar
|
||||
],
|
||||
'logs' => [
|
||||
'file' => null
|
||||
],
|
||||
'cache' => [
|
||||
'values' => true // collect cache values
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Inject Debugbar in Response
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Usually, the debugbar is added just before </body>, by listening to the
|
||||
| Response after the App is done. If you disable this, you have to add them
|
||||
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
||||
|
|
||||
*/
|
||||
|
||||
'inject' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DebugBar route prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Sometimes you want to set route prefix to be used by DebugBar to load
|
||||
| its resources from. Usually the need comes from misconfigured web server or
|
||||
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
|
||||
|
|
||||
*/
|
||||
'route_prefix' => '_debugbar',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DebugBar route domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default DebugBar route served from the same domain that request served.
|
||||
| To override default domain, specify it as a non-empty value.
|
||||
*/
|
||||
'route_domain' => null,
|
||||
];
|
||||
|
|
@ -29,6 +29,9 @@ return [
|
|||
'sua-st-tp' => ['name' => 'SUPERADMIN > Einstellungen > Reisprogramme' , 'color' => 'superadmin'],
|
||||
'sua-st-tc' => ['name' => 'SUPERADMIN > Einstellungen > Reiseländer' , 'color' => 'superadmin'],
|
||||
'sua-st-tn' => ['name' => 'SUPERADMIN > Einstellungen > Nationalitäten' , 'color' => 'superadmin'],
|
||||
'sua-re' => ['name' => 'SUPERADMIN > Export' , 'color' => 'superadmin'],
|
||||
'sua-re-bo' => ['name' => 'SUPERADMIN > Export > Buchungen' , 'color' => 'superadmin'],
|
||||
'sua-re-pp' => ['name' => 'SUPERADMIN > Export > Leistungsträger' , 'color' => 'superadmin'],
|
||||
'sua-ur-rt' => ['name' => 'SUPERADMIN > User Rechte' , 'color' => 'danger'],
|
||||
],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ class CreateBookingTable extends Migration
|
|||
$table->date('end_date')->nullable();
|
||||
$table->bigInteger('website_id')->nullable();
|
||||
$table->string('travel_number', 30)->nullable();
|
||||
$table->string('participant_name', 80)->nullable();
|
||||
$table->string('participant_firstname', 80)->nullable();
|
||||
$table->string('participant_name', 255)->nullable();
|
||||
$table->string('participant_firstname', 255)->nullable();
|
||||
$table->date('participant_birthdate')->nullable();
|
||||
$table->bigInteger('participant_salutation_id')->nullable();
|
||||
$table->string('ev_number', 255)->nullable();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class CreateLeadTable extends Migration
|
|||
$table->tinyInteger('is_closed')->nullable()->default(0);
|
||||
$table->bigInteger('initialcontacttype_id')->nullable();
|
||||
$table->bigInteger('searchengine_id')->nullable();
|
||||
$table->string('searchengine_keywords', 80)->nullable();
|
||||
$table->string('searchengine_keywords', 255)->nullable();
|
||||
$table->bigInteger('status_id');
|
||||
$table->date('next_due_date')->nullable();
|
||||
$table->bigInteger('website_id')->nullable();
|
||||
|
|
@ -40,8 +40,8 @@ class CreateLeadTable extends Migration
|
|||
$table->dateTime('updated_at');
|
||||
$table->decimal('price', 10, 2)->nullable();
|
||||
$table->bigInteger('pax')->nullable();
|
||||
$table->string('participant_name', 80)->nullable();
|
||||
$table->string('participant_firstname', 80)->nullable();
|
||||
$table->string('participant_name', 255)->nullable();
|
||||
$table->string('participant_firstname', 255)->nullable();
|
||||
$table->date('participant_birthdate')->nullable();
|
||||
$table->bigInteger('participant_salutation_id')->nullable();
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ class CreateIQContentTreeNodesTable extends Migration
|
|||
$table->string('name', 64)->index();
|
||||
$table->string('identifier', 80)->index();
|
||||
$table->string('slug', 80)->index()->unique();
|
||||
$table->string('description')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->string('title')->nullable();
|
||||
|
||||
|
||||
$table->text('settings')->nullable();
|
||||
$table->unsignedTinyInteger('pos')->default(0);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateTravelBookingTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('mysql_stern')->create('travel_booking', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->bigInteger('crm_booking_id')->nullable();
|
||||
$table->integer('salutation_id')->nullable();
|
||||
$table->string('first_name', 255)->nullable();
|
||||
$table->string('last_name', 255)->nullable();
|
||||
$table->string('street', 255)->nullable();
|
||||
$table->string('zipcode', 255)->nullable();
|
||||
$table->string('city', 255)->nullable();
|
||||
$table->integer('country_id')->nullable();
|
||||
$table->string('fax', 255)->nullable();
|
||||
$table->string('phone', 255)->nullable();
|
||||
$table->string('mobile', 255)->nullable();
|
||||
$table->text('comments')->nullable();
|
||||
$table->string('email', 255)->nullable();
|
||||
$table->dateTime('created')->nullable();
|
||||
$table->date('selected_start_date')->nullable();
|
||||
$table->date('selected_end_date')->nullable();
|
||||
$table->string('program_name', 255)->nullable();
|
||||
$table->text('selected_travel')->nullable();
|
||||
$table->text('selected_departure')->nullable();
|
||||
$table->integer('program_id')->nullable();
|
||||
$table->integer('period_id')->nullable();
|
||||
$table->string('class', 255)->nullable();
|
||||
$table->integer('selected_adults')->nullable();
|
||||
$table->integer('selected_childs')->nullable();
|
||||
$table->integer('participants_total')->nullable();
|
||||
$table->text('participants')->nullable();
|
||||
$table->text('drafts')->nullable();
|
||||
$table->text('service_items')->nullable();
|
||||
$table->text('arrangements')->nullable();
|
||||
$table->text('rooms')->nullable();
|
||||
$table->decimal('price', 10, 2)->nullable();
|
||||
$table->decimal('price_total', 10, 2)->nullable();
|
||||
$table->decimal('deposit_total', 10, 2)->nullable();
|
||||
$table->decimal('final_payment', 10, 2)->nullable();
|
||||
$table->date('final_payment_date')->nullable();
|
||||
$table->string('insurance_name', 255)->nullable();
|
||||
$table->text('insurances')->nullable();
|
||||
$table->integer('travel_cancellation')->nullable();
|
||||
$table->text('options')->nullable();
|
||||
$table->text('class_options')->nullable();;
|
||||
$table->text('extra_category')->nullable();;
|
||||
$table->unsignedTinyInteger('accept_legal_rights')->nullable();
|
||||
$table->string('ip', 255)->nullable();
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('mysql_stern')->dropIfExists('travel_booking');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateCustomerTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('customer', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('salutation_id')->nullable();
|
||||
$table->string('title', 255)->nullable();
|
||||
$table->string('name', 255);
|
||||
$table->string('firstname', 255)->nullable();
|
||||
$table->date('birthdate')->nullable();
|
||||
$table->string('company', 255)->nullable();
|
||||
$table->string('street', 255)->nullable();
|
||||
$table->string('zip', 255)->nullable();
|
||||
$table->string('city', 255)->nullable();
|
||||
$table->string('email', 255)->nullable();
|
||||
$table->string('phone', 255)->nullable();
|
||||
$table->string('phonebusiness', 255)->nullable();
|
||||
$table->string('phonemobile', 255)->nullable();
|
||||
$table->string('fax', 255)->nullable();
|
||||
$table->string('bank', 80)->nullable();
|
||||
$table->string('bank_code', 80)->nullable();
|
||||
$table->string('bank_account_number', 80)->nullable();
|
||||
$table->bigInteger('credit_card_type_id')->nullable();
|
||||
$table->string('credit_card_number', 80)->nullable();
|
||||
$table->date('credit_card_expiration_date')->nullable();
|
||||
$table->text('participants_remarks')->nullable();
|
||||
$table->text('miscellaneous_remarks')->nullable();
|
||||
$table->dateTime('created_at');
|
||||
$table->dateTime('updated_at');
|
||||
$table->bigInteger('country_id')->nullable();
|
||||
|
||||
$table->index('salutation_id', 'salutation_id_idx');
|
||||
$table->index('credit_card_type_id', 'credit_card_type_id_idx');
|
||||
$table->index('country_id', 'country_id_idx');
|
||||
|
||||
$table->foreign('country_id', 'customer_country_id_travel_country_id')->references('id')->on('travel_country')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('credit_card_type_id', 'customer_credit_card_type_id_credit_card_type_id')->references('id')->on('credit_card_type')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('salutation_id', 'customer_salutation_id_salutation_id')->references('id')->on('salutation')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('customer');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateInitialContactTypeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('initial_contact_type', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('initial_contact_type');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateSalutationTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('salutation', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('salutation');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateSearchengineTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('searchengine', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('searchengine');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateTravelCategoryTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('travel_category', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('travel_category');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateInquiryTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('inquiry', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('lead_id')->nullable();
|
||||
$table->bigInteger('template_id')->nullable();
|
||||
$table->tinyInteger('in_pdf')->nullable()->default(0);
|
||||
$table->date('begin')->nullable();
|
||||
$table->date('end')->nullable();
|
||||
$table->bigInteger('type_id')->nullable();
|
||||
$table->string('type_s', 80)->nullable();
|
||||
$table->text('data_s')->nullable();
|
||||
$table->bigInteger('view_position')->nullable();
|
||||
|
||||
$table->index('lead_id', 'inquiry_lead_id_idx');
|
||||
$table->index('template_id', 'inquiry_template_id_idx');
|
||||
$table->index('type_id', 'inquiry_type_id_idx');
|
||||
|
||||
$table->foreign('lead_id', 'inquiry_lead_id_lead_id')->references('id')->on('lead')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('template_id', 'inquiry_template_id_inquiry_template_id')->references('id')->on('inquiry_template')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('type_id', 'inquiry_type_id_inquiry_type_id')->references('id')->on('inquiry_type')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('inquiry');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateLeadParticipantTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('lead_participant', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('lead_id')->nullable();
|
||||
$table->string('participant_name', 255)->nullable();
|
||||
$table->string('participant_firstname', 255)->nullable();
|
||||
$table->date('participant_birthdate')->nullable();
|
||||
$table->bigInteger('participant_salutation_id')->nullable();
|
||||
|
||||
$table->index('lead_id', 'lead_participant_lead_id_idx');
|
||||
$table->index('participant_salutation_id', 'lead_participant_participant_salutation_id_idx');
|
||||
|
||||
$table->foreign('lead_id', 'lead_participant_lead_id_lead_id')->references('id')->on('lead')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('participant_salutation_id', 'lead_participant_participant_salutation_id_salutation_id')->references('id')->on('salutation')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('lead_participant');
|
||||
}
|
||||
}
|
||||
48
database/migrations/2020_01_29_151358_create_offer_table.php
Normal file
48
database/migrations/2020_01_29_151358_create_offer_table.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateOfferTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('offer', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('lead_id');
|
||||
$table->decimal('total', 10, 2)->default(0.00);
|
||||
// $table->UNKNOWN:longblob('binary_data');
|
||||
$table->dateTime('created_at');
|
||||
$table->dateTime('updated_at');
|
||||
|
||||
$table->index('lead_id', 'offer_lead_id_idx');
|
||||
|
||||
$table->foreign('lead_id', 'offer_lead_id_lead_id')->references('id')->on('lead')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('offer');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateStatusHistoryTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('status_history', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('status_id');
|
||||
$table->bigInteger('lead_id');
|
||||
$table->integer('sf_guard_user_id');
|
||||
$table->date('date');
|
||||
$table->text('remarks')->nullable();
|
||||
$table->date('target_date');
|
||||
$table->dateTime('created_at');
|
||||
|
||||
$table->index('sf_guard_user_id', 'sf_guard_user_id_idx');
|
||||
$table->index('status_id', 'status_id_idx');
|
||||
$table->index('lead_id', 'lead_id_idx');
|
||||
|
||||
$table->foreign('lead_id', 'status_history_lead_id_lead_id')->references('id')->on('lead')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('sf_guard_user_id', 'status_history_sf_guard_user_id_sf_guard_user_id')->references('id')->on('sf_guard_user')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('status_id', 'status_history_status_id_status_id')->references('id')->on('status')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('status_history');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateWebsiteTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('website', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('website');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateCouponTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('coupon', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('number', 30)->nullable();
|
||||
$table->bigInteger('customer_id');
|
||||
$table->bigInteger('booking_id');
|
||||
$table->decimal('value', 10, 2)->default(0.00);
|
||||
$table->date('issue_date');
|
||||
$table->date('valid_date');
|
||||
$table->tinyInteger('is_redeemed')->default(0);
|
||||
$table->date('redeem_date')->nullable();
|
||||
$table->dateTime('created_at');
|
||||
$table->dateTime('updated_at');
|
||||
|
||||
$table->index('customer_id', 'customer_id_idx');
|
||||
$table->index('booking_id', 'booking_id_idx');
|
||||
|
||||
$table->foreign('booking_id', 'coupon_booking_id_booking_id')->references('id')->on('booking')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('customer_id', 'coupon_customer_id_customer_id')->references('id')->on('customer')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('coupon');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateCreditCardTypeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('credit_card_type', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('credit_card_type');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateInquiryTemplateTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('inquiry_template', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('title', 130)->nullable();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('inquiry_template');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateInquiryTypeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('inquiry_type', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 80);
|
||||
$table->bigInteger('arrangement_type_id')->nullable();
|
||||
|
||||
$table->index('arrangement_type_id', 'inquiry_type_arrangement_type_id_idx');
|
||||
|
||||
$table->foreign('arrangement_type_id', 'inquiry_type_arrangement_type_id_arrangement_type_id')->references('id')->on('arrangement_type')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('inquiry_type');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateInsuranceCertificateTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('insurance_certificate', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('booking_id');
|
||||
$table->bigInteger('internal_id');
|
||||
$table->string('filename', 255);
|
||||
// $table->UNKNOWN:longblob('binary_data');
|
||||
$table->dateTime('created_at');
|
||||
$table->dateTime('updated_at');
|
||||
$table->text('request_data')->nullable();
|
||||
|
||||
$table->index('booking_id', 'booking_id_idx');
|
||||
|
||||
$table->foreign('booking_id', 'insurance_certificate_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('insurance_certificate');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateParticipantTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('participant', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('booking_id')->nullable();
|
||||
$table->string('participant_name', 255)->nullable();
|
||||
$table->string('participant_firstname', 255)->nullable();
|
||||
$table->date('participant_birthdate')->nullable();
|
||||
$table->bigInteger('participant_salutation_id')->nullable();
|
||||
$table->tinyInteger('participant_child')->nullable()->default(0);
|
||||
|
||||
$table->index('booking_id', 'participant_booking_id_idx');
|
||||
$table->index('participant_salutation_id', 'participant_participant_salutation_id_idx');
|
||||
|
||||
$table->foreign('booking_id', 'participant_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('participant_salutation_id', 'participant_participant_salutation_id_salutation_id')->references('id')->on('salutation')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('participant');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateArrangementTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('arrangement', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('template_id')->nullable();
|
||||
$table->date('state')->nullable();
|
||||
$table->date('begin')->nullable();
|
||||
$table->date('end')->nullable();
|
||||
$table->string('type_s', 255)->nullable();
|
||||
$table->text('data_s')->nullable();
|
||||
$table->bigInteger('view_position')->nullable();
|
||||
$table->bigInteger('booking_id')->nullable();
|
||||
$table->bigInteger('type_id');
|
||||
$table->tinyInteger('in_pdf')->nullable()->default(0);
|
||||
|
||||
$table->index('template_id', 'arrangement_template_id_idx');
|
||||
$table->index('booking_id', 'arrangement_booking_id_idx');
|
||||
|
||||
$table->foreign('booking_id', 'arrangement_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('template_id', 'arrangement_template_id_arrangement_template_id')->references('id')->on('arrangement_template')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('arrangement');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateArrangementTemplateTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('arrangement_template', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('title', 130)->nullable();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('arrangement_template');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateArrangementTypeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('arrangement_type', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 80);
|
||||
$table->bigInteger('notify_rel_days')->nullable()->default(-19);
|
||||
$table->bigInteger('arrangement_type_id')->nullable()->default(4);
|
||||
$table->tinyInteger('is_unique')->nullable()->default(0);
|
||||
$table->bigInteger('notify_rel_field_key')->nullable()->default(1);
|
||||
|
||||
$table->index('arrangement_type_id', 'arrangement_type_arrangement_type_id_idx');
|
||||
|
||||
$table->foreign('arrangement_type_id', 'arrangement_type_arrangement_type_id_arrangement_type_id')->references('id')->on('arrangement_type')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('arrangement_type');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateBookingServiceItemTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('booking_service_item', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('booking_id');
|
||||
$table->bigInteger('travel_company_id');
|
||||
$table->decimal('service_price', 10, 2)->default(0.00);
|
||||
$table->decimal('service_price_refund', 10, 2)->nullable()->default(0.00);
|
||||
$table->decimal('commission', 10, 2)->default(0.00);
|
||||
$table->date('travel_date');
|
||||
$table->dateTime('created_at');
|
||||
$table->dateTime('updated_at');
|
||||
$table->string('name', 255)->nullable();
|
||||
$table->tinyInteger('is_commission_locked')->default(0);
|
||||
|
||||
$table->index('travel_company_id', 'travel_company_id_idx');
|
||||
$table->index('booking_id', 'booking_id_idx');
|
||||
|
||||
$table->foreign('booking_id', 'booking_service_item_booking_id_booking_id')->references('id')->on('booking')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('travel_company_id', 'booking_service_item_travel_company_id_travel_company_id')->references('id')->on('travel_company')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('booking_service_item');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateTravelCompanyTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('travel_company', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
$table->decimal('percentage', 6, 2)->nullable();
|
||||
$table->tinyInteger('is_allowed_edit_commission')->nullable()->default(0);
|
||||
$table->tinyInteger('is_inhouse')->nullable()->default(0);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('travel_company');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateServiceProviderTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('service_provider', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name', 255);
|
||||
$table->unsignedTinyInteger('dollar')->nullable()->default(0);
|
||||
$table->string('type', 255)->nullable();
|
||||
|
||||
$table->index('type', 'service_provider_type_idx');
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('service_provider');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||
*/
|
||||
class CreateServiceProviderEntryTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('service_provider_entry', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('booking_id');
|
||||
$table->bigInteger('service_provider_id');
|
||||
$table->decimal('amount', 10, 2);
|
||||
$table->decimal('amount_eur', 10, 2)->nullable()->default(0.00);
|
||||
$table->decimal('factor', 6, 4)->nullable()->default(1.0000);
|
||||
$table->date('payment_date')->nullable();
|
||||
$table->string('invoice_number', 255)->nullable();
|
||||
$table->tinyInteger('is_cleared')->nullable()->default(0);
|
||||
$table->dateTime('created_at');
|
||||
$table->dateTime('updated_at');
|
||||
$table->string('type', 255)->nullable();
|
||||
|
||||
$table->index('booking_id', 'service_provider_payment_booking_id_idx');
|
||||
$table->index('service_provider_id', 'service_provider_payment_service_provider_id_idx');
|
||||
$table->index('type', 'service_provider_payment_type_idx');
|
||||
|
||||
$table->foreign('booking_id', 'service_provider_payment_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE
|
||||
')->onUpdate('RESTRICT');
|
||||
$table->foreign('service_provider_id', 'service_provider_payment_service_provider_id_service_provider_id')->references('id')->on('service_provider')->onDelete('RESTRICT
|
||||
')->onUpdate('RESTRICT');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('service_provider_entry');
|
||||
}
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
</nav>
|
||||
|
||||
<div id="empty" class="d-none">
|
||||
<i class="far fa-folder-open"></i>
|
||||
<i class="fa fa-folder-open"></i>
|
||||
{{ trans('laravel-filemanager::lfm.message-empty') }}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,16 @@
|
|||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
AddOutputFilterByType DEFLATE text/shtml
|
||||
AddOutputFilterByType DEFLATE text/css
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews -Indexes
|
||||
|
|
|
|||
36
resources/views/_empty.blade.php
Executable file
36
resources/views/_empty.blade.php
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
||||
<p>{{ $text }}</p>
|
||||
</div>
|
||||
|
||||
{{--
|
||||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
||||
<h4>{{__('Delete') }}</h4>
|
||||
<p>{{__('If you no longer want to use our offer, you can delete your account here.')}}</p>
|
||||
<a href="{{route('user_delete_account')}}" class="btn btn-default">{{__('Delete Account')}}</a>
|
||||
</div>
|
||||
--}}
|
||||
|
||||
|
||||
@endsection
|
||||
122
resources/views/admin/report/index.blade.php
Executable file
122
resources/views/admin/report/index.blade.php
Executable file
|
|
@ -0,0 +1,122 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Leistungsträger-Zahlungen
|
||||
<a class="btn btn-default btn-sm float-right" href="{{ make_old_url('backend.php') }}" > zurück ins v1 CRM</a>
|
||||
</h4>
|
||||
<div class="card">
|
||||
{!! Form::open(['url' => route('admin_report_export_providers'), 'class' => '']) !!}
|
||||
|
||||
<div class="ui-bordered px-4 pt-3 mb-0">
|
||||
<div class="form-row align-items-center">
|
||||
<div class="col-12 col-md-4 mb-4">
|
||||
<label class="form-label" for="travel_option_search">Leistungsträger</label>
|
||||
<select class="custom-select" name="filter_service_provider_id" id="filter_service_provider_id">
|
||||
<option value="">Filter aus</option>
|
||||
@foreach($serviceProviders as $serviceProvider)
|
||||
<option value="{{$serviceProvider->id}}">{{$serviceProvider->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 mb-4">
|
||||
<label class="form-label">Reisedatum</label>
|
||||
<div class="row">
|
||||
<div class="input-group col-6 pr-0">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">von</span>
|
||||
</div>
|
||||
<input class="form-control datepicker-base" name="filter_travel_date_from" type="text" value="">
|
||||
</div>
|
||||
|
||||
<div class="input-group col-6 pl-1">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">bis</span>
|
||||
</div>
|
||||
<input class="form-control datepicker-base" name="filter_travel_date_to" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 mb-4">
|
||||
<label class="form-label" for="travel_option_search">Bezahlt</label>
|
||||
<select class="custom-select" name="filter_is_cleared" id="filter_is_cleared">
|
||||
<option value="">Filter aus</option>
|
||||
<option value="1">Ja</option>
|
||||
<option value="0">Nein</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-md-1 mb-4 mt-4">
|
||||
<a href="{{ route('admin_report_providers') }}" class="btn icon-btn btn-sm btn-outline-dark float-right">
|
||||
<span class="fa fa-sync"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-report table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{__('Reiseveranstalter')}}</th>
|
||||
<th>{{__('MyJack Nr.')}}</th>
|
||||
<th>{{__('Reisepreis')}}</th>
|
||||
<th>{{__('Erlös')}}</th>
|
||||
<th>{{__('Kunde')}}</th>
|
||||
<th>{{__('Reisedatum')}}</th>
|
||||
<th>{{__('bezahlt')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<div class="mt-4 col">
|
||||
<button type="submit" name="export" value="export" class="btn btn-primary"><i class="ion"></i> Export </button>
|
||||
<button type="submit" name="export" value="export_lt" class="btn btn-primary"><i class="ion"></i> Export LT </button>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
var table = $('.datatables-report').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"ajax": {
|
||||
"url": '{!! route( 'admin_report_providers_datatable' ) !!}',
|
||||
"data": function(d) {
|
||||
d.filter_service_provider_id = $('select[name=filter_service_provider_id]').val();
|
||||
d.filter_travel_date_from = $('input[name=filter_travel_date_from]').val();
|
||||
d.filter_travel_date_to = $('input[name=filter_travel_date_to]').val();
|
||||
d.filter_is_cleared = $('select[name=filter_is_cleared]').val();
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
{ data: 'id', name: 'id' },
|
||||
{ data: 'service_provider.name', name: 'service_provider.name' },
|
||||
{ data: 'booking.merlin_order_number', name: 'booking.merlin_order_number' },
|
||||
{ data: 'booking.price', name: 'booking.price' },
|
||||
{ data: 'booking.proceeds', name: 'booking.proceeds' },
|
||||
{ data: 'booking.customer.fullName', name: 'booking.customer.fullName' },
|
||||
{ data: 'booking.start_date', name: 'booking.start_date' },
|
||||
{ data: 'is_cleared', name: 'is_cleared' },
|
||||
],
|
||||
"order": [[ 0, "desc" ]],
|
||||
"orderSequence": ["desc", "asc"],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
|
||||
$('#filter_service_provider_id, #filter_is_cleared').on('change', function(){
|
||||
table.order( [ 0, 'desc' ] ).draw();
|
||||
});
|
||||
|
||||
$('.datepicker-base').on('change', function(){
|
||||
table.order( [ 0, 'desc' ] ).draw();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
@php($i = 1)
|
||||
<div class="text-right mb-2">
|
||||
<button type="submit" name="action" value="addItemUp" class="btn btn-sm btn-primary"><i class="far fa-plus"></i> Neue Leistung hinzufügen <i class="far fa-arrow-up"></i></button>
|
||||
<button type="submit" name="action" value="addItemUp" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-up"></i></button>
|
||||
</div>
|
||||
<div id="dragula-drag-handles">
|
||||
@foreach($booking->booking_draft_items as $booking_draft_item)
|
||||
|
|
@ -133,7 +133,7 @@
|
|||
|
||||
<div class="form-group col-4 col-sm-3 col-md-2">
|
||||
<div class="text-right mt-2 float-right">
|
||||
<a class="text-danger" href="{{ route('booking_draft_item_delete', [$booking_draft_item->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a>
|
||||
<a class="text-danger" href="{{ route('booking_draft_item_delete', [$booking_draft_item->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</div>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('draft_item['.$booking_draft_item->id.'][in_pdf]', 1, $booking_draft_item->in_pdf, ['class'=>'custom-control-input']) !!}
|
||||
|
|
@ -170,7 +170,7 @@
|
|||
@endif
|
||||
|
||||
<div class="text-right">
|
||||
<button type="submit" name="action" value="addItemDown" class="btn btn-sm btn-primary"><i class="far fa-plus"></i> Neue Leistung hinzufügen <i class="far fa-arrow-down"></i></button>
|
||||
<button type="submit" name="action" value="addItemDown" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-down"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="text-left mt-3">
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
@php($i = 1)
|
||||
<div class="text-right mb-2">
|
||||
<button type="submit" name="action" value="addItemUp" class="btn btn-sm btn-primary"><i class="far fa-plus"></i> Neue Leistung hinzufügen <i class="far fa-arrow-up"></i></button>
|
||||
<button type="submit" name="action" value="addItemUp" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-up"></i></button>
|
||||
</div>
|
||||
<div class="table-responsive mb-4">
|
||||
<table class="table mb-0" id="table_dragula_tbody" style="min-width: 1080px">
|
||||
|
|
@ -150,7 +150,7 @@
|
|||
<td>
|
||||
<button type="button" name="" value="up_{{$booking_draft_item->id}}" class="btn btn-xs btn-primary py-0 move-up-btn"><i class="fa fa-arrow-up"></i> </button>
|
||||
<button type="button" name="" value="down_{{$booking_draft_item->id}}" class="btn btn-xs btn-primary mr-2 move-down-btn"><i class="fa fa-arrow-down"></i> </button>
|
||||
<a class="text-danger" href="{{ route('booking_draft_item_delete', [$booking_draft_item->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a>
|
||||
<a class="text-danger" href="{{ route('booking_draft_item_delete', [$booking_draft_item->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr @if($booking_draft_item->draft_type) style="background-color: {{ $booking_draft_item->draft_type->color }}" @endif class="border-none">
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
@endif
|
||||
|
||||
<div class="text-right">
|
||||
<button type="submit" name="action" value="addItemDown" class="btn btn-sm btn-primary"><i class="far fa-plus"></i> Neue Leistung hinzufügen <i class="far fa-arrow-down"></i></button>
|
||||
<button type="submit" name="action" value="addItemDown" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-down"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="text-left mt-3">
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Nr.')}}</th>
|
||||
<th>{{__('Datum')}}</th>
|
||||
<th>{{__('Reise')}}</th>
|
||||
<th>{{__('Von')}}</th>
|
||||
<th>{{__('Bis')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
|
@ -30,14 +34,17 @@
|
|||
"columns": [
|
||||
{ data: 'action_edit', orderable: false, searchable: false},
|
||||
{ data: 'id', name: 'id' },
|
||||
{ data: 'booking_date', name: 'booking_date', orderable: false, searchable: false },
|
||||
{ data: 'title', name: 'title' },
|
||||
{ data: 'start_date', name: 'start_date', orderable: false, searchable: false },
|
||||
{ data: 'end_date', name: 'end_date', orderable: false, searchable: false },
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"iDisplayLength": 100,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -46,13 +46,13 @@
|
|||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $value->id }}"
|
||||
data-model="content">
|
||||
<span class="far fa-edit"></span>
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td>{{ $value->getFieldName() }}</td>
|
||||
<td>{{ $value->getPreviewContent() }}</td>
|
||||
<td><a class="text-danger" href="{{ route('cms_content_all_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a></td>
|
||||
<td><a class="text-danger" href="{{ route('cms_content_all_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a></td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@
|
|||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th><i class="far fa-eye"></i> {{__('Seite')}}</th>
|
||||
<th><i class="far fa-eye"></i> {{__('CRM')}}</th>
|
||||
<th><i class="far fa-eye"></i> {{__('Kunden')}}</th>
|
||||
<th><i class="fa fa-eye"></i> {{__('Seite')}}</th>
|
||||
<th><i class="fa fa-eye"></i> {{__('CRM')}}</th>
|
||||
<th><i class="fa fa-eye"></i> {{__('Kunden')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -40,29 +40,29 @@
|
|||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('cms_content_country_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="far fa-edit"></span>
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td><a href="{{ route('cms_content_country_detail', [$value->id]) }}">{{ $value->name }}</a></td>
|
||||
<td data-sort="{{ $value->active_frontend }}">
|
||||
@if($value->active_frontend)
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
|
||||
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $value->active_backend }}">
|
||||
@if($value->active_backend)
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
|
||||
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $value->is_customer_country }}">
|
||||
@if($value->is_customer_country)
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
|
||||
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="col-sm-1 col-2 p-1">
|
||||
<a href="{{route('cms_content_infos_delete', ['special_available', $special_local->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich löschen?');"><i class="far fa-trash-alt"></i></a>
|
||||
<a href="{{route('cms_content_infos_delete', ['special_available', $special_local->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich löschen?');"><i class="fa fa-trash-alt"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="col-sm-1 col-2 p-1">
|
||||
<a href="{{route('cms_content_infos_delete', ['special_available', $special_phone->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich löschen?');"><i class="far fa-trash-alt"></i></a>
|
||||
<a href="{{route('cms_content_infos_delete', ['special_available', $special_phone->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich löschen?');"><i class="fa fa-trash-alt"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
|
@ -233,7 +233,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1 col-2 p-1">
|
||||
<a href="{{route('cms_content_infos_delete', ['holiday', $cms_holiday->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich löschen?');"><i class="far fa-trash-alt"></i></a>
|
||||
<a href="{{route('cms_content_infos_delete', ['holiday', $cms_holiday->id])}}" class="btn btn-danger btn-sm" onclick="return confirm('Wirklich löschen?');"><i class="fa fa-trash-alt"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
|
@ -259,7 +259,7 @@
|
|||
|
||||
<label class="form-label" for="office_important_note">{{ __('Wichtiger Hinweis') }} <span class="text-muted">(wird zusätzlich angezeigt, wenn aktiv)</span></label>
|
||||
{{ Form::text('infos[office-important-note][val]', \App\Models\CMSInfo::getContentBySlug('office-important-note'), array('placeholder'=>__('Weihnachtsferien! Vom 23.12.2019 bis zum 28.12.2019 sind wir nur zu den genannten Zeiten telefonisch zu erreichen.'), 'class'=>'form-control', 'id'=>'office_important_note')) }}
|
||||
{{ Form::hidden('infos[office-important-note][type]', 'text') }}
|
||||
{{ Form::hidden('infos[office-important-note][type]', 'full_text') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('cms_feedback_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="far fa-edit"></span>
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td><a href="{{ route('cms_feedback_detail', [$value->id]) }}">{{ $value->title }}</a></td>
|
||||
|
|
@ -36,14 +36,14 @@
|
|||
|
||||
<td data-sort="{{ $value->status }}">
|
||||
@if($value->status)
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
|
||||
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($value->parent)
|
||||
<a class="text-danger" href="{{ route('cms_feedback_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a>
|
||||
<a class="text-danger" href="{{ route('cms_feedback_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('cms_sidebar_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="far fa-edit"></span>
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
|
|
@ -39,13 +39,13 @@
|
|||
</td>
|
||||
<td data-sort="{{ $value->status }}">
|
||||
@if($value->active)
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
|
||||
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a class="text-danger" href="{{ route('cms_sidebar_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a>
|
||||
<a class="text-danger" href="{{ route('cms_sidebar_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue