<tr> <td align="right" valign="top">PAYEE : </td> <td> <input type="text" name="payee" id="payee"> </td> </tr> <tr> <td align="right" valign="top">CHECK # : </td> <td> <input type="text" name="checknum" id="checknum"> </td> </tr> <tr> <td align="right" valign="top">ACCOUNT </td> <td align="left" valign="top">AMOUNT</td> </tr> <tr id="account_amount" > <td align="right" valign="top"> ' . set::accounTitle($pdo_sql, $default = '<option value="">Account title</option>', $inputName = "account[]", $id = "debitAccount") . ' : </td> <td align="left" valign="top"> <input type="text" name="amount[]" id="amount" value="0.00"> </td> </tr> <tr> <td align="right"> </td> <td align="center"> <span id="add_acc_amo" style="cursor: pointer;"> add </span> </td> </tr> <tr> <td align="right" valign="top">TOTAL : </td> <td align="left" valign="top"><input type="text" name="totalAmount" id="totalAmount"></td> </tr>
$branch = $listVal['branch']; $cvNum = $listVal['cvNum']; $isDate = $listVal['isDate']; $isMonth = $listVal['isMonth']; $isDay = $listVal['isDay']; $isYear = $listVal['isYear']; $payee = $listVal['payee']; $checknum = $listVal['checknum']; $account = $listVal['account']; $dAcount = explode("_", $account); $account = ''; // disbursement account and amount item is concatinated by "_" unconcatinate them // get the and unconcatinate the accont title per disbursement item foreach ($dAcount as $accKey => $accountVal) { if (!empty($accountVal) && $accountVal != "") { $account[$accKey] = '<td align="right" valign="top">' . set::accounTitle($pdo_sql, $default = '<option value="">Account title</option>', $inputName = "account[]", $id = "debitAccount") . ' : </td>'; } } // get the and unconcatinate the account of each disbursement item $amount = $listVal['amount']; $dAmont = explode("_", $amount); $amount = ''; foreach ($dAmont as $amKey => $amountVal) { if (!empty($amountVal) && $amountVal != "") { $amount[$amKey] = '<td align="left" valign="top"><input type="textbox" name="amount[]" id="amount" value="' . $amountVal . '"></td>'; } } // format the list of account and amount item of the disbursement in fomatted HTMl $acc_amo = count($dAcount) - 1; $acc_amoVal = ''; for ($i = 0; $i < $acc_amo; $i++) {
<?php /* * file: root/05_disbusrement/JavaScripts/modRecord.php * purpose: js for validating data to be edited and for the on the spot data editing possible * last modified: November 17, 2012 * */ //________________________________________________________________________________________________ ob_start(); // include the system configurations here include '../../sysConfig.php'; // include the system interface module here include '../../systemInt.php'; $acc_amo = '<tr id="account_amount"><td align="right" valign="top"> ' . set::accounTitle($pdo_sql, $default = '<option value="">Account title</option>', $inputName = "account[]", $id = "debitAccount") . ' : </td><td align="left" valign="top"><input type="text" name="amount[]" id="amount" value="0.00"></td></tr>'; echo ' var $j = jQuery.noConflict(); $j(document).ready(function(){ $j("#add_acc_amo").live("click",function(){ $j("#account_amount").before(\'' . $acc_amo . '\').removeAttr("id"); $j("#account_amount input#lessName").focus(); }); $j("form#disburtment input, select").live("focusout", function(){ /* reg exp variable for floating point data typed input tags */ var intRegex = /^\\d+(?:\\.\\d{0,5})?$/; var inputVals = $j(this).val(); var inputIDs = $j(this).attr("id");