JakeWright Posted May 28, 2013 Report Share Posted May 28, 2013 Hi All, I have posted about this a long time ago so i know there is a way to solve it, however i have no longer got access to the email that the solution was sent too. My dilemma was and is; i have some schedules that are 3 legs in total, however share the same callsign, e.g VX260 - SFO - LAS - JFK. Under the current php system, i have to put an alpha letter after the callsign for the second leg i.e VX260A (this is the case when uploading in .csv format and manually adding schedules through the main panel), which granted isn't the biggest problem in the world, however, it's just not realistic for VX ops. As i have stated, i know there is a solution available in the form of some code, as i used it for a significant period of time and it worked wonders! So the question remains does anyone have this code to solve the problem? Cheers, Jake Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 28, 2013 Report Share Posted May 28, 2013 I think this has been covered before, however this is actually the flight number and not the callsign. Quote Link to comment Share on other sites More sharing options...
JakeWright Posted May 29, 2013 Author Report Share Posted May 29, 2013 Yeah, i stated that it had, but haven't come across it, i'm trying to find the guy that provided some code to sort it Quote Link to comment Share on other sites More sharing options...
Sava Posted May 29, 2013 Report Share Posted May 29, 2013 If I understand correctly, you want code that will allow you to have 2 schedules with the same number? You can just remove the code that checks for existing schedules admin/modules/Operations/Operations.php around line 903 # Check if the schedule exists $sched = SchedulesData::getScheduleByFlight($this->post->code, $this->post->flightnum); if(is_object($sched)) { $this->set('message', 'This schedule already exists!'); $this->render('core_error.tpl'); return; } change to # Check if the schedule exists /*$sched = SchedulesData::getScheduleByFlight($this->post->code, $this->post->flightnum); if(is_object($sched)) { $this->set('message', 'This schedule already exists!'); $this->render('core_error.tpl'); return; } */ I haven't tried it but it should work When adding schedules it will not verify any more. Edit: Just noticed that there is actually no verification in place when editing schedules, so if you set it up like 100A, and go to edit it to 100 afterwards, it will allow you. Quote Link to comment Share on other sites More sharing options...
Strider Posted May 29, 2013 Report Share Posted May 29, 2013 I think if you put the schedules into CSV format and import them, it wont check if they are the same, I think it uses the id of the db so you can have a table row in the db with the same ID, but can have one with the same code for the flight number. Quote Link to comment Share on other sites More sharing options...
JakeWright Posted May 29, 2013 Author Report Share Posted May 29, 2013 Sava, Thanks worked a treat Quote Link to comment Share on other sites More sharing options...
Sava Posted May 30, 2013 Report Share Posted May 30, 2013 You are more than welcome. Quote Link to comment Share on other sites More sharing options...
VirtualBMI Posted April 24, 2014 Report Share Posted April 24, 2014 Any chance you can help please it doesn't work for me. Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.