Exemplo n.º 1
0
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);
}
//end if
$thetable->getCustomFieldInfo();
$theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
$theform->jsMerge();
Exemplo n.º 2
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";
    }
Exemplo n.º 3
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;
 }
Exemplo n.º 4
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";
    }
Exemplo n.º 5
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";
    }
Exemplo n.º 6
0
    function showSelectScreen()
    {
        include "include/fields.php";
        global $phpbms;
        $db =& $this->db;
        $phpbms->cssIncludes[] = "pages/bms/incoming_cashflow.css";
        $phpbms->jsIncludes[] = "modules/bms/javascript/incoming_cashflow.js";
        $phpbms->showMenu = false;
        $formSubmit = htmlentities($_SERVER['REQUEST_URI']);
        $theform = new phpbmsForm();
        $theinput = new inputDatePicker("fromdate", dateToString(mktime(0, 0, 0, date("m"), 1), "SQL"), "from", true);
        $theform->addField($theinput);
        $theinput = new inputDatePicker("todate", dateToString(mktime(0, 0, 0), "SQL"), "to", true);
        $theform->addField($theinput);
        $theinput = new inputCheckbox("showitems", false, "Show individual items");
        $theform->addField($theinput);
        $theform->jsMerge();
        include "header.php";
        ?>

        <div class="bodyline" id="dialog">
            <h1>Incoming Cash Flow</h1>
	    <form action="<?php 
        echo $formSubmit;
        ?>
" id="record" method="post">

                <fieldset>

                    <legend>time period</legend>

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

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

		</fieldset>

                <fieldset>

                    <legend>groupings</legend>
                    <input id="groupings" type="hidden" name="groupings"/>
                    <div id="theGroups">
                        <div id="Group1">
                            <select id="Group1Field">
                                <?php 
        $this->showOptions("groupings");
        ?>
                            </select>
                            <button type="button" id="Group1Minus" class="graphicButtons buttonMinusDisabled"><span>-</span></button>
                            <button type="button" id="Group1Plus" class="graphicButtons buttonPlus"><span>+</span></button>
                        </div>
                    </div>

                </fieldset>


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

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

            </form>
        </div>

        <?php 
        include "footer.php";
    }