[Vtigercrm-commits] [vtiger-commits] r8019 - in /vtigercrm/trunk/modules: Invoice/ PriceBooks/ Products/ PurchaseOrder/ Quotes/ SalesOrder/ Vendors/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Jul 13 16:30:45 EDT 2006
Author: saraj
Date: Thu Jul 13 14:30:33 2006
New Revision: 8019
Log:
* Added API docs
Modified:
vtigercrm/trunk/modules/Invoice/Invoice.php
vtigercrm/trunk/modules/PriceBooks/PriceBook.php
vtigercrm/trunk/modules/Products/Product.php
vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.php
vtigercrm/trunk/modules/Quotes/ListTopQuotes.php
vtigercrm/trunk/modules/Quotes/Quote.php
vtigercrm/trunk/modules/SalesOrder/ListTopSalesOrder.php
vtigercrm/trunk/modules/SalesOrder/SalesOrder.php
vtigercrm/trunk/modules/Vendors/Vendor.php
Modified: vtigercrm/trunk/modules/Invoice/Invoice.php
==============================================================================
--- vtigercrm/trunk/modules/Invoice/Invoice.php (original)
+++ vtigercrm/trunk/modules/Invoice/Invoice.php Thu Jul 13 14:30:33 2006
@@ -92,6 +92,8 @@
var $default_order_by = 'crmid';
var $default_sort_order = 'ASC';
+ /** Constructor which will set the column_fields in this object
+ */
function Invoice() {
$this->log =LoggerManager::getLogger('Invoice');
$this->log->debug("Entering Invoice() method ...");
@@ -101,6 +103,9 @@
}
// Mike Crowe Mod --------------------------------------------------------Default ordering for us
+ /** Function used to get the sort order for Invoice listview
+ * return string $sorder - first check the $_REQUEST['sorder'] if request value is empty then check in the $_SESSION['INVOICE_SORT_ORDER'] if this session value is empty then default sort order will be returned.
+ */
function getSortOrder()
{
global $log;
@@ -113,6 +118,9 @@
return $sorder;
}
+ /** Function used to get the order by value for Invoice listview
+ * return string $order_by - first check the $_REQUEST['order_by'] if request value is empty then check in the $_SESSION['INVOICE_ORDER_BY'] if this session value is empty then default order by will be returned.
+ */
function getOrderBy()
{
global $log;
@@ -125,6 +133,10 @@
return $order_by;
}
+
+ /** function used to get the name of the current object
+ * return string $this->name - name of the current object
+ */
function get_summary_text()
{
global $log;
@@ -132,6 +144,12 @@
$log->debug("Exiting get_summary_text method ...");
return $this->name;
}
+
+
+ /** function used to get the list of activities which are related to the invoice
+ * @param int $id - invoice id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_activities($id)
{
global $log;
@@ -148,6 +166,11 @@
$log->debug("Exiting get_activities method ...");
return GetRelatedList('Invoice','Activities',$focus,$query,$button,$returnset);
}
+
+ /** function used to get the the activity history related to the quote
+ * @param int $id - invoice id
+ * return array - array which will be returned from the function GetHistory
+ */
function get_history($id)
{
global $log;
@@ -171,6 +194,12 @@
$log->debug("Exiting get_history method ...");
return getHistory('Invoice',$query,$id);
}
+
+
+ /** function used to get the attachment which are related to the invoice
+ * @param int $id - invoice id to which we want to retrieve the attachments and notes
+ * @return array - array which will be returned from the function getAttachmentsAndNotes with parameters module, query, invoice id
+ **/
function get_attachments($id)
{
global $log;
Modified: vtigercrm/trunk/modules/PriceBooks/PriceBook.php
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/PriceBook.php (original)
+++ vtigercrm/trunk/modules/PriceBooks/PriceBook.php Thu Jul 13 14:30:33 2006
@@ -49,6 +49,8 @@
var $default_order_by = 'bookname';
var $default_sort_order = 'ASC';
+ /** Constructor which will set the column_fields in this object
+ */
function PriceBook() {
$this->log =LoggerManager::getLogger('pricebook');
$this->log->debug("Entering PriceBook() method ...");
@@ -58,6 +60,9 @@
}
// Mike Crowe Mod --------------------------------------------------------Default ordering for us
+ /** Function used to get the sort order for Product listview
+ * return string $sorder - first check the $_REQUEST['sorder'] if request value is empty then check in the $_SESSION['PRICEBOOK_SORT_ORDER'] if this session value is empty then default sort order will be returned.
+ */
function getSortOrder()
{
global $log;
@@ -70,6 +75,9 @@
return $sorder;
}
+ /** Function used to get the order by value for Product listview
+ * return string $order_by - first check the $_REQUEST['order_by'] if request value is empty then check in the $_SESSION['PRICEBOOK_ORDER_BY'] if this session value is empty then default order by will be returned.
+ */
function getOrderBy()
{
global $log;
@@ -82,6 +90,10 @@
return $order_by;
}
+ /** function used to get the products which are related to the pricebook
+ * @param int $id - pricebook id
+ * @return array - array which will be returned from the function getPriceBookRelatedProducts with parameters query, product object and returnset value
+ **/
function get_pricebook_products($id)
{
global $log;
@@ -98,12 +110,18 @@
$log->debug("Exiting get_pricebook_products method ...");
return getPriceBookRelatedProducts($query,$focus,$returnset);
}
+
+ /** function used to get whether the pricebook has related with a product or not
+ * @param int $id - product id
+ * return true or false - return false if there are no pricebooks available or associated pricebooks for the product is equal to total number of pricebooks elase return true
+ */
function get_pricebook_noproduct($id)
{
global $log;
$log->debug("Entering get_pricebook_noproduct(".$id.") method ...");
- $query = "select vtiger_crmentity.crmid, vtiger_pricebook.* from vtiger_pricebook inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_pricebook.pricebookid where vtiger_crmentity.deleted=0"; $result = $this->db->query($query);
+ $query = "select vtiger_crmentity.crmid, vtiger_pricebook.* from vtiger_pricebook inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_pricebook.pricebookid where vtiger_crmentity.deleted=0";
+ $result = $this->db->query($query);
$no_count = $this->db->num_rows($result);
if($no_count !=0)
{
Modified: vtigercrm/trunk/modules/Products/Product.php
==============================================================================
--- vtigercrm/trunk/modules/Products/Product.php (original)
+++ vtigercrm/trunk/modules/Products/Product.php Thu Jul 13 14:30:33 2006
@@ -69,6 +69,8 @@
var $default_order_by = 'productname';
var $default_sort_order = 'ASC';
+ /** Constructor which will set the column_fields in this object
+ */
function Product() {
$this->log =LoggerManager::getLogger('product');
$this->log->debug("Entering Product() method ...");
@@ -76,7 +78,10 @@
$this->column_fields = getColumnFields('Products');
$this->log->debug("Exiting Product method ...");
}
-
+
+ /** Function used to get the sort order for Product listview
+ * return string $sorder - first check the $_REQUEST['sorder'] if request value is empty then check in the $_SESSION['HELPDESK_SORT_ORDER'] if this session value is empty then default sort order will be returned.
+ */
function getSortOrder()
{
global $log;
@@ -89,6 +94,9 @@
return $sorder;
}
+ /** Function used to get the order by value for Product listview
+ * return string $order_by - first check the $_REQUEST['order_by'] if request value is empty then check in the $_SESSION['HELPDESK_ORDER_BY'] if this session value is empty then default order by will be returned.
+ */
function getOrderBy()
{
global $log;
@@ -101,13 +109,15 @@
return $order_by;
}
+ /** function used to get the attachment which are related to the product
+ * @param int $id - product id to which we want to retrieve the attachments and notes
+ * @return array - array which will be returned from the function getAttachmentsAndNotes with parameters module, query, product id
+ **/
function get_attachments($id)
{
global $log;
$log->debug("Entering get_attachments(".$id.") method ...");
- // Armando Lüscher 18.10.2005 -> §visibleDescription
- // Desc: Inserted vtiger_crmentity.createdtime, vtiger_notes.notecontent description, vtiger_users.user_name
- // Inserted inner join vtiger_users on vtiger_crmentity.smcreatorid= vtiger_users.id
+
$query = "SELECT vtiger_notes.title, 'Notes ' AS ActivityType,
vtiger_notes.filename, vtiger_attachments.type AS FileType,
crm2.modifiedtime AS lastmodified,
@@ -153,8 +163,13 @@
$log->debug("Exiting get_attachments method ...");
return getAttachmentsAndNotes('Products',$query,$id);
- }
-
+ }
+
+ /** function used to get the list of potentials which are related to the product
+ * @param int $id - product id
+ * @return void
+ * but this function will call the function renderRelatedPotentials with parameter query
+ */
function get_opportunities($id)
{
global $log;
@@ -170,12 +185,17 @@
ON vtiger_potential.potentialid = vtiger_potentialgrouprelation.potentialid
LEFT JOIN vtiger_groups
ON vtiger_groups.groupname = vtiger_potentialgrouprelation.groupname
+ inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_products.productid
WHERE vtiger_crmentity.deleted = 0
AND vtiger_products.productid = ".$id;
$log->debug("Exiting get_opportunities method ...");
renderRelatedPotentials($query);
}
+ /** function used to get the list of tickets which are related to the product
+ * @param int $id - product id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_tickets($id)
{
global $log;
@@ -212,7 +232,10 @@
return GetRelatedList('Products','HelpDesk',$focus,$query,$button,$returnset);
}
-
+ /** function used to get the list of activities which are related to the product
+ * @param int $id - product id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_activities($id)
{
global $log;
@@ -262,6 +285,11 @@
$log->debug("Exiting get_activities method ...");
return GetRelatedList('Products','Activities',$focus,$query,$button,$returnset);
}
+
+ /** function used to get the list of quotes which are related to the product
+ * @param int $id - product id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_quotes($id)
{
global $log;
@@ -297,6 +325,11 @@
$log->debug("Exiting get_quotes method ...");
return GetRelatedList('Products','Quotes',$focus,$query,$button,$returnset);
}
+
+ /** function used to get the list of purchase orders which are related to the product
+ * @param int $id - product id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_purchase_orders($id)
{
global $log;
@@ -329,6 +362,11 @@
$log->debug("Exiting get_purchase_orders method ...");
return GetRelatedList('Products','PurchaseOrder',$focus,$query,$button,$returnset);
}
+
+ /** function used to get the list of sales orders which are related to the product
+ * @param int $id - product id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_salesorder($id)
{
global $log;
@@ -363,6 +401,11 @@
$log->debug("Exiting get_salesorder method ...");
return GetRelatedList('Products','SalesOrder',$focus,$query,$button,$returnset);
}
+
+ /** function used to get the list of invoices which are related to the product
+ * @param int $id - product id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_invoices($id)
{
global $log;
@@ -395,6 +438,11 @@
$log->debug("Exiting get_invoices method ...");
return GetRelatedList('Products','Invoice',$focus,$query,$button,$returnset);
}
+
+ /** function used to get the list of pricebooks which are related to the product
+ * @param int $id - product id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_product_pricebooks($id)
{
global $log;
@@ -420,6 +468,10 @@
return GetRelatedList('Products','PriceBooks',$focus,$query,$button,$returnset);
}
+ /** function used to get the number of vendors which are related to the product
+ * @param int $id - product id
+ * return int number of rows - return the number of products which do not have relationship with vendor
+ */
function product_novendor()
{
global $log;
@@ -429,13 +481,17 @@
INNER JOIN vtiger_crmentity
ON vtiger_crmentity.crmid = vtiger_products.productid
WHERE vtiger_crmentity.deleted = 0
- AND vtiger_products.vendor_id = ''";
+ AND vtiger_products.vendor_id is NULL";
$result=$this->db->query($query);
$log->debug("Exiting product_novendor method ...");
return $this->db->num_rows($result);
}
-
+ /** function used to get the export query for product
+ * @param reference &$order_by - reference of the order by variable which will be added with the query
+ * @param reference &$where - reference of the where variable which will be added with the query
+ * return string $query - return the query which will give the list of products to export
+ */
function create_export_query(&$order_by, &$where)
{
global $log;
Modified: vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.php
==============================================================================
--- vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.php (original)
+++ vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.php Thu Jul 13 14:30:33 2006
@@ -89,10 +89,10 @@
var $default_order_by = 'subject';
var $default_sort_order = 'ASC';
-/** Constructor Function for Order class
- * This function creates an instance of LoggerManager class using getLogger method
- * creates an instance for PearDatabase class and get values for column_fields array of Order class.
-*/
+ /** Constructor Function for Order class
+ * This function creates an instance of LoggerManager class using getLogger method
+ * creates an instance for PearDatabase class and get values for column_fields array of Order class.
+ */
function Order() {
$this->log =LoggerManager::getLogger('PurchaseOrder');
$this->db = new PearDatabase();
@@ -100,6 +100,9 @@
}
// Mike Crowe Mod --------------------------------------------------------Default ordering for us
+ /** Function used to get the sort order for Purchase Order listview
+ * return string $sorder - first check the $_REQUEST['sorder'] if request value is empty then check in the $_SESSION['PURCHASEORDER_SORT_ORDER'] if this session value is empty then default sort order will be returned.
+ */
function getSortOrder()
{
global $log;
@@ -112,6 +115,9 @@
return $sorder;
}
+ /** Function used to get the order by value for Purchase Order listview
+ * return string $order_by - first check the $_REQUEST['order_by'] if request value is empty then check in the $_SESSION['PURCHASEORDER_ORDER_BY'] if this session value is empty then default order by will be returned.
+ */
function getOrderBy()
{
global $log;
@@ -124,10 +130,10 @@
return $order_by;
}
-/** Function to get activities associated with the id
- * This function accepts the id as arguments and execute the MySQL query using the id
- * and sends the query and the id as arguments to renderRelatedActivities() method
-*/
+ /** Function to get activities associated with the id
+ * This function accepts the id as arguments and execute the MySQL query using the id
+ * and sends the query and the id as arguments to renderRelatedActivities() method
+ */
function get_activities($id)
{
global $log;
@@ -145,10 +151,10 @@
return GetRelatedList('PurchaseOrder','Activities',$focus,$query,$button,$returnset);
}
-/** Function to get history associated with the id
- * This function accepts the id as arguments and execute the MySQL query using the id
- * and sends the query and the id as arguments to renderRelatedHistory() method
-*/
+ /** Function to get history associated with the id
+ * This function accepts the id as arguments and execute the MySQL query using the id
+ * and sends the query and the id as arguments to renderRelatedHistory() method
+ */
function get_history($id)
{
global $log;
@@ -173,10 +179,10 @@
return getHistory('PurchaseOrder',$query,$id);
}
-/** Function to get vtiger_attachments associated with the id
- * This function accepts the id as arguments and execute the MySQL query using the id
- * and sends the query and the id as arguments to renderRelatedAttachments() method.
-*/
+ /** Function to get vtiger_attachments associated with the id
+ * This function accepts the id as arguments and execute the MySQL query using the id
+ * and sends the query and the id as arguments to renderRelatedAttachments() method.
+ */
function get_attachments($id)
{
global $log;
@@ -213,7 +219,7 @@
where vtiger_crmentity.crmid=".$id."
order by createdtime desc";
$log->debug("Exiting get_attachments method ...");
- return getAttachmentsAndNotes('PurchaseOrder',$query,$id);
+ return getAttachmentsAndNotes('PurchaseOrder',$query,$id,$sid='purchaseorderid');
}
/** Function used to get the Status history of the Purchase Order
Modified: vtigercrm/trunk/modules/Quotes/ListTopQuotes.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/ListTopQuotes.php (original)
+++ vtigercrm/trunk/modules/Quotes/ListTopQuotes.php Thu Jul 13 14:30:33 2006
@@ -12,6 +12,10 @@
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
+
+/** function used to get the top 5 quotes
+ * return array $values - array with the title, header and entries like Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries
+ */
function getTopQuotes()
{
require_once("data/Tracker.php");
Modified: vtigercrm/trunk/modules/Quotes/Quote.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/Quote.php (original)
+++ vtigercrm/trunk/modules/Quotes/Quote.php Thu Jul 13 14:30:33 2006
@@ -97,6 +97,8 @@
var $default_order_by = 'crmid';
var $default_sort_order = 'ASC';
+ /** Constructor which will set the column_fields in this object
+ */
function Quote() {
$this->log =LoggerManager::getLogger('quote');
$this->db = new PearDatabase();
@@ -104,6 +106,9 @@
}
// Mike Crowe Mod --------------------------------------------------------Default ordering for us
+ /** Function used to get the sort order for Quote listview
+ * return string $sorder - first check the $_REQUEST['sorder'] if request value is empty then check in the $_SESSION['QUOTES_SORT_ORDER'] if this session value is empty then default sort order will be returned.
+ */
function getSortOrder()
{
global $log;
@@ -116,6 +121,9 @@
return $sorder;
}
+ /** Function used to get the order by value for Quotes listview
+ * return string $order_by - first check the $_REQUEST['order_by'] if request value is empty then check in the $_SESSION['QUOTES_ORDER_BY'] if this session value is empty then default order by will be returned.
+ */
function getOrderBy()
{
global $log;
@@ -129,6 +137,10 @@
}
// Mike Crowe Mod --------------------------------------------------------
+ /** function used to get the list of sales orders which are related to the Quotes
+ * @param int $id - quote id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_salesorder($id)
{
global $log;
@@ -144,7 +156,11 @@
$log->debug("Exiting get_salesorder method ...");
return GetRelatedList('Quotes','SalesOrder',$focus,$query,$button,$returnset);
}
-
+
+ /** function used to get the list of activities which are related to the Quotes
+ * @param int $id - quote id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_activities($id)
{
global $log;
@@ -161,6 +177,11 @@
$log->debug("Exiting get_activities method ...");
return GetRelatedList('Quotes','Activities',$focus,$query,$button,$returnset);
}
+
+ /** function used to get the the activity history related to the quote
+ * @param int $id - quote id
+ * return array - array which will be returned from the function GetHistory
+ */
function get_history($id)
{
global $log;
Modified: vtigercrm/trunk/modules/SalesOrder/ListTopSalesOrder.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/ListTopSalesOrder.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/ListTopSalesOrder.php Thu Jul 13 14:30:33 2006
@@ -12,6 +12,11 @@
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
+
+
+/** function used to get the top 5 sales orders
+ * return array $values - array with the title, header and entries like Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries
+ */
function getTopSalesOrder()
{
require_once("data/Tracker.php");
Modified: vtigercrm/trunk/modules/SalesOrder/SalesOrder.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/SalesOrder.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/SalesOrder.php Thu Jul 13 14:30:33 2006
@@ -95,10 +95,11 @@
var $default_order_by = 'subject';
var $default_sort_order = 'ASC';
-/** Constructor Function for SalesOrder class
- * This function creates an instance of LoggerManager class using getLogger method
- * creates an instance for PearDatabase class and get values for column_fields array of SalesOrder class.
-*/
+
+ /** Constructor Function for SalesOrder class
+ * This function creates an instance of LoggerManager class using getLogger method
+ * creates an instance for PearDatabase class and get values for column_fields array of SalesOrder class.
+ */
function SalesOrder() {
$this->log =LoggerManager::getLogger('SalesOrder');
$this->db = new PearDatabase();
@@ -106,6 +107,9 @@
}
// Mike Crowe Mod --------------------------------------------------------Default ordering for us
+ /** Function used to get the sort order for Sales Order listview
+ * return string $sorder - first check the $_REQUEST['sorder'] if request value is empty then check in the $_SESSION['SALESORDER_SORT_ORDER'] if this session value is empty then default sort order will be returned.
+ */
function getSortOrder()
{
global $log;
@@ -118,6 +122,9 @@
return $sorder;
}
+ /** Function used to get the order by value for Sales Order listview
+ * return string $order_by - first check the $_REQUEST['order_by'] if request value is empty then check in the $_SESSION['SALESORDER_ORDER_BY'] if this session value is empty then default order by will be returned.
+ */
function getOrderBy()
{
global $log;
@@ -131,10 +138,10 @@
}
// Mike Crowe Mod --------------------------------------------------------
-/** Function to get activities associated with the id
- * This function accepts the id as arguments and execute the MySQL query using the id
- * and sends the query and the id as arguments to renderRelatedActivities() method
-*/
+ /** Function to get activities associated with the id
+ * This function accepts the id as arguments and execute the MySQL query using the id
+ * and sends the query and the id as arguments to renderRelatedActivities() method
+ */
function get_activities($id)
{
global $log;
@@ -152,10 +159,10 @@
return GetRelatedList('SalesOrder','Activities',$focus,$query,$button,$returnset);
}
-/** Function to get history associated with the id
- * This function accepts the id as arguments and execute the MySQL query using the id
- * and sends the query and the id as arguments to renderRelatedHistory() method
-*/
+ /** Function to get history associated with the id
+ * This function accepts the id as arguments and execute the MySQL query using the id
+ * and sends the query and the id as arguments to renderRelatedHistory() method
+ */
function get_history($id)
{
global $log;
@@ -180,10 +187,10 @@
return getHistory('SalesOrder',$query,$id);
}
-/** Function to get vtiger_attachments associated with the id
- * This function accepts the id as arguments and execute the MySQL query using the id
- * and sends the query and the id as arguments to renderRelatedAttachments() method.
-*/
+ /** Function to get vtiger_attachments associated with the id
+ * This function accepts the id as arguments and execute the MySQL query using the id
+ * and sends the query and the id as arguments to renderRelatedAttachments() method.
+ */
function get_attachments($id)
{
global $log;
@@ -220,13 +227,13 @@
where vtiger_crmentity.crmid=".$id."
order by createdtime desc";
$log->debug("Exiting get_attachments method ...");
- return getAttachmentsAndNotes('SalesOrder',$query,$id);
- }
-
-/** Function to get vtiger_invoices associated with the id
- * This function accepts the id as arguments and execute the MySQL query using the id
- * and sends the query and the id as arguments to renderRelatedInvoices() method.
-*/
+ return getAttachmentsAndNotes('SalesOrder',$query,$id,$sid='salesorderid');
+ }
+
+ /** Function to get vtiger_invoices associated with the id
+ * This function accepts the id as arguments and execute the MySQL query using the id
+ * and sends the query and the id as arguments to renderRelatedInvoices() method.
+ */
function get_invoices($id)
{
global $log;
Modified: vtigercrm/trunk/modules/Vendors/Vendor.php
==============================================================================
--- vtigercrm/trunk/modules/Vendors/Vendor.php (original)
+++ vtigercrm/trunk/modules/Vendors/Vendor.php Thu Jul 13 14:30:33 2006
@@ -55,6 +55,8 @@
var $default_order_by = 'vendorname';
var $default_sort_order = 'ASC';
+ /** Constructor which will set the column_fields in this object
+ */
function Vendor() {
$this->log =LoggerManager::getLogger('vendor');
$this->log->debug("Entering Vendor() method ...");
@@ -63,6 +65,10 @@
$this->log->debug("Exiting Vendor method ...");
}
+ /** function used to get the list of products which are related to the vendor
+ * @param int $id - vendor id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_products($id)
{
global $log;
@@ -79,6 +85,11 @@
$log->debug("Exiting get_products method ...");
return GetRelatedList('Vendors','Products',$focus,$query,$button,$returnset);
}
+
+ /** function used to get the list of purchase orders which are related to the vendor
+ * @param int $id - vendor id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_purchase_orders($id)
{
global $log;
@@ -95,6 +106,11 @@
$log->debug("Exiting get_purchase_orders method ...");
return GetRelatedList('Vendors','PurchaseOrder',$focus,$query,$button,$returnset);
}
+
+ /** function used to get the list of contacts which are related to the vendor
+ * @param int $id - vendor id
+ * return array - array which will be returned from the function GetRelatedList
+ */
function get_contacts($id)
{
global $log;
More information about the vtigercrm-commits
mailing list