[Vtigercrm-commits] [vtiger-commits] r9311 - in /vtigercrm/branches/4.2/modules/Reports: ReportRun.php Reports.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Sep 6 03:57:03 EDT 2006
Author: allanbush
Date: Wed Sep 6 01:57:00 2006
New Revision: 9311
Log:
Adds Sales Orders to the list of modules reports can be created for. Closes #94.
Modified:
vtigercrm/branches/4.2/modules/Reports/ReportRun.php
vtigercrm/branches/4.2/modules/Reports/Reports.php
Modified: vtigercrm/branches/4.2/modules/Reports/ReportRun.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Reports/ReportRun.php (original)
+++ vtigercrm/branches/4.2/modules/Reports/ReportRun.php Wed Sep 6 01:57:00 2006
@@ -1072,6 +1072,7 @@
inner join crmentity 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 usersQuotes on usersQuotes.id = crmentityQuotes.smownerid
left join users usersRel1 on usersRel1.id = quotes.inventorymanager
left join potential potentialRel on potentialRel.potentialid = quotes.potentialid
@@ -1087,6 +1088,7 @@
inner join crmentity 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 usersOrders on usersOrders.id = crmentityOrders.smownerid
left join vendor vendorRel on vendorRel.vendorid = purchaseorder.vendorid
left join contactdetails contactdetailsOrders on contactdetailsOrders.contactid = purchaseorder.contactid
@@ -1100,11 +1102,29 @@
inner join crmentity 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 usersInvoice on usersInvoice.id = crmentityInvoice.smownerid
left join account accountInvoice on accountInvoice.accountid = invoice.accountid
".$this->getRelatedModulesQuery($module,$this->secondarymodule)."
where crmentityInvoice.deleted=0";
}
+
+ if($module == "SalesOrder")
+ {
+ $query = "from salesorder
+ inner join crmentity as crmentitySalesOrder on crmentitySalesOrder.crmid=salesorder.salesorderid
+ inner join sobillads on salesorder.salesorderid=sobillads.sobilladdressid
+ inner join soshipads on salesorder.salesorderid=soshipads.soshipaddressid
+ left join salesordercf on salesorder.salesorderid = salesordercf.salesorderid
+ left join contactdetails as contactdetailsSalesOrder on contactdetailsSalesOrder.contactid = salesorder.contactid
+ left join quotes as quotesSalesOrder on quotesSalesOrder.quoteid = salesorder.quoteid
+ left join account as accountSalesOrder on accountSalesOrder.accountid = salesorder.accountid
+ left join potential as potentialRel on potentialRel.potentialid = salesorder.potentialid
+ left join users as usersSalesOrder on usersSalesOrder.id = crmentitySalesOrder.smownerid
+ where crmentitySalesOrder.deleted=0";
+
+ }
+
$vtlog->logthis("ReportRun :: Successfully returned getReportsQuery".$module,"info");
return $query;
Modified: vtigercrm/branches/4.2/modules/Reports/Reports.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Reports/Reports.php (original)
+++ vtigercrm/branches/4.2/modules/Reports/Reports.php Wed Sep 6 01:57:00 2006
@@ -33,7 +33,7 @@
"m"=>"less or equal",
"h"=>"greater or equal");
-$report_modules = Array('Leads','Accounts','Contacts','Potentials','Products','HelpDesk','Quotes','Orders','Invoice','Activities');
+$report_modules = Array('Leads','Accounts','Contacts','Potentials','Products','HelpDesk','Quotes','Orders','Invoice','Activities','SalesOrder');
$related_modules = Array('Leads'=>Array(''),
'Accounts'=>Array('Potentials','Contacts','Products','Quotes','Invoice'),
@@ -44,6 +44,7 @@
'HelpDesk'=>Array('Products'),
'Quotes'=>Array('Accounts','Contacts','Potentials'),
'Orders'=>Array('Contacts'),
+ 'SalesOrder'=>Array(),
'Invoice'=>Array('Accounts')
);
@@ -102,6 +103,7 @@
"HelpDesk"=>Array("Information"=>'1,2',"Custom Information"=>5,"Description"=>3,"Solution"=>4),//patch2
"Quotes"=>Array("Information"=>1,"Address"=>2,"Description"=>3,"Custom Information"=>5),
"Orders"=>Array("Information"=>1,"Address"=>2,"Description"=>3,"Custom Information"=>5),
+ "SalesOrder"=>Array("Information"=>1,"Address"=>2,"Description"=>3,"Custom Information"=>5),
"Invoice"=>Array("Information"=>1,"Address"=>2,"Description"=>3,"Custom Information"=>5)
);
More information about the vtigercrm-commits
mailing list