Completed
Push — master ( 24ce66...da2f36 )
by Adam
25:35
created
modules/AOS_Products/metadata/quickcreatedefs.php 2 patches
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -2,115 +2,115 @@
 block discarded – undo
2 2
 $module_name = 'AOS_Products';
3 3
 $viewdefs [$module_name] = 
4 4
 array (
5
-  'QuickCreate' => 
6
-  array (
5
+    'QuickCreate' => 
6
+    array (
7 7
     'templateMeta' => 
8 8
     array (
9
-      'maxColumns' => '2',
10
-      'widths' => 
11
-      array (
9
+        'maxColumns' => '2',
10
+        'widths' => 
11
+        array (
12 12
         0 => 
13 13
         array (
14
-          'label' => '10',
15
-          'field' => '30',
14
+            'label' => '10',
15
+            'field' => '30',
16 16
         ),
17 17
         1 => 
18 18
         array (
19
-          'label' => '10',
20
-          'field' => '30',
19
+            'label' => '10',
20
+            'field' => '30',
21
+        ),
21 22
         ),
22
-      ),
23
-      'form' => 
24
-      array (
23
+        'form' => 
24
+        array (
25 25
         'enctype' => 'multipart/form-data',
26 26
         'headerTpl' => 'modules/AOS_Products/tpls/EditViewHeader.tpl',
27
-      ),
28
-      'includes' => 
29
-      array (
27
+        ),
28
+        'includes' => 
29
+        array (
30 30
         0 => 
31 31
         array (
32
-          'file' => 'modules/AOS_Products/js/products.js',
32
+            'file' => 'modules/AOS_Products/js/products.js',
33 33
         ),
34
-      ),
35
-      'useTabs' => false,
36
-      'tabDefs' => 
37
-      array (
34
+        ),
35
+        'useTabs' => false,
36
+        'tabDefs' => 
37
+        array (
38 38
         'DEFAULT' => 
39 39
         array (
40
-          'newTab' => false,
41
-          'panelDefault' => 'expanded',
40
+            'newTab' => false,
41
+            'panelDefault' => 'expanded',
42
+        ),
42 43
         ),
43
-      ),
44 44
     ),
45 45
     'panels' => 
46 46
     array (
47
-      'default' => 
48
-      array (
47
+        'default' => 
48
+        array (
49 49
         0 => 
50 50
         array (
51
-          0 => 
52
-          array (
51
+            0 => 
52
+            array (
53 53
             'name' => 'name',
54 54
             'label' => 'LBL_NAME',
55
-          ),
56
-          1 => 
57
-          array (
55
+            ),
56
+            1 => 
57
+            array (
58 58
             'name' => 'part_number',
59 59
             'label' => 'LBL_PART_NUMBER',
60
-          ),
60
+            ),
61 61
         ),
62 62
         1 => 
63 63
         array (
64
-          0 => 
65
-          array (
64
+            0 => 
65
+            array (
66 66
             'name' => 'url',
67 67
             'label' => 'LBL_URL',
68
-          ),
69
-          1 => 
70
-          array (
68
+            ),
69
+            1 => 
70
+            array (
71 71
             'name' => 'type',
72 72
             'label' => 'LBL_TYPE',
73
-          ),
73
+            ),
74 74
         ),
75 75
         2 => 
76 76
         array (
77
-          0 => 
78
-          array (
77
+            0 => 
78
+            array (
79 79
             'name' => 'cost',
80 80
             'label' => 'LBL_COST',
81
-          ),
82
-          1 => 
83
-          array (
81
+            ),
82
+            1 => 
83
+            array (
84 84
             'name' => 'price',
85 85
             'label' => 'LBL_PRICE',
86
-          ),
86
+            ),
87 87
         ),
88 88
         3 => 
89 89
         array (
90
-          0 => 
91
-          array (
90
+            0 => 
91
+            array (
92 92
             'name' => 'contact',
93 93
             'label' => 'LBL_CONTACT',
94
-          ),
94
+            ),
95 95
         ),
96 96
         4 => 
97 97
         array (
98
-          0 => 
99
-          array (
98
+            0 => 
99
+            array (
100 100
             'name' => 'description',
101 101
             'label' => 'LBL_DESCRIPTION',
102
-          ),
102
+            ),
103 103
         ),
104 104
         5 => 
105 105
         array (
106
-          0 => 
107
-          array (
106
+            0 => 
107
+            array (
108 108
             'name' => 'product_image',
109 109
             'customCode' => '{$PRODUCT_IMAGE}',
110
-          ),
110
+            ),
111
+        ),
111 112
         ),
112
-      ),
113 113
     ),
114
-  ),
114
+    ),
115 115
 );
116 116
 ?>
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,110 +1,110 @@
 block discarded – undo
1 1
 <?php
2 2
 $module_name = 'AOS_Products';
3 3
 $viewdefs [$module_name] = 
4
-array (
4
+array(
5 5
   'QuickCreate' => 
6
-  array (
6
+  array(
7 7
     'templateMeta' => 
8
-    array (
8
+    array(
9 9
       'maxColumns' => '2',
10 10
       'widths' => 
11
-      array (
11
+      array(
12 12
         0 => 
13
-        array (
13
+        array(
14 14
           'label' => '10',
15 15
           'field' => '30',
16 16
         ),
17 17
         1 => 
18
-        array (
18
+        array(
19 19
           'label' => '10',
20 20
           'field' => '30',
21 21
         ),
22 22
       ),
23 23
       'form' => 
24
-      array (
24
+      array(
25 25
         'enctype' => 'multipart/form-data',
26 26
         'headerTpl' => 'modules/AOS_Products/tpls/EditViewHeader.tpl',
27 27
       ),
28 28
       'includes' => 
29
-      array (
29
+      array(
30 30
         0 => 
31
-        array (
31
+        array(
32 32
           'file' => 'modules/AOS_Products/js/products.js',
33 33
         ),
34 34
       ),
35 35
       'useTabs' => false,
36 36
       'tabDefs' => 
37
-      array (
37
+      array(
38 38
         'DEFAULT' => 
39
-        array (
39
+        array(
40 40
           'newTab' => false,
41 41
           'panelDefault' => 'expanded',
42 42
         ),
43 43
       ),
44 44
     ),
45 45
     'panels' => 
46
-    array (
46
+    array(
47 47
       'default' => 
48
-      array (
48
+      array(
49 49
         0 => 
50
-        array (
50
+        array(
51 51
           0 => 
52
-          array (
52
+          array(
53 53
             'name' => 'name',
54 54
             'label' => 'LBL_NAME',
55 55
           ),
56 56
           1 => 
57
-          array (
57
+          array(
58 58
             'name' => 'part_number',
59 59
             'label' => 'LBL_PART_NUMBER',
60 60
           ),
61 61
         ),
62 62
         1 => 
63
-        array (
63
+        array(
64 64
           0 => 
65
-          array (
65
+          array(
66 66
             'name' => 'url',
67 67
             'label' => 'LBL_URL',
68 68
           ),
69 69
           1 => 
70
-          array (
70
+          array(
71 71
             'name' => 'type',
72 72
             'label' => 'LBL_TYPE',
73 73
           ),
74 74
         ),
75 75
         2 => 
76
-        array (
76
+        array(
77 77
           0 => 
78
-          array (
78
+          array(
79 79
             'name' => 'cost',
80 80
             'label' => 'LBL_COST',
81 81
           ),
82 82
           1 => 
83
-          array (
83
+          array(
84 84
             'name' => 'price',
85 85
             'label' => 'LBL_PRICE',
86 86
           ),
87 87
         ),
88 88
         3 => 
89
-        array (
89
+        array(
90 90
           0 => 
91
-          array (
91
+          array(
92 92
             'name' => 'contact',
93 93
             'label' => 'LBL_CONTACT',
94 94
           ),
95 95
         ),
96 96
         4 => 
97
-        array (
97
+        array(
98 98
           0 => 
99
-          array (
99
+          array(
100 100
             'name' => 'description',
101 101
             'label' => 'LBL_DESCRIPTION',
102 102
           ),
103 103
         ),
104 104
         5 => 
105
-        array (
105
+        array(
106 106
           0 => 
107
-          array (
107
+          array(
108 108
             'name' => 'product_image',
109 109
             'customCode' => '{$PRODUCT_IMAGE}',
110 110
           ),
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/metafiles.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
  */
33 33
 $module_name = 'AOS_Products';
34 34
  $metafiles[$module_name] = array(
35
-	'detailviewdefs'  => 	'modules/' . $module_name . '/metadata/detailviewdefs.php', 	
36
-	'editviewdefs'    => 	'modules/' . $module_name . '/metadata/editviewdefs.php',
37
- 	'listviewdefs'    => 	'modules/' . $module_name . '/metadata/listviewdefs.php',
38
- 	'searchdefs'      =>    'modules/' . $module_name . '/metadata/searchdefs.php',
39
- 	'popupdefs'	      =>    'modules/' . $module_name . '/metadata/popupdefs.php',
40
- 	'searchfields'	  =>    'modules/' . $module_name . '/metadata/SearchFields.php',
35
+	'detailviewdefs'  => 	'modules/'.$module_name.'/metadata/detailviewdefs.php', 	
36
+	'editviewdefs'    => 	'modules/'.$module_name.'/metadata/editviewdefs.php',
37
+ 	'listviewdefs'    => 	'modules/'.$module_name.'/metadata/listviewdefs.php',
38
+ 	'searchdefs'      =>    'modules/'.$module_name.'/metadata/searchdefs.php',
39
+ 	'popupdefs'	      =>    'modules/'.$module_name.'/metadata/popupdefs.php',
40
+ 	'searchfields'	  =>    'modules/'.$module_name.'/metadata/SearchFields.php',
41 41
  );
42 42
 ?>
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
31 31
  * Window - Preferences - PHPeclipse - PHP - Code Templates
32 32
  */
33 33
 $module_name = 'AOS_Products';
34
- $metafiles[$module_name] = array(
35
-	'detailviewdefs'  => 	'modules/' . $module_name . '/metadata/detailviewdefs.php', 	
36
-	'editviewdefs'    => 	'modules/' . $module_name . '/metadata/editviewdefs.php',
37
- 	'listviewdefs'    => 	'modules/' . $module_name . '/metadata/listviewdefs.php',
38
- 	'searchdefs'      =>    'modules/' . $module_name . '/metadata/searchdefs.php',
39
- 	'popupdefs'	      =>    'modules/' . $module_name . '/metadata/popupdefs.php',
40
- 	'searchfields'	  =>    'modules/' . $module_name . '/metadata/SearchFields.php',
41
- );
34
+    $metafiles[$module_name] = array(
35
+    'detailviewdefs'  => 	'modules/' . $module_name . '/metadata/detailviewdefs.php', 	
36
+    'editviewdefs'    => 	'modules/' . $module_name . '/metadata/editviewdefs.php',
37
+        'listviewdefs'    => 	'modules/' . $module_name . '/metadata/listviewdefs.php',
38
+        'searchdefs'      =>    'modules/' . $module_name . '/metadata/searchdefs.php',
39
+        'popupdefs'	      =>    'modules/' . $module_name . '/metadata/popupdefs.php',
40
+        'searchfields'	  =>    'modules/' . $module_name . '/metadata/SearchFields.php',
41
+    );
42 42
 ?>
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/listviewdefs.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $listViewDefs ['AOS_Products'] = 
3 3
 array (
4
-  'NAME' => 
5
-  array (
4
+    'NAME' => 
5
+    array (
6 6
     'width' => '15%',
7 7
     'label' => 'LBL_NAME',
8 8
     'default' => true,
9 9
     'link' => true,
10
-  ),
11
-  'PART_NUMBER' => 
12
-  array (
10
+    ),
11
+    'PART_NUMBER' => 
12
+    array (
13 13
     'width' => '10%',
14 14
     'label' => 'LBL_PART_NUMBER',
15 15
     'default' => true,
16
-  ),
17
-  'COST' => 
18
-  array (
16
+    ),
17
+    'COST' => 
18
+    array (
19 19
     'width' => '10%',
20 20
     'label' => 'LBL_COST',
21 21
     'currency_format' => true,
22 22
     'default' => true,
23
-  ),
24
-  'PRICE' => 
25
-  array (
23
+    ),
24
+    'PRICE' => 
25
+    array (
26 26
     'width' => '10%',
27 27
     'label' => 'LBL_PRICE',
28 28
     'currency_format' => true,
29 29
     'default' => true,
30
-  ),
31
-  'AOS_PRODUCT_CATEGORY_NAME' => 
32
-  array (
30
+    ),
31
+    'AOS_PRODUCT_CATEGORY_NAME' => 
32
+    array (
33 33
     'type' => 'relate',
34 34
     'studio' => 'visible',
35 35
     'label' => 'LBL_AOS_PRODUCT_CATEGORYS_NAME',
@@ -38,24 +38,24 @@  discard block
 block discarded – undo
38 38
     'width' => '10%',
39 39
     'default' => true,
40 40
     'related_fields' =>
41
-      array (
42
-          'aos_product_category_id',
43
-      ),
44
-  ),
45
-  'CREATED_BY_NAME' => 
46
-  array (
41
+        array (
42
+            'aos_product_category_id',
43
+        ),
44
+    ),
45
+    'CREATED_BY_NAME' => 
46
+    array (
47 47
     'width' => '10%',
48 48
     'label' => 'LBL_CREATED',
49 49
     'default' => true,
50 50
     'module' => 'Users',
51 51
     'link' => true,
52 52
     'id' => 'CREATED_BY',
53
-  ),
54
-  'DATE_ENTERED' => 
55
-  array (
53
+    ),
54
+    'DATE_ENTERED' => 
55
+    array (
56 56
     'width' => '5%',
57 57
     'label' => 'LBL_DATE_ENTERED',
58 58
     'default' => true,
59
-  ),
59
+    ),
60 60
 );
61 61
 ?>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $listViewDefs ['AOS_Products'] = 
3
-array (
3
+array(
4 4
   'NAME' => 
5
-  array (
5
+  array(
6 6
     'width' => '15%',
7 7
     'label' => 'LBL_NAME',
8 8
     'default' => true,
9 9
     'link' => true,
10 10
   ),
11 11
   'PART_NUMBER' => 
12
-  array (
12
+  array(
13 13
     'width' => '10%',
14 14
     'label' => 'LBL_PART_NUMBER',
15 15
     'default' => true,
16 16
   ),
17 17
   'COST' => 
18
-  array (
18
+  array(
19 19
     'width' => '10%',
20 20
     'label' => 'LBL_COST',
21 21
     'currency_format' => true,
22 22
     'default' => true,
23 23
   ),
24 24
   'PRICE' => 
25
-  array (
25
+  array(
26 26
     'width' => '10%',
27 27
     'label' => 'LBL_PRICE',
28 28
     'currency_format' => true,
29 29
     'default' => true,
30 30
   ),
31 31
   'AOS_PRODUCT_CATEGORY_NAME' => 
32
-  array (
32
+  array(
33 33
     'type' => 'relate',
34 34
     'studio' => 'visible',
35 35
     'label' => 'LBL_AOS_PRODUCT_CATEGORYS_NAME',
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
     'width' => '10%',
39 39
     'default' => true,
40 40
     'related_fields' =>
41
-      array (
41
+      array(
42 42
           'aos_product_category_id',
43 43
       ),
44 44
   ),
45 45
   'CREATED_BY_NAME' => 
46
-  array (
46
+  array(
47 47
     'width' => '10%',
48 48
     'label' => 'LBL_CREATED',
49 49
     'default' => true,
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     'id' => 'CREATED_BY',
53 53
   ),
54 54
   'DATE_ENTERED' => 
55
-  array (
55
+  array(
56 56
     'width' => '5%',
57 57
     'label' => 'LBL_DATE_ENTERED',
58 58
     'default' => true,
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/sidecreateviewdefs.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /**
4 4
  * Products, Quotations & Invoices modules.
5 5
  * Extensions to SugarCRM
@@ -40,16 +40,16 @@  discard block
 block discarded – undo
40 40
                                             array('label' => '10', 'field' => '30'),
41 41
                                          ),
42 42
                         ),
43
- 'panels' =>array (
43
+ 'panels' =>array(
44 44
   'DEFAULT' =>
45
-  array (
45
+  array(
46 46
     array(
47
-      array('name'=>'name', 'displayParams'=>array('required'=>true,'size'=>20)),
47
+      array('name'=>'name', 'displayParams'=>array('required'=>true, 'size'=>20)),
48 48
     ),
49
-    array (
50
-      array('name'=>'description','displayParams'=>array('rows'=>3, 'cols'=>20)),
49
+    array(
50
+      array('name'=>'description', 'displayParams'=>array('rows'=>3, 'cols'=>20)),
51 51
     ),
52
-    array (
52
+    array(
53 53
       array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
54 54
     ),
55 55
   ),
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,32 +29,32 @@
 block discarded – undo
29 29
 $module_name = 'AOS_Products';
30 30
 $viewdefs[$module_name]['SideQuickCreate'] = array(
31 31
     'templateMeta' => array('form'=>array('buttons'=>array('SAVE'),
32
-    								      'button_location'=>'bottom',
33
-                                          'headerTpl'=>'include/EditView/header.tpl',
34
-                                          'footerTpl'=>'include/EditView/footer.tpl',
35
-                                          ),
36
-							'maxColumns' => '1',
37
-							'panelClass'=>'none',
38
-							'labelsOnTop'=>true,
32
+                                            'button_location'=>'bottom',
33
+                                            'headerTpl'=>'include/EditView/header.tpl',
34
+                                            'footerTpl'=>'include/EditView/footer.tpl',
35
+                                            ),
36
+                            'maxColumns' => '1',
37
+                            'panelClass'=>'none',
38
+                            'labelsOnTop'=>true,
39 39
                             'widths' => array(
40 40
                                             array('label' => '10', 'field' => '30'),
41
-                                         ),
41
+                                            ),
42 42
                         ),
43
- 'panels' =>array (
44
-  'DEFAULT' =>
45
-  array (
43
+    'panels' =>array (
44
+    'DEFAULT' =>
45
+    array (
46 46
     array(
47
-      array('name'=>'name', 'displayParams'=>array('required'=>true,'size'=>20)),
47
+        array('name'=>'name', 'displayParams'=>array('required'=>true,'size'=>20)),
48 48
     ),
49 49
     array (
50
-      array('name'=>'description','displayParams'=>array('rows'=>3, 'cols'=>20)),
50
+        array('name'=>'description','displayParams'=>array('rows'=>3, 'cols'=>20)),
51 51
     ),
52 52
     array (
53
-      array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
53
+        array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
54
+    ),
54 55
     ),
55
-  ),
56 56
 
57
- )
57
+    )
58 58
 
59 59
 
60 60
 );
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /**
4 6
  * Products, Quotations & Invoices modules.
5 7
  * Extensions to SugarCRM
Please login to merge, or discard this patch.
modules/TableDictionary.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,6 +125,6 @@
 block discarded – undo
125 125
 include('metadata/securitygroups_usersMetaData.php');
126 126
 
127 127
 if(file_exists('custom/application/Ext/TableDictionary/tabledictionary.ext.php')){
128
-	include('custom/application/Ext/TableDictionary/tabledictionary.ext.php');
128
+    include('custom/application/Ext/TableDictionary/tabledictionary.ext.php');
129 129
 }
130 130
 ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 include('metadata/securitygroups_recordsMetaData.php');
125 125
 include('metadata/securitygroups_usersMetaData.php');
126 126
 
127
-if(file_exists('custom/application/Ext/TableDictionary/tabledictionary.ext.php')){
127
+if (file_exists('custom/application/Ext/TableDictionary/tabledictionary.ext.php')) {
128 128
 	include('custom/application/Ext/TableDictionary/tabledictionary.ext.php');
129 129
 }
130 130
 ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.
modules/AOS_Products_Quotes/Line_Items.php 2 patches
Braces   +9 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@  discard block
 block discarded – undo
84 84
             $html .= '<script>insertGroup();</script>';
85 85
         }
86 86
 
87
-    }
88
-    else if($view == 'DetailView'){
87
+    } else if($view == 'DetailView'){
89 88
         $params = array('currency_id' => $focus->currency_id);
90 89
 
91 90
         $sql = "SELECT pg.id, pg.group_id FROM aos_products_quotes pg LEFT JOIN aos_line_item_groups lig ON pg.group_id = lig.id WHERE pg.parent_type = '".$focus->object_name."' AND pg.parent_id = '".$focus->id."' AND pg.deleted = 0 ORDER BY lig.number ASC, pg.number ASC";
@@ -111,7 +110,9 @@  discard block
 block discarded – undo
111 110
 
112 111
             if($enable_groups && ($group_id != $row['group_id'] || $i == 0)){
113 112
                 $html .= $groupStart.$product.$service.$groupEnd;
114
-                if($i != 0)$html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
113
+                if($i != 0) {
114
+                    $html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
115
+                }
115 116
                 $groupStart = '';
116 117
                 $groupEnd = '';
117 118
                 $product = '';
@@ -229,15 +230,13 @@  discard block
 block discarded – undo
229 230
         if($type == 'Amount')
230 231
         {
231 232
             return currency_format_number($amount,$params )."</td>";
232
-        }
233
-        else if($locale->getPrecision())
233
+        } else if($locale->getPrecision())
234 234
         {
235 235
             return rtrim(rtrim(format_number($amount), '0'),$sep[1])."%";
236 236
         } else{
237 237
             return format_number($amount)."%";
238 238
         }
239
-    }
240
-    else
239
+    } else
241 240
     {
242 241
         return "-";
243 242
     }
@@ -248,7 +247,9 @@  discard block
 block discarded – undo
248 247
     if($view == 'EditView'){
249 248
         global $app_list_strings;
250 249
 
251
-        if($value != '') $value = format_number($value);
250
+        if($value != '') {
251
+            $value = format_number($value);
252
+        }
252 253
 
253 254
         $html = "<input id='shipping_tax_amt' type='text' tabindex='0' title='' value='".$value."' maxlength='26,6' size='22' name='shipping_tax_amt' onblur='calculateTotal(\"lineItems\");'>";
254 255
         $html .= "<select name='shipping_tax' id='shipping_tax' onchange='calculateTotal(\"lineItems\");' >".get_select_options_with_id($app_list_strings['vat_list'], (isset($focus->shipping_tax) ? $focus->shipping_tax : ''))."</select>";
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @author SalesAgility <[email protected]>
23 23
  */
24 24
 
25
-function display_lines($focus, $field, $value, $view){
25
+function display_lines($focus, $field, $value, $view) {
26 26
 
27 27
     global $sugar_config, $locale, $app_list_strings, $mod_strings;
28 28
 
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 
32 32
     $html = '';
33 33
 
34
-    if($view == 'EditView'){
34
+    if ($view == 'EditView') {
35 35
 
36 36
         $html .= '<script src="modules/AOS_Products_Quotes/line_items.js"></script>';
37
-        if(file_exists('custom/modules/AOS_Products_Quotes/line_items.js')){
37
+        if (file_exists('custom/modules/AOS_Products_Quotes/line_items.js')) {
38 38
             $html .= '<script src="custom/modules/AOS_Products_Quotes/line_items.js"></script>';
39 39
         }
40 40
         $html .= '<script language="javascript">var sig_digits = '.$locale->getPrecision().';';
@@ -45,18 +45,18 @@  discard block
 block discarded – undo
45 45
 
46 46
         $html .= "<table border='0' cellspacing='4' id='lineItems'></table>";
47 47
 
48
-        if($enable_groups){
48
+        if ($enable_groups) {
49 49
             $html .= "<div style='padding-top: 10px; padding-bottom:10px;'>";
50 50
             $html .= "<input type=\"button\" tabindex=\"116\" class=\"button\" value=\"".$mod_strings['LBL_ADD_GROUP']."\" id=\"addGroup\" onclick=\"insertGroup(0)\" />";
51 51
             $html .= "</div>";
52 52
         }
53 53
         $html .= '<input type="hidden" name="vathidden" id="vathidden" value="'.get_select_options_with_id($app_list_strings['vat_list'], '').'">
54 54
 				  <input type="hidden" name="discounthidden" id="discounthidden" value="'.get_select_options_with_id($app_list_strings['discount_list'], '').'">';
55
-        if($focus->id != '') {
55
+        if ($focus->id != '') {
56 56
             require_once('modules/AOS_Products_Quotes/AOS_Products_Quotes.php');
57 57
             require_once('modules/AOS_Line_Item_Groups/AOS_Line_Item_Groups.php');
58 58
 
59
-            $sql = "SELECT pg.id, pg.group_id FROM aos_products_quotes pg LEFT JOIN aos_line_item_groups lig ON pg.group_id = lig.id WHERE pg.parent_type = '" . $focus->object_name . "' AND pg.parent_id = '" . $focus->id . "' AND pg.deleted = 0 ORDER BY lig.number ASC, pg.number ASC";
59
+            $sql = "SELECT pg.id, pg.group_id FROM aos_products_quotes pg LEFT JOIN aos_line_item_groups lig ON pg.group_id = lig.id WHERE pg.parent_type = '".$focus->object_name."' AND pg.parent_id = '".$focus->id."' AND pg.deleted = 0 ORDER BY lig.number ASC, pg.number ASC";
60 60
 
61 61
             $result = $focus->db->query($sql);
62 62
             $html .= "<script>
@@ -75,17 +75,17 @@  discard block
 block discarded – undo
75 75
                     $group_item = json_encode($group_item->toArray());
76 76
                 }
77 77
                 $html .= "<script>
78
-                        insertLineItems(" . $line_item . "," . $group_item . ");
78
+                        insertLineItems(" . $line_item.",".$group_item.");
79 79
                     </script>";
80 80
 
81 81
             }
82 82
         }
83
-        if(!$enable_groups){
83
+        if (!$enable_groups) {
84 84
             $html .= '<script>insertGroup();</script>';
85 85
         }
86 86
 
87 87
     }
88
-    else if($view == 'DetailView'){
88
+    else if ($view == 'DetailView') {
89 89
         $params = array('currency_id' => $focus->currency_id);
90 90
 
91 91
         $sql = "SELECT pg.id, pg.group_id FROM aos_products_quotes pg LEFT JOIN aos_line_item_groups lig ON pg.group_id = lig.id WHERE pg.parent_type = '".$focus->object_name."' AND pg.parent_id = '".$focus->id."' AND pg.deleted = 0 ORDER BY lig.number ASC, pg.number ASC";
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
             $line_item->retrieve($row['id']);
110 110
 
111 111
 
112
-            if($enable_groups && ($group_id != $row['group_id'] || $i == 0)){
112
+            if ($enable_groups && ($group_id != $row['group_id'] || $i == 0)) {
113 113
                 $html .= $groupStart.$product.$service.$groupEnd;
114
-                if($i != 0)$html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
114
+                if ($i != 0)$html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
115 115
                 $groupStart = '';
116 116
                 $groupEnd = '';
117 117
                 $product = '';
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
                 $groupEnd .= "<td class='tabDetailViewDL' style='text-align: right;padding:2px;'>".currency_format_number($group_item->total_amount, $params)."</td>";
153 153
                 $groupEnd .= "</tr>";
154 154
             }
155
-            if($line_item->product_id != '0' && $line_item->product_id != null){
156
-                if($productCount == 0)
155
+            if ($line_item->product_id != '0' && $line_item->product_id != null) {
156
+                if ($productCount == 0)
157 157
                 {
158 158
                     $product .= "<tr>";
159 159
                     $product .= "<td width='5%' class='tabDetailViewDL' style='text-align: left;padding:2px;' scope='row'>&nbsp;</td>";
@@ -169,26 +169,26 @@  discard block
 block discarded – undo
169 169
                 }
170 170
 
171 171
                 $product .= "<tr>";
172
-                $product_note = wordwrap($line_item->description,40,"<br />\n");
172
+                $product_note = wordwrap($line_item->description, 40, "<br />\n");
173 173
                 $product .= "<td class='tabDetailViewDF' style='text-align: left; padding:2px;'>".++$productCount."</td>";
174
-                $product .= "<td class='tabDetailViewDF' style='padding:2px;'>".stripDecimalPointsAndTrailingZeroes(format_number($line_item->product_qty),$sep[1])."</td>";
174
+                $product .= "<td class='tabDetailViewDF' style='padding:2px;'>".stripDecimalPointsAndTrailingZeroes(format_number($line_item->product_qty), $sep[1])."</td>";
175 175
 
176 176
                 $product .= "<td class='tabDetailViewDF' style='padding:2px;'><a href='index.php?module=AOS_Products&action=DetailView&record=".$line_item->product_id."' class='tabDetailViewDFLink'>".$line_item->name."</a><br />".$product_note."</td>";
177
-                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_list_price,$params)."</td>";
177
+                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_list_price, $params)."</td>";
178 178
 
179 179
                 $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".get_discount_string($line_item->discount, $line_item->product_discount, $params, $locale, $sep)."</td>";
180 180
 
181
-                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_unit_price,$params )."</td>";
182
-                if($locale->getPrecision()){
183
-                    $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".rtrim(rtrim(format_number($line_item->vat), '0'),$sep[1])."%</td>";
181
+                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_unit_price, $params)."</td>";
182
+                if ($locale->getPrecision()) {
183
+                    $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".rtrim(rtrim(format_number($line_item->vat), '0'), $sep[1])."%</td>";
184 184
                 } else {
185 185
                     $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".format_number($line_item->vat)."%</td>";
186 186
                 }
187
-                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->vat_amt,$params )."</td>";
188
-                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_total_price,$params )."</td>";
187
+                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->vat_amt, $params)."</td>";
188
+                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_total_price, $params)."</td>";
189 189
                 $product .= "</tr>";
190 190
             } else {
191
-                if($serviceCount == 0)
191
+                if ($serviceCount == 0)
192 192
                 {
193 193
                     $service .= "<tr>";
194 194
                     $service .= "<td width='5%' class='tabDetailViewDL' style='text-align: left;padding:2px;' scope='row'>&nbsp;</td>";
@@ -205,15 +205,15 @@  discard block
 block discarded – undo
205 205
                 $service .= "<tr>";
206 206
                 $service .= "<td class='tabDetailViewDF' style='text-align: left; padding:2px;'>".++$serviceCount."</td>";
207 207
                 $service .= "<td class='tabDetailViewDF' style='padding:2px;' colspan='2'>".$line_item->name."</td>";
208
-                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_list_price,$params)."</td>";
208
+                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_list_price, $params)."</td>";
209 209
 
210 210
                 $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".get_discount_string($line_item->discount, $line_item->product_discount, $params, $locale, $sep)."</td>";
211 211
 
212 212
 
213
-                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_unit_price,$params)."</td>";
213
+                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_unit_price, $params)."</td>";
214 214
                 $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".rtrim(rtrim(format_number($line_item->vat), '0'), $sep[1])."%</td>";
215
-                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->vat_amt,$params )."</td>";
216
-                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_total_price,$params )."</td>";
215
+                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->vat_amt, $params)."</td>";
216
+                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_total_price, $params)."</td>";
217 217
                 $service .= "</tr>";
218 218
 
219 219
             }
@@ -230,22 +230,22 @@  discard block
 block discarded – undo
230 230
 //field was 0.
231 231
 //The approach below will strip off the fractional part if it is only zeroes (and in this case the decimal separator
232 232
 //will also be stripped off) The custom decimal separator is passed in to the function from the locale settings
233
-function stripDecimalPointsAndTrailingZeroes($inputString,$decimalSeparator)
233
+function stripDecimalPointsAndTrailingZeroes($inputString, $decimalSeparator)
234 234
 {
235
-    return preg_replace('/'.preg_quote($decimalSeparator).'[0]+$/','',$inputString);
235
+    return preg_replace('/'.preg_quote($decimalSeparator).'[0]+$/', '', $inputString);
236 236
 }
237 237
 
238
-function get_discount_string($type, $amount, $params, $locale, $sep){
239
-    if($amount != '' && $amount != '0.00')
238
+function get_discount_string($type, $amount, $params, $locale, $sep) {
239
+    if ($amount != '' && $amount != '0.00')
240 240
     {
241
-        if($type == 'Amount')
241
+        if ($type == 'Amount')
242 242
         {
243
-            return currency_format_number($amount,$params )."</td>";
243
+            return currency_format_number($amount, $params)."</td>";
244 244
         }
245
-        else if($locale->getPrecision())
245
+        else if ($locale->getPrecision())
246 246
         {
247
-            return rtrim(rtrim(format_number($amount), '0'),$sep[1])."%";
248
-        } else{
247
+            return rtrim(rtrim(format_number($amount), '0'), $sep[1])."%";
248
+        } else {
249 249
             return format_number($amount)."%";
250 250
         }
251 251
     }
@@ -255,12 +255,12 @@  discard block
 block discarded – undo
255 255
     }
256 256
 }
257 257
 
258
-function display_shipping_vat($focus, $field, $value, $view){
258
+function display_shipping_vat($focus, $field, $value, $view) {
259 259
 
260
-    if($view == 'EditView'){
260
+    if ($view == 'EditView') {
261 261
         global $app_list_strings;
262 262
 
263
-        if($value != '') $value = format_number($value);
263
+        if ($value != '') $value = format_number($value);
264 264
 
265 265
         $html = "<input id='shipping_tax_amt' type='text' tabindex='0' title='' value='".$value."' maxlength='26,6' size='22' name='shipping_tax_amt' onblur='calculateTotal(\"lineItems\");'>";
266 266
         $html .= "<select name='shipping_tax' id='shipping_tax' onchange='calculateTotal(\"lineItems\");' >".get_select_options_with_id($app_list_strings['vat_list'], (isset($focus->shipping_tax) ? $focus->shipping_tax : ''))."</select>";
Please login to merge, or discard this patch.
modules/Project/delete_project_tasks.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@
 block discarded – undo
24 24
  * Used to delete a project's related tasks after a project is deleted
25 25
  */
26 26
 class delete_project_tasks {
27
-    function delete_tasks(&$bean, $event, $arguments){
27
+    function delete_tasks(&$bean, $event, $arguments) {
28 28
         global $db;
29 29
         $Task = BeanFactory::getBean('ProjectTask');
30 30
         $tasks = $Task->get_full_list("order_number", "project_task.project_id = '".$bean->id."'");
31 31
 
32
-        foreach($tasks as $task){
32
+        foreach ($tasks as $task) {
33 33
             $query = "UPDATE project_task SET deleted ='1' WHERE id ='".$task->id."'";
34 34
             $update = $db->query($query);
35 35
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /**
4 6
  * This program is free software; you can redistribute it and/or modify
5 7
  * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
Please login to merge, or discard this patch.
modules/Project/ProjectQuickCreate.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -66,24 +66,24 @@
 block discarded – undo
66 66
         $this->javascript->setSugarBean($focus);
67 67
         $this->javascript->addAllFields('');
68 68
 
69
-		//$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_status_dom'], $focus->status));
69
+        //$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_status_dom'], $focus->status));
70 70
         $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
71 71
         $this->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format());
72 72
         
73 73
         
74 74
         $json = getJSONobj();
75 75
         
76
-		$popup_request_data = array(
77
-			'call_back_function' => 'set_return',
78
-			'form_name' => 'projectsQuickCreate',
79
-			'field_to_name_array' => array(
80
-				'id' => 'account_id',
81
-				'name' => 'account_name',
82
-			),
83
-		);
76
+        $popup_request_data = array(
77
+            'call_back_function' => 'set_return',
78
+            'form_name' => 'projectsQuickCreate',
79
+            'field_to_name_array' => array(
80
+                'id' => 'account_id',
81
+                'name' => 'account_name',
82
+            ),
83
+        );
84 84
 	
85
-		$encoded_popup_request_data = $json->encode($popup_request_data);
86
-		$this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);        
85
+        $encoded_popup_request_data = $json->encode($popup_request_data);
86
+        $this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);        
87 87
 
88 88
         
89 89
     }   
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $mod_strings = return_module_language($current_language, 'Project');
53 53
         
54 54
         parent::process();
55
-        if($this->viaAJAX) { // override for ajax call
55
+        if ($this->viaAJAX) { // override for ajax call
56 56
             $this->ss->assign('saveOnclick', "onclick='if(check_form(\"projectQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"projects\"); else return false;'");
57 57
             $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_project\")';");
58 58
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.
modules/Project/metadata/additionalDetails.php 3 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -42,25 +42,25 @@
 block discarded – undo
42 42
 
43 43
 
44 44
 function additionalDetailsProject($fields) {
45
-	static $mod_strings;
46
-	if(empty($mod_strings)) {
47
-		global $current_language;
48
-		$mod_strings = return_module_language($current_language, 'Project');
49
-	}
45
+    static $mod_strings;
46
+    if(empty($mod_strings)) {
47
+        global $current_language;
48
+        $mod_strings = return_module_language($current_language, 'Project');
49
+    }
50 50
 		
51
-	$overlib_string = '';
51
+    $overlib_string = '';
52 52
 	
53
-	if(!empty($fields['DESCRIPTION'])) {
54
-		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
55
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
56
-	}	
53
+    if(!empty($fields['DESCRIPTION'])) {
54
+        $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
55
+        if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
56
+    }	
57 57
 
58
-	return array('fieldToAddTo' => 'NAME', 
59
-				 'string' => $overlib_string, 
60
-				 'editLink' => "index.php?action=EditView&module=Project&return_module=Project&record={$fields['ID']}", 
61
-				 'viewLink' => "index.php?action=DetailView&module=Project&return_module=Project&record={$fields['ID']}");
58
+    return array('fieldToAddTo' => 'NAME', 
59
+                    'string' => $overlib_string, 
60
+                    'editLink' => "index.php?action=EditView&module=Project&return_module=Project&record={$fields['ID']}", 
61
+                    'viewLink' => "index.php?action=DetailView&module=Project&return_module=Project&record={$fields['ID']}");
62 62
 }
63 63
  
64
- ?>
64
+    ?>
65 65
  
66 66
  
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
 
44 44
 function additionalDetailsProject($fields) {
45 45
 	static $mod_strings;
46
-	if(empty($mod_strings)) {
46
+	if (empty($mod_strings)) {
47 47
 		global $current_language;
48 48
 		$mod_strings = return_module_language($current_language, 'Project');
49 49
 	}
50 50
 		
51 51
 	$overlib_string = '';
52 52
 	
53
-	if(!empty($fields['DESCRIPTION'])) {
54
-		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
55
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
53
+	if (!empty($fields['DESCRIPTION'])) {
54
+		$overlib_string .= '<b>'.$mod_strings['LBL_DESCRIPTION'].'</b> '.substr($fields['DESCRIPTION'], 0, 300);
55
+		if (strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
56 56
 	}	
57 57
 
58 58
 	return array('fieldToAddTo' => 'NAME', 
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -52,7 +54,9 @@  discard block
 block discarded – undo
52 54
 	
53 55
 	if(!empty($fields['DESCRIPTION'])) {
54 56
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
55
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
57
+		if(strlen($fields['DESCRIPTION']) > 300) {
58
+		    $overlib_string .= '...';
59
+		}
56 60
 	}	
57 61
 
58 62
 	return array('fieldToAddTo' => 'NAME', 
Please login to merge, or discard this patch.