Changeset 549


Ignore:
Timestamp:
Jul 6, 2013, 12:22:02 AM (11 years ago)
Author:
chronos
Message:
  • Přidáno: Vlastnost Generate u plateb a faktur pro určení, které doklady se mají zpožděně generovat jako PDF.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Version.php

    r548 r549  
    11<?php
    22
    3 $Revision = 547; // Subversion revision
    4 $DatabaseRevision = 535; // SQL structure revision
    5 $ReleaseTime = '2013-06-12';
     3$Revision = 549; // Subversion revision
     4$DatabaseRevision = 549; // SQL structure revision
     5$ReleaseTime = '2013-07-05';
    66
  • trunk/Modules/Finance/Finance.php

    r548 r549  
    366366        'BankAccount' => array('Type' => 'TFinanceBankAccount', 'Caption' => 'Účet', 'Default' => '', 'Null' => true),
    367367        'Treasury' => array('Type' => 'TFinanceTreasury', 'Caption' => 'Pokladna', 'Default' => '', 'Null' => true),
     368        'Generate' => array('Type' => 'Boolean', 'Caption' => 'Generovat', 'Default' => ''),
    368369      ),
    369370    ));
     
    380381        'Value' => array('Type' => 'Integer', 'Caption' => 'Částka', 'Default' => '0', 'Suffix' => 'Kč'),
    381382        'File' => array('Type' => 'TFile', 'Caption' => 'Doklad', 'Default' => '', 'Null' => true),
     383        'Generate' => array('Type' => 'Boolean', 'Caption' => 'Generovat', 'Default' => ''),
    382384        'Items' => array('Type' => 'TFinanceInvoiceItemListInvoice', 'Caption' => 'Položky', 'Default' => ''),
    383385      ),
  • trunk/Modules/Finance/Manage.php

    r548 r549  
    148148      'Subject' => $Subject, 'TimeCreation' => TimeToMysqlDateTime($TimeCreation),
    149149      'TimeDue' => TimeToMysqlDateTime($TimeDue), 'Value' => $SumValue, 'BillCode' => $BillCode,
    150       'PeriodFrom' => TimeToMysqlDate($PeriodFrom), 'PeriodTo' => TimeToMysqlDate($PeriodTo)));
     150      'PeriodFrom' => TimeToMysqlDate($PeriodFrom), 'PeriodTo' => TimeToMysqlDate($PeriodTo),
     151      'Generate' => 1));
    151152    $InvoiceId = $this->Database->insert_id;
    152153    foreach($Items as $Item)
     
    552553    // FinanceInvoice
    553554    $DbResult = $this->Database->query('SELECT * FROM `FinanceInvoice` WHERE (`BillCode` <> "") '.
    554       'AND (`Value` != 0) AND (`File` IS NULL)');
     555      'AND (`Value` != 0) AND (`File` IS NULL) AND (`Generate` = 1)');
    555556    while($Row = $DbResult->fetch_assoc())
    556557    {
  • trunk/admin/Updates.php

    r548 r549  
    314314}
    315315
     316function UpdateTo535($Manager)
     317{
     318  $Manager->Execute("ALTER TABLE `FinanceOperation` ADD `Generate` INT NOT NULL DEFAULT '0',
     319ADD INDEX ( `Generate` ) ;");
     320  $Manager->Execute("ALTER TABLE `FinanceInvoice` ADD `Generate` INT NOT NULL DEFAULT '0',
     321ADD INDEX ( `Generate` ) ;");
     322}
     323
    316324$Updates = array(
    317325  491 => array('Revision' => 493, 'Function' => 'UpdateTo493'),
     
    330338  526 => array('Revision' => 527, 'Function' => 'UpdateTo527'),
    331339  527 => array('Revision' => 535, 'Function' => 'UpdateTo535'),
     340  535 => array('Revision' => 549, 'Function' => 'UpdateTo549'),
    332341);
Note: See TracChangeset for help on using the changeset viewer.