<?php
$strTableName="advances_to_supplier_status";
$_SESSION["OwnerID"] = $_SESSION["_".$strTableName."_OwnerID"];

$strOriginalTableName="advances_to_supplier";

$gstrOrderBy="ORDER BY advances_to_supplier.advance_amount - ifnull(puttt.pur,0) DESC";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy="order by ".$gstrOrderBy;

// alias for 'SQLQuery' object
$gSettings = new ProjectSettings("advances_to_supplier_status");
$gQuery = $gSettings->getSQLQuery();
$eventObj = &$tableEvents["advances_to_supplier_status"];

$reportCaseSensitiveGroupFields = false;

$gstrSQL = $gQuery->gSQLWhere("");
?>