Пример #1
0
 function prepFields()
 {
     $settings = $this->settings;
     $theform = new phpbmsForm();
     for ($i = 1; $i < 9; $i++) {
         $theinput = new inputField("custom" . $i . "name", $settings["custom" . $i]["name"], "name");
         $theform->addField($theinput);
         $theinput = new inputRolesList($this->db, "custom" . $i . "roleid", $settings["custom" . $i]["roleid"], "access (role)");
         $theform->addField($theinput);
         $theinput = new inputField("custom" . $i . "displayorder", $settings["custom" . $i]["displayorder"], "display order", true, NULL, 10, 10);
         $theform->addField($theinput);
         switch ($i) {
             case 1:
             case 2:
                 $req = true;
                 $formatArray = array("integer" => "integer", "real" => "real", "currency" => "currency");
                 break;
             case 3:
             case 4:
                 $req = true;
                 $formatArray = array("date" => "date", "time" => "time");
                 break;
             case 5:
             case 6:
                 $req = true;
                 $formatArray = array("no formatting" => "", "phone number" => "phone", "e-mail address" => "email", "Web address (URL)" => "www", "modifiable drop down list" => "list");
                 break;
             case 7:
             case 8:
                 $req = false;
                 $formatArray = array("Not Applicable" => "");
                 break;
         }
         //endswitch
         $theinput = new inputBasicList("custom" . $i . "format", $settings["custom" . $i]["format"], $formatArray, "format");
         if (!$req) {
             $theinput->setAttribute("readonly", "readonly");
             $theinput->setAttribute("class", "uneditable");
         }
         //endif
         $theform->addField($theinput);
         $theinput = new inputCheckbox("custom" . $i . "required", $settings["custom" . $i]["required"], "required", !$req);
         $theform->addField($theinput);
         if ($req) {
             $theinput = new inputTextarea("custom" . $i . "generator", $settings["custom" . $i]["generator"], "generation javascript", false, 2, 84);
             $theform->addField($theinput);
         }
         //endif
     }
     //endfor i
     return $theform;
 }
Пример #2
0
 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   |
 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   |
 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     |
 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   |
 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    |
 |                                                                         |
 +-------------------------------------------------------------------------+
*/
require_once "../../include/session.php";
require_once "include/fields.php";
$pagetitle = "Search Clients and Prospects";
$phpbms->cssIncludes[] = "pages/quickview.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/quickview.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
if (isset($_GET["cid"])) {
    //$passedValue = getUuid($db, "tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083", (int) $_GET["cid"]);
    $passedValue = $_GET["cid"];
} else {
    $passedValue = NULL;
}
$theinput = new inputSmartSearch($db, "clientid", "Pick Sales Order Client", $passedValue, "client", false, 55, 255, false);
$theform->addField($theinput);
$theform->jsMerge();
//==============================================================
//End Form Elements
$lookUp["name"] = $theinput->getSearchInfo("Pick Sales Order Client");
$lookUp["e-mail address"] = $theinput->getSearchInfo("Pick Client By Email");
$lookUp["phone"] = $theinput->getSearchInfo("Pick Client By Phone");
include "header.php";
Пример #3
0
    function showOptions()
    {
        include "include/fields.php";
        global $phpbms;
        $db =& $this->db;
        $phpbms->cssIncludes[] = "pages/aritems_clientstatement.css";
        $phpbms->jsIncludes[] = "modules/bms/javascript/aritem_clientstatement.js";
        $phpbms->showMenu = false;
        $formSubmit = htmlentities($_SERVER['REQUEST_URI']);
        $theform = new phpbmsForm();
        $theinput = new inputDatePicker("statementdate", dateToString(mktime(0, 0, 0), "SQL"), "statement date", true);
        $theform->addField($theinput);
        $theinput = new inputCheckbox("showpayments", true, "show new payments");
        $theform->addField($theinput);
        $theinput = new inputCheckbox("showclosed", false, "show closed items (history)");
        $theform->addField($theinput);
        $theform->jsMerge();
        include "header.php";
        ?>

		<div class="bodyline" id="dialog">
			<h1><span>AR Summary Report</span></h1>
			<form action="<?php 
        echo $formSubmit;
        ?>
" id="record" method="post">
			<input type="hidden" id="command" name="command" />

				<fieldset>
					<legend>options</legend>

					<p><?php 
        $theform->showField("statementdate");
        ?>
</p>

					<p><?php 
        $theform->showField("showclosed");
        ?>
</p>

					<p><?php 
        $theform->showField("showpayments");
        ?>
</p>

				</fieldset>

<!--		THIS NO WORKY		-->
				<!--<fieldset>
					<legend>payments</legend>

					<p>
						<input type="radio" name="payments" id="paymentsNew" value="new" class="radiochecks" checked="checked"/>
						<label for="paymentsNew">show new payments</label>
					</p>

					<p>
						<input type="radio" name="payments" id="paymentsAll" value="all" class="radiochecks"/>
						<label for="paymentsAll">show all payments</label>
					</p>

					<p>
						<input type="radio" name="payments" id="paymentsNone" value="none" class="radiochecks"/>
						<label for="paymentsNone">show no payments</label>
					</p>

				</fieldset>-->

				<fieldset>
					<legend>Records</legend>

					<p>
						<input type="radio" name="selrecords" id="allOpen" value="allOpen" class="radiochecks" checked="checked"/>
						<label for="allOpen">all clients with open items</label>
					</p>

					<p>
						<input type="radio" name="selrecords" id="allClients" value="allClients" class="radiochecks"/>
						<label for="allClients">all clients with any credit history</label>
					</p>

					<p>
						<input type="radio" name="selrecords" id="fromPrint" value="fromPrint" class="radiochecks"/>
						<label for="fromPrint">clients based on records from print screen</label>
					</p>

				</fieldset>

				<p align="right">
					<button type="button" class="Buttons" id="printButton">print</button>
					<button type="button" class="Buttons" id="cancelButton">cancel</button>
				</p>
			</form>
		</div>

		<?php 
        include "footer.php";
    }
Пример #4
0
 |                                                                         |
 +-------------------------------------------------------------------------+
*/
include "../../include/session.php";
include "include/fields.php";
include "include/tables.php";
$thetable = new phpbmsTable($db, "tbld:ea159d67-5e89-5b7f-f5a0-c740e147cd73");
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = "Installed Modules";
$phpbms->cssIncludes[] = "pages/base/modules.css";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theform->jsMerge();
//==============================================================
//End Form Elements
include "header.php";
?>

<div class="bodyline">
<form action="<?php 
echo htmlentities($_SERVER["PHP_SELF"]);
?>
" method="post" name="record" onsubmit="return validateForm(this);">
	<h1 id="topTitle"><span><?php 
echo $pageTitle;
?>
</span></h1>
Пример #5
0
}
if (isset($_POST["command"])) {
    $statusmessage = $settings->processForm($_POST);
}
$therecord = $settings->getSettings();
$pageTitle = "Configuration";
$phpbms->cssIncludes[] = "pages/base/adminsettings.css";
$phpbms->jsIncludes[] = "modules/base/javascript/adminsettings.js";
foreach ($phpbms->modules as $module => $moduleinfo) {
    if ($module != "base" && file_exists("../" . $module . "/javascript/adminsettings.js")) {
        $phpbms->jsIncludes[] = "modules/" . $module . "/javascript/adminsettings.js";
    }
}
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theform->enctype = "multiform/form-data";
$theinput = new inputField("application_name", $therecord["application_name"], "application name", true);
$theform->addField($theinput);
$theinput = new inputField("application_uuid", $therecord["application_uuid"], "application uuid", false, NULL, 40);
$theinput->setAttribute("readonly", "readonly");
$theinput->setAttribute("class", "uneditable");
$theform->addField($theinput);
$theinput = new inputCheckbox("auto_check_update", $therecord["auto_check_update"], "automatically check for updates");
$theform->addField($theinput);
$theinput = new inputCheckbox("send_metrics", $therecord["send_metrics"], "send additional metrics");
$theform->addField($theinput);
$theinput = new inputField("last_update_check", $therecord["last_update_check"], "last update check");
$theinput->setAttribute("readonly", "readonly");
$theinput->setAttribute("class", "uneditable");
$theform->addField($theinput);
Пример #6
0
if ($therecord["id"]) {
    if ($thetable->receiptitems === NULL) {
        $thetable->receiptitems = new receiptitems($db);
    }
}
//end if
$pageTitle = "Receipt";
$phpbms->cssIncludes[] = "pages/receipts.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/receipt.js";
$phpbms->jsIncludes[] = "modules/bms/javascript/paymentprocess.js";
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputField("theid", $therecord["id"], "id", false, NULL, 11);
$theinput->setAttribute("readonly", "readonly");
$theinput->setAttribute("class", "uneditable");
$theform->addField($theinput);
$theinput = new inputDatePicker("receiptdate", $therecord["receiptdate"], "date", true);
$theform->addField($theinput);
$theinput = new inputBasicList("status", $therecord["status"], array("open" => "open", "collected" => "collected"));
$theform->addField($theinput);
$theinput = new inputCheckBox("readytopost", $therecord["readytopost"], "ready to post");
$theform->addField($theinput);
$theinput = new inputCheckBox("posted", $therecord["posted"], "posted");
$theinput->setAttribute("disabled", "disabled");
$theform->addField($theinput);
$theinput = new inputSmartSearch($db, "clientid", "Pick Client With Credit", $therecord["clientid"], "client", true, 51);
$theinput->setAttribute("class", "important");
Пример #7
0
    if (isset($_GET["refid"])) {
        $backurl .= "?refid=" . $_GET["refid"];
    }
    $thetable = new addresstorecord($db, "tbld:27b99bda-7bec-b152-8397-a3b09c74cb23", $backurl);
    $pageTitle = "Client Address";
}
//end if
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$phpbms->cssIncludes[] = "pages/bms/addresses.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/addresstorecord.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputField("title", $therecord["title"], NULL, false, NULL, 71, 128);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputField("address1", $therecord["address1"], "address", false, NULL, 71, 128);
$theform->addField($theinput);
$theinput = new inputField("address2", $therecord["address2"], NULL, false, NULL, 71, 128, false);
$theform->addField($theinput);
$theinput = new inputField("city", $therecord["city"], NULL, false, NULL, 35, 64);
$theform->addField($theinput);
$theinput = new inputField("state", $therecord["state"], "state/province", false, NULL, 10, 20);
$theform->addField($theinput);
$theinput = new inputField("postalcode", $therecord["postalcode"], "zip/postal code", false, NULL, 12, 15);
$theform->addField($theinput);
$theinput = new inputField("country", $therecord["country"], NULL, false, NULL, 44, 128);
$theform->addField($theinput);
Пример #8
0
    $_POST["startdate"] = dateToString(mktime(0, 0, 0, date("m"), 1, date("y")));
}
if (!isset($_POST["enddate"])) {
    $_POST["enddate"] = dateToString(mktime(0, 0, 0));
}
$poster = new poster($db, stringToDate($_POST["startdate"]), stringToDate($_POST["enddate"]));
$poster->getSections();
if (isset($_POST["cmd"])) {
    $statusmessage = $poster->process($_POST);
}
$pageTitle = "Post Records";
$phpbms->cssIncludes[] = "pages/bms/post.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/post.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputDatePicker("startdate", dateToString($poster->startdate, "SQL"), "start date");
$theform->addField($theinput);
$theinput = new inputDatePicker("enddate", dateToString($poster->enddate, "SQL"), "end date");
$theform->addField($theinput);
$theform->jsMerge();
//==============================================================
//End Form Elements
include "header.php";
?>
<div class="bodyline" id="mainline">
	<form action="<?php 
echo htmlentities($_SERVER["PHP_SELF"]);
?>
" method="post" name="record" id="record" onsubmit="return false">
	<input type="hidden" id="cmd" name="cmd" value=""/>
Пример #9
0
if (isset($_POST["referrer"])) {
    $_SERVER['HTTP_REFERER'] = $_POST["referrer"];
}
$thetable = new recurringinvoice($db, $_GET["id"]);
$therecord = $thetable->process();
//set the page title
$refquery = "\n\t\tSELECT\n\t\t\t`invoices`.`id`,\n\t\t\tif(clients.lastname!=\"\",concat(clients.lastname,\", \",clients.firstname,if(clients.company!=\"\",concat(\" (\",clients.company,\")\"),\"\")),clients.company) as name,\n\t\t\t`invoices`.`type`,\n\t\t\t`invoices`.`invoicedate`\n\t\tFROM\n\t\t\t`invoices` INNER JOIN `clients` ON `invoices`.`clientid`=clients.uuid\n\t\tWHERE\n\t\t\t`invoices`.`id`=" . $_GET["id"];
$refquery = $db->query($refquery);
$refrecord = $db->fetchArray($refquery);
$invoiceDate = stringToDate($refrecord["invoicedate"], "SQL");
$pageTitle = "Invoice Recurrence: " . $refrecord["id"] . ": " . $refrecord["name"];
$phpbms->cssIncludes[] = "pages/recurringinvoices.css";
$phpbms->jsIncludes[] = "modules/recurringinvoices/javascript/recurringinvoices.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputCheckbox("recurr", "", "recurr invoice", $invoiceDate == NULL);
$theform->addField($theinput);
$temparray = array("Daily" => "Daily", "Weekly" => "Weekly", "Monthly" => "Monthly", "Yearly" => "Yearly");
$theinput = new inputBasiclist("type", $therecord["type"], $temparray, "frequency");
$theinput->setAttribute("onchange", "changeType();");
$theform->addField($theinput);
$theinput = new inputField("every", $therecord["every"], "frequency of repeating", false, "integer", 2, 4, false);
$theform->addField($theinput);
$theinput = new inputBasiclist("monthlyontheweek", $therecord["ontheweek"], $thetable->weekArray, "on the week of", false);
$theinput2 = new inputBasiclist("yearlyontheweek", $therecord["ontheweek"], $thetable->weekArray, "on the week of", false);
if (!$therecord["ontheday"]) {
    $theinput->setAttribute("disabled", "disabled");
    $theinput2->setAttribute("disabled", "disabled");
    $weekNumber = ceil(date("d", $invoiceDate) / 7);
    if ($weekNumber > 4) {
Пример #10
0
        $statusmessage = $columns->update(addSlashesToarray($_POST));
        break;
    case "moveup":
        $statusmessage = $columns->move($_GET["columnid"], "up");
        break;
    case "movedown":
        $statusmessage = $columns->move($_GET["columnid"], "down");
        break;
}
//end switch
$columnsquery = $columns->get();
$pageTitle = "Table Definition Columns: " . $tableRecord["displayname"];
$phpbms->cssIncludes[] = "pages/tablecolumns.css";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputField("name", $thecolumn["name"], NULL, true, NULL, 32, 64);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputBasicList("align", $thecolumn["align"], array("left" => "left", "center" => "center", "right" => "right"));
$theform->addField($theinput);
$theinput = new inputCheckbox("wrap", $thecolumn["wrap"]);
$theform->addField($theinput);
$formatArray["None"] = "";
$formatArray["Date"] = "date";
$formatArray["Time"] = "time";
$formatArray["Date and Time"] = "datetime";
$formatArray["Currency"] = "currency";
$formatArray["Boolean (yes / no)"] = "boolean";
$formatArray["File Link"] = "filelink";
$formatArray["Invoice link"] = "invoice";
Пример #11
0
    }
}
$thetable = new clients($db, "tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083", $backurl);
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = ucwords($therecord["type"]);
if ($therecord["inactive"]) {
    $pageTitle = "Inactive " . $pageTitle;
}
$phpbms->cssIncludes[] = "pages/client.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/client.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputCheckbox("inactive", $therecord["inactive"]);
$theform->addField($theinput);
if (moduleExists("mod:58c60122-9d08-af17-e95b-765d74c7c422", $phpbms->modules)) {
    $name = "subscribed to mailchimp";
}
$theinput = new inputCheckbox("canemail", $therecord["canemail"], "can email");
$theform->addField($theinput);
$theinput = new inputBasicList("type", $therecord["type"], array("prospect" => "prospect", "client" => "client"), "type");
$theinput->setAttribute("class", "important");
$theinput->setAttribute("onchange", "changeClientType(this)");
$disabled = false;
if ($therecord["type"] == "client" && $therecord["id"]) {
    $disabled = $thetable->checkForInvoices($therecord["id"]);
    if ($disabled) {
        $theinput->setAttribute("disabled", "disabled");
Пример #12
0
    function showDialog()
    {
        include_once "include/fields.php";
        global $phpbms;
        $db =& $this->db;
        $phpbms->cssIncludes[] = "pages/aging.css";
        $phpbms->jsIncludes[] = "modules/bms/javascript/aritem_aging.js";
        $phpbms->showMenu = false;
        $formSubmit = str_replace("&", "&amp;", $_SERVER['REQUEST_URI']);
        $theform = new phpbmsForm();
        $theinput = new inputDatePicker("agingdate", dateToString(mktime(0, 0, 0), "SQL"), "aging date", true);
        $theform->addField($theinput);
        $theform->jsMerge();
        include "header.php";
        ?>
		<div class="bodyline" id="dialog">
			<h1><span>AR Aging</span></h1>
			<form action="<?php 
        echo $formSubmit;
        ?>
" id="record" method="post">

				<fieldset>
					<legend>options</legend>
					<p><?php 
        $theform->showField("agingdate");
        ?>
</p>
				</fieldset>

				<fieldset>
					<legend>Current Items Needing Aging</legend>
					<?php 
        $this->_showNeedingAgingTotals();
        ?>

				</fieldset>

				<fieldset>
					<legend>Report Options</legend>

					<p>
						<input type="checkbox" value="1" id="printStatements" name="printStatements" class="radiochecks"/>
						<label for="printStatements">Print client statements for clients with open items.</label>
					</p>

					<p>
						<input type="checkbox" value="1" id="printSummary" name="printSummary" class="radiochecks"/>
						<label for="printSummary">Print a statement summary.</label>
					</p>

				</fieldset>
				<p class="notes">
					Aging should be run in a consistent timeframe.  Although
					running again will not result in duplicate service charges
					for an invoice in the same aging period, not running
					the aging on the same specified date may result in client
					statements showing the service charges too early or too late.
				</p>

				<p align="right">
					<input type="hidden" name="command" id="command" />
					<button type="button" class="Buttons" id="runButton">run aging</button>
					<button type="button" class="Buttons" id="cancelButton">cancel</button>
				</p>
			</form>
		</div>
		<?php 
        include "footer.php";
    }
Пример #13
0
$options = new tableOptions($db, $_GET["id"]);
$pageTitle = "Table Definition Options: " . $options->tablename;
if (isset($_POST["command"])) {
    $therecord = $options->processForm(addSlashesToArray($_POST));
} else {
    $therecord = $options->getDefaults();
}
if (isset($therecord["statusmessage"])) {
    $statusmessage = $therecord["statusmessage"];
}
$queryresult = $options->get();
$phpbms->cssIncludes[] = "pages/tableoptions.css";
$phpbms->jsIncludes[] = "modules/base/javascript/tableoptions.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$temparray = array("Integrated Feature" => 0, "Additional Commands" => 1);
if (moduleExists("mod:b2d42220-443b-fe74-dbdb-ed2c0968c38c", $phpbms->modules)) {
    $temparray["Api Commands"] = 2;
    $theinput = new inputDataTableList($db, "pushrecordid", $therecord["pushrecordid"], "pushrecords", "pushrecords.uuid", "pushrecords.name", "pushrecords.originuuid = '" . $options->tabledefuuid . "'", "pushrecords.name ASC", true, "Push Record Commands");
    $theform->addField($theinput);
}
$theinput = new inputBasicList("type", $therecord["type"], $temparray);
$theform->addField($theinput);
$temparray = array("new" => "new", "edit" => "edit", "select" => "select", "reporting" => "printex", "import" => "import");
$theinput = new inputBasicList("ifName", $therecord["name"], $temparray, "name");
$theform->addField($theinput);
$theinput = new inputCheckBox("ifOption", $therecord["option"], "allowed");
$theform->addField($theinput);
$theinput = new inputField("acName", $therecord["name"], "php method", false, NULL, 64, 64);
$theform->addField($theinput);
Пример #14
0
$therecord = $thetable->processAddEditPage();
if ($thetable->lineitems === NULL) {
    $thetable->lineitems = new lineitems($db, $therecord["id"], $therecord["type"]);
} else {
    $thetable->lineitems->invoicetype = $therecord["type"];
}
$phpbms->cssIncludes[] = "pages/invoice.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/invoice.js";
$phpbms->jsIncludes[] = "modules/bms/javascript/invoiceaddress.js";
$phpbms->jsIncludes[] = "modules/bms/javascript/paymentprocess.js";
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputField("theid", $therecord["id"], "id", false, NULL, 11);
$theinput->setAttribute("readonly", "readonly");
$theinput->setAttribute("class", "uneditable");
$theform->addField($theinput);
$theinput = new inputSmartSearch($db, "clientid", "Pick Sales Order Client", $therecord["clientid"], "client", true, 68, 255, false);
$theform->addField($theinput);
$theinput = new inputDatePicker("orderdate", $therecord["orderdate"], "order date");
$theform->addField($theinput);
$theinput = new inputDatePicker("invoicedate", $therecord["invoicedate"], "invoice date");
$theform->addField($theinput);
$theinput = new inputDatePicker("requireddate", $therecord["requireddate"], "required date");
$theform->addField($theinput);
$theinput = new inputBasicList("type", $therecord["type"], array("Quote" => "Quote", "Order" => "Order"), NULL, true);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
Пример #15
0
    $backurl = $_GET["backurl"];
    if (isset($_GET["refid"])) {
        $backurl .= "?refid=" . $_GET["refid"];
    }
}
$thetable = new products($db, "tbld:7a9e87ed-d165-c4a4-d9b9-0a4adc3c5a34", $backurl);
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = "Product";
$phpbms->cssIncludes[] = "pages/products.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/product.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theform->enctype = "multipart/form-data";
$theinput = new inputCheckbox("inactive", $therecord["inactive"]);
$theform->addField($theinput);
$theinput = new inputCheckbox("taxable", $therecord["taxable"]);
$theform->addField($theinput);
$temparray = array("Inventory" => "Inventory", "Non-Inventory" => "Non-Inventory", "Service" => "Service", "Kit" => "Kit", "Assembly" => "Assembly");
$theinput = new inputBasicList("type", $therecord["type"], $temparray);
$theform->addField($theinput);
$temparray = array("In Stock (Available)" => "In Stock", "Out of Stock (Unavailable)" => "Out of Stock", "Back Ordered" => "Backordered");
$theinput = new inputBasicList("status", $therecord["status"], $temparray, "availablity");
$theform->addField($theinput);
$theinput = new inputField("partname", $therecord["partname"], "name");
$theform->addField($theinput);
$theinput = new inputField("partnumber", $therecord["partnumber"], "part number", true);
$theform->addField($theinput);
Пример #16
0
 +-------------------------------------------------------------------------+
*/
include "../../include/session.php";
include "include/tables.php";
include "include/fields.php";
include "include/productcategories.php";
$thetable = new productcategories($db, "tbld:3342a3d4-c6a2-3a38-6576-419299859561");
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = "Product Category";
$phpbms->cssIncludes[] = "pages/productcategories.css";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputCheckbox("inactive", $therecord["inactive"]);
$theform->addField($theinput);
$theinput = new inputField("name", $therecord["name"], NULL, true, NULL, 32, 128);
$theform->addField($theinput);
$theinput = new inputField("displayorder", $therecord["displayorder"], "display order", true, NULL, 10, 10);
$theform->addField($theinput);
$theinput = new inputField("webdisplayname", $therecord["webdisplayname"], "web display name");
$theform->addField($theinput);
$theinput = new inputTextarea("description", $therecord["description"]);
$theform->addField($theinput);
$theinput = new inputCheckbox("webenabled", $therecord["webenabled"], "web enabled");
$theform->addField($theinput);
$thetable->getCustomFieldInfo();
$theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
$theform->jsMerge();
Пример #17
0
 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    |
 |                                                                         |
 +-------------------------------------------------------------------------+
*/
include "../../include/session.php";
include "include/fields.php";
include "include/tables.php";
$thetable = new phpbmstable($db, "tbld:29925e0a-c825-0067-8882-db4b57866a96");
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$phpbms->cssIncludes[] = "pages/base/smartsearches.css";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputField("id", $therecord["id"], NULL, false, NULL, 9, 64);
$theinput->setAttribute("class", "uneditable");
$theinput->setAttribute("readonly", "readonly");
$theform->addField($theinput);
$theinput = new inputField("name", $therecord["name"], NULL, true, NULL, 50, 255, false);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputDataTableList($db, "moduleid", $therecord["moduleid"], "modules", "uuid", "displayname", "", "", false, "module");
$theform->addField($theinput);
$theinput = new inputDataTableList($db, "tabledefid", $therecord["tabledefid"], "tabledefs", "uuid", "displayname", "", "", false, "table");
$theform->addField($theinput);
$theinput = new inputTextarea("fromclause", $therecord["fromclause"], "from clause", true, 3, 80);
$theform->addField($theinput);
$theinput = new inputField("valuefield", $therecord["valuefield"], "value field", true, NULL, 50, 255);
$theform->addField($theinput);
Пример #18
0
include "include/tables.php";
include "include/fields.php";
include "./include/discounts.php";
$thetable = new discounts($db, "tbld:455b8839-162b-3fcb-64b6-eeb946f873e1");
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$stats = $thetable->getTotals($therecord["id"]);
$pageTitle = "Discount / Promotion";
$phpbms->cssIncludes[] = "pages/discounts.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/discount.js";
$phpbms->onload[] = "init();";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputCheckbox("inactive", $therecord["inactive"]);
$theform->addField($theinput);
$theinput = new inputField("name", $therecord["name"], NULL, true, NULL, 32, 64);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputPercentage("percentvalue", $therecord["value"], "value", 2, true);
$theform->addField($theinput);
$theinput = new inputCurrency("amountvalue", $therecord["value"], "value", true);
$theform->addField($theinput);
$thetable->getCustomFieldInfo();
$theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
$theform->jsMerge();
//==============================================================
//End Form Elements
include "header.php";
Пример #19
0
            }
            //endif
            break;
    }
    //endswitch - comand
}
//endif - command
$prerequstatement = "\n\t\tSELECT DISTINCT\n\t\t\t`prerequisites`.`id`,\n\t\t\t`partnumber`,\n\t\t\t`partname`,\n\t\t\t`description`\n\t\tFROM\n\t\t\t`prerequisites` INNER JOIN `products` ON `prerequisites`.`childid`=`products`.`uuid`\n\t\tWHERE\n\t\t\t`prerequisites`.`parentid`='" . $refrecord["uuid"] . "'\n\t";
$prereqresult = $db->query($prerequstatement);
$prereqresult ? $numrows = $db->numRows($prereqresult) : ($numrows = 0);
$pageTitle = "Product Prerequisites: " . $refrecord["partname"];
$phpbms->cssIncludes[] = "pages/products.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/prereq.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputSmartSearch($db, "productid", "Pick Product", "", "product", false, 51, 255);
$theform->addField($theinput);
$theform->jsMerge();
//==============================================================
//End Form Elements
include "header.php";
$phpbms->showTabs("products entry", "tab:9bfc7eea-5abb-f5d8-763f-f78fe499464d", $_GET["id"]);
?>
<div class="bodyline">
	<h1><span><?php 
echo $pageTitle;
?>
</span></h1>
	<form action="<?php 
echo htmlentities($_SERVER["REQUEST_URI"]);
Пример #20
0
    function displayOptions()
    {
        global $phpbms;
        $db =& $this->db;
        require "include/fields.php";
        $pageTitle = "Product Sales History";
        $phpbms->cssIncludes[] = "pages/historyreports.css";
        $phpbms->showMenu = false;
        //Form Elements
        //==============================================================
        $theform = new phpbmsForm();
        $thedate = dateToString(mktime(0, 0, 0, date("m"), 1), "SQL");
        $theinput = new inputDatePicker("fromdate", $thedate, "from", true);
        $theform->addField($theinput);
        $thedate = dateToString(mktime(0, 0, 0, date("m") + 1, 0, date("Y")), "SQL");
        $theinput = new inputDatePicker("todate", $thedate, "to", true);
        $theform->addField($theinput);
        $theform->jsMerge();
        //==============================================================
        //End Form Elements
        include "header.php";
        ?>
        <form action="<?php 
        echo htmlentities($_SERVER["REQUEST_URI"]);
        ?>
" method="post" name="totals" onsubmit="return validateForm(this)">

            <div class="bodyline" id="reportOptions">

                <h1 id="topTitle"><span>Product Sales History Options</span></h1>

                <fieldset>
                    <legend>time frame</legend>

                    <p id="fromP"><?php 
        $theform->showField("fromdate");
        ?>
</p>

                    <p><?php 
        $theform->showField("todate");
        ?>
</p>
                </fieldset>

                <p>
                    <label for="status">include products from...<br /></label>
                    <select id="status" name="status">
                        <option value="Orders and Invoices" selected="selected">Orders and Invoices</option>
                        <option value="Invoices">Invoices</option>
                        <option value="Orders">Orders</option>
                    </select>
                </p>

                <div align="right">
                    <input name="command" type="submit" class="Buttons" id="print" value="print" />
                    <input name="cancel" type="button" class="Buttons" id="cancel" value="cancel" onclick="window.close();" />
                </div>
            </div>
        </form>

        <?php 
        include "footer.php";
    }
Пример #21
0
 +-------------------------------------------------------------------------+
*/
include "../../include/session.php";
include "include/tables.php";
include "include/fields.php";
include "include/invoicestatuses.php";
$thetable = new invoicestatuses($db, "tbld:d6e4e1fb-4bfa-cb53-ab9c-1b3e7f907ae2");
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = "Invoice Status";
$phpbms->cssIncludes[] = "pages/invoicestatuses.css";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputCheckbox("inactive", $therecord["inactive"]);
$theform->addField($theinput);
$theinput = new inputField("priority", $therecord["priority"], NULL, false, "integer", 8, 8);
$theform->addField($theinput);
$theinput = new inputField("name", $therecord["name"], NULL, true, NULL, 28, 64);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputCheckbox("invoicedefault", $therecord["invoicedefault"], "new order default");
$theform->addField($theinput);
$theinput = new inputCheckbox("setreadytopost", $therecord["setreadytopost"], "set ready to post when status selected");
$theform->addField($theinput);
$theinput = new inputSmartSearch($db, "defaultassignedtoid", "Pick Active User", $therecord["defaultassignedtoid"], "assigned to", false, 42);
$theform->addField($theinput);
$thetable->getCustomFieldInfo();
$theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
Пример #22
0
 function importForm($action = NULL, $method = "post", $name = "record", $onsubmit = "return validateForm(this);", $dontSubmit = true)
 {
     parent::phpbmsForm($action, $method, $name, $onsubmit, $dontSubmit);
 }
Пример #23
0
}
$thetable = new notes($db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1", $backurl);
$therecord = $thetable->processAddEditPage();
if ($therecord["private"] && $therecord["createdby"] != $_SESSION["userinfo"]["id"] && !$_SESSION["userinfo"]["admin"]) {
    goURL("../../noaccess.php");
}
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$attachedtableinfo = $thetable->getAttachedTableDefInfo($therecord["attachedtabledefid"]);
$pageTitle = "Note/Task/Event";
$phpbms->cssIncludes[] = "pages/base/notes.css";
$phpbms->jsIncludes[] = "modules/base/javascript/notes.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theform->onsubmit = "return submitForm(this)";
$theform->id = "record";
$temparray = array("Note" => "NT", "Task" => "TS", "Event" => "EV", "System Message" => "SM");
$theinput = new inputBasicList("thetype", $therecord["type"], $temparray, "type");
$theinput->setAttribute("class", "important");
$theinput->setAttribute("onchange", "changeType()");
$theform->addField($theinput);
$theinput = new inputField("subject", $therecord["subject"], "title", true);
$theform->addField($theinput);
$temparray = array("Highest" => 3, "High" => 2, "Medium" => 1, "Normal" => 0, "Low" => -1, "Lowest" => -2);
$theinput = new inputBasicList("importance", $therecord["importance"], $temparray, "importance", false);
$theform->addField($theinput);
$theinput = new inputCheckbox("private", $therecord["private"]);
$theform->addField($theinput);
$theinput = new inputDatePicker("startdate", $therecord["startdate"], "start date", false, 11, 15, false);
Пример #24
0
*/
include "../../include/session.php";
include "include/tables.php";
include "include/fields.php";
include "include/tabledefs.php";
$thetable = new tableDefinitions($db, "tbld:5c9d645f-26ab-5003-b98e-89e9049f8ac3");
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = "Table Definition";
$phpbms->cssIncludes[] = "pages/tabledefs.css";
$phpbms->jsIncludes[] = "modules/base/javascript/tabledefs.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputBasicList("type", $therecord["type"], $list = array("table" => "table", "view" => "view", "system" => "system"));
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputCheckbox("canpost", $therecord["canpost"], "can post records");
$theform->addField($theinput);
$theinput = new inputCheckbox("hascustomfields", $therecord["hascustomfields"], "has custom fields");
$theform->addField($theinput);
$theinput = new inputCheckbox("apiaccessible", $therecord["apiaccessible"], "api accessible");
$theform->addField($theinput);
$theinput = new inputDataTableList($db, "moduleid", $therecord["moduleid"], "modules", "uuid", "displayname", "", "", false, "module");
$theform->addField($theinput);
$theinput = new inputField("displayname", $therecord["displayname"], "display name", true, NULL, 50, 64, false);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputField("prefix", $therecord["prefix"], "uuid prefix", false, NULL, 10, 4);
Пример #25
0
include "../../include/session.php";
include "include/tables.php";
include "include/fields.php";
include "include/scheduler.php";
$thetable = new scheduler($db, "tbld:83de284b-ef79-3567-145c-30ca38b40796");
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = "Scheduler";
$currentpath = getcwd();
$phpbms->cssIncludes[] = "pages/scheduler.css";
$phpbms->jsIncludes[] = "modules/base/javascript/scheduler.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theform->id = $theform->name;
$theinput = new inputCheckbox("inactive", $therecord["inactive"]);
$theform->addField($theinput);
$theinput = new inputField("name", $therecord["name"], NULL, true, NULL, 32, 64);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
if (moduleExists("mod:b2d42220-443b-fe74-dbdb-ed2c0968c38c", $phpbms->modules)) {
    $list = array("file" => "job", "push record" => "pushrecord");
    $theinput = new inputBasicList("scripttype", $therecord["scripttype"], $list, "script type");
    $theform->addField($theinput);
    $theinput = new inputSmartSearch($db, "pushrecordid", "Pick Push Record For Cron", $therecord["pushrecordid"]);
    $theform->addField($theinput);
}
//end if
$theinput = new inputField("job", $therecord["job"], "script", false, NULL, 32, 128, false);
Пример #26
0
 +-------------------------------------------------------------------------+
*/
include "../../include/session.php";
include "include/tables.php";
include "include/fields.php";
$thetable = new phpbmstable($db, "tbld:fa8a0ddc-87d3-a9e9-60b0-1bab374b2993");
$therecord = $thetable->processAddEditPage();
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$pageTitle = "Shipping Method";
$phpbms->cssIncludes[] = "pages/shippingmethods.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/shippingmethods.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputCheckbox("inactive", $therecord["inactive"]);
$theform->addField($theinput);
$theinput = new inputField("priority", $therecord["priority"], NULL, false, "integer", 8, 8);
$theform->addField($theinput);
$theinput = new inputField("name", $therecord["name"], NULL, true, NULL, 32, 128);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputCheckbox("canestimate", $therecord["canestimate"], "estimate shipping");
$theinput->setAttribute("onchange", "checkScript(this);");
$theform->addField($theinput);
$theform->jsMerge();
//==============================================================
//End Form Elements
include "header.php";
?>
Пример #27
0
include "include/tables.php";
include "modules/bms/include/aritems.php";
$aritems = new aritems($db, "tbld:c595dbe7-6c77-1e02-5e81-c2e215736e9c");
$therecord = $aritems->processAddEditPage();
$payments = new aritemPayments($db, $therecord);
$client = new relatedClient($db, $therecord["clientid"]);
$clientInfo = $client->getClientInfo();
$clientName = $clientInfo["name"];
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
$phpbms->cssIncludes[] = "pages/aritems.css";
$phpbms->jsIncludes[] = "modules/bms/javascript/aritem.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputCheckbox("posted", $therecord["posted"]);
$theinput->setAttribute("disabled", "disabled");
$theform->addField($theinput);
$theinput = new inputField("client", $clientName, NULL, true, NULL, 60, 128);
$theinput->setAttribute("class", "uneditable");
$theinput->setAttribute("readonly", "readonly");
$theform->addField($theinput);
$theinput = new inputField("type", $therecord["type"], NULL, true, NULL, 14, 64);
$theinput->setAttribute("class", "uneditable");
$theinput->setAttribute("readonly", "readonly");
$theform->addField($theinput);
$theinput = new inputField("status", $therecord["status"], NULL, true, NULL, 9, 64);
$theinput->setAttribute("class", "uneditable");
$theinput->setAttribute("readonly", "readonly");
$theform->addField($theinput);
Пример #28
0
if (isset($_GET["command"])) {
    $thecommand = $_GET["command"];
}
if (isset($_POST["command"])) {
    $thecommand = $_POST["command"];
}
$therecord = $groupings->processForm($thecommand, $_POST, $_GET);
$allRecords = $groupings->getRecords();
$action = $therecord["action"];
if (isset($therecord["statusMessage"])) {
    $statusmessage = $therecord["statusMessage"];
}
$phpbms->cssIncludes[] = "pages/tablecolumns.css";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputTextarea("field", $therecord["field"], "SQL field", true, 3, 80);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputField("name", $therecord["name"], NULL, false, NULL, 32, 64);
$theform->addField($theinput);
$theinput = new inputCheckbox("ascending", $therecord["ascending"]);
$theform->addField($theinput);
$theinput = new inputRolesList($db, "roleid", $therecord["roleid"], "access (role)");
$theform->addField($theinput);
$theform->jsMerge();
//==============================================================
//End Form Elements
include "header.php";
$phpbms->showTabs("tabledefs entry", "tab:c111eaf5-692b-9c7d-1d46-1bacb6703361", $_GET["id"]);
?>
Пример #29
0
    goURL("../../noaccess.php");
}
if (isset($therecord["phpbmsStatus"])) {
    $statusmessage = $therecord["phpbmsStatus"];
}
function getAttachments($db, $uuid)
{
    $querystatement = "\n\t\t\tSELECT\n\t\t\t\t`tabledefs`.`displayname`,\n\t\t\t\t`attachments`.`recordid`,\n\t\t\t\t`attachments`.`creationdate`,\n\t\t\t\t`tabledefs`.`editfile`\n\t\t\tFROM\n\t\t\t\t`attachments`INNER JOIN `tabledefs` ON `attachments`.`tabledefid`=`tabledefs`.`uuid`\n\t\t\tWHERE `attachments`.`fileid`='" . $uuid . "'\n\t\t\t";
    $queryresult = $db->query($querystatement);
    return $queryresult;
}
$phpbms->cssIncludes[] = "pages/files.css";
$phpbms->jsIncludes[] = "modules/base/javascript/file.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theform->enctype = "multipart/form-data";
if (isset($therecord["id"])) {
    $theinput = new inputField("name", $therecord["name"], NULL, true, NULL, 64, 128);
    $theinput->setAttribute("class", "important");
    $theform->addField($theinput);
}
$theinput = new inputField("type", $therecord["type"], "file type", false, null, 25);
$theinput->setAttribute("readonly", "readonly");
$theinput->setAttribute("class", "uneditable");
$theform->addField($theinput);
$theinput = new inputRolesList($db, "roleid", $therecord["roleid"], "access (role)");
$theform->addField($theinput);
if (isset($_GET["tabledefid"]) && !isset($therecord["id"])) {
    $theinput = new inputSmartSearch($db, "fileid", "Pick File", "", "exisiting file", false, 40);
    $theform->addField($theinput);
Пример #30
0
        case "Update Contact":
            $statusmessage = $user->update($_POST);
            break;
        case "Update Email":
            $statusmessage = $user->updateEmail($_POST);
            break;
    }
    //endswitch
}
//endif
$pageTitle = "My Account";
$phpbms->cssIncludes[] = "pages/myaccount.css";
$phpbms->jsIncludes[] = "modules/base/javascript/myaccount.js";
//Form Elements
//==============================================================
$theform = new phpbmsForm();
$theinput = new inputField("phone", $_SESSION["userinfo"]["phone"], "phone/extension", false, "phone", 32, 64);
$theform->addField($theinput);
$theinput = new inputField("email", $_SESSION["userinfo"]["email"], "e-mail address", false, "email", 32, 64);
$theinput->setAttribute("title", "Enter the email address to send site mail from. Will also be used as part of your contact details.");
$theform->addField($theinput);
$theinput = new inputField("sendmail", $_SESSION["userinfo"]["sendmail"], "sendmail path", false, null, 32, 255);
$theinput->setAttribute("title", "Enter the path to the sendmail program directory on the host server. Defaults to: '/usr/sbin/sendmail -bs'");
$theform->addField($theinput);
$theinput = new inputField("smtphost", $_SESSION["userinfo"]["smtphost"], "SMTP host", false, null, 32, 255);
$theinput->setAttribute("title", "Enter the name of the SMTP host. Defaults to: 'localhost'");
$theform->addField($theinput);
$theinput = new inputField("smtpport", $_SESSION["userinfo"]["smtpport"], "SMTP port", false, "integer", 10, 10);
$theinput->setAttribute("title", "Enter the port number of your SMTP server. Use 25 for most unsecure servers and 465 for most secure servers. Defaults to: 25");
$theform->addField($theinput);
$theinput = new inputField("smtpuser", $_SESSION["userinfo"]["smtpuser"], "SMTP username", false, NULL, 32, 255);