Esempio n. 1
0
function show_productSale_new($template)
{
    global $TPL;
    global $productSaleItemsDoExist;
    global $productSaleID;
    $taxName = config::get_config_item("taxName");
    $productSaleItem = new productSaleItem();
    $productSaleItem->set_values();
    // wipe clean
    $product = new product();
    $ops = $product->get_assoc_array("productID", "productName");
    $TPL["productList_dropdown"] = page::select_options($ops, $productSaleItem->get_value("productID"));
    $productSaleItemsDoExist and $TPL["display"] = "display:none";
    if ($taxName) {
        $TPL["sellPriceTax_check"] = sprintf(" <input type='checkbox' name='sellPriceIncTax[]' value='1'%s> inc %s", $productSaleItem->get_value("sellPriceIncTax") ? ' checked' : '', $taxName);
    }
    $TPL["psid"] = $productSaleID;
    // poorly named template variable to prevent clobbering
    include_template($template);
}