Changeset 888 for trunk/Modules/Finance


Ignore:
Timestamp:
Nov 24, 2020, 10:58:56 AM (4 years ago)
Author:
chronos
Message:
  • Modified: More static types added.
Location:
trunk/Modules/Finance
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Finance/Bill.php

    r887 r888  
    66  public bool $Checked = false;
    77
    8   function GenerateHTML()
     8  function GenerateHTML(): string
    99  {
    1010    return '';
    1111  }
    1212
    13   function SaveToFile(string $FileName)
     13  function SaveToFile(string $FileName): void
    1414  {
    1515    $PdfData = $this->HtmlToPdf($this->GenerateHTML());
  • trunk/Modules/Finance/Finance.php

    r887 r888  
    2222class Finance extends Model
    2323{
    24   var $kWh;
    25   var $Internet;
    26   var $Sprava;
    27   var $DatumOdecteni;
    28   var $InternetUsers;
    29   var $SpravaUsers;
    30   var $MaxSpeed;
    31   var $RealMaxSpeed;
    32   var $SpeedReserve;
    33   var $BaseSpeedElement;
    34   var $BaseTariffPrice;
    35   var $TopTariffPrice;
    36   var $TotalPaid;
    37   var $TotalInternetPaid;
    38   var $MainSubject;
    39   var $BillingPeriods;
    40   var $DirectoryId;
    41   var $Rounding;
     24  public string $kWh;
     25  public string $Internet;
     26  public string $Sprava;
     27  public string $DatumOdecteni;
     28  public string $InternetUsers;
     29  public string $SpravaUsers;
     30  public string $MaxSpeed;
     31  public string $RealMaxSpeed;
     32  public string $SpeedReserve;
     33  public string $BaseSpeedElement;
     34  public string $BaseTariffPrice;
     35  public string $TopTariffPrice;
     36  public string $TotalPaid;
     37  public string $TotalInternetPaid;
     38  public string $MainSubject;
     39  public array $BillingPeriods;
     40  public string $DirectoryId;
     41  public string $Rounding;
    4242
    4343  function LoadMonthParameters(int $Period = 1) // 0 - now, 1 - next month
     
    8383  }
    8484
    85   function CreateFinanceYear($Year)
     85  function CreateFinanceYear(int $Year)
    8686  {
    8787    $StartTime = mktime(0, 0, 0, 1, 1, $Year);
     
    100100  }
    101101
    102   function GetFinanceYear(int $Year)
     102  function GetFinanceYear(int $Year): array
    103103  {
    104104    if ($Year == 0)
     
    121121  }
    122122
    123   function GetNextDocumentLineNumber(string $Id, int $FinanceYear = 0)
     123  function GetNextDocumentLineNumber(string $Id, int $FinanceYear = 0): string
    124124  {
    125125          $FinanceYear = $this->GetFinanceYear($FinanceYear);
  • trunk/Modules/Finance/Import.php

    r887 r888  
    128128  }
    129129
    130   function InsertMoney(string $Subject, string $Value, string $Cash, string $Taxable, string $Time, string $Text, array $Group)
     130  function InsertMoney(string $Subject, string $Value, string $Cash, string $Taxable, string $Time, string $Text, array $Group): void
    131131  {
    132132    $Year = date('Y', $Time);
  • trunk/Modules/Finance/Trade.php

    r887 r888  
    33class PageFinanceTaxFiling extends Page
    44{
    5   var $StartEvidence = 0;
     5  public int $StartEvidence = 0;
    66
    77  function __construct(System $System)
     
    1313  }
    1414
    15   function GetTimePeriodBalance($StartTime, $EndTime)
     15  function GetTimePeriodBalance(int $StartTime, int $EndTime): array
    1616  {
    1717    $Balance = array();
     
    7373  }
    7474
    75   function ShowAnnualBalance()
     75  function ShowAnnualBalance(): string
    7676  {
    7777    $Output = '<table style="font-size: smaller;" class="WideTable">';
     
    109109  }
    110110
    111   function ShowMonthlyBalance()
     111  function ShowMonthlyBalance(): string
    112112  {
    113113    $Output = '<table class="WideTable" style="font-size: smaller;">';
     
    151151  }
    152152
    153   function ShowIncomes()
     153  function ShowIncomes(): string
    154154  {
    155155    $Table = array('Ne', 'Ano');
     
    190190  }
    191191
    192   function ShowExpenses()
     192  function ShowExpenses(): string
    193193  {
    194194    $Table = array('Ne', 'Ano');
     
    231231  }
    232232
    233   function ShowClaims()
     233  function ShowClaims(): string
    234234  {
    235235    $Table = array('Ne', 'Ano');
     
    262262  }
    263263
    264   function ShowLiabilities()
     264  function ShowLiabilities(): string
    265265  {
    266266    $Table = array('Ne', 'Ano');
     
    294294  }
    295295
    296   function ShowSubjectList()
     296  function ShowSubjectList(): string
    297297  {
    298298    $Output = '<strong>Seznam subjektů</strong>';
     
    327327  }
    328328
    329   function ShowSmallAssets()
     329  function ShowSmallAssets(): string
    330330  {
    331331    $Output = '<strong>Drobný majetek</strong>';
     
    343343  }
    344344
    345   function ShowSubjectAccount()
     345  function ShowSubjectAccount(): string
    346346  {
    347347    $Finance = &ModuleFinance::Cast($this->System->GetModule('Finance'))->Finance;
     
    408408  }
    409409
    410   function ShowDefault()
     410  function ShowDefault(): string
    411411  {
    412412    $Output = '<strong>Celkové přehledy</strong><br/>';
     
    486486  }
    487487
    488   function ShowFinanceYears()
     488  function ShowFinanceYears(): string
    489489  {
    490490    $Output = 'Roky: ';
     
    499499  {
    500500    $TimeDue = $Time + 15 * 24 * 3600; // 15 dnů
    501 
    502501  }
    503502
  • trunk/Modules/Finance/UserState.php

    r887 r888  
    1111  }
    1212
    13   function ShowFinanceOperation($Subject)
     13  function ShowFinanceOperation(int $Subject): string
    1414  {
    1515    $UserOperationTableQuery = '((SELECT `Text`, `Time`, `Value`, `File`, `BillCode`, NULL AS `PeriodFrom`, NULL AS `PeriodTo`, `DocumentLineCode`.`Name` AS `BillName` '.
Note: See TracChangeset for help on using the changeset viewer.