Example #1
0
        $invoicesUpdate = new Invoices();
        $invoicesUpdate->setInvoicesid($_GET['id']);
        $invoicesUpdate->setPaid(time());
        $invoicesUpdate->updateDB();
        $logresult = logEvent(26, $logContent);
        $done = 1;
    }
}
if (isset($_GET['go']) && $_GET['go'] == "undopaid") {
    if (isset($_GET['id']) && is_numeric($_GET['id']) && $_GET['id']) {
        $logContent = 'Invoice marked UNPaid for InvoiceID:' . $_GET['id'];
        # Update DB
        $invoicesUpdate = new Invoices();
        $invoicesUpdate->setInvoicesid($_GET['id']);
        $invoicesUpdate->setPaid(0);
        $invoicesUpdate->updateDB();
        $logresult = logEvent(26, $logContent);
        $done = 1;
    }
}
// Define elements for the HTML Header include
$pagetitle = "Home";
$pagescript = array();
$pagestyle = array();
$query = isset($_GET['q']) && $_GET['q'] != '' ? $_GET['q'] : '';
$custid = isset($_GET['custid']) && is_numeric($_GET['custid']) && $_GET['custid'] > 0 ? $_GET['custid'] : '';
include "../tmpl/header.php";
?>

<h1>Invoices</h1>
<span><a href="/invoices/add">Add New Invoice</a></span>