Ignore:
Timestamp:
Jan 2, 2015, 11:16:56 PM (10 years ago)
Author:
chronos
Message:
  • Added: Support for Hidden items in form types values.
  • Added: Support for Filtered items in form types values.
  • Modified: FinanceOperation Value splitted to (Direction * Value). Direction can be +1 or -1 depends on if money goes out or in company.
  • Added: Menu "Incomes and spends" is now splitted to incomes/spends of bank account or treasury. Direction and document line is filled automatically.
File:
1 edited

Legend:

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

    r680 r719  
    166166    //}
    167167    $BooleanText = array('Ne', 'Ano');
    168     if($Operation['Value'] < 0)
     168    if($Operation['Direction'] == -1)
    169169    $Desc = array(
    170170      'Type' => 'VÝDAJOVÝ',
    171171      'Signature' => 'Vydal',
    172       'Sign' => -1,
    173172      'Target' => 'Vydáno komu',
    174173    );
    175     else $Desc = array(
     174    else if($Operation['Direction'] == 1)
     175    $Desc = array(
    176176      'Type' => 'PŘÍJMOVÝ',
    177177      'Signature' => 'Přijal',
    178       'Sign' => 1,
    179178      'Target' => 'Přijato od',
    180179    );
     180    else throw new Exception('Wrong finance direction');
    181181
    182182    $Output = '<table width="100%" border="1" cellspacing="0" cellpadding="3"><tr><td width="50%">'.
     
    201201    if($Subject['DIC'] != '') $Output .= 'DIČ: '.$Subject['DIC'].'<br>';
    202202    $Description = $Operation['Text'];
    203     $Total = $Operation['Value'] * $Desc['Sign'];
    204203    $Output .= '</td></tr>'.
    205       '<tr><td colspan="2"><strong>Částka:</strong> '.$Total.' Kč<br><br>'.
     204      '<tr><td colspan="2"><strong>Částka:</strong> '.$Operation['Value'].' Kč<br><br>'.
    206205      '</td></tr>'.
    207206      '<tr><td colspan="2"><strong>Účel platby:</strong><br>'.$Description.'</td></tr>'.
Note: See TracChangeset for help on using the changeset viewer.