<?php require "settings.php"; cFramework::run("edit"); cFramework::parse(); function edit(&$frm) { /* @var $frm cForm */ $frm->setkey("confirm"); $frm->settitle("Point of Sale Settings"); $frm->add_heading("Point of Sale Slips/Printing"); /* point of sale message at the bottom of the slip */ $posmsg = getCSetting("POSMSG"); $frm->add_textarea("Message to Display at bottom of Slip", "posmsg", $posmsg, "1:255"); return $frm->getfrm_input(); } function confirm(&$frm) { /* @var $frm cForm */ if ($frm->validate("confirm")) { return edit($frm); } $frm->setkey("write"); return $frm->getfrm_input(); } function write($frm) { /* @var $frm cForm */ if ($frm->validate("confirm")) { return edit($frm); }
#The full software license can be found here: #http://www.accounting-123.com/a.php?a=153/GPLv3 # # # # # # # # # # # require "settings.php"; require "core-settings.php"; cFramework::run("select"); cFramework::parse(); function select(&$frm) { $frm->setkey("confirm"); $frm->settitle("Automatic Depreciation"); $frm->add_heading("Options"); $frm->add_date("Date to Depreciate To", "date", DATE_YEAR, DATE_MONTH, DATE_DAY); return $frm->getfrm_input(); } function confirm(&$frm) { if ($frm->validate("confirm")) { return select($frm); } $frm->setkey("write");
<?php require "../settings.php"; cFramework::run("buildlist"); cFramework::parse(); function buildlist(&$frm) { if (!isset($_GET["cusnum"])) { invalid_use(); } $cust = qryCustomer($_GET["cusnum"]); $qry = new dbSelect("plist_prices", "exten", grp(m("where", "listid='{$cust['pricelist']}' AND div='" . USER_DIV . "'"))); $qry->run(); $pli = array(); $pli_noshow = array(); while ($row = $qry->fetch_array()) { if ($row["show"] == "Yes") { $pli[$row["stkid"]] = $row["price"]; } else { $pli_noshow[$row["stkid"]] = $row["price"]; } } $qry = new dbSelect("stock", "cubit", grp(m("where", "div='" . USER_DIV . "'"))); $qry->run(); $plist = ""; while ($row = $qry->fetch_array()) { if (isset($pli_noshow[$row["stkid"]])) { continue; } if (isset($pli[$row["stkid"]])) { $price = $pli[$row["stkid"]];
<?php require "../settings.php"; cFramework::run("view"); cFramework::quickLinks(ql("order_approve.php", "Approve Customer Sales Orders"), ql("../customers-view.php", "View Customers"), ql("../supp-view.php", "View Suppliers"), ql("configuration.php", "Transheks Configuration")); cFramework::parse(); function view(&$frm, $err = "") { $OUT = "\n\t<h3>Unknown Transactioning Requests</h3>\n\t{$err}\n\t<table " . TMPL_tblDflts . ">\n\t<tr>\n\t\t<th colspan='5'>Customers</th>\n\t</tr>\n\t<tr>\n\t\t<th>Name</th>\n\t\t<th>Telephone</th>\n\t\t<th colspan='2'>Options</th>\n\t</tr>"; $qry = new dbSelect("keys", "trh", grp(m("where", "custid='-1'"))); $qry->run(); if ($qry->num_rows() <= 0) { $OUT .= "\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td colspan='4'>No unknown requests.</td>\n\t\t</tr>"; } while ($row = $qry->fetch_array()) { $OUT .= "\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td>{$row['compname']}</td>\n\t\t\t<td>{$row['bustel']}</td>\n\t\t\t<td><a href='" . SELF . "?id={$row['id']}&key=approve'>Approve</a></td>\n\t\t\t<td><a href='" . SELF . "?id={$row['id']}&key=deny'>Deny</a></td>\n\t\t</tr>"; } $OUT .= TBL_BR . "\n\t<tr>\n\t\t<th colspan='5'>Suppliers</th>\n\t</tr>\n\t<tr>\n\t\t<th>Name</th>\n\t\t<th>Telephone</th>\n\t\t<th colspan='2'>Options</th>\n\t</tr>"; $qry = new dbSelect("keys", "trh", grp(m("where", "suppid='-1'"))); $qry->run(); if ($qry->num_rows() <= 0) { $OUT .= "\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td colspan='4'>No unknown requests.</td>\n\t\t</tr>"; } while ($row = $qry->fetch_array()) { $OUT .= "\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td>{$row['compname']}</td>\n\t\t\t<td>{$row['bustel']}</td>\n\t\t\t<td><a href='" . SELF . "?id={$row['id']}&key=approve'>Approve</a></td>\n\t\t\t<td><a href='" . SELF . "?id={$row['id']}&key=deny'>Deny</a></td>\n\t\t</tr>"; } $OUT .= "\n\t</table>"; return $OUT; } function approve(&$frm) {
<?php require "../settings.php"; require "../salwages/emp-functions.php"; cFramework::run("select_emp"); cFramework::parse(); function select_emp(&$frm) { /* @var $frm cForm */ $frm->setkey("entersal"); $frm->settitle("Previous Employee Salary Information"); $emps = qryEmployee(); $emplist = new dbList($emps); $emplist->setFmt("#empnum", "#sname, #fnames"); $frm->add_heading("Employee Details"); $frm->add_select("Employee", "empnum", false, $emplist, "num", "1:10"); return $frm->getfrm_input(); } function entersal(&$frm) { /* @var $frm cForm */ if ($frm->validate("entersal")) { return select_emp($frm); } $frm->setkey("writesal"); extract($_POST); $empi = qryEmployee($empnum); $qry = new dbSelect("salpaid", "cubit", grp(m("cols", "month, week"), m("where", "empnum='{$empnum}' AND cyear='" . EMP_YEAR . "'"), m("order", "month, week"), m("group", "month, week"))); //print $qry->sql; $qry->run(); /* in case we did a correction, we run clean_fields to remove the