Changeset 75 for www/finance


Ignore:
Timestamp:
Apr 16, 2008, 8:23:03 PM (17 years ago)
Author:
george
Message:

Opraveno: Generování seznamu majetku.
Opraveno: Řazení výpisu operací účastníků od nejnovějšího data.

Location:
www/finance
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • www/finance/clenove.php

    r74 r75  
    2121    $Operations = array();
    2222    $DbResult = $Database->query('(SELECT Time, Value, Text, Bill FROM FinanceCashFlow WHERE Subject='.$_GET['id'].') UNION ALL '.
    23       '(SELECT TimeCreation as Time, (-Value) as Value, Text, Bill FROM FinanceClaimsLiabilities WHERE Subject='.$_GET['id'].') ORDER BY Time');
     23      '(SELECT TimeCreation as Time, (-Value) as Value, Text, Bill FROM FinanceClaimsLiabilities WHERE Subject='.$_GET['id'].') ORDER BY Time DESC');
    2424    while($DbRow = $DbResult->fetch_array())
    2525      $Operations[] = $DbRow;
  • www/finance/manage.php

    r70 r75  
    182182  {
    183183    //$Database->insert('FinanceSmallAsset', array());
    184     $Items[] = array('description' => $Device['name'], 'quantity' => $Device['count'], 'price' => $Device['price']);
     184    $Items[] = array('description' => $Device['name'], 'quantity' => $Device['count'], 'price' => 0); //$Device['price']);
    185185    $LastId = $Device['id'];
    186186    $TotalPrice += $Device['price'] * $Device['count'];
     
    204204  {
    205205    //$Database->insert('FinanceSmallAsset', array());
    206     $Items[] = array('description' => $Device['name'], 'quantity' => $Device['count'], 'price' => $Device['price']);
     206    $Items[] = array('description' => $Device['name'], 'quantity' => $Device['count'], 'price' => 0); //$Device['price']);
    207207    $TotalPrice += $Device['price'] * $Device['count'];
    208208  }
    209209  //print_r($Items);
    210   $InvoiceGenerator->CreateBill($Subject, $Items, $Time, $Time);
     210  $BillId = $InvoiceGenerator->CreateBill($Subject, $Items, $Time, $Time);
    211211  $DbResult = $Database->query('UPDATE network_devices SET TimeEnlistment = "'.TimeToMysqlDateTime($Time).'" WHERE used <> 0 AND date < "'.TimeToMysqlDateTime($Time).'" AND (id > '.$LastId.')');
    212212  InsertLiability($Subject, 0, $Time, $BillId, 'Nákup infrastruktury', $Time);
Note: See TracChangeset for help on using the changeset viewer.