Tuesday 2 October 2012

Developer Notes on my Joomla Payroll system.


I have now blogged about the features and have made the code I have written this far in, available at


Problems and issues.

Firstly the component works in conjuction with Community Builder. 

To add shifts you'll need at least this mysql table from CB .



CREATE TABLE IF NOT EXISTS `#__comprofiler` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `firstname` varchar(100) DEFAULT NULL,
  `middlename` varchar(100) DEFAULT NULL,
  `lastname` varchar(100) DEFAULT NULL,
  `hits` int(11) NOT NULL DEFAULT '0',
  `message_last_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `message_number_sent` int(11) NOT NULL DEFAULT '0',
  `avatar` varchar(255) DEFAULT NULL,
  `avatarapproved` tinyint(4) NOT NULL DEFAULT '1',
  `approved` tinyint(4) NOT NULL DEFAULT '1',
  `confirmed` tinyint(4) NOT NULL DEFAULT '1',
  `lastupdatedate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `registeripaddr` varchar(50) NOT NULL DEFAULT '',
  `cbactivation` varchar(50) NOT NULL DEFAULT '',
  `banned` tinyint(4) NOT NULL DEFAULT '0',
  `banneddate` datetime DEFAULT NULL,
  `unbanneddate` datetime DEFAULT NULL,
  `bannedby` int(11) DEFAULT NULL,
  `unbannedby` int(11) DEFAULT NULL,
  `bannedreason` mediumtext,
  `acceptedterms` tinyint(1) NOT NULL DEFAULT '0',
  `cb_employmentlevel` mediumtext,
  `cb_gender` mediumtext,
  `cb_telephone` varchar(255) DEFAULT NULL,
  `cb_mobile` varchar(255) DEFAULT NULL,
  `cb_address` mediumtext,
  `cb_postcode` varchar(255) DEFAULT NULL,
  `cb_mystrengths` mediumtext,
  `cb_traveldistance` varchar(255) DEFAULT NULL,
  `cb_usertype` mediumtext NOT NULL,
  `cb_employmentstatus` mediumtext NOT NULL,
  `cb_nameofemployer` varchar(255) DEFAULT NULL,
  `cb_addressline1` varchar(255) DEFAULT NULL,
  `cb_addressline2` varchar(255) DEFAULT NULL,
  `cb_addressline3` varchar(255) DEFAULT NULL,
  `cb_addressline4` varchar(255) DEFAULT NULL,
  `cb_resume` varchar(255) DEFAULT NULL,
  `cb_bankname` varchar(255) DEFAULT NULL,
  `cb_payeename` varchar(255) DEFAULT NULL,
  `cb_PayType` int(1) NOT NULL,
  `cb_bankaccountnumber` int(11) DEFAULT NULL,
  `cb_sortcode` varchar(255) DEFAULT NULL,
  `cb_riscemployeeno` int(11) DEFAULT NULL,
  `cb_insurancerate` decimal(10,2) DEFAULT NULL,
  `cb_accountancyFees` decimal(10,2) NOT NULL,
  `cb_loan` decimal(10,2) NOT NULL,
  `cb_loanRepaymentWeeks` int(5) NOT NULL,
  `cb_loanWeekAmount` decimal(10,2) NOT NULL,
  `bumber` varchar(50) NOT NULL,
  `cb_accountfeeslstdte` int(12) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`),
  KEY `apprconfbanid` (`approved`,`confirmed`,`banned`,`id`),
  KEY `avatappr_apr_conf_ban_avatar` (`avatarapproved`,`approved`,`confirmed`,`banned`,`avatar`),
  KEY `lastupdatedate` (`lastupdatedate`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ;


If you haven't got Community Builder then a solution for dealing with Employee information will need to be create. 

If you do have CB then I heavily changed CB core file to get that component to do what I wanted it to.

Here's that file to download Comprofiler changes for my Payroll System

###############


Secondly the front end is the backend; if you get my drift !  I made the system to look like the customers previous software solution.  As the system is on a intranet; then I see no issue with this .  However if it we're to be connect to the internet I would think I would have made this component part of 'Administrator' instead.

The component was originally an adaption of 'com_projectfork' - and in that regards is not as clean as it should be.  There's a lot of unnecesary code in this component.  However it works, and a lot of effort has gone into to it to get it to this point !  Feedback and thoughts are welcome.

1 comment:

gads said...

hi sir do you have new update of this payroll component?