Beispiel #1
0
$theinput = new inputField("partnumber", $therecord["partnumber"], "part number", true);
$theform->addField($theinput);
$theinput = new inputField("upc", $therecord["upc"], "UPC");
$theform->addField($theinput);
$theinput = new inputField("description", $therecord["description"], "description", false, NULL, 96, 255);
$theform->addField($theinput);
$theinput = new inputCurrency("unitprice", $therecord["unitprice"], "unit price", true);
$theinput->setAttribute("class", "important");
$theform->addField($theinput);
$theinput = new inputCurrency("unitcost", $therecord["unitcost"], "unit cost");
$theform->addField($theinput);
$markup = 0;
if ($therecord["unitcost"] != 0) {
    $markup = round($therecord["unitprice"] / $therecord["unitcost"] - 1, 4) * 100;
}
$theinput = new inputPercentage("markup", $markup, "mark-up", 2);
$theinput->setAttribute("size", "10");
$theform->addField($theinput);
$theinput = new inputField("unitofmeasure", $therecord["unitofmeasure"], "unit of measure");
$theform->addField($theinput);
$theinput = new inputField("weight", $therecord["weight"], NULL, false, "real");
$theform->addField($theinput);
if ($therecord["packagesperitem"]) {
    $itemsperpackage = 1 / $therecord["packagesperitem"];
} else {
    $itemsperpackage = NULL;
}
$theinput = new inputField("packagesperitem", $itemsperpackage, NULL, false, "real", 10, 16, false);
$theform->addField($theinput);
$theinput = new inputCheckbox("isprepackaged", $therecord["isprepackaged"], "prepackaged");
$theform->addField($theinput);
Beispiel #2
0
$theform->addField($theinput);
$theinput = new inputField("shiptoaddress1", $therecord["shiptoaddress1"], "address", false, NULL, 71, 128, false);
$theform->addField($theinput);
$theinput = new inputField("shiptoaddress2", $therecord["shiptoaddress2"], NULL, false, NULL, 71, 128, false);
$theform->addField($theinput);
$theinput = new inputField("shiptocity", $therecord["shiptocity"], "city", false, NULL, 35, 64);
$theform->addField($theinput);
$theinput = new inputField("shiptostate", $therecord["shiptostate"], "state/province", false, NULL, 10, 20);
$theform->addField($theinput);
$theinput = new inputField("shiptopostalcode", $therecord["shiptopostalcode"], "zip/postal code", false, NULL, 12, 15);
$theform->addField($theinput);
$theinput = new inputField("shiptocountry", $therecord["shiptocountry"], "country", false, NULL, 44, 128);
$theform->addField($theinput);
$theinput = new inputBasicList("shiptosaveoptions", "orderOnly", $saveOptionList, "address save options");
$theform->addField($theinput);
$theinput = new inputPercentage("taxpercentage", $therecord["taxpercentage"], "tax percentage", 5);
$theinput->setAttribute("onchange", "clearTaxareaid()");
$theform->addField($theinput);
$theinput = new inputCurrency("creditlimit", $therecord["creditlimit"], "credit limit");
$theinput->setAttribute("readonly", "readonly");
$theform->addField($theinput);
$theinput = new inputCurrency("creditleft", $therecord["creditleft"], "credit left (before order)");
$theinput->setAttribute("readonly", "readonly");
$theform->addField($theinput);
//=====Payment Info====================
$theinput = new inputComparisonField("accountnumber", $therecord["accountnumber"], "account number", false, NULL, 20, 64);
$theform->addField($theinput);
$theinput = new inputComparisonField("routingnumber", $therecord["routingnumber"], "routing number", false, NULL, 30, 64);
$theform->addField($theinput);
$theinput = new inputComparisonField("ccnumber", $therecord["ccnumber"], "card number", false, NULL, 28, 40);
$theform->addField($theinput);