Changeset 723
- Timestamp:
- Jan 3, 2015, 8:31:42 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/FormClasses.php
r722 r723 20 20 'Invoice' => array('Type' => 'TFinanceInvoice', 'Caption' => 'Faktura', 'Default' => ''), 21 21 'Operation' => array('Type' => 'TFinanceOperation', 'Caption' => 'Platba', 'Default' => ''), 22 ),23 ),24 'ServiceCustomerRel' => array(25 'Title' => 'Vztahy služba - zákazník',26 'Table' => 'ServiceCustomerRel',27 'Items' => array(28 'Service' => array('Type' => 'TService', 'Caption' => 'Služba', 'Default' => ''),29 'Customer' => array('Type' => 'TMember', 'Caption' => 'Zákazník', 'Default' => ''),30 'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => '', 'Null' => true),31 'ReplaceId' => array('Type' => 'TServiceCustomerRel', 'Caption' => 'Cílová položka', 'Default' => '', 'Null' => true),32 22 ), 33 23 ), … … 117 107 ), 118 108 ), 119 'Service' => array(120 'Title' => 'Služby',121 'Table' => 'Service',122 'DefaultSortColumn' => 'Name',123 'Items' => array(124 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),125 'Category' => array('Type' => 'TServiceCategory', 'Caption' => 'Skupina', 'Default' => '', 'Null' => true),126 'Price' => array('Type' => 'Integer', 'Caption' => 'Cena', 'Default' => '0', 'Suffix' => 'Kč'),127 'VAT' => array('Type' => 'TFinanceVATType', 'Caption' => 'Sazba DPH', 'Default' => '0', 'Suffix' => ''),128 'CustomerCount' => array('Type' => 'Integer', 'Caption' => 'Počet zákazníků', 'Default' => '', 'ReadOnly' => true,129 'SQL' => '(SELECT COUNT(*) FROM `ServiceCustomerRel` LEFT JOIN `Member` ON `Member`.`Id`=`ServiceCustomerRel`.`Customer` WHERE (`ServiceCustomerRel`.`Service`=#Id) AND (`Member`.`Blocked`=0))'),130 'Public' => array('Type' => 'Boolean', 'Caption' => 'Veřejné', 'Default' => ''),131 'InternetSpeedMin' => array('Type' => 'Integer', 'Caption' => 'Min. rychlost internetu', 'Default' => '0', 'Suffix' => 'kbit/s'),132 'InternetSpeedMax' => array('Type' => 'Integer', 'Caption' => 'Max. rychlost internetu', 'Default' => '0', 'Suffix' => 'kbit/s'),133 'UploadAsymmetry' => array('Type' => 'Integer', 'Caption' => 'Asymetrie odesílání', 'Default' => '1'),134 'Memory' => array('Type' => 'Integer', 'Caption' => 'Paměť', 'Default' => '0', 'Suffix' => 'GB'),135 'MemorySwap' => array('Type' => 'Integer', 'Caption' => 'Odkládací oddíl', 'Default' => '0', 'Suffix' => 'GB'),136 'Storage' => array('Type' => 'Integer', 'Caption' => 'Úložiště', 'Default' => '0', 'Suffix' => 'GB'),137 'CPUCount' => array('Type' => 'Integer', 'Caption' => 'Počet jader', 'Default' => '0', 'Suffix' => ''),138 'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => '', 'Null' => true),139 'ReplaceId' => array('Type' => 'TService', 'Caption' => 'Cílová položka', 'Default' => '', 'Null' => true),140 'CustomerRel' => array('Type' => 'TServiceCustomerRelListService', 'Caption' => 'Placení zákazníky', 'Default' => ''),141 ),142 ),143 'ServiceCategory' => array(144 'Title' => 'Kategorie služeb',145 'Table' => 'ServiceCategory',146 'Items' => array(147 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),148 'Items' => array('Type' => 'TServiceListServiceCategory', 'Caption' => 'Služby', 'Default' => ''),149 ),150 ),151 109 ); 152 110 153 111 $FormManager->FormTypes = array 154 112 ( 155 'TServiceCategory' => array( 156 'Type' => 'Reference', 157 'Table' => 'ServiceCategory', 113 'TPriority' => array( 114 'Type' => 'Enumeration', 115 'States' => array('Nízká', 'Střední', 'Vysoká'), 116 ), 117 'TOnlineState' => array( 118 'Type' => 'Enumeration', 119 'States' => array('<span style="color:red;">Nedostupný</span>', '<span style="color:green;">Dostupný</span>'), 120 ), 121 'TNetworkConfigurationState' => array( 122 'Type' => 'Enumeration', 123 'States' => array('Neplánováno', 'V plánu', 'Provádí se'), 124 ), 125 'TAntennaPolarity' => array( 126 'Type' => 'Enumeration', 127 'States' => array('Vertikální', 'Horizontální', 'Kruhová', 'Vertikální i horizontální'), 128 ), 129 'TNetworkDeviceState' => array( 130 'Type' => 'Enumeration', 131 'States' => array('Vyřazeno', 'Použito', 'Na skladě'), 132 ), 133 'TNetworkDeviceAction' => array( 134 'Type' => 'Enumeration', 135 'States' => array('Zakoupeno', 'Prodáno', 'Zařazeno do použití', 'Vyřazeno z použití', 'Zasláno do reklamace', 'Přijato z reklamace'), 136 ), 137 'TActionEnum' => array( 138 'Type' => 'Enumeration', 139 'States' => array('add' => 'Přidat', 'modify' => 'Upravit', 'remove' => 'Odstranit'), 140 ), 141 'TWirelessMode' => array( 142 'Type' => 'Enumeration', 143 'States' => array('Přístupový bod (AP)', 'Klient'), 144 ), 145 'TFinanceBillingPeriod' => array( 146 'Type' => 'Reference', 147 'Table' => 'FinanceBillingPeriod', 158 148 'Id' => 'Id', 159 149 'Name' => 'Name', 160 150 'Filter' => '1', 161 151 ), 162 'TPriority' => array( 163 'Type' => 'Enumeration', 164 'States' => array('Nízká', 'Střední', 'Vysoká'), 165 ), 166 'TOnlineState' => array( 167 'Type' => 'Enumeration', 168 'States' => array('<span style="color:red;">Nedostupný</span>', '<span style="color:green;">Dostupný</span>'), 169 ), 170 'TNetworkConfigurationState' => array( 171 'Type' => 'Enumeration', 172 'States' => array('Neplánováno', 'V plánu', 'Provádí se'), 173 ), 174 'TAntennaPolarity' => array( 175 'Type' => 'Enumeration', 176 'States' => array('Vertikální', 'Horizontální', 'Kruhová', 'Vertikální i horizontální'), 177 ), 178 'TNetworkDeviceState' => array( 179 'Type' => 'Enumeration', 180 'States' => array('Vyřazeno', 'Použito', 'Na skladě'), 181 ), 182 'TNetworkDeviceAction' => array( 183 'Type' => 'Enumeration', 184 'States' => array('Zakoupeno', 'Prodáno', 'Zařazeno do použití', 'Vyřazeno z použití', 'Zasláno do reklamace', 'Přijato z reklamace'), 185 ), 186 'TActionEnum' => array( 187 'Type' => 'Enumeration', 188 'States' => array('add' => 'Přidat', 'modify' => 'Upravit', 'remove' => 'Odstranit'), 189 ), 190 'TWirelessMode' => array( 191 'Type' => 'Enumeration', 192 'States' => array('Přístupový bod (AP)', 'Klient'), 193 ), 194 'TService' => array( 195 'Type' => 'Reference', 196 'Table' => 'Service', 152 'TMemberListSubject' => array( 153 'Type' => 'ManyToOne', 154 'Table' => 'Member', 155 'Id' => 'Id', 156 'Ref' => 'Subject', 157 'Filter' => '1', 158 ), 159 'TDocumentLine' => array( 160 'Type' => 'Reference', 161 'Table' => 'DocumentLine', 197 162 'Id' => 'Id', 198 163 'Name' => 'Name', 199 164 'Filter' => '1', 200 165 ), 201 'TFinanceBillingPeriod' => array( 202 'Type' => 'Reference', 203 'Table' => 'FinanceBillingPeriod', 166 'TStockSerialNumberListStock' => array( 167 'Type' => 'ManyToOne', 168 'Table' => 'StockSerialNumber', 169 'Id' => 'Id', 170 'Ref' => 'Stock', 171 'Filter' => '1', 172 ), 173 'TStockSerialNumberListProduct' => array( 174 'Type' => 'ManyToOne', 175 'Table' => 'StockSerialNumber', 176 'Id' => 'Id', 177 'Ref' => 'Product', 178 'Filter' => '1', 179 ), 180 'TNetworkDeviceListProduct' => array( 181 'Type' => 'ManyToOne', 182 'Table' => 'NetworkDevice', 183 'Id' => 'Id', 184 'Ref' => 'Product', 185 'Filter' => '1', 186 ), 187 'TDocumentLine' => array( 188 'Type' => 'Reference', 189 'Table' => 'DocumentLine', 204 190 'Id' => 'Id', 205 191 'Name' => 'Name', 206 192 'Filter' => '1', 207 193 ), 208 'TMemberListSubject' => array( 209 'Type' => 'ManyToOne', 210 'Table' => 'Member', 211 'Id' => 'Id', 212 'Ref' => 'Subject', 213 'Filter' => '1', 214 ), 215 'TDocumentLine' => array( 216 'Type' => 'Reference', 217 'Table' => 'DocumentLine', 218 'Id' => 'Id', 219 'Name' => 'Name', 220 'Filter' => '1', 221 ), 222 'TServiceCustomerRel' => array( 223 'Type' => 'Reference', 224 'Table' => 'ServiceCustomerRel', 194 'TFinanceYear' => array( 195 'Type' => 'Reference', 196 'Table' => 'FinanceYear', 197 'Id' => 'Id', 198 'Name' => 'Year', 199 'Filter' => '1', 200 ), 201 'TCurrency' => array( 202 'Type' => 'Reference', 203 'Table' => 'Currency', 204 'Id' => 'Id', 205 'Name' => 'Code', 206 'Filter' => '1', 207 ), 208 'TFinanceInvoice' => array( 209 'Type' => 'Reference', 210 'Table' => 'FinanceInvoice', 211 'Id' => 'Id', 212 'Name' => 'BillCode', 213 'Filter' => '1', 214 ), 215 'TFinanceOperation' => array( 216 'Type' => 'Reference', 217 'Table' => 'FinanceOperation', 218 'Id' => 'Id', 219 'Name' => 'BillCode', 220 'Filter' => '1', 221 ), 222 'TFinanceCharge' => array( 223 'Type' => 'Reference', 224 'Table' => 'FinanceCharge', 225 225 'Id' => 'Id', 226 226 'Name' => 'Id', 227 227 'Filter' => '1', 228 228 ), 229 'TStockSerialNumberListStock' => array( 229 'TDocumentLineSequenceListYear' => array( 230 'Type' => 'ManyToOne', 231 'Table' => 'DocumentLineSequence', 232 'Id' => 'Id', 233 'Ref' => 'FinanceYear', 234 'Filter' => '1', 235 ), 236 'TDocumentLineSequenceListLine' => array( 237 'Type' => 'ManyToOne', 238 'Table' => 'DocumentLineSequence', 239 'Id' => 'Id', 240 'Ref' => 'DocumentLine', 241 'Filter' => '1', 242 ), 243 'TUserCustomerRelListUser' => array( 244 'Type' => 'ManyToOne', 245 'Table' => 'UserCustomerRel', 246 'Id' => 'Id', 247 'Ref' => 'User', 248 'Filter' => '1', 249 ), 250 'TUserCustomerRelListCustomer' => array( 251 'Type' => 'ManyToOne', 252 'Table' => 'UserCustomerRel', 253 'Id' => 'Id', 254 'Ref' => 'Customer', 255 'Filter' => '1', 256 ), 257 'TFinanceInvoiceOperationRelListInvoice' => array( 258 'Type' => 'ManyToOne', 259 'Table' => 'FinanceInvoiceOperationRel', 260 'Id' => 'Id', 261 'Ref' => 'Invoice', 262 'Filter' => '1', 263 ), 264 'TFinanceInvoiceOperationRelListOperation' => array( 265 'Type' => 'ManyToOne', 266 'Table' => 'FinanceInvoiceOperationRel', 267 'Id' => 'Id', 268 'Ref' => 'Operation', 269 'Filter' => '1', 270 ), 271 'TCustomerStockSerialNumber' => array( 230 272 'Type' => 'ManyToOne', 231 273 'Table' => 'StockSerialNumber', 232 274 'Id' => 'Id', 233 'Ref' => 'Stock', 234 'Filter' => '1', 235 ), 236 'TStockSerialNumberListProduct' => array( 237 'Type' => 'ManyToOne', 238 'Table' => 'StockSerialNumber', 239 'Id' => 'Id', 240 'Ref' => 'Product', 241 'Filter' => '1', 242 ), 243 'TNetworkDeviceListProduct' => array( 244 'Type' => 'ManyToOne', 245 'Table' => 'NetworkDevice', 246 'Id' => 'Id', 247 'Ref' => 'Product', 248 'Filter' => '1', 249 ), 250 'TDocumentLine' => array( 251 'Type' => 'Reference', 252 'Table' => 'DocumentLine', 253 'Id' => 'Id', 254 'Name' => 'Name', 255 'Filter' => '1', 256 ), 257 'TFinanceYear' => array( 258 'Type' => 'Reference', 259 'Table' => 'FinanceYear', 260 'Id' => 'Id', 261 'Name' => 'Year', 262 'Filter' => '1', 263 ), 264 'TCurrency' => array( 265 'Type' => 'Reference', 266 'Table' => 'Currency', 267 'Id' => 'Id', 268 'Name' => 'Code', 269 'Filter' => '1', 270 ), 271 'TFinanceInvoice' => array( 272 'Type' => 'Reference', 273 'Table' => 'FinanceInvoice', 274 'Id' => 'Id', 275 'Name' => 'BillCode', 276 'Filter' => '1', 277 ), 278 'TFinanceOperation' => array( 279 'Type' => 'Reference', 280 'Table' => 'FinanceOperation', 281 'Id' => 'Id', 282 'Name' => 'BillCode', 283 'Filter' => '1', 284 ), 285 'TFinanceCharge' => array( 286 'Type' => 'Reference', 287 'Table' => 'FinanceCharge', 288 'Id' => 'Id', 289 'Name' => 'Id', 290 'Filter' => '1', 291 ), 292 'TDocumentLineSequenceListYear' => array( 293 'Type' => 'ManyToOne', 294 'Table' => 'DocumentLineSequence', 295 'Id' => 'Id', 296 'Ref' => 'FinanceYear', 297 'Filter' => '1', 298 ), 299 'TDocumentLineSequenceListLine' => array( 300 'Type' => 'ManyToOne', 301 'Table' => 'DocumentLineSequence', 302 'Id' => 'Id', 303 'Ref' => 'DocumentLine', 304 'Filter' => '1', 305 ), 306 'TUserCustomerRelListUser' => array( 307 'Type' => 'ManyToOne', 308 'Table' => 'UserCustomerRel', 275 'Ref' => 'Location', 276 'Filter' => '1', 277 ), 278 'TPermissionUserAssignmentListUser' => array( 279 'Type' => 'ManyToOne', 280 'Table' => 'PermissionUserAssignment', 309 281 'Id' => 'Id', 310 282 'Ref' => 'User', 311 283 'Filter' => '1', 312 284 ), 313 'TUserCustomerRelListCustomer' => array(314 'Type' => 'ManyToOne',315 'Table' => 'UserCustomerRel',316 'Id' => 'Id',317 'Ref' => 'Customer',318 'Filter' => '1',319 ),320 'TFinanceInvoiceOperationRelListInvoice' => array(321 'Type' => 'ManyToOne',322 'Table' => 'FinanceInvoiceOperationRel',323 'Id' => 'Id',324 'Ref' => 'Invoice',325 'Filter' => '1',326 ),327 'TFinanceInvoiceOperationRelListOperation' => array(328 'Type' => 'ManyToOne',329 'Table' => 'FinanceInvoiceOperationRel',330 'Id' => 'Id',331 'Ref' => 'Operation',332 'Filter' => '1',333 ),334 'TServiceCustomerRelListCustomer' => array(335 'Type' => 'ManyToOne',336 'Table' => 'ServiceCustomerRel',337 'Id' => 'Id',338 'Ref' => 'Customer',339 'Filter' => '1',340 ),341 'TServiceCustomerRelListService' => array(342 'Type' => 'ManyToOne',343 'Table' => 'ServiceCustomerRel',344 'Id' => 'Id',345 'Ref' => 'Service',346 'Filter' => '1',347 ),348 'TCustomerStockSerialNumber' => array(349 'Type' => 'ManyToOne',350 'Table' => 'StockSerialNumber',351 'Id' => 'Id',352 'Ref' => 'Location',353 'Filter' => '1',354 ),355 'TPermissionUserAssignmentListUser' => array(356 'Type' => 'ManyToOne',357 'Table' => 'PermissionUserAssignment',358 'Id' => 'Id',359 'Ref' => 'User',360 'Filter' => '1',361 ),362 285 'TPermissionGroupAssignmentListGroup' => array( 363 286 'Type' => 'ManyToOne', … … 379 302 'Id' => 'Id', 380 303 'Ref' => 'AssignedGroup', 381 'Filter' => '1',382 ),383 'TServiceListServiceCategory' => array(384 'Type' => 'ManyToOne',385 'Table' => 'Service',386 'Id' => 'Id',387 'Ref' => 'Category',388 304 'Filter' => '1', 389 305 ), -
trunk/Modules/Customer/Customer.php
r721 r723 63 63 'Filter' => '1', 64 64 )); 65 65 $this->System->FormManager->RegisterClass('Service', array( 66 'Title' => 'Služby', 67 'Table' => 'Service', 68 'DefaultSortColumn' => 'Name', 69 'Items' => array( 70 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 71 'Category' => array('Type' => 'TServiceCategory', 'Caption' => 'Skupina', 'Default' => '', 'Null' => true), 72 'Price' => array('Type' => 'Integer', 'Caption' => 'Cena', 'Default' => '0', 'Suffix' => 'Kč'), 73 'VAT' => array('Type' => 'TFinanceVATType', 'Caption' => 'Sazba DPH', 'Default' => '0', 'Suffix' => ''), 74 'CustomerCount' => array('Type' => 'Integer', 'Caption' => 'Počet zákazníků', 'Default' => '', 'ReadOnly' => true, 75 'SQL' => '(SELECT COUNT(*) FROM `ServiceCustomerRel` LEFT JOIN `Member` ON `Member`.`Id`=`ServiceCustomerRel`.`Customer` WHERE (`ServiceCustomerRel`.`Service`=#Id) AND (`Member`.`Blocked`=0))'), 76 'Public' => array('Type' => 'Boolean', 'Caption' => 'Veřejné', 'Default' => ''), 77 'InternetSpeedMin' => array('Type' => 'Integer', 'Caption' => 'Min. rychlost internetu', 'Default' => '0', 'Suffix' => 'kbit/s'), 78 'InternetSpeedMax' => array('Type' => 'Integer', 'Caption' => 'Max. rychlost internetu', 'Default' => '0', 'Suffix' => 'kbit/s'), 79 'UploadAsymmetry' => array('Type' => 'Integer', 'Caption' => 'Asymetrie odesílání', 'Default' => '1'), 80 'Memory' => array('Type' => 'Integer', 'Caption' => 'Paměť', 'Default' => '0', 'Suffix' => 'GB'), 81 'MemorySwap' => array('Type' => 'Integer', 'Caption' => 'Odkládací oddíl', 'Default' => '0', 'Suffix' => 'GB'), 82 'Storage' => array('Type' => 'Integer', 'Caption' => 'Úložiště', 'Default' => '0', 'Suffix' => 'GB'), 83 'CPUCount' => array('Type' => 'Integer', 'Caption' => 'Počet jader', 'Default' => '0', 'Suffix' => ''), 84 'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => '', 'Null' => true), 85 'ReplaceId' => array('Type' => 'TService', 'Caption' => 'Cílová položka', 'Default' => '', 'Null' => true), 86 'CustomerRel' => array('Type' => 'TServiceCustomerRelListService', 'Caption' => 'Placení zákazníky', 'Default' => ''), 87 ), 88 )); 89 $this->System->FormManager->RegisterClass('ServiceCategory', array( 90 'Title' => 'Kategorie služeb', 91 'Table' => 'ServiceCategory', 92 'Items' => array( 93 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 94 'Items' => array('Type' => 'TServiceListServiceCategory', 'Caption' => 'Služby', 'Default' => ''), 95 ), 96 )); 97 $this->System->FormManager->RegisterClass('ServiceCustomerRel', array( 98 'Title' => 'Vztahy služba - zákazník', 99 'Table' => 'ServiceCustomerRel', 100 'Items' => array( 101 'Service' => array('Type' => 'TService', 'Caption' => 'Služba', 'Default' => ''), 102 'Customer' => array('Type' => 'TMember', 'Caption' => 'Zákazník', 'Default' => ''), 103 'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => '', 'Null' => true), 104 'ReplaceId' => array('Type' => 'TServiceCustomerRel', 'Caption' => 'Cílová položka', 'Default' => '', 'Null' => true), 105 ), 106 )); 107 $this->System->FormManager->RegisterFormType('TServiceCategory', array( 108 'Type' => 'Reference', 109 'Table' => 'ServiceCategory', 110 'Id' => 'Id', 111 'Name' => 'Name', 112 'Filter' => '1', 113 )); 114 $this->System->FormManager->RegisterFormType('TService', array( 115 'Type' => 'Reference', 116 'Table' => 'Service', 117 'Id' => 'Id', 118 'Name' => 'Name', 119 'Filter' => '1', 120 )); 121 $this->System->FormManager->RegisterFormType('TServiceCustomerRel', array( 122 'Type' => 'Reference', 123 'Table' => 'ServiceCustomerRel', 124 'Id' => 'Id', 125 'Name' => 'Id', 126 'Filter' => '1', 127 )); 128 $this->System->FormManager->RegisterFormType('TServiceCustomerRelListCustomer', array( 129 'Type' => 'ManyToOne', 130 'Table' => 'ServiceCustomerRel', 131 'Id' => 'Id', 132 'Ref' => 'Customer', 133 'Filter' => '1', 134 )); 135 $this->System->FormManager->RegisterFormType('TServiceCustomerRelListService', array( 136 'Type' => 'ManyToOne', 137 'Table' => 'ServiceCustomerRel', 138 'Id' => 'Id', 139 'Ref' => 'Service', 140 'Filter' => '1', 141 )); 142 $this->System->FormManager->RegisterFormType('TServiceListServiceCategory', array( 143 'Type' => 'ManyToOne', 144 'Table' => 'Service', 145 'Id' => 'Id', 146 'Ref' => 'Category', 147 'Filter' => '1', 148 )); 66 149 } 67 150 }
Note:
See TracChangeset
for help on using the changeset viewer.