Billing module and adding fees in bulk

Hi Ross,

I started with my study of the billing module this morning. So far it is working perfectly and the design is straight forward.

I’m stuck with the following problem: The school bus may collect students from various locations. Depending on their location, the bus fee varies. I want to assign the appropriate bus fee in bulk, which is kind of tricky, because there are only 2 student sorting orders available, which are “All Enrolled Students by Form Group” and “All Enrolled Students by Alphabet”.

How can I add another sorting order depending maybe on a particular customized field called “bus”, where I set the bus collection point? Or is there maybe another way to go about it?

Kind regards,
Roman

Roman,

At the moment this will, I am afraid have to be done manually, which I can imagine is far from ideal. One option is to try and use a CSV export from the system (using Query Builder) of bus routes, and then to try and use this to create some SQL to run to add the relevant fees to the relevant students. Hope this helps.

As I mentioned in a previous post, we are flat out getting v12 ready, and then looking forward to object oriented for v13, so hard for us to take on such requests right now.

Thanks,

Ross

Hi Ross,

Thanks for your suggestion! Sounds rather complicated, though.

You may not like the following idea for obvious reasons, but couldn’t I do a little hacking and add a third sorting order, which is customized to our needs only?

Kind regards,
Roman

Roman,

Yes, if you want to, and then you can commit it back to us via GitHub, so that you don’t lose it on the next upgrade. Sounds like a perfect solution.

Thanks,

Ross

Hi Ross,

Ok, let me have a closer look at the code and see if a can manage to hack it. I’ll later get back to you with my findings.

Kind regards,
Roman

Hi Ross,

I find it rather difficult to extract data from customized fields. In my case the content of the attribute looks like this:

a:2:{s:3:“001”;s:8:“Atabadze”;s:3:“002”;s:21:“Roman Catholic Church”;}

I need to get the term “Atabadze” to build a third new sorting order as we discussed above, so I can build a select list, which may look like this:

–All Enrolled Students by Form Group
07.1 – Bonjour, Pete
–All Enrolled Students by Alphabet
Bonjour, Pete – 07.1
–All Enrolled Students by Bus Collection Point
Atabadze – Bonjour, Pete – 07.1

Do you have a function available to do so? Any ideas or suggestions?

Kind regards,
Roman

Roman,

The format you see is a serialized array. In PHP unserialize() will turn this back from text to an array.

Ross

Ross, many thanks for the hint…Roman