Ejemplo n.º 1
0
function ShowStockTypes($StockType)
{
    $StockTypes = StockTypes();
    echo '<td><select name="StockType" onChange="ReloadForm(UpdateItems)" >';
    echo '<option value=""></option>';
    foreach ($StockTypes as $Type => $Name) {
        if (isset($StockType) and $StockType == $Type) {
            echo '<option selected value="' . $Type . '">' . $Name . '</option>';
        } else {
            echo '<option value="' . $Type . '">' . $Name . '</option>';
        }
    }
    echo '</select>';
}
Ejemplo n.º 2
0
				<td>' . _('Category Code') . ':</td>
				<td><input type="text" name="CategoryID" size="7" maxlength="6" value="' . $_POST['CategoryID'] . '" /></td>
			</tr>';
}
//SQL to poulate account selection boxes
$sql = "SELECT accountcode,\n\t\t\t\taccountname\n\t\t\tFROM chartmaster,\n\t\t\t\taccountgroups\n\t\t\tWHERE chartmaster.group_=accountgroups.groupname\n\t\t\t\tAND accountgroups.pandl=0\n\t\t\tORDER BY accountcode";
$BSAccountsResult = DB_query($sql, $db);
$sql = "SELECT accountcode,\n\t\t\t\taccountname\n\t\t\tFROM chartmaster,\n\t\t\t\taccountgroups\n\t\t\tWHERE chartmaster.group_=accountgroups.groupname\n\t\t\t\tAND accountgroups.pandl!=0\n\t\t\tORDER BY accountcode";
$PnLAccountsResult = DB_query($sql, $db);
if (!isset($_POST['CategoryDescription'])) {
    $_POST['CategoryDescription'] = '';
}
echo '<tr><td>' . _('Category Description') . ':</td>
			<td><input type="text" name="CategoryDescription" size="22" maxlength="20" value="' . $_POST['CategoryDescription'] . '" /></td></tr>';
echo '<tr><td>' . _('Stock Type') . ':</td>';
$StockTypes = StockTypes();
echo '<td><select name="StockType" >';
echo '<option value=""></option>';
foreach ($StockTypes as $Type => $Name) {
    if (isset($_POST['StockType']) and $_POST['StockType'] == $Type) {
        echo '<option selected value="' . $Type . '">' . $Name . '</option>';
    } else {
        echo '<option value="' . $Type . '">' . $Name . '</option>';
    }
}
echo '</select></td>';
echo '</tr>';
echo '<input type="submit" name="UpdateItems" style="visibility:hidden;width:1px" value="Not Seen" />';
if (isset($_POST['StockType']) and $_POST['StockType'] == 'L') {
    $Result = $PnLAccountsResult;
    echo '<tr><td>' . _('Recovery GL Code');