Changeset 720 for trunk/Modules/Finance/Finance.php
- Timestamp:
- Jan 3, 2015, 5:55:34 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Finance.php
r719 r720 186 186 while($Member = $DbResult->fetch_assoc()) 187 187 { 188 $DbResult2 = $this->Database->query('SELECT ((SELECT COALESCE( SUM(-Value*Direction), 0) FROM FinanceOperation '.189 'WHERE Subject='.$Member['Subject'].') + (SELECT COALESCE( SUM(-Value), 0) FROM FinanceInvoice '.190 'WHERE Subject='.$Member['Subject'].')) asCash');188 $DbResult2 = $this->Database->query('SELECT ((SELECT COALESCE(-SUM(Value*Direction), 0) FROM FinanceOperation '. 189 'WHERE Subject='.$Member['Subject'].') + (SELECT COALESCE(-SUM(Value*Direction), 0) FROM FinanceInvoice '. 190 'WHERE Subject='.$Member['Subject'].')) AS Cash'); 191 191 $Cash = $DbResult2->fetch_row(); 192 192 $Cash = $Cash[0]; … … 277 277 'DefaultSortOrder' => 1, 278 278 'Items' => array( 279 'Direction' => array('Type' => 'TFinance Direction', 'Caption' => 'Směr', 'Default' => '1'),279 'Direction' => array('Type' => 'TFinanceOperationDirection', 'Caption' => 'Směr', 'Default' => '1'), 280 280 'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => ''), 281 281 'BillCode' => array('Type' => 'String', 'Caption' => 'Označení', 'Default' => ''), … … 337 337 $this->System->FormManager->Classes['FinanceAccountOut']['Items']['Treasury']['Hidden'] = true; 338 338 339 $this->System->FormManager->RegisterFormType('TFinance Direction', array(339 $this->System->FormManager->RegisterFormType('TFinanceOperationDirection', array( 340 340 'Type' => 'Enumeration', 341 341 'States' => array(-1 => 'Výdej', 1 => 'Příjem'), … … 347 347 'DefaultSortOrder' => 1, 348 348 'Items' => array( 349 'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => ''), 349 'Direction' => array('Type' => 'TFinanceInvoiceDirection', 'Caption' => 'Směr', 'Default' => '1'), 350 'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => ''), 350 351 'BillCode' => array('Type' => 'String', 'Caption' => 'Označení', 'Default' => ''), 351 352 'Subject' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => ''), … … 367 368 'BeforeInsert' => array($this, 'BeforeInsertFinanceOperation'), 368 369 )); 370 $this->System->FormManager->RegisterClass('FinanceInvoiceIn', $this->System->FormManager->Classes['FinanceInvoice']); 371 $this->System->FormManager->Classes['FinanceInvoiceIn']['Title'] = 'Přijaté faktury'; 372 $this->System->FormManager->Classes['FinanceInvoiceIn']['Items']['Direction']['Default'] = -1; 373 $this->System->FormManager->Classes['FinanceInvoiceIn']['Items']['Direction']['Hidden'] = true; 374 $this->System->FormManager->Classes['FinanceInvoiceIn']['Items']['Direction']['Filter'] = true; 375 $this->System->FormManager->Classes['FinanceInvoiceIn']['Items']['DocumentLine']['Default'] = DOC_LINE_INVOICE_IN; 376 $this->System->FormManager->Classes['FinanceInvoiceIn']['Items']['DocumentLine']['Hidden'] = true; 377 $this->System->FormManager->Classes['FinanceInvoiceIn']['Items']['DocumentLine']['Filter'] = true; 378 379 $this->System->FormManager->RegisterClass('FinanceInvoiceOut', $this->System->FormManager->Classes['FinanceInvoice']); 380 $this->System->FormManager->Classes['FinanceInvoiceOut']['Title'] = 'Vydané faktury'; 381 $this->System->FormManager->Classes['FinanceInvoiceOut']['Items']['Direction']['Default'] = 1; 382 $this->System->FormManager->Classes['FinanceInvoiceOut']['Items']['Direction']['Hidden'] = true; 383 $this->System->FormManager->Classes['FinanceInvoiceOut']['Items']['Direction']['Filter'] = true; 384 $this->System->FormManager->Classes['FinanceInvoiceOut']['Items']['DocumentLine']['Default'] = DOC_LINE_INVOICE_OUT; 385 $this->System->FormManager->Classes['FinanceInvoiceOut']['Items']['DocumentLine']['Hidden'] = true; 386 $this->System->FormManager->Classes['FinanceInvoiceOut']['Items']['DocumentLine']['Filter'] = true; 387 388 $this->System->FormManager->RegisterFormType('TFinanceInvoiceDirection', array( 389 'Type' => 'Enumeration', 390 'States' => array(-1 => 'Příjem', 1 => 'Výdej'), 391 )); 392 369 393 $this->System->FormManager->RegisterClass('Company', array( 370 394 'Title' => 'Firma',
Note:
See TracChangeset
for help on using the changeset viewer.