setQuery("SELECT * FROM `trf-details`
LEFT JOIN auth_users ON `trf-details`.iduser=auth_users.id
LEFT JOIN article_type ON `trf-details`.idarticletype=article_type.idarticletype
LEFT JOIN certificationtype ON certificationtype.idcertificationtype=`trf-details`.idcertification
WHERE `trf-details`.idcompany='$idcompany'
AND `trf-details`.signedon <> ''
ORDER BY `trf-details`.trfnumber, `trf-details`.revtrf DESC");
$archivetrflist->execute();
?>
setQuery("SELECT * FROM `trf-details`
LEFT JOIN article_type ON `trf-details`.idarticletype=article_type.idarticletype
LEFT JOIN certificationtype ON certificationtype.idcertificationtype=`trf-details`.idcertification
WHERE `trf-details`.idcompany='$idcompany'
AND `trf-details`.signedon =''
ORDER BY `trf-details`.trfnumber");
$drafttrf->execute();
?>
moveNext();
}
$drafttrf->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
TRF N.
REV
Signed On
Description
Cert Type
Article type
Insert by
PDF1
PDF2
ZIP
ACTION
atEnd()) {
// without signed for rev
$idtrf_nosign = $archivetrflist->getColumnVal("idtrfdetails");
$trfnosign = $archivetrflist->getColumnVal("trfnumber");
$archivetrflistnosign = new WA_MySQLi_RS("archivetrflistnosign", $cmctrfdb, 0);
$archivetrflistnosign->setQuery("SELECT MAX(revtrf) as max_revtrf FROM `trf-details` WHERE `trf-details`.trfnumber='$trfnosign'");
$archivetrflistnosign->execute();
$maxrevtrf = $archivetrflistnosign->getColumnVal("max_revtrf");
$currentrevtrf = $archivetrflist->getColumnVal("revtrf");
$current_trfnumber = $archivetrflist->getColumnVal("trfnumber");
$current_revtrf = $archivetrflist->getColumnVal("revtrf");
// Check if this is a new TRF number
if ($last_trfnumber !== $current_trfnumber) {
$last_trfnumber = $current_trfnumber;
$last_revtrf = $current_revtrf;
}
$wa_startindex = $archivetrflist->Index;
$idcertfortd = $archivetrflist->getColumnVal("idcertification")
?>