Hi Marty,
Each of your documents has an Include statement at top of file.
For instance
<?PHP include('Reports/report_queries/Expired_Insurance_Qry.php'); ?>
The queries reside on your server under k9bytes/Reports/report_queries
Here is a section of the .php query:
$search .= " FROM AIC_Standard_Loan l\n";
$search .= " LEFT JOIN AIC_Investors i ON l.i_Inv_Num = i.i_Inv_Num\n";
$search .= " WHERE\n"; # Deal is not paid yet blank
if($Exp_Term > 0) {
### Do these if and expterm has been passed
$search .= " ((l.l_Date_Paid = '') AND (l.INS_Prop_Expiration_Date >= " . $Today_Epoch . ") AND (l.INS_Prop_Expiration_Date < " . $Comp_Epoch . ") AND (l.INS_Prop_Expiration_Date != ''))\n"; #First and second prop not expired
$search .= " OR ((l.l_Date_Paid = '') AND (l.INS_2nd_Prop_Expiration_Date >= " . $Today_Epoch . ") AND (l.INS_2nd_Prop_Expiration_Date < " . $Comp_Epoch . ") AND (l.INS_2nd_Prop_Expiration_Date != ''))\n"; # But either will expire before ext date
$Report_Title = "Insurance Will Lapse On These Loans on (" . $disp_cepoch . ")";
}
else {
$search .= " ((l.l_Date_Paid = '') AND ( l.INS_Prop_Expiration_Date < " . $Today_Epoch . ") AND (l.INS_Prop_Expiration_Date != ''))\n"; # No expterm has been sent or they expired
$search .= " OR ((l.l_Date_Paid = '') AND ( l.INS_2nd_Prop_Expiration_Date < " . $Today_Epoch . ") AND (l.INS_2nd_Prop_Expiration_Date != ''))\n"; # No expterm has been sent or they expired
$Report_Title = "Insurance Has Lapsed On These Loans";