Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.

  • 10 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...