Re: Payroll extension for practice
@notrinos: good work.Attached the same zip file without the MAC OS temp files. Updated file attached in a later post.
It's much more fun, when you can discuss your problems with others...
You are not logged in. Please login or register.
FrontAccounting forum → Modules Add-on's → Payroll extension for practice
@notrinos: good work.Attached the same zip file without the MAC OS temp files. Updated file attached in a later post.
@apmuthu: thanks for your corrections.
maybe someday I'll create another payroll module for more features and hope to receive more advices from you.
I have found an issue with DateTime class when generating payslip and fixed it here.
Change these lines in the payslip_ui.inc from
$emp_id = $_POST['person_id'];
$from_date = $_POST['from_date'];
$to_date = $_POST['to_date'];
to
$emp_id = $_POST['person_id'];
$from_date = $_POST['from_date'];
$from_date = DateTime::createFromFormat("m-d-Y H:i:s", $from_date);
$to_date = $_POST['to_date'];
$to_date = DateTime::createFromFormat("m-d-Y H:i:s", $to_date);
@notrinos: Thanks. Fork my GitHub repo and include your extension and update it there and send in a pull request.
Replaced the said lines with:
$emp_id = $_POST['person_id'];
$from_date = DateTime::createFromFormat("m-d-Y H:i:s", $_POST['from_date']);
$to_date = DateTime::createFromFormat("m-d-Y H:i:s", $_POST['to_date']);
Updated your extension and removed whitespaces and attached herein.
I installed this extension. It is giving following errors on all pages
Undefined property: sys_prefs::$use_popup_windows in file: D:\xampp\htdocs\boxygen\modules\Payroll\emp_payslip.php at line 24
Call to undefined function user_use_date_picker() in D:\xampp\htdocs\boxygen\modules\Payroll\emp_payslip.php on line 26
did you installed on 2.3 @boxygen ? It works with 2.4 only.
Oh yes I installed with 2.3.25.
I think 2.4 doesn't have stable release till now. Shouldn't you have it for 2.3.25 as well?
Regards
By the way while installing with 2.4RC1 I am receiving following error.
Package 'Payroll' is incompatible with current application version and cannot be activated. Check Install/Activate page for newer package version.
With 2.3.25 it installed successfully but had problem in accessing pages.
By the way while installing with 2.4RC1 I am receiving following error.
Package 'Payroll' is incompatible with current application version and cannot be activated. Check Install/Activate page for newer package version.
With 2.3.25 it installed successfully but had problem in accessing pages.
This solved on post #4
The file includes/packages.inc defines the function check_src_ext_version() and returns tru only if the package version >= application version. Here the latter is the FA version defined in line 9 of version.php as $src_version = "2.4.RC1"; and the former is the Payroll Module version. As your module is not packaged, there is no version number displayed in it's entry in installed_extensions.php file both in the webroot and in the company/#/ folder where you can manually make an entry for the version.
@joe: If no version is present like this for manually installed custom modules, the line 215 in admin/inst_modules.php:
if (check_value('Active'.$i) && !check_src_ext_version($ext['version']))
can be modified to check the latter condition only if the $ext['version'] is not empty.
Added time attendance feature and mod payslip calculation based on timesheet DOWNLOAD
Thats great I will test it and will respond.
Fixed issue of attendance sheet display. Replace line 61 of inquiry/attendance_sheet.php with:
$cols["<div style='background:#FFCCCC'>".$day->format('d')."</div><p hidden>".$day->format('m')."</p>"] = array('align'=>'center');
Check if the attachment is okay and matches your current repo state.
an error is shown as " modules/payroll/employee.php was not found on this server"
all is uploaded, and already in the server.
your guidance is appreciated...
Ajmal, try to rename folder to payroll instead of Payroll
Good work
Hello all esteem members.
Following the steps on this topic, I have been a able to write and install a module. But when I add update.sql file, I got this errors while re-installing the module again:
(SQL script execution failed in line 2: Erreur de syntaxe près de ') ENGINE=InnoDB' à la ligne 19)
(Status change for some extensions failed.)
I was able to re-install when I commented out as follow:
function activate_extension($company, $check_only=true) {
global $db_connections;
// $updates = array( 'update.sql' => array('sharehold'));
return $this->update_databases($company, $updates, $check_only);
}
-------------------------------------update.sql---------------------
DROP TABLE IF EXISTS `0_shareholder`;
CREATE TABLE IF NOT EXISTS `0_shareholder` (
`shd_id` int(11) NOT NULL AUTO_INCREMENT,
`shd_first_name` varchar(100) DEFAULT NULL,
`shd_last_name` varchar(100) DEFAULT NULL,
`gender` tinyint(1) NOT NULL DEFAULT '0',
`shd_address` tinytext,
`shd_mobile` varchar(30) DEFAULT NULL,
`shd_email` varchar(100) DEFAULT NULL,
`shd_birthdate` date NOT NULL,
`national_id` varchar(100) DEFAULT NULL,
`passport` varchar(100) DEFAULT NULL,
`bank_account` varchar(100) DEFAULT NULL,
`tax_number` varchar(100) DEFAULT NULL,
`shd_notes` tinytext NOT NULL,
`shd_hiredate` date DEFAULT NULL,
`shd_releasedate` date DEFAULT NULL,
`inactive` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`shd_id`),
) ENGINE=InnoDB;
-----------------------------------------------------------------------
Please help
The error message pointed out how to solve your problem
SQL script execution failed in line 2: Erreur de syntaxe près de ') ENGINE=InnoDB' à la ligne 19
Please remove the last comma in the SQL script
Problem solved. Thank you
FrontAccounting forum → Modules Add-on's → Payroll extension for practice
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 4 official extensions. Copyright © 2003–2009 PunBB.