} $histQ->close(); #************************************************************************** #* Calc late fee if any #************************************************************************** if ($saveDaysLate > 0 and $dailyLateFee > 0) { $fee = $dailyLateFee * $saveDaysLate; $trans = new MemberAccountTransaction(); $trans->setMbrid($saveMbrid); $trans->setCreateUserid($_SESSION["userid"]); $trans->setTransactionTypeCd("+c"); $trans->setAmount($fee); $trans->setDescription($loc->getText("shelvingCartTrans", array("barcode" => $barcode))); $transQ = new MemberAccountQuery(); $transQ->connect(); if ($transQ->errorOccurred()) { $transQ->close(); displayErrorPage($transQ); } $trans = $transQ->insert($trans); if ($transQ->errorOccurred()) { $transQ->close(); displayErrorPage($transQ); } // Set fee message if (OBIB_LOCALE == 'th') { $balText = number_format($fee, 2) . ' บาท'; } else { $balText = moneyFormat($fee, 2); } $_SESSION['feeMsg'] = "<font class=\"error\">" . $loc->getText("mbrViewBalMsg2", array("fee" => $balText)) . " <a href=\"../circ/mbr_account.php?mbrid=" . $saveMbrid . "&reset=Y\">" . $loc->getText('mbrAccountLink') . "</a></font><br><br>";
$materialImageFiles = $dmQ->getAssoc("material_type_dm", "image_file"); $memberFieldsDm = $dmQ->getAssoc("member_fields_dm"); $dmQ->close(); #**************************************************************************** #* Search database for member #**************************************************************************** $mbrQ = new MemberQuery(); $mbrQ->connect(); $mbr = $mbrQ->get($mbrid); $mbrQ->close(); #**************************************************************************** #* Check for outstanding balance due #**************************************************************************** $acctQ = new MemberAccountQuery(); $acctQ->connect(); if ($acctQ->errorOccurred()) { $acctQ->close(); displayErrorPage($acctQ); } $balance = $acctQ->getBalance($mbrid); if ($acctQ->errorOccurred()) { $acctQ->close(); displayErrorPage($acctQ); } $acctQ->close(); #************************************************************************** #* Show member information #************************************************************************** require_once "../shared/header.php"; $balMsg = ""; if ($balance > 0 && $balance >= $mbrMaxFines[$mbr->getClassification()]) {