[Vtigercrm-commits] [vtiger-commits] r5615 - /vtigercrm/trunk/modules/PriceBooks/PriceBook.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon May 1 05:37:54 EDT 2006


Author: don
Date: Mon May  1 03:37:51 2006
New Revision: 5615

Log:
logs entry has been included in all functions

Modified:
    vtigercrm/trunk/modules/PriceBooks/PriceBook.php

Modified: vtigercrm/trunk/modules/PriceBooks/PriceBook.php
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/PriceBook.php (original)
+++ vtigercrm/trunk/modules/PriceBooks/PriceBook.php Mon May  1 03:37:51 2006
@@ -60,12 +60,16 @@
 
 	function PriceBook() {
 		$this->log =LoggerManager::getLogger('pricebook');
+		$this->log->debug("Entering PriceBook() method ...");
 		$this->db = new PearDatabase();
 		$this->column_fields = getColumnFields('PriceBooks');
+		$this->log->debug("Exiting PriceBook method ...");
 	}
 
 	function get_pricebook_products($id)
 	{
+		global $log;
+		$log->debug("Entering get_pricebook_products(".$id.") method ...");
 		global $app_strings;
 		require_once('modules/Products/Product.php');	
 		$focus = new Product();
@@ -75,10 +79,13 @@
 		$returnset = '&return_module=PriceBooks&return_action=DetailView&return_id='.$id;
 
 		$query = 'select products.productid, products.productname, products.productcode, products.commissionrate, products.qty_per_unit, products.unit_price, crmentity.crmid, crmentity.smownerid,pricebookproductrel.listprice from products inner join pricebookproductrel on products.productid = pricebookproductrel.productid inner join crmentity on crmentity.crmid = products.productid inner join pricebook on pricebook.pricebookid = pricebookproductrel.pricebookid  where pricebook.pricebookid = '.$id.' and crmentity.deleted = 0'; 
+		$log->debug("Exiting get_pricebook_products method ...");
 		return getPriceBookRelatedProducts($query,$focus,$returnset);
 	}
 	function get_pricebook_noproduct($id)
-        {
+	{
+		global $log;
+		$log->debug("Entering get_pricebook_noproduct(".$id.") method ...");
 		 
 		$query = "select crmentity.crmid, pricebook.* from pricebook inner join crmentity on crmentity.crmid=pricebook.pricebookid where crmentity.deleted=0";                                                                                                  $result = $this->db->query($query);
 		$no_count = $this->db->num_rows($result);
@@ -88,19 +95,23 @@
 			$result_pb = $this->db->query($pb_query);
 			if($no_count == $this->db->num_rows($result_pb))
 			{
+				$log->debug("Exiting get_pricebook_noproduct method ...");
 				return false;
 			}
 			elseif($this->db->num_rows($result_pb) == 0)
 			{
+				$log->debug("Exiting get_pricebook_noproduct method ...");
 				return true;
 			}
 			elseif($this->db->num_rows($result_pb) < $no_count)
 			{
+				$log->debug("Exiting get_pricebook_noproduct method ...");
 				return true;
 			}
 		}
 		else
 		{
+			$log->debug("Exiting get_pricebook_noproduct method ...");
 			return false;
 		}
 	}





More information about the vtigercrm-commits mailing list