[Vtigercrm-commits] [vtiger-commits] r4939 - in /vtigercrm/trunk/include/utils: CommonUtils.php DetailViewUtils.php EditViewUtils.php GraphUtils.php InventoryUtils.php export.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Apr 6 09:29:11 EDT 2006
Author: saraj
Date: Thu Apr 6 07:29:00 2006
New Revision: 4939
Log:
Docs added for function
Modified:
vtigercrm/trunk/include/utils/CommonUtils.php
vtigercrm/trunk/include/utils/DetailViewUtils.php
vtigercrm/trunk/include/utils/EditViewUtils.php
vtigercrm/trunk/include/utils/GraphUtils.php
vtigercrm/trunk/include/utils/InventoryUtils.php
vtigercrm/trunk/include/utils/export.php
Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Thu Apr 6 07:29:00 2006
@@ -1519,6 +1519,11 @@
return $filepath;
}
+/**
+ * This function is used to get the Quick create form field parameters for a given module.
+ * Param $module - module name
+ * returns the value in array format
+ */
function QuickCreate($module)
Modified: vtigercrm/trunk/include/utils/DetailViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/DetailViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/DetailViewUtils.php Thu Apr 6 07:29:00 2006
@@ -20,22 +20,21 @@
* Contributor(s): ______________________________________..
********************************************************************************/
-
-
-/** This function returns the name of the person.
- * It currently returns "first last". It should not put the space if either name is not available.
- * It should not return errors if either name is not available.
- * If no names are present, it will return ""
- * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
- * All Rights Reserved.
- * Contributor(s): ______________________________________..
- */
-
-
-
require_once('include/database/PearDatabase.php');
require_once('include/ComboUtil.php'); //new
require_once('include/utils/CommonUtils.php'); //new
+
+
+/** This function returns the detail view form field and and its properties in array format.
+ * Param $uitype - UI type of the field
+ * Param $fieldname - Form field name
+ * Param $fieldlabel - Form field label name
+ * Param $col_fields - array contains the fieldname and values
+ * Param $generatedtype - Field generated type (default is 1)
+ * Param $tabid - tab id to which the Field belongs to (default is "")
+ * Return type is an array
+ */
+
function getDetailViewOutputHtml($uitype, $fieldname, $fieldlabel, $col_fields,$generatedtype,$tabid='')
{
global $adb;
@@ -732,6 +731,11 @@
return $label_fld;
}
+/** This function returns a HTML output of associated products for a given entity (Quotes,Invoice,Sales order or Purchase order)
+ * Param $module - module name
+ * Param $focus - module object
+ * Return type string
+ */
function getDetailAssociatedProducts($module,$focus)
{
@@ -838,6 +842,12 @@
}
+/** This function returns the related tab details for a given entity or a module.
+* Param $module - module name
+* Param $focus - module object
+* Return type is an array
+*/
+
function getRelatedLists($module,$focus)
{
global $adb;
@@ -873,6 +883,13 @@
return $focus_list;
}
+/** This function returns the detailed block information of a record in a module.
+* Param $module - module name
+* Param $block - block id
+* Param $col_fields - column fields array for the module
+* Param $tabid - tab id
+* Return type is an array
+*/
function getDetailBlockInformation($module, $block,$col_fields,$tabid)
{
Modified: vtigercrm/trunk/include/utils/EditViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/EditViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/EditViewUtils.php Thu Apr 6 07:29:00 2006
@@ -20,20 +20,20 @@
* Contributor(s): ______________________________________..
********************************************************************************/
-
-
-/** This function returns the name of the person.
- * It currently returns "first last". It should not put the space if either name is not available.
- * It should not return errors if either name is not available.
- * If no names are present, it will return ""
- * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
- * All Rights Reserved.
- * Contributor(s): ______________________________________..
- */
-
require_once('include/database/PearDatabase.php');
require_once('include/ComboUtil.php'); //new
require_once('include/utils/CommonUtils.php'); //new
+
+/** This function returns the field details for a given fieldname.
+ * Param $uitype - UI type of the field
+ * Param $fieldname - Form field name
+ * Param $fieldlabel - Form field label name
+ * Param $maxlength - maximum length of the field
+ * Param $col_fields - array contains the fieldname and values
+ * Param $generatedtype - Field generated type (default is 1)
+ * Param $module_name - module name
+ * Return type is an array
+ */
function getOutputHtml($uitype, $fieldname, $fieldlabel, $maxlength, $col_fields,$generatedtype,$module_name)
{
@@ -962,9 +962,12 @@
return $final_arr;
}
-
-
-
+/** This function returns the invoice object populated with the details from sales order object.
+* Param $focus - Invoice object
+* Param $so_focus - Sales order focus
+* Param $soid - sales order id
+* Return type is an object array
+*/
function getConvertSoToInvoice($focus,$so_focus,$soid)
{
@@ -999,6 +1002,12 @@
}
+/** This function returns the invoice object populated with the details from quote object.
+* Param $focus - Invoice object
+* Param $quote_focus - Quote order focus
+* Param $quoteid - quote id
+* Return type is an object array
+*/
function getConvertQuoteToInvoice($focus,$quote_focus,$quoteid)
@@ -1027,6 +1036,12 @@
}
+/** This function returns the sales order object populated with the details from quote object.
+* Param $focus - Sales order object
+* Param $quote_focus - Quote order focus
+* Param $quoteid - quote id
+* Return type is an object array
+*/
function getConvertQuoteToSoObject($focus,$quote_focus,$quoteid)
{
@@ -1058,6 +1073,13 @@
}
+/** This function returns the detailed list of products associated to a given entity or a record.
+* Param $module - module name
+* Param $focus - module object
+* Param $seid - sales entity id
+* Return type is an object array
+*/
+
function getAssociatedProducts($module,$focus,$seid='')
{
@@ -1142,6 +1164,13 @@
}
+/** This function returns the no of products associated to the given entity or a record.
+* Param $module - module name
+* Param $focus - module object
+* Param $seid - sales entity id
+* Return type is an object array
+*/
+
function getNoOfAssocProducts($module,$focus,$seid='')
{
global $adb;
@@ -1177,9 +1206,15 @@
return $num_rows;
}
-
-
-
+/** This function returns the detail block information of a record for given block id.
+* Param $module - module name
+* Param $block - block name
+* Param $mode - view type (detail/edit/create)
+* Param $col_fields - fields array
+* Param $tabid - tab id
+* Param $info_type - information type (basic/advance) default ""
+* Return type is an object array
+*/
function getBlockInformation($module, $block, $mode, $col_fields,$tabid,$info_type='')
{
@@ -1276,6 +1311,12 @@
}
+/** This function returns the data type of the fields, with field label, which is used for javascript validation.
+* Param $validationData - array of fieldnames with datatype
+* Return type array
+*/
+
+
function split_validationdataArray($validationData)
{
$fieldName = '';
Modified: vtigercrm/trunk/include/utils/GraphUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/GraphUtils.php (original)
+++ vtigercrm/trunk/include/utils/GraphUtils.php Thu Apr 6 07:29:00 2006
@@ -26,6 +26,10 @@
DEFINE("FF_FONT1",'Verdana');
+/**This function is used to get the font name when a language code is given
+* Param $locale - language code
+* Return type string
+*/
function calculate_font_name($locale)
{
@@ -48,6 +52,11 @@
return FF_FONT1;
}
+/**This function is used to generate the color format.
+* Param $count - language code
+* Return type string
+*/
+
function color_generator($count = 1, $start = '33CCFF', $step = '221133')
{
// explode color strings to RGB array
@@ -69,4 +78,4 @@
}
return $result;
}
-?>
+?>
Modified: vtigercrm/trunk/include/utils/InventoryUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/InventoryUtils.php (original)
+++ vtigercrm/trunk/include/utils/InventoryUtils.php Thu Apr 6 07:29:00 2006
@@ -50,6 +50,16 @@
return $productBlock;
}
+/**
+ * This function updates the stock information once the product is ordered.
+ * Param $productid - product id
+ * Param $qty - product quantity in no's
+ * Param $mode - mode type
+ * Param $ext_prod_arr - existing products
+ * Param $module - module name
+ * return type void
+ */
+
function updateStk($product_id,$qty,$mode,$ext_prod_arr,$module)
{
global $adb;
@@ -118,6 +128,17 @@
}
}
+/**
+ * This function sends a mail to the handler whenever the product reaches the reorder level.
+ * Param $product_id - product id
+ * Param $upd_qty - updated product quantity in no's
+ * Param $prod_name - product name
+ * Param $qtyinstk - quantity in stock
+ * Param $qty - quantity
+ * Param $module - module name
+ * return type void
+ */
+
function sendPrdStckMail($product_id,$upd_qty,$prod_name,$qtyinstk,$qty,$module)
{
global $current_user;
@@ -173,6 +194,10 @@
}
}
+/**This function is used to get the quantity in stock of a given product
+*Param $product_id - product id
+*Returns type numeric
+*/
function getPrdQtyInStck($product_id)
{
global $adb;
@@ -182,6 +207,11 @@
return $qtyinstck;
}
+/**This function is used to get the reorder level of a product
+*Param $product_id - product id
+*Returns type numeric
+*/
+
function getPrdReOrderLevel($product_id)
{
global $adb;
@@ -191,6 +221,11 @@
return $reorderlevel;
}
+/**This function is used to get the handler for a given product
+*Param $product_id - product id
+*Returns type numeric
+*/
+
function getPrdHandler($product_id)
{
global $adb;
Modified: vtigercrm/trunk/include/utils/export.php
==============================================================================
--- vtigercrm/trunk/include/utils/export.php (original)
+++ vtigercrm/trunk/include/utils/export.php Thu Apr 6 07:29:00 2006
@@ -51,13 +51,20 @@
die("you can't export!");
}
-//Function added to convert line breaks to space in description during export
+/**Function convert line breaks to space in description during export
+ * Pram $str - text
+ * retrun type string
+*/
function br2nl_vt($str)
{
$str = preg_replace("/(\r\n)/", " ", $str);
return $str;
}
+/**This function exports all the data for a given module
+ * Param $type - module name
+ * Return type text
+*/
function export_all($type)
{
$contact_fields = Array();
More information about the vtigercrm-commits
mailing list