Nathan,
I think that I found the source of our problems with perp_human_resources>>staff and perp_payroll.
Making comparisions between today SVN pERP and a pERP version that was working in 10.27.2008 I understood that the file perp_payroll>>inc>>class.Paystub.inc.php was causing the blank screen.
So I’ve replaced the function (in the line 108) :
public function __construct($staff_id, $pay_period_id = null, $currency = null, $exchange_rate = null) {
// Initialize data access objects
parent::so_sql(‘perp_payroll’,‘perp_pay_stub’);
$this->staff_id = (int)$staff_id;
if($currency == null) {
$config = config::('perp_ledger');
$currency = $config['gl_currency'];
}
$this->currency = $currency;
if($exchange_rate == null) {
$bo_api = new bo_perp_api();
$bo_api->get_currencies(array('currency_id' => $this->currency, 'template'=>false), $currency);
$currency = $currency[0];
}
$this->exchange_rate = $currency['exchange_rate'];
if(is_numeric($this->staff_id) && !is_null($pay_period_id)) {
$this->pay_period_id = (int)$pay_period_id;
$this->pay_period = new Payperiod($this->pay_period_id);
// Try for an existing pay period
if(!$this->read()) {
$this->build();
}
}
}</b>
of today SVN pERP, by the function:
public function __construct($staff_id, $pay_period_id = null, $currency = null, $exchange_rate = null) {
// Initialize data access objects
parent::so_sql(‘perp_payroll’,‘perp_pay_stub’);
$this->staff_id = (int)$staff_id;
if($currency == null) {
$config = CreateObject('phpgwapi.config', 'perp_ledger');
$config->read_repository();
$currency = $config->config_data['gl_currency'];
}
$this->currency = $currency;
if($exchange_rate == null) {
$bo_api = new bo_perp_api();
$bo_api->get_currencies(array('currency_id' => $this->currency, 'template'=>false), $currency);
$currency = $currency[0];
}
$this->exchange_rate = $currency['exchange_rate'];
if(is_numeric($this->staff_id) && !is_null($pay_period_id)) {
$this->pay_period_id = (int)$pay_period_id;
$this->pay_period = new Payperiod($this->pay_period_id);
// Try for an existing pay period
if(!$this->read()) {
$this->build();
}
}
}</b>
of the 10.27.2008 pERP SVN.
Now the perp_human_resources>>staff and perp_payroll are working.
I believe that function __construct is the source of the our problem.
What do you think?
thanks for your attention,
Regards.