Ignore:
Timestamp:
Jan 3, 2015, 5:55:34 PM (10 years ago)
Author:
chronos
Message:
  • Modified: Invoice negative values replaced by Direction column which is used to determine if invoice is in or out invoice.
File:
1 edited

Legend:

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

    r719 r720  
    7373
    7474    // If negative value => switch sides
    75     if($Invoice['Value'] < 0)
     75    if($Invoice['Direction'] == -1)
    7676    {
    7777        $Subject = $SubjectTo;
    7878        $SubjectTo = $SubjectFrom;
    7979        $SubjectFrom = $Subject;
    80         foreach($InvoiceItems as $Index => $Item)
    81         {
    82                 $InvoiceItems[$Index]['Price'] = -$InvoiceItems[$Index]['Price'];
    83         }
    8480    }
    8581
     
    159155    $MainSubjectAccount = $DbResult->fetch_assoc();
    160156
    161     //$Dodavka = array();
    162     //$DbResult = $this->Database->select('FinanceInvoiceItem', '*', 'FinanceInvoice='.$BillId);
    163     //while($Item = $DbResult->fetch_assoc())
    164     //{
    165     //  $InvoiceItems[$Item['Id']] = $Item;
    166     //}
    167157    $BooleanText = array('Ne', 'Ano');
    168158    if($Operation['Direction'] == -1)
Note: See TracChangeset for help on using the changeset viewer.