Ignore:
Timestamp:
Feb 23, 2016, 4:44:03 PM (9 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

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

    r793 r802  
    621621  function BeforeInsertFinanceInvoice($Form)
    622622  {
     623    // Get new DocumentLineCode by selected invoice Group
    623624    if(array_key_exists('Time', $Form->Values)) $Year = date("Y", $Form->Values['Time']);
    624625      else $Year = date("Y", $Form->Values['ValidFrom']);
    625     $FinanceGroup = $this->System->Modules['Finance']->GetFinanceGroupById($Form->Values['Group'], 'FinanceInvoiceGroup');
    626     $Form->Values['BillCode'] = $this->System->Modules['Finance']->GetNextDocumentLineNumberId($FinanceGroup['DocumentLine'], $Year);
     626    $Group = $this->System->Modules['Finance']->GetFinanceGroupById($Form->Values['Group'], 'FinanceInvoiceGroup');
     627    $Form->Values['BillCode'] = $this->System->Modules['Finance']->GetNextDocumentLineNumberId($Group['DocumentLine'], $Year);
    627628    return($Form->Values);
    628629  }
Note: See TracChangeset for help on using the changeset viewer.