[Vtigercrm-commits] [vtiger development] #44: Fix for Error by custom view with a custom fields
vtiger development
vtiger-tickets at vtiger.fosslabs.com
Wed Mar 1 05:02:57 EST 2006
#44: Fix for Error by custom view with a custom fields
------------------------+---------------------------------------------------
Reporter: Kleo | Owner: developer
Type: defect | Status: closed
Priority: major | Milestone: 4.2.5
Component: vtigercrm | Version: 4.2.4rc1
Resolution: fixed | Keywords:
------------------------+---------------------------------------------------
Changes (by anonymous):
* resolution: => fixed
* status: new => closed
Comment:
change this code:
{{{
if($module == "Vendor")
{
$query = "select crmentity.crmid, vendor.* from vendor
inner join crmentity on crmentity.crmid=vendor.vendorid where
crmentity.deleted=0";
}
if($module == "PriceBook")
{
$query = "select crmentity.crmid, pricebook.* from
pricebook inner join crmentity on crmentity.crmid=pricebook.pricebookid
where crmentity.deleted=0";
}
if($module == "Quotes")
{
$query = "select crmentity.*, quotes.*, quotesbillads.*,
quotesshipads.*,potential.potentialname,account.accountname from quotes
inner join crmentity on crmentity.crmid=quotes.quoteid inner join
quotesbillads on quotes.quoteid=quotesbillads.quotebilladdressid inner
join quotesshipads on quotes.quoteid=quotesshipads.quoteshipaddressid left
outer join account on account.accountid=quotes.accountid left outer join
potential on potential.potentialid=quotes.potentialid where
crmentity.deleted=0".$where;
}
if($module == "Orders")
{
$query = "select crmentity.*, purchaseorder.*,
pobillads.*, poshipads.*,vendor.vendorname from purchaseorder inner join
crmentity on crmentity.crmid=purchaseorder.purchaseorderid left outer join
vendor on purchaseorder.vendorid=vendor.vendorid inner join pobillads on
purchaseorder.purchaseorderid=pobillads.pobilladdressid inner join
poshipads on purchaseorder.purchaseorderid=poshipads.poshipaddressid where
crmentity.deleted=0";
}
if($module == "SalesOrder")
{
$query = "select crmentity.*, salesorder.*, sobillads.*,
soshipads.*,quotes.subject as quotename, account.accountname from
salesorder inner join crmentity on crmentity.crmid=salesorder.salesorderid
inner join sobillads on salesorder.salesorderid=sobillads.sobilladdressid
inner join soshipads on salesorder.salesorderid=soshipads.soshipaddressid
left outer join quotes on quotes.quoteid=salesorder.quoteid left outer
join account on account.accountid=salesorder.accountid where
crmentity.deleted=0".$where;
}
if($module == "Invoice")
{
$query = "select crmentity.*, invoice.*, invoicebillads.*,
invoiceshipads.*,salesorder.subject as salessubject from invoice inner
join crmentity on crmentity.crmid=invoice.invoiceid inner join
invoicebillads on invoice.invoiceid=invoicebillads.invoicebilladdressid
inner join invoiceshipads on
invoice.invoiceid=invoiceshipads.invoiceshipaddressid left outer join
salesorder on salesorder.salesorderid=invoice.salesorderid where
crmentity.deleted=0".$where;
}
}}}
with this:
{{{
if($module == "Vendor")
{
$query = "select crmentity.crmid, vendor.*, vendorcf.*
from vendor inner join crmentity on crmentity.crmid=vendor.vendorid inner
join vendorcf on vendor.vendorid = vendorcf.vendorid where
crmentity.deleted=0";
}
if($module == "PriceBook")
{
$query = "select crmentity.crmid, pricebook.* from
pricebook inner join crmentity on crmentity.crmid=pricebook.pricebookid
where crmentity.deleted=0";
}
if($module == "Quotes")
{
$query = "select crmentity.*, quotes.*, quotesbillads.*,
quotesshipads.*, quotescf.* , potential.potentialname,account.accountname
from quotes inner join crmentity on crmentity.crmid=quotes.quoteid inner
join quotesbillads on quotes.quoteid=quotesbillads.quotebilladdressid
inner join quotesshipads on
quotes.quoteid=quotesshipads.quoteshipaddressid left outer join account on
account.accountid=quotes.accountid left outer join potential on
potential.potentialid=quotes.potentialid inner join quotescf on
quotes.quoteid = quotescf.quoteid where crmentity.deleted=0".$where;
}
if($module == "Orders")
{
$query = "select crmentity.*, purchaseorder.*,
pobillads.*, poshipads.*, purchaseordercf.* ,vendor.vendorname from
purchaseorder inner join crmentity on
crmentity.crmid=purchaseorder.purchaseorderid left outer join vendor on
purchaseorder.vendorid=vendor.vendorid inner join pobillads on
purchaseorder.purchaseorderid=pobillads.pobilladdressid inner join
poshipads on purchaseorder.purchaseorderid=poshipads.poshipaddressid inner
join purchaseordercf on purchaseorder.purchaseorderid =
purchaseordercf.purchaseorderid where crmentity.deleted=0";
}
if($module == "SalesOrder")
{
$query = "select crmentity.*, salesorder.*, sobillads.*,
soshipads.*, salesordercf.* ,quotes.subject as quotename,
account.accountname from salesorder inner join crmentity on
crmentity.crmid=salesorder.salesorderid inner join sobillads on
salesorder.salesorderid=sobillads.sobilladdressid inner join soshipads on
salesorder.salesorderid=soshipads.soshipaddressid left outer join quotes
on quotes.quoteid=salesorder.quoteid left outer join account on
account.accountid=salesorder.accountid inner join salesordercf on
salesorder.salesorderid = salesordercf.salesorderid where
crmentity.deleted=0".$where;
}
if($module == "Invoice")
{
$query = "select crmentity.*, invoice.*, invoicebillads.*,
invoiceshipads.*, invoicecf.* ,salesorder.subject as salessubject from
invoice inner join crmentity on crmentity.crmid=invoice.invoiceid inner
join invoicebillads on
invoice.invoiceid=invoicebillads.invoicebilladdressid inner join
invoiceshipads on invoice.invoiceid=invoiceshipads.invoiceshipaddressid
left outer join salesorder on salesorder.salesorderid=invoice.salesorderid
inner join invoicecf on invoice.invoiceid = invoicecf.invoiceid where
crmentity.deleted=0".$where;
}
}}}
--
Ticket URL: <http://vtiger.fosslabs.com/cgi-bin/trac.cgi/ticket/44>
vtiger development <http://vtiger.fosslabs.com/>
vtigerCRM
More information about the vtigercrm-commits
mailing list