Ignore:
Timestamp:
Feb 18, 2021, 1:59:28 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Improved generation of contracts.
File:
1 edited

Legend:

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

    r901 r902  
    429429      if ($Row['File'] == null)
    430430      {
    431         $this->Database->insert('File', array('Name' => '', 'Size' => 0, 'Directory' => $DirectoryId, 'Time' => 'NOW()'));
     431        $this->Database->insert('File', array('Name' => '', 'Size' => 0, 'Directory' => $DirectoryId, 'Time' => 'NOW()',
     432          'Hash' => 'SHA1(CONCAT(Id,Name,Size,Time))'));
    432433        $FileId = $this->Database->insert_id;
    433434      } else $FileId = $Row['File'];
    434435      $FileName = 'doklad-'.$FileId.'.pdf';
    435436      $Bill = new BillInvoice($this->System);
    436       $Bill->Database = &$this->System->Database;
    437       $Bill->System = &$this->System;
    438437      $Bill->InvoiceId = $Row['Id'];
    439438      $FullFileName = ModuleFile::Cast($this->System->GetModule('File'))->File->GetDir($DirectoryId).$FileName;
     
    460459      {
    461460        $DbResult2 = $this->Database->insert('File', array('Name' => '', 'Size' => 0,
    462           'Directory' => $DirectoryId, 'Time' => 'NOW()'));
     461          'Directory' => $DirectoryId, 'Time' => 'NOW()', 'Hash' => 'SHA1(CONCAT(Id,Name,Size,Time))'));
    463462        $FileId = $this->Database->insert_id;
    464463      } else $FileId = $Row['File'];
    465464      $FileName = 'doklad2-'.$FileId.'.pdf';
    466465      $Bill = new BillOperation($this->System);
    467       $Bill->Database = &$this->System->Database;
    468       $Bill->System = &$this->System;
    469466      $Bill->OperationId = $Row['Id'];
    470467      $FullFileName = ModuleFile::Cast($this->System->GetModule('File'))->File->GetDir($DirectoryId).$FileName;
Note: See TracChangeset for help on using the changeset viewer.