Thursday, 19 July 2012

Adding PAYE and NON-PAYE ordering and message to the Bacs report.

This is working in the Joomla Payroll System component I am developing.   I have already added a tick box to the employee area and now I need to add conditions to the BACS report so firstly the ordering is done by the Pay Type.  and then secondly I need to pick up when the change over happens in the table that is out putted.

The details actually pass in and out of two tables when calculated.

OPEN components/com_projectfork/models/bacs.php

in the Query on line 50 that gets the details from the shifts - get the info from the column #__comprofiler.cb_PayType that had been added.

on line 88 that information is picked up again with


and passed into the #__time_diff  row.  Which I've again set up the respective column.

line 107  - information retrieved from #__time_diff . This time as well as filling the array with  the #__time_diff.PayType column; we also use the column to ORDER BY .  So that all the nonPAYE comes first and PAYE second.

ORDER BY #__time_diff.PayType

on line 151 we add the details to yet another table in

, '$datares->PayType'

It's from this table that's called up in the page

OPEN components/com_projectfork/views/bacs/tmpl/default.php

on line 82 the following code deals with whether or not to tell the frontend that the PAYE & NON PAYE columns have started.

$PAYEorNOT = $ids->PayType;

if ($lastPAYE != $PAYEorNOT ){

echo ' ';

if($PAYEorNOT == '0'){

echo 'NON PAYE';

elseif($PAYEorNOT == 1 )

echo 'PAYE';


echo '';

$lastPAYE = $PAYEorNOT;



#__ alterations_bacs_amount.PayType

No comments: