[Vtigercrm-commits] [vtiger-commits] r11056 - in /vtigercrm/branches/5.0.3/modules: Invoice/CreatePDF.php PurchaseOrder/CreatePDF.php Quotes/CreatePDF.php SalesOrder/CreateSOPDF.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat May 26 08:08:18 EDT 2007
Author: richie
Date: Sat May 26 06:08:11 2007
New Revision: 11056
Log:
* Modified the if condition to get the default company information if there are many
Modified:
vtigercrm/branches/5.0.3/modules/Invoice/CreatePDF.php
vtigercrm/branches/5.0.3/modules/PurchaseOrder/CreatePDF.php
vtigercrm/branches/5.0.3/modules/Quotes/CreatePDF.php
vtigercrm/branches/5.0.3/modules/SalesOrder/CreateSOPDF.php
Modified: vtigercrm/branches/5.0.3/modules/Invoice/CreatePDF.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Invoice/CreatePDF.php (original)
+++ vtigercrm/branches/5.0.3/modules/Invoice/CreatePDF.php Sat May 26 06:08:11 2007
@@ -65,18 +65,18 @@
$result = $adb->query($add_query);
$num_rows = $adb->num_rows($result);
-if($num_rows == 1)
-{
- $org_name = $adb->query_result($result,0,"organizationname");
- $org_address = $adb->query_result($result,0,"address");
- $org_city = $adb->query_result($result,0,"city");
- $org_state = $adb->query_result($result,0,"state");
- $org_country = $adb->query_result($result,0,"country");
- $org_code = $adb->query_result($result,0,"code");
- $org_phone = $adb->query_result($result,0,"phone");
- $org_fax = $adb->query_result($result,0,"fax");
- $org_website = $adb->query_result($result,0,"website");
- $logo_name = $adb->query_result($result,0,"logoname");
+if($num_rows > 0)
+{
+ $org_name = $adb->query_result($result,0,"organizationname");
+ $org_address = $adb->query_result($result,0,"address");
+ $org_city = $adb->query_result($result,0,"city");
+ $org_state = $adb->query_result($result,0,"state");
+ $org_country = $adb->query_result($result,0,"country");
+ $org_code = $adb->query_result($result,0,"code");
+ $org_phone = $adb->query_result($result,0,"phone");
+ $org_fax = $adb->query_result($result,0,"fax");
+ $org_website = $adb->query_result($result,0,"website");
+ $logo_name = $adb->query_result($result,0,"logoname");
}
Modified: vtigercrm/branches/5.0.3/modules/PurchaseOrder/CreatePDF.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/PurchaseOrder/CreatePDF.php (original)
+++ vtigercrm/branches/5.0.3/modules/PurchaseOrder/CreatePDF.php Sat May 26 06:08:11 2007
@@ -63,19 +63,19 @@
$result = $adb->query($add_query);
$num_rows = $adb->num_rows($result);
-if($num_rows == 1)
-{
- $org_name = $adb->query_result($result,0,"organizationname");
- $org_address = $adb->query_result($result,0,"address");
- $org_city = $adb->query_result($result,0,"city");
- $org_state = $adb->query_result($result,0,"state");
- $org_country = $adb->query_result($result,0,"country");
- $org_code = $adb->query_result($result,0,"code");
- $org_phone = $adb->query_result($result,0,"phone");
- $org_fax = $adb->query_result($result,0,"fax");
- $org_website = $adb->query_result($result,0,"website");
-
- $logo_name = $adb->query_result($result,0,"logoname");
+if($num_rows > 0)
+{
+ $org_name = $adb->query_result($result,0,"organizationname");
+ $org_address = $adb->query_result($result,0,"address");
+ $org_city = $adb->query_result($result,0,"city");
+ $org_state = $adb->query_result($result,0,"state");
+ $org_country = $adb->query_result($result,0,"country");
+ $org_code = $adb->query_result($result,0,"code");
+ $org_phone = $adb->query_result($result,0,"phone");
+ $org_fax = $adb->query_result($result,0,"fax");
+ $org_website = $adb->query_result($result,0,"website");
+
+ $logo_name = $adb->query_result($result,0,"logoname");
}
//Population of Product Details - Starts
Modified: vtigercrm/branches/5.0.3/modules/Quotes/CreatePDF.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Quotes/CreatePDF.php (original)
+++ vtigercrm/branches/5.0.3/modules/Quotes/CreatePDF.php Sat May 26 06:08:11 2007
@@ -63,19 +63,19 @@
$result = $adb->query($add_query);
$num_rows = $adb->num_rows($result);
-if($num_rows == 1)
-{
- $org_name = $adb->query_result($result,0,"organizationname");
- $org_address = $adb->query_result($result,0,"address");
- $org_city = $adb->query_result($result,0,"city");
- $org_state = $adb->query_result($result,0,"state");
- $org_country = $adb->query_result($result,0,"country");
- $org_code = $adb->query_result($result,0,"code");
- $org_phone = $adb->query_result($result,0,"phone");
- $org_fax = $adb->query_result($result,0,"fax");
- $org_website = $adb->query_result($result,0,"website");
-
- $logo_name = $adb->query_result($result,0,"logoname");
+if($num_rows > 0)
+{
+ $org_name = $adb->query_result($result,0,"organizationname");
+ $org_address = $adb->query_result($result,0,"address");
+ $org_city = $adb->query_result($result,0,"city");
+ $org_state = $adb->query_result($result,0,"state");
+ $org_country = $adb->query_result($result,0,"country");
+ $org_code = $adb->query_result($result,0,"code");
+ $org_phone = $adb->query_result($result,0,"phone");
+ $org_fax = $adb->query_result($result,0,"fax");
+ $org_website = $adb->query_result($result,0,"website");
+
+ $logo_name = $adb->query_result($result,0,"logoname");
}
Modified: vtigercrm/branches/5.0.3/modules/SalesOrder/CreateSOPDF.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/SalesOrder/CreateSOPDF.php (original)
+++ vtigercrm/branches/5.0.3/modules/SalesOrder/CreateSOPDF.php Sat May 26 06:08:11 2007
@@ -63,19 +63,19 @@
$result = $adb->query($add_query);
$num_rows = $adb->num_rows($result);
-if($num_rows == 1)
-{
- $org_name = $adb->query_result($result,0,"organizationname");
- $org_address = $adb->query_result($result,0,"address");
- $org_city = $adb->query_result($result,0,"city");
- $org_state = $adb->query_result($result,0,"state");
- $org_country = $adb->query_result($result,0,"country");
- $org_code = $adb->query_result($result,0,"code");
- $org_phone = $adb->query_result($result,0,"phone");
- $org_fax = $adb->query_result($result,0,"fax");
- $org_website = $adb->query_result($result,0,"website");
-
- $logo_name = $adb->query_result($result,0,"logoname");
+if($num_rows > 0)
+{
+ $org_name = $adb->query_result($result,0,"organizationname");
+ $org_address = $adb->query_result($result,0,"address");
+ $org_city = $adb->query_result($result,0,"city");
+ $org_state = $adb->query_result($result,0,"state");
+ $org_country = $adb->query_result($result,0,"country");
+ $org_code = $adb->query_result($result,0,"code");
+ $org_phone = $adb->query_result($result,0,"phone");
+ $org_fax = $adb->query_result($result,0,"fax");
+ $org_website = $adb->query_result($result,0,"website");
+
+ $logo_name = $adb->query_result($result,0,"logoname");
}
//Population of Product Details - Starts
More information about the vtigercrm-commits
mailing list