<?php # This form allows to enter a date. After submitting, all Bank and Cash Account-balances get # printed seperated by Projects. session_start(); require "accrp.php"; require "security/secure.php"; beginDocument("list Cash and Bank", $sess_user); if ($date) { $ac1 = get_ac_array(1); foreach ($ac1 as $key => $prj_desc) { $accounts = new BankAndCashAccounts_byProject($key, $date, "c"); beginPrettyTable(4, "{$prj_desc}"); printRow(array("Account", "Balance")); while ($row = $accounts->getNext()) { printRow(array($row["AC5_DESC"], $accounts->getActualBalance() . " "), "irgendwas"); } printRow(array("Sum", $accounts->getSum())); endPrettyTable(); } } else { openForm("enter Date", $PHP_SELF); beginPrettyTable("2", "list bank and cash"); makeTextField("date", get_today_hrd_string(), "Date:"); makeSubmitter(); endPrettyTable(); closeForm(); } endDocument();
<?php # Show Profile shows all the Customer Info, Invoices, Payments, Tickets, # and a balance. session_start(); require "accrp.php"; require "security/secure.php"; beginDocument($lCustomerProfile, $sess_user); $db = getDBConnection(); $ac1_array = get_ac_array(1); $ac2_array = get_ac_array(2); $ac3_array = get_ac_array(3); $ac4_array = get_ac_array(4); $result = mysql_query("select * from AC_CODE1 order by AC_ID1", $db); checkMySQLError(); echo "<table border=0>"; while ($row = mysql_fetch_array($result)) { $ac1_desc = $row["AC1_DESC"]; $ac1 = $row["AC_ID1"]; $result2 = mysql_query("select * from AC_CODE2 order by AC_ID2", $db); checkMySQLError(); while ($row2 = mysql_fetch_array($result2)) { $ac2_desc = $row2["AC2_DESC"]; $ac2 = $row2["AC_ID2"]; $result3 = mysql_query("select * from AC_CODE3 order by AC_ID3", $db); checkMySQLError(); while ($row3 = mysql_fetch_array($result3)) { $ac3_desc = $row3["AC3_DESC"]; $ac3 = $row3["AC_ID3"]; $result4 = mysql_query("select * from AC_CODE4 order by AC_ID4", $db); checkMySQLError();
} printRow(array("", "<b>total Receipts<b>", "<b>" . $transactions->getTotalReceipts() . "</b>")); endPrettyTable(); # Payments # generate Transaction-object if ($ac_id1 != 0) { $transactions = new Transactions($ac_id1, $startdate, $enddate); } else { $transactions = new Transactions_byProject("1", $startdate, $enddate); } beginPrettyTable("4", "Payments"); printRow(array("Code Number", "Description", "Amount", "VR-Type")); while ($row = $transactions->getNextPayment()) { printRow($row, "fluct"); } printRow(array("", "<b>total Payments</b>", "<b>" . $transactions->getTotalPayments() . "</b>")); printRow(array("", "<b>closing Balance:</b> ", "<b>" . $transactions->getClosingBalance() . "</b>")); endPrettyTable(); } else { $ac_array = get_ac_array(1); $ac_array[0] = "ALL PROJECTS"; openForm("enter Date", $PHP_SELF); beginPrettyTable("2", "Project Transactions"); makeDropBox("ac_id1", $ac_array, "Project"); makeTextField("startdate", get_today_hrd_string(), "Start Date:"); makeTextField("enddate", get_today_hrd_string(), "End Date:"); makeSubmitter(); endPrettyTable(); closeForm(); } endDocument();
function print_project_transactions_head($prj_no, $startdate, $enddate) { $prj_array = get_ac_array(1); $prj_desc = $prj_array[$prj_no]; echo "<H2>Project Transactions</H2>"; echo "<H3>{$prj_desc}</H3>"; echo "<H3>From {$startdate} To {$enddate}</H3>"; echo "<hr>"; }