Changeset 874 for trunk/Modules/Finance
- Timestamp:
- Apr 6, 2020, 11:56:19 PM (5 years ago)
- Location:
- trunk/Modules/Finance
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Bill.php
r873 r874 8 8 function GenerateHTML() 9 9 { 10 return ('');10 return ''; 11 11 } 12 12 … … 29 29 $Output = shell_exec('echo "'.addslashes($Encoding->FromUTF8($HtmlCode)). 30 30 '"|htmldoc --no-numbered --webpage --no-embedfonts --charset 8859-2 -t pdf -'); 31 return ($Output);31 return $Output; 32 32 } 33 33 } … … 47 47 if ($Subject['Account'] != '') $Output .= 'Účet: '.$Subject['Account'].'<br>'; 48 48 if ($Subject['PayVAT'] != '') $Output .= 'Plátce DPH: '.$BooleanText[$Subject['PayVAT']].'<br>'; 49 return ($Output);49 return $Output; 50 50 } 51 51 … … 146 146 '</table>'; 147 147 148 return ($Output);148 return $Output; 149 149 } 150 150 } … … 215 215 '<tr><td> </td><td><br><br>'.$Desc['Signature'].':</td></tr>'; 216 216 $Output .= '</table>'; 217 return ($Output);217 return $Output; 218 218 } 219 219 } -
trunk/Modules/Finance/Finance.php
r873 r874 80 80 function W2Kc($Spotreba) 81 81 { 82 return (round($Spotreba * 0.72 * $this->kWh));82 return round($Spotreba * 0.72 * $this->kWh); 83 83 } 84 84 … … 138 138 $this->Database->query('UPDATE `DocumentLineSequence` SET `NextNumber` = `NextNumber` + 1 '. 139 139 'WHERE (`DocumentLine`='.$Id.') AND (`FinanceYear`='.$FinanceYear['Id'].')'); 140 return ($Result);140 return $Result; 141 141 } 142 142 … … 153 153 if ($DbResult->num_rows == 1) { 154 154 $Group = $DbResult->fetch_assoc(); 155 return ($Group);155 return $Group; 156 156 } else die('Finance group id '.$Id.' not found in table '.$Table); 157 157 } … … 204 204 } 205 205 $this->System->ModuleManager->Modules['Log']->NewRecord('Finance', 'RecalculateMemberPayment'); 206 return ($Output);206 return $Output; 207 207 } 208 208 … … 214 214 TimeToMysqlDate($Time).'") OR (ValidTo IS NULL)) LIMIT 1'); 215 215 $Row = $DbResult->fetch_array(); 216 return ($Row[0]);216 return $Row[0]; 217 217 } 218 218 } … … 669 669 $FinanceGroup = $this->System->Modules['Finance']->GetFinanceGroupById($Form->Values['Group'], 'FinanceOperationGroup'); 670 670 $Form->Values['BillCode'] = $this->System->Modules['Finance']->GetNextDocumentLineNumberId($FinanceGroup['DocumentLine'], $Year); 671 return ($Form->Values);671 return $Form->Values; 672 672 } 673 673 … … 677 677 $this->Database->query('UPDATE `'.$Form->Definition['Table'].'` SET `Value`= '. 678 678 ($Form->Values['ValueUser'] * $FinanceGroup['ValueSign']).' WHERE `Id`='.$Id); 679 return ($Form->Values);679 return $Form->Values; 680 680 } 681 681 … … 685 685 $this->Database->query('UPDATE `'.$Form->Definition['Table'].'` SET `Value`= '. 686 686 ($Form->Values['ValueUser'] * $FinanceGroup['ValueSign']).' WHERE `Id`='.$Id); 687 return ($Form->Values);687 return $Form->Values; 688 688 } 689 689 … … 695 695 $Group = $this->System->Modules['Finance']->GetFinanceGroupById($Form->Values['Group'], 'FinanceInvoiceGroup'); 696 696 $Form->Values['BillCode'] = $this->System->Modules['Finance']->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year); 697 return ($Form->Values);697 return $Form->Values; 698 698 } 699 699 … … 707 707 $this->Database->query('UPDATE `'.$Form->Definition['Table'].'` SET `Value`= '. 708 708 ($Sum * $FinanceGroup['ValueSign']).' WHERE `Id`='.$Id); 709 return ($Form->Values);709 return $Form->Values; 710 710 } 711 711 … … 718 718 $this->Database->query('UPDATE `'.$Form->Definition['Table'].'` SET `Value`= '. 719 719 ($Sum * $FinanceGroup['ValueSign']).' WHERE `Id`='.$Id); 720 return ($Form->Values);720 return $Form->Values; 721 721 } 722 722 … … 727 727 $ParentForm->LoadValuesFromDatabase($Form->Values['FinanceInvoice']); 728 728 $this->AfterInsertFinanceInvoice($ParentForm, $Form->Values['FinanceInvoice']); 729 return ($Form->Values);729 return $Form->Values; 730 730 } 731 731 … … 736 736 $ParentForm->LoadValuesFromDatabase($Form->Values['FinanceInvoice']); 737 737 $this->BeforeModifyFinanceInvoice($ParentForm, $Form->Values['FinanceInvoice']); 738 return ($Form->Values);738 return $Form->Values; 739 739 } 740 740 … … 744 744 else $Year = date("Y", $Form->Values['ValidFrom']); 745 745 $Form->Values['BillCode'] = $this->System->Modules['Finance']->GetNextDocumentLineNumberId($Form->Values['DocumentLine'], $Year); 746 return ($Form->Values);746 return $Form->Values; 747 747 } 748 748 } -
trunk/Modules/Finance/Import.php
r873 r874 9 9 function Show() 10 10 { 11 if (!$this->System->User->CheckPermission('Finance', 'SubjectList')) return ('Nemáte oprávnění');11 if (!$this->System->User->CheckPermission('Finance', 'SubjectList')) return 'Nemáte oprávnění'; 12 12 if (array_key_exists('Operation', $_GET)) 13 13 { 14 if ($_GET['Operation'] == 'prepare') return ($this->Prepare());15 else if ($_GET['Operation'] == 'insert') return ($this->Insert());14 if ($_GET['Operation'] == 'prepare') return $this->Prepare(); 15 else if ($_GET['Operation'] == 'insert') return $this->Insert(); 16 16 else echo('Neplatná akce'); 17 17 } else … … 22 22 $Output .= '<input type="submit" value="Analyzovat"/>'; 23 23 $Output .= '</form>'; 24 return ($Output);24 return $Output; 25 25 } 26 26 } … … 121 121 $Output .= '<input type="submit" value="Zpracovat"/></form>'; 122 122 } 123 return ($Output);123 return $Output; 124 124 } 125 125 … … 156 156 $this->System->ModuleManager->Modules['Log']->NewRecord('Finance', 'NewPaymentInserted'); 157 157 } 158 return ($Output);158 return $Output; 159 159 } 160 160 } -
trunk/Modules/Finance/Manage.php
r873 r874 11 11 $Output = ''; 12 12 if (!$this->System->User->CheckPermission('Finance', 'Manage')) 13 return ('Nemáte oprávnění');13 return 'Nemáte oprávnění'; 14 14 15 15 if (array_key_exists('Operation', $_GET)) $Operation = $_GET['Operation']; … … 42 42 $Output .= '<a href="'.$this->System->Link('/finance/import/').'">Import plateb</a><br />'; 43 43 } 44 return ($Output);44 return $Output; 45 45 } 46 46 … … 52 52 53 53 $MonthCount = $this->System->Modules['Finance']->BillingPeriods[$Period]['MonthCount']; 54 if ($MonthCount <= 0) return (array('From' => NULL, 'To' => NULL, 'MonthCount' => 0));54 if ($MonthCount <= 0) return array('From' => NULL, 'To' => NULL, 'MonthCount' => 0); 55 55 $MonthCurrent = date('n', $Time); 56 56 … … 67 67 $PeriodTo = mktime(0, 0, 0, $MonthTo, date('t', mktime(0, 0, 0, $MonthTo, 1, $Year)), $Year); 68 68 69 return (array('From' => $PeriodFrom, 'To' => $PeriodTo, 'MonthCount' => $MonthCount));69 return array('From' => $PeriodFrom, 'To' => $PeriodTo, 'MonthCount' => $MonthCount); 70 70 } 71 71 72 72 function ShowMonthlyPayment() 73 73 { 74 if (!$this->System->User->CheckPermission('Finance', 'Manage')) return ('Nemáte oprávnění');74 if (!$this->System->User->CheckPermission('Finance', 'Manage')) return 'Nemáte oprávnění'; 75 75 $SQL = 'SELECT `Member`.*, `MemberPayment`.`MonthlyTotal` AS `Monthly`, '. 76 76 '`MemberPayment`.`Cash` AS `Cash`, '. … … 120 120 $Output .= $PageList['Output']; 121 121 $Output .= '<a href="?Operation=ProcessMonthlyPayment">Generovat faktury</a>'; 122 return ($Output);122 return $Output; 123 123 } 124 124 … … 149 149 //$LastInsertTime = $Time; 150 150 //$this->CheckAdvancesAndLiabilities($Subject); 151 return ($InvoiceId);151 return $InvoiceId; 152 152 } 153 153 … … 217 217 $Output .= "\n"; 218 218 } 219 return ($Output);219 return $Output; 220 220 } 221 221 … … 270 270 $this->TableUpdateChanges('ServiceCustomerRel'); 271 271 272 return ($Output);272 return $Output; 273 273 } 274 274 275 275 function ProcessMonthlyPayment() 276 276 { 277 if (!$this->System->User->CheckPermission('Finance', 'Manage')) return ('Nemáte oprávnění');277 if (!$this->System->User->CheckPermission('Finance', 'Manage')) return 'Nemáte oprávnění'; 278 278 $Output = ''; 279 279 … … 335 335 } 336 336 $Output = str_replace("\n", '<br/>', $Output); 337 return ($Output);337 return $Output; 338 338 } 339 339 … … 478 478 $Output .= $this->GenerateInvoice(' AND (`File` IS NULL)'); 479 479 $Output .= $this->GenerateOperation(' AND (`File` IS NULL)'); 480 return ($Output);480 return $Output; 481 481 } 482 482 } -
trunk/Modules/Finance/Trade.php
r873 r874 65 65 $Row = $DbResult->fetch_array(); 66 66 $Balance['SmallAssets']['End'] = $Row[0] + 0; 67 return ($Balance);67 return $Balance; 68 68 } 69 69 … … 427 427 { 428 428 if (!$this->System->User->CheckPermission('Finance', 'TradingStatus')) 429 return ('Nemáte oprávnění');429 return 'Nemáte oprávnění'; 430 430 431 431 $Finance = &$this->System->Modules['Finance']; … … 478 478 $Output = $this->ShowDefault(); 479 479 } 480 return ($Output);480 return $Output; 481 481 } 482 482 … … 488 488 $Output .= '<a href="?year='.$DbRow['Id'].'">'.$DbRow['Year'].'</a> '; 489 489 $Output .= '<br/>'; 490 return ($Output);490 return $Output; 491 491 } 492 492 -
trunk/Modules/Finance/UserState.php
r873 r874 66 66 $Output .= '</table>'; 67 67 $Output .= $PageList['Output']; 68 return ($Output);68 return $Output; 69 69 } 70 70 … … 77 77 if (array_key_exists('i', $_GET)) 78 78 { 79 if (!$this->System->User->CheckPermission('Finance', 'Manage')) return ('Nemáte oprávnění');79 if (!$this->System->User->CheckPermission('Finance', 'Manage')) return 'Nemáte oprávnění'; 80 80 $CustomerId = $_GET['i']; 81 81 } else 82 82 { 83 if (!$this->System->User->CheckPermission('Finance', 'DisplaySubjectState')) return ('Nemáte oprávnění');83 if (!$this->System->User->CheckPermission('Finance', 'DisplaySubjectState')) return 'Nemáte oprávnění'; 84 84 $UserId = $this->System->User->User['Id']; 85 85 $DbResult = $this->Database->query('SELECT `Customer` FROM `UserCustomerRel` WHERE `User`='.$UserId.' LIMIT 1'); … … 88 88 $CustomerUserRel = $DbResult->fetch_assoc(); 89 89 $CustomerId = $CustomerUserRel['Customer']; 90 } else return ($this->SystemMessage('Chyba', 'Nejste zákazníkem'));90 } else return $this->SystemMessage('Chyba', 'Nejste zákazníkem'); 91 91 } 92 92 … … 96 96 { 97 97 $Customer = $DbResult->fetch_assoc(); 98 } else return ($this->SystemMessage('Položka nenalezena', 'Zákazník nenalezen'));98 } else return $this->SystemMessage('Položka nenalezena', 'Zákazník nenalezen'); 99 99 100 100 … … 104 104 { 105 105 $Subject = $DbResult->fetch_assoc(); 106 } else return ($this->SystemMessage('Položka nenalezena', 'Subjekt nenalezen'));106 } else return $this->SystemMessage('Položka nenalezena', 'Subjekt nenalezen'); 107 107 108 108 … … 152 152 153 153 $Output .= '</td></tr></table>'; 154 return ($Output);154 return $Output; 155 155 } 156 156 }
Note:
See TracChangeset
for help on using the changeset viewer.