init
This commit is contained in:
25
modules/EcmPriceBooks/getPriceBooks.php
Executable file
25
modules/EcmPriceBooks/getPriceBooks.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?
|
||||
global $db;
|
||||
//if($_REQUEST['account_id'])$arr[]="(account_id='".$_REQUEST['account_id']."')";
|
||||
//if($_REQUEST['exchange_rate_id'])$arr[]="exchange_rate_id like '".$_REQUEST['exchange_rate_id']."'";
|
||||
//$where="where ".@implode(" and ",$arr);
|
||||
|
||||
$z="select id,name from ecmpricebooks ".$where." order by name asc";
|
||||
//print $z;
|
||||
$result = $db->query($z);
|
||||
$pbs='<select id="pricebook_id" name="pricebook_id"><option value="">standard</option>';
|
||||
$i=0;
|
||||
$stop=0;
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$pbs.='<option value="'.$row['id'].'"';
|
||||
if($_GET['pricebook_id']==$row['id'] && $stop==0){
|
||||
$pbs.=' selected';
|
||||
$stop=1;
|
||||
}
|
||||
$pbs.='>'.$row['name'].'</option>';
|
||||
$i++;
|
||||
}
|
||||
$pbs.='</select>';
|
||||
print $pbs;
|
||||
?>
|
||||
Reference in New Issue
Block a user