Ignore:
Timestamp:
Jul 5, 2015, 6:24:33 PM (9 years ago)
Author:
chronos
Message:
  • Modified: Added Direction column to finance operations and invoices. This column will serve as real direction where ValueSign could be different for storno operations.
File:
1 edited

Legend:

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

    r740 r741  
    101101
    102102  function InsertInvoice($Subject, $TimeCreation, $TimeDue, $ValueSign, $Items,
    103   $Group, $PeriodFrom, $PeriodTo)
     103  $Group, $PeriodFrom, $PeriodTo, $Direction)
    104104  {
    105105    global $LastInsertTime;
     
    114114      'Subject' => $Subject, 'Time' => TimeToMysqlDateTime($TimeCreation),
    115115      'TimeDue' => TimeToMysqlDateTime($TimeDue), 'Value' => $SumValue,
    116       'ValueSign' => $ValueSign, 'BillCode' => $BillCode,
     116      'ValueSign' => $ValueSign, 'BillCode' => $BillCode, 'Direction' => $Direction,
    117117      'PeriodFrom' => TimeToMysqlDate($PeriodFrom), 'PeriodTo' => TimeToMysqlDate($PeriodTo),
    118118      'Generate' => 1, 'Group' => $FinanceGroup['Id']));
     
    185185          $Output .= $TimePeriodText.': '.$MonthlyTotal.' * '.$Period['MonthCount'].' = '.$PayPerPeriod.'<br />';
    186186          $this->InsertInvoice($Member['Subject'], time(), time() + 3600 * 24 * INVOICE_DUE_DAYS,
    187             $FinanceGroup['ValueSign'], $InvoiceItems, $FinanceGroup, $Period['From'], $Period['To']);
     187            $FinanceGroup['ValueSign'], $InvoiceItems, $FinanceGroup, $Period['From'],
     188                $Period['To'], $FinanceGroup['Direction']);
    188189
    189190          $Output .= $this->SendPaymentEmail($Member['Id']);
Note: See TracChangeset for help on using the changeset viewer.