コード例 #1
0
#
#
#
#
#
#
#
#
#
require "settings.php";
$pure = isset($_GET["xls"]);
# show asset ledger
if (isset($_GET["type"]) && $_GET["type"] == "p") {
    $OUTPUT = prevAssetLedg($pure);
} else {
    $OUTPUT = AssetLedg($pure);
}
if (isset($_GET["xls"])) {
    require_lib("xls");
    $OUTPUT = clean_html($OUTPUT);
    StreamXLS("Assets", $OUTPUT);
}
require "template.php";
# show stock
function AssetLedg($pure = false)
{
    extract($_REQUEST);
    $fields = array();
    $fields["group_id"] = 0;
    $fields["type_id"] = 0;
    extract($fields, EXTR_SKIP);
コード例 #2
0
#The full software license can be found here:
#http://www.accounting-123.com/a.php?a=153/GPLv3
#
#
#
#
#
#
#
#
#
#
#
require "../settings.php";
# show asset ledger
$OUTPUT = AssetLedg();
require "../template.php";
# show stock
function AssetLedg()
{
    # Set up table to display in
    $Assets = "\r\n\t<h3>Asset Ledger</h3>\r\n\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\r\n\t<tr><th>Group</th><th>Serial</th><th>Location</th><th>Description</th><th>Date Bought</th><th>Date Added</th><th>Cost Amount</th><th>Net Value</th></tr>";
    db_connect();
    $i = 0;
    $tot = 0;
    $totnet = 0;
    $Sl = "SELECT * FROM assets WHERE div = '" . USER_DIV . "' ORDER BY serial";
    $Rs = db_exec($Sl) or errDie("Unable to retrieve Asset Ledger from database.");
    if (pg_numrows($Rs) < 1) {
        return "<li>There are no Assets recorded on Cubit.";
    }