[Vtigercrm-commits] [vtiger development] #45: Fix for "Fatal error..." by reports with custom field
vtiger development
vtiger-tickets at vtiger.fosslabs.com
Wed Mar 1 05:07:10 EST 2006
#45: Fix for "Fatal error..." by reports with custom field
------------------------+---------------------------------------------------
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:
replace this code:
{{{
if($module == "Quotes")
{
$query = "from quotes
inner join crmentity as crmentityQuotes on
crmentityQuotes.crmid=quotes.quoteid
inner join quotesbillads on
quotes.quoteid=quotesbillads.quotebilladdressid
inner join quotesshipads on
quotes.quoteid=quotesshipads.quoteshipaddressid
left join users as usersQuotes on
usersQuotes.id = crmentityQuotes.smownerid
left join users as usersRel1 on
usersRel1.id = quotes.inventorymanager
left join potential as potentialRel on
potentialRel.potentialid = quotes.potentialid
left join contactdetails as
contactdetailsQuotes on contactdetailsQuotes.contactid = quotes.contactid
left join account as accountQuotes on
accountQuotes.accountid = quotes.accountid
".$this->getRelatedModulesQuery($module,$this->secondarymodule)."
where crmentityQuotes.deleted=0";
}
if($module == "Orders")
{
$query = "from purchaseorder
inner join crmentity as crmentityOrders on
crmentityOrders.crmid=purchaseorder.purchaseorderid
inner join pobillads on
purchaseorder.purchaseorderid=pobillads.pobilladdressid
inner join poshipads on
purchaseorder.purchaseorderid=poshipads.poshipaddressid
left join users as usersOrders on
usersOrders.id = crmentityOrders.smownerid
left join vendor as vendorRel on
vendorRel.vendorid = purchaseorder.vendorid
left join contactdetails as
contactdetailsOrders on contactdetailsOrders.contactid =
purchaseorder.contactid
".$this->getRelatedModulesQuery($module,$this->secondarymodule)."
where crmentityOrders.deleted=0";
}
if($module == "Invoice")
{
$query = "from invoice
inner join crmentity as crmentityInvoice
on crmentityInvoice.crmid=invoice.invoiceid
inner join invoicebillads on
invoice.invoiceid=invoicebillads.invoicebilladdressid
inner join invoiceshipads on
invoice.invoiceid=invoiceshipads.invoiceshipaddressid
left join users as usersInvoice on
usersInvoice.id = crmentityInvoice.smownerid
left join account as accountInvoice on
accountInvoice.accountid = invoice.accountid
".$this->getRelatedModulesQuery($module,$this->secondarymodule)."
where crmentityInvoice.deleted=0";
}
}}}
with this code:
{{{
if($module == "Quotes")
{
$query = "from quotes
inner join crmentity as crmentityQuotes on
crmentityQuotes.crmid=quotes.quoteid
inner join quotesbillads on
quotes.quoteid=quotesbillads.quotebilladdressid
inner join quotesshipads on
quotes.quoteid=quotesshipads.quoteshipaddressid
inner join quotescf on quotes.quoteid =
quotescf.quoteid
left join users as usersQuotes on
usersQuotes.id = crmentityQuotes.smownerid
left join users as usersRel1 on
usersRel1.id = quotes.inventorymanager
left join potential as potentialRel on
potentialRel.potentialid = quotes.potentialid
left join contactdetails as
contactdetailsQuotes on contactdetailsQuotes.contactid = quotes.contactid
left join account as accountQuotes on
accountQuotes.accountid = quotes.accountid
".$this->getRelatedModulesQuery($module,$this->secondarymodule)."
where crmentityQuotes.deleted=0";
}
if($module == "Orders")
{
$query = "from purchaseorder
inner join crmentity as crmentityOrders on
crmentityOrders.crmid=purchaseorder.purchaseorderid
inner join pobillads on
purchaseorder.purchaseorderid=pobillads.pobilladdressid
inner join poshipads on
purchaseorder.purchaseorderid=poshipads.poshipaddressid
inner join purchaseordercf on
purchaseorder.purchaseorderid = purchaseordercf.purchaseorderid
left join users as usersOrders on
usersOrders.id = crmentityOrders.smownerid
left join vendor as vendorRel on
vendorRel.vendorid = purchaseorder.vendorid
left join contactdetails as
contactdetailsOrders on contactdetailsOrders.contactid =
purchaseorder.contactid
".$this->getRelatedModulesQuery($module,$this->secondarymodule)."
where crmentityOrders.deleted=0";
}
if($module == "Invoice")
{
$query = "from invoice
inner join crmentity as crmentityInvoice
on crmentityInvoice.crmid=invoice.invoiceid
inner join invoicebillads on
invoice.invoiceid=invoicebillads.invoicebilladdressid
inner join invoiceshipads on
invoice.invoiceid=invoiceshipads.invoiceshipaddressid
inner join invoicecf on invoice.invoiceid
= invoicecf.invoiceid
left join users as usersInvoice on
usersInvoice.id = crmentityInvoice.smownerid
left join account as accountInvoice on
accountInvoice.accountid = invoice.accountid
".$this->getRelatedModulesQuery($module,$this->secondarymodule)."
where crmentityInvoice.deleted=0";
}
}}}
--
Ticket URL: <http://vtiger.fosslabs.com/cgi-bin/trac.cgi/ticket/45>
vtiger development <http://vtiger.fosslabs.com/>
vtigerCRM
More information about the vtigercrm-commits
mailing list