Exemplo n.º 1
0
        $sPageTitle = gettext("Payment Editor - Modify Existing Payment");
    } else {
        $sPageTitle = gettext("Payment Editor - New Deposit Slip Will Be Created");
    }
}
if ($dep_Closed && $iPledgeID && $PledgeOrPayment == 'Payment') {
    $sPageTitle .= " &nbsp; <font color=red>Deposit closed</font>";
}
// Security: User must have Finance permission to use this form.
// Clean error handling: (such as somebody typing an incorrect URL ?PersonID= manually)
if (!$_SESSION['bFinance']) {
    Redirect("Menu.php");
    exit;
}
// Instantiate the MICR class
$micrObj = new MICRReader();
//Is this the second pass?
if (isset($_POST["PledgeSubmit"]) || isset($_POST["PledgeSubmitAndAdd"]) || isset($_POST["MatchFamily"]) || isset($_POST["MatchEnvelope"]) || isset($_POST["SetDefaultCheck"])) {
    $iFamily = 0;
    $iCheckNo = 0;
    // Take care of match-family first- select the family based on the scanned check
    if (isset($_POST["MatchFamily"])) {
        $tScanString = FilterInput($_POST["ScanInput"]);
        $routeAndAccount = $micrObj->FindRouteAndAccount($tScanString);
        // use routing and account number for matching
        if ($routeAndAccount) {
            $sSQL = "SELECT fam_ID FROM family_fam WHERE fam_scanCheck REGEXP \"" . $routeAndAccount . "\"";
            $rsFam = RunQuery($sSQL);
            extract(mysql_fetch_array($rsFam));
            $iFamily = $fam_ID;
            $iCheckNo = $micrObj->FindCheckNo($tScanString);
Exemplo n.º 2
0
 $sSQL = "UPDATE IGNORE config_cfg SET cfg_category=NULL WHERE cfg_id IN (61,62,63,64,65)";
 RunQuery($sSQL, FALSE);
 // False means do not stop on error
 $sSQL = "UPDATE IGNORE menuconfig_mcf SET name='root' WHERE name='ROOT'";
 RunQuery($sSQL, FALSE);
 // False means do not stop on error
 $sSQL = "UPDATE IGNORE config_cfg SET cfg_value='Include/fpdf17' WHERE cfg_name='sFPDF_PATH'";
 RunQuery($sSQL, FALSE);
 // False means do not stop on error
 // Update the format of the scanned check stored in the family record.
 // The original implementation stored the whole string, including the check number.
 // The new version strips out the check number to facilitate matching.  The original
 // version worked most of the time, but not in the rare cases when the check number
 // was in the middle.
 require "Include/MICRFunctions.php";
 $micrObj = new MICRReader();
 $sSQL = "SELECT fam_ID, fam_scanCheck from family_fam";
 $rsFamilies = RunQuery($sSQL);
 while ($aRow = mysql_fetch_array($rsFamilies)) {
     $scanFormat = $micrObj->IdentifyFormat($aRow['fam_scanCheck']);
     if ($aRow['fam_scanCheck'] != '' && $scanFormat != $micrObj->NOT_RECOGNIZED) {
         $newScanCheck = $micrObj->FindRouteAndAccount($aRow['fam_scanCheck']);
         $sSQL = "UPDATE family_fam SET fam_scanCheck='{$newScanCheck}' WHERE fam_ID=" . $aRow['fam_ID'];
         if (!RunQuery($sSQL, FALSE)) {
             break 2;
         }
         // break while and for
     }
 }
 // add time zone config parameter, now mandatory for time functions in php
 $sSQL = "INSERT IGNORE INTO `config_cfg` VALUES (65, 'sTimeZone', 'America/New_York', 'text', 'America/New_York', 'Time zone- see http://php.net/manual/en/timezones.php for valid choices.', 'General', NULL)";