function render()
 {
     $current_user =& singleton("current_user");
     global $TPL;
     $ops["return"] = "array";
     $ops["status"] = array("admin");
     $rows = productSale::get_list($ops);
     $TPL["saleListRows"] = $rows;
     if ($TPL["saleListRows"]) {
         return true;
     }
 }
Exemple #2
0
 * allocPSA is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or (at
 * your option) any later version.
 * 
 * allocPSA is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
 * License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with allocPSA. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "../alloc.php";
function show_filter()
{
    global $TPL;
    global $defaults;
    $_FORM = productSale::load_form_data($defaults);
    $arr = productSale::load_productSale_filter($_FORM);
    is_array($arr) and $TPL = array_merge($TPL, $arr);
    include_template("templates/productSaleListFilterS.tpl");
}
$defaults = array("url_form_action" => $TPL["url_alloc_productSaleList"], "form_name" => "productSaleList_filter", "return" => "array");
$_FORM = productSale::load_form_data($defaults);
$TPL["productSaleListRows"] = productSale::get_list($_FORM);
if (!$current_user->prefs["productSaleList_filter"]) {
    $TPL["message_help"][] = "\n\nallocPSA allows you to create Sales and Products and allocate the funds from\nSales. This page allows you to view a list of Sales.\n\n<br><br>\n\nSimply adjust the filter settings and click the <b>Filter</b> button to\ndisplay a list of previously created Sales.\nIf you would prefer to create a new Sale, click the <b>New Sale</b> link\nin the top-right hand corner of the box below.";
}
$TPL["main_alloc_title"] = "Sales List - " . APPLICATION_NAME;
include_template("templates/productSaleListM.tpl");