Completed
Push — develop ( 675ac9...0c0e51 )
by Adam
22:55
created
modules/AOS_Products/metadata/searchdefs.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -2,71 +2,71 @@
 block discarded – undo
2 2
 $module_name = 'AOS_Products';
3 3
 $searchdefs [$module_name] = 
4 4
 array (
5
-  'layout' => 
6
-  array (
5
+    'layout' => 
6
+    array (
7 7
     'basic_search' => 
8 8
     array (
9
-      0 => 'name',
10
-      1 => 
11
-      array (
9
+        0 => 'name',
10
+        1 => 
11
+        array (
12 12
         'name' => 'current_user_only',
13 13
         'label' => 'LBL_CURRENT_USER_FILTER',
14 14
         'type' => 'bool',
15
-      ),
15
+        ),
16 16
         'favorites_only' => array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',),
17 17
     ),
18 18
     'advanced_search' => 
19 19
     array (
20
-      'name' => 
21
-      array (
20
+        'name' => 
21
+        array (
22 22
         'name' => 'name',
23 23
         'default' => true,
24 24
         'width' => '10%',
25
-      ),
26
-      'part_number' => 
27
-      array (
25
+        ),
26
+        'part_number' => 
27
+        array (
28 28
         'name' => 'part_number',
29 29
         'default' => true,
30 30
         'width' => '10%',
31
-      ),
32
-      'cost' => 
33
-      array (
31
+        ),
32
+        'cost' => 
33
+        array (
34 34
         'name' => 'cost',
35 35
         'default' => true,
36 36
         'width' => '10%',
37
-      ),
38
-      'price' => 
39
-      array (
37
+        ),
38
+        'price' => 
39
+        array (
40 40
         'name' => 'price',
41 41
         'default' => true,
42 42
         'width' => '10%',
43
-      ),
44
-      'created_by' => 
45
-      array (
43
+        ),
44
+        'created_by' => 
45
+        array (
46 46
         'name' => 'created_by',
47 47
         'label' => 'LBL_CREATED',
48 48
         'type' => 'enum',
49 49
         'function' => 
50 50
         array (
51
-          'name' => 'get_user_array',
52
-          'params' => 
53
-          array (
51
+            'name' => 'get_user_array',
52
+            'params' => 
53
+            array (
54 54
             0 => false,
55
-          ),
55
+            ),
56 56
         ),
57 57
         'default' => true,
58 58
         'width' => '10%',
59
-      ),
59
+        ),
60
+    ),
60 61
     ),
61
-  ),
62
-  'templateMeta' => 
63
-  array (
62
+    'templateMeta' => 
63
+    array (
64 64
     'maxColumns' => '3',
65 65
     'widths' => 
66 66
     array (
67
-      'label' => '10',
68
-      'field' => '30',
67
+        'label' => '10',
68
+        'field' => '30',
69
+    ),
69 70
     ),
70
-  ),
71 71
 );
72 72
 ?>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,56 +1,56 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $module_name = 'AOS_Products';
3 3
 $searchdefs [$module_name] = 
4
-array (
4
+array(
5 5
   'layout' => 
6
-  array (
6
+  array(
7 7
     'basic_search' => 
8
-    array (
8
+    array(
9 9
       0 => 'name',
10 10
       1 => 
11
-      array (
11
+      array(
12 12
         'name' => 'current_user_only',
13 13
         'label' => 'LBL_CURRENT_USER_FILTER',
14 14
         'type' => 'bool',
15 15
       ),
16
-        'favorites_only' => array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',),
16
+        'favorites_only' => array('name' => 'favorites_only', 'label' => 'LBL_FAVORITES_FILTER', 'type' => 'bool',),
17 17
     ),
18 18
     'advanced_search' => 
19
-    array (
19
+    array(
20 20
       'name' => 
21
-      array (
21
+      array(
22 22
         'name' => 'name',
23 23
         'default' => true,
24 24
         'width' => '10%',
25 25
       ),
26 26
       'part_number' => 
27
-      array (
27
+      array(
28 28
         'name' => 'part_number',
29 29
         'default' => true,
30 30
         'width' => '10%',
31 31
       ),
32 32
       'cost' => 
33
-      array (
33
+      array(
34 34
         'name' => 'cost',
35 35
         'default' => true,
36 36
         'width' => '10%',
37 37
       ),
38 38
       'price' => 
39
-      array (
39
+      array(
40 40
         'name' => 'price',
41 41
         'default' => true,
42 42
         'width' => '10%',
43 43
       ),
44 44
       'created_by' => 
45
-      array (
45
+      array(
46 46
         'name' => 'created_by',
47 47
         'label' => 'LBL_CREATED',
48 48
         'type' => 'enum',
49 49
         'function' => 
50
-        array (
50
+        array(
51 51
           'name' => 'get_user_array',
52 52
           'params' => 
53
-          array (
53
+          array(
54 54
             0 => false,
55 55
           ),
56 56
         ),
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
     ),
61 61
   ),
62 62
   'templateMeta' => 
63
-  array (
63
+  array(
64 64
     'maxColumns' => '3',
65 65
     'widths' => 
66
-    array (
66
+    array(
67 67
       'label' => '10',
68 68
       'field' => '30',
69 69
     ),
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/SearchFields.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -2,87 +2,87 @@
 block discarded – undo
2 2
 // created: 2013-05-07 12:48:58
3 3
 global $current_user;
4 4
 $searchFields['AOS_Products'] = array (
5
-  'name' => 
6
-  array (
5
+    'name' => 
6
+    array (
7 7
     'query_type' => 'default',
8
-  ),
9
-  'current_user_only' => 
10
-  array (
8
+    ),
9
+    'current_user_only' => 
10
+    array (
11 11
     'query_type' => 'default',
12 12
     'db_field' => 
13 13
     array (
14
-      0 => 'created_by',
14
+        0 => 'created_by',
15 15
     ),
16 16
     'my_items' => true,
17 17
     'vname' => 'LBL_CURRENT_USER_FILTER',
18 18
     'type' => 'bool',
19
-  ),
20
-  'range_price' => 
21
-  array (
19
+    ),
20
+    'range_price' => 
21
+    array (
22 22
     'query_type' => 'default',
23 23
     'enable_range_search' => true,
24
-  ),
25
-  'start_range_price' => 
26
-  array (
24
+    ),
25
+    'start_range_price' => 
26
+    array (
27 27
     'query_type' => 'default',
28 28
     'enable_range_search' => true,
29
-  ),
30
-  'end_range_price' => 
31
-  array (
29
+    ),
30
+    'end_range_price' => 
31
+    array (
32 32
     'query_type' => 'default',
33 33
     'enable_range_search' => true,
34
-  ),
35
-  'range_cost' => 
36
-  array (
34
+    ),
35
+    'range_cost' => 
36
+    array (
37 37
     'query_type' => 'default',
38 38
     'enable_range_search' => true,
39
-  ),
40
-  'start_range_cost' => 
41
-  array (
39
+    ),
40
+    'start_range_cost' => 
41
+    array (
42 42
     'query_type' => 'default',
43 43
     'enable_range_search' => true,
44
-  ),
45
-  'end_range_cost' => 
46
-  array (
44
+    ),
45
+    'end_range_cost' => 
46
+    array (
47 47
     'query_type' => 'default',
48 48
     'enable_range_search' => true,
49
-  ),
50
-  'range_date_entered' => 
51
-  array (
49
+    ),
50
+    'range_date_entered' => 
51
+    array (
52 52
     'query_type' => 'default',
53 53
     'enable_range_search' => true,
54 54
     'is_date_field' => true,
55
-  ),
56
-  'start_range_date_entered' => 
57
-  array (
55
+    ),
56
+    'start_range_date_entered' => 
57
+    array (
58 58
     'query_type' => 'default',
59 59
     'enable_range_search' => true,
60 60
     'is_date_field' => true,
61
-  ),
62
-  'end_range_date_entered' => 
63
-  array (
61
+    ),
62
+    'end_range_date_entered' => 
63
+    array (
64 64
     'query_type' => 'default',
65 65
     'enable_range_search' => true,
66 66
     'is_date_field' => true,
67
-  ),
68
-  'range_date_modified' => 
69
-  array (
67
+    ),
68
+    'range_date_modified' => 
69
+    array (
70 70
     'query_type' => 'default',
71 71
     'enable_range_search' => true,
72 72
     'is_date_field' => true,
73
-  ),
74
-  'start_range_date_modified' => 
75
-  array (
73
+    ),
74
+    'start_range_date_modified' => 
75
+    array (
76 76
     'query_type' => 'default',
77 77
     'enable_range_search' => true,
78 78
     'is_date_field' => true,
79
-  ),
80
-  'end_range_date_modified' => 
81
-  array (
79
+    ),
80
+    'end_range_date_modified' => 
81
+    array (
82 82
     'query_type' => 'default',
83 83
     'enable_range_search' => true,
84 84
     'is_date_field' => true,
85
-  ),
85
+    ),
86 86
     'favorites_only' => array(
87 87
         'query_type'=>'format',
88 88
         'operator' => 'subquery',
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // created: 2013-05-07 12:48:58
3 3
 global $current_user;
4
-$searchFields['AOS_Products'] = array (
4
+$searchFields['AOS_Products'] = array(
5 5
   'name' => 
6
-  array (
6
+  array(
7 7
     'query_type' => 'default',
8 8
   ),
9 9
   'current_user_only' => 
10
-  array (
10
+  array(
11 11
     'query_type' => 'default',
12 12
     'db_field' => 
13
-    array (
13
+    array(
14 14
       0 => 'created_by',
15 15
     ),
16 16
     'my_items' => true,
@@ -18,67 +18,67 @@  discard block
 block discarded – undo
18 18
     'type' => 'bool',
19 19
   ),
20 20
   'range_price' => 
21
-  array (
21
+  array(
22 22
     'query_type' => 'default',
23 23
     'enable_range_search' => true,
24 24
   ),
25 25
   'start_range_price' => 
26
-  array (
26
+  array(
27 27
     'query_type' => 'default',
28 28
     'enable_range_search' => true,
29 29
   ),
30 30
   'end_range_price' => 
31
-  array (
31
+  array(
32 32
     'query_type' => 'default',
33 33
     'enable_range_search' => true,
34 34
   ),
35 35
   'range_cost' => 
36
-  array (
36
+  array(
37 37
     'query_type' => 'default',
38 38
     'enable_range_search' => true,
39 39
   ),
40 40
   'start_range_cost' => 
41
-  array (
41
+  array(
42 42
     'query_type' => 'default',
43 43
     'enable_range_search' => true,
44 44
   ),
45 45
   'end_range_cost' => 
46
-  array (
46
+  array(
47 47
     'query_type' => 'default',
48 48
     'enable_range_search' => true,
49 49
   ),
50 50
   'range_date_entered' => 
51
-  array (
51
+  array(
52 52
     'query_type' => 'default',
53 53
     'enable_range_search' => true,
54 54
     'is_date_field' => true,
55 55
   ),
56 56
   'start_range_date_entered' => 
57
-  array (
57
+  array(
58 58
     'query_type' => 'default',
59 59
     'enable_range_search' => true,
60 60
     'is_date_field' => true,
61 61
   ),
62 62
   'end_range_date_entered' => 
63
-  array (
63
+  array(
64 64
     'query_type' => 'default',
65 65
     'enable_range_search' => true,
66 66
     'is_date_field' => true,
67 67
   ),
68 68
   'range_date_modified' => 
69
-  array (
69
+  array(
70 70
     'query_type' => 'default',
71 71
     'enable_range_search' => true,
72 72
     'is_date_field' => true,
73 73
   ),
74 74
   'start_range_date_modified' => 
75
-  array (
75
+  array(
76 76
     'query_type' => 'default',
77 77
     'enable_range_search' => true,
78 78
     'is_date_field' => true,
79 79
   ),
80 80
   'end_range_date_modified' => 
81
-  array (
81
+  array(
82 82
     'query_type' => 'default',
83 83
     'enable_range_search' => true,
84 84
     'is_date_field' => true,
@@ -89,6 +89,6 @@  discard block
 block discarded – undo
89 89
         'subquery' => 'SELECT favorites.parent_id FROM favorites
90 90
 			                    WHERE favorites.deleted = 0
91 91
 			                        and favorites.parent_type = "'.$module_name.'"
92
-			                        and favorites.assigned_user_id = "' .$current_user->id . '") OR NOT ({0}',
92
+			                        and favorites.assigned_user_id = "' .$current_user->id.'") OR NOT ({0}',
93 93
         'db_field'=>array('id')),
94 94
 );
95 95
\ No newline at end of file
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/detailviewdefs.php 2 patches
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -2,127 +2,127 @@
 block discarded – undo
2 2
 $module_name = 'AOS_Products';
3 3
 $viewdefs [$module_name] = 
4 4
 array (
5
-  'DetailView' => 
6
-  array (
5
+    'DetailView' => 
6
+    array (
7 7
     'templateMeta' => 
8 8
     array (
9
-      'form' => 
10
-      array (
9
+        'form' => 
10
+        array (
11 11
         'buttons' => 
12 12
         array (
13
-          0 => 'EDIT',
14
-          1 => 'DUPLICATE',
15
-          2 => 'DELETE',
13
+            0 => 'EDIT',
14
+            1 => 'DUPLICATE',
15
+            2 => 'DELETE',
16
+        ),
16 17
         ),
17
-      ),
18
-      'maxColumns' => '2',
19
-      'widths' => 
20
-      array (
18
+        'maxColumns' => '2',
19
+        'widths' => 
20
+        array (
21 21
         0 => 
22 22
         array (
23
-          'label' => '10',
24
-          'field' => '30',
23
+            'label' => '10',
24
+            'field' => '30',
25 25
         ),
26 26
         1 => 
27 27
         array (
28
-          'label' => '10',
29
-          'field' => '30',
28
+            'label' => '10',
29
+            'field' => '30',
30
+        ),
30 31
         ),
31
-      ),
32
-      'useTabs' => true,
33
-      'tabDefs' => 
34
-      array (
32
+        'useTabs' => true,
33
+        'tabDefs' => 
34
+        array (
35 35
         'DEFAULT' => 
36 36
         array (
37
-          'newTab' => true,
38
-          'panelDefault' => 'expanded',
37
+            'newTab' => true,
38
+            'panelDefault' => 'expanded',
39
+        ),
39 40
         ),
40
-      ),
41 41
     ),
42 42
     'panels' => 
43 43
     array (
44
-      'default' => 
45
-      array (
44
+        'default' => 
45
+        array (
46 46
         0 => 
47 47
         array (
48
-          0 => 
49
-          array (
48
+            0 => 
49
+            array (
50 50
             'name' => 'name',
51 51
             'label' => 'LBL_NAME',
52
-          ),
53
-          1 => 
54
-          array (
52
+            ),
53
+            1 => 
54
+            array (
55 55
             'name' => 'part_number',
56 56
             'label' => 'LBL_PART_NUMBER',
57
-          ),
57
+            ),
58 58
         ),
59 59
         1 => 
60 60
         array (
61
-          0 => 
62
-          array (
61
+            0 => 
62
+            array (
63 63
             'name' => 'aos_product_category_name',
64 64
             'label' => 'LBL_AOS_PRODUCT_CATEGORYS_NAME',
65
-          ),
66
-          1 => 
67
-          array (
65
+            ),
66
+            1 => 
67
+            array (
68 68
             'name' => 'type',
69 69
             'label' => 'LBL_TYPE',
70
-          ),
70
+            ),
71 71
         ),
72 72
         2 => 
73 73
         array (
74
-          0 => 
75
-          array (
74
+            0 => 
75
+            array (
76 76
             'name' => 'currency_id',
77 77
             'studio' => 'visible',
78 78
             'label' => 'LBL_CURRENCY',
79
-          ),
79
+            ),
80 80
         ),
81 81
         3 => 
82 82
         array (
83
-          0 => 
84
-          array (
83
+            0 => 
84
+            array (
85 85
             'name' => 'cost',
86 86
             'label' => 'LBL_COST',
87
-          ),
88
-          1 => 
89
-          array (
87
+            ),
88
+            1 => 
89
+            array (
90 90
             'name' => 'price',
91 91
             'label' => 'LBL_PRICE',
92
-          ),
92
+            ),
93 93
         ),
94 94
         4 => 
95 95
         array (
96
-          0 => 
97
-          array (
96
+            0 => 
97
+            array (
98 98
             'name' => 'contact',
99 99
             'label' => 'LBL_CONTACT',
100
-          ),
101
-          1 => 
102
-          array (
100
+            ),
101
+            1 => 
102
+            array (
103 103
             'name' => 'url',
104 104
             'label' => 'LBL_URL',
105
-          ),
105
+            ),
106 106
         ),
107 107
         5 => 
108 108
         array (
109
-          0 => 
110
-          array (
109
+            0 => 
110
+            array (
111 111
             'name' => 'description',
112 112
             'label' => 'LBL_DESCRIPTION',
113
-          ),
113
+            ),
114 114
         ),
115 115
         6 => 
116 116
         array (
117
-          0 => 
118
-          array (
117
+            0 => 
118
+            array (
119 119
             'name' => 'product_image',
120 120
             'label' => 'LBL_PRODUCT_IMAGE',
121 121
             'customCode' => '<img src="{$fields.product_image.value}"/>',
122
-          ),
122
+            ),
123 123
         ),
124
-      ),
124
+        ),
125
+    ),
125 126
     ),
126
-  ),
127 127
 );
128 128
 ?>
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $module_name = 'AOS_Products';
3 3
 $viewdefs [$module_name] = 
4
-array (
4
+array(
5 5
   'DetailView' => 
6
-  array (
6
+  array(
7 7
     'templateMeta' => 
8
-    array (
8
+    array(
9 9
       'form' => 
10
-      array (
10
+      array(
11 11
         'buttons' => 
12
-        array (
12
+        array(
13 13
           0 => 'EDIT',
14 14
           1 => 'DUPLICATE',
15 15
           2 => 'DELETE',
@@ -17,105 +17,105 @@  discard block
 block discarded – undo
17 17
       ),
18 18
       'maxColumns' => '2',
19 19
       'widths' => 
20
-      array (
20
+      array(
21 21
         0 => 
22
-        array (
22
+        array(
23 23
           'label' => '10',
24 24
           'field' => '30',
25 25
         ),
26 26
         1 => 
27
-        array (
27
+        array(
28 28
           'label' => '10',
29 29
           'field' => '30',
30 30
         ),
31 31
       ),
32 32
       'useTabs' => true,
33 33
       'tabDefs' => 
34
-      array (
34
+      array(
35 35
         'DEFAULT' => 
36
-        array (
36
+        array(
37 37
           'newTab' => true,
38 38
           'panelDefault' => 'expanded',
39 39
         ),
40 40
       ),
41 41
     ),
42 42
     'panels' => 
43
-    array (
43
+    array(
44 44
       'default' => 
45
-      array (
45
+      array(
46 46
         0 => 
47
-        array (
47
+        array(
48 48
           0 => 
49
-          array (
49
+          array(
50 50
             'name' => 'name',
51 51
             'label' => 'LBL_NAME',
52 52
           ),
53 53
           1 => 
54
-          array (
54
+          array(
55 55
             'name' => 'part_number',
56 56
             'label' => 'LBL_PART_NUMBER',
57 57
           ),
58 58
         ),
59 59
         1 => 
60
-        array (
60
+        array(
61 61
           0 => 
62
-          array (
62
+          array(
63 63
             'name' => 'aos_product_category_name',
64 64
             'label' => 'LBL_AOS_PRODUCT_CATEGORYS_NAME',
65 65
           ),
66 66
           1 => 
67
-          array (
67
+          array(
68 68
             'name' => 'type',
69 69
             'label' => 'LBL_TYPE',
70 70
           ),
71 71
         ),
72 72
         2 => 
73
-        array (
73
+        array(
74 74
           0 => 
75
-          array (
75
+          array(
76 76
             'name' => 'currency_id',
77 77
             'studio' => 'visible',
78 78
             'label' => 'LBL_CURRENCY',
79 79
           ),
80 80
         ),
81 81
         3 => 
82
-        array (
82
+        array(
83 83
           0 => 
84
-          array (
84
+          array(
85 85
             'name' => 'cost',
86 86
             'label' => 'LBL_COST',
87 87
           ),
88 88
           1 => 
89
-          array (
89
+          array(
90 90
             'name' => 'price',
91 91
             'label' => 'LBL_PRICE',
92 92
           ),
93 93
         ),
94 94
         4 => 
95
-        array (
95
+        array(
96 96
           0 => 
97
-          array (
97
+          array(
98 98
             'name' => 'contact',
99 99
             'label' => 'LBL_CONTACT',
100 100
           ),
101 101
           1 => 
102
-          array (
102
+          array(
103 103
             'name' => 'url',
104 104
             'label' => 'LBL_URL',
105 105
           ),
106 106
         ),
107 107
         5 => 
108
-        array (
108
+        array(
109 109
           0 => 
110
-          array (
110
+          array(
111 111
             'name' => 'description',
112 112
             'label' => 'LBL_DESCRIPTION',
113 113
           ),
114 114
         ),
115 115
         6 => 
116
-        array (
116
+        array(
117 117
           0 => 
118
-          array (
118
+          array(
119 119
             'name' => 'product_image',
120 120
             'label' => 'LBL_PRODUCT_IMAGE',
121 121
             'customCode' => '<img src="{$fields.product_image.value}"/>',
Please login to merge, or discard this patch.
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
  * 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/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' width='37.5%' 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.