Changeset 296 for trunk


Ignore:
Timestamp:
Oct 2, 2010, 8:00:11 PM (14 years ago)
Author:
george
Message:
  • Opraveno: Zpožděné generování dokladů včetně kódu dokladu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/finance/manage.php

    r295 r296  
    542542          $BillCode = $Finance->GetNextDocumentLineNumber(6); // Faktury vydané
    543543          $BillId = $this->System->Modules['Bill']->CreateBill($Member['Subject'], array(array('Description' => 'Připojení k síti', 'Price' => $PayPerPeriod, 'Quantity' => 1)), $Period['From'], $Period['To'], $BillCode);
    544           $this->Database->insert('FinanceClaimsLiabilities', array('Value' => $PayPerPeriod, 'Subject' => $Member['Subject'], 'TimeCreation' => 'NOW()', 'TimeDue' => 'DATE_ADD(NOW(), INTERVAL 15 DAY)', 'Text' => 'Připojení k síti za období '.$TimePeriodText, 'Bill' => 0, 'BillCode' => $BillCode));
     544          $this->Database->insert('FinanceClaimsLiabilities', array('Value' => $PayPerPeriod, 'Subject' => $Member['Subject'], 'TimeCreation' => 'NOW()', 'TimeDue' => 'DATE_ADD(NOW(), INTERVAL 15 DAY)', 'Text' => 'Připojení k síti za období '.$TimePeriodText, 'Bill' => $BillId, 'BillCode' => $BillCode));
    545545          $Output .= $this->SendPaymentEmail($Member['Id']);
    546546          $this->Database->update('Member', 'Id='.$Member['Id'], array('BillingPeriodLastDate' => TimeToMysqlDateTime($Period['To'])));
     
    624624  {
    625625    // FinanceClaimsLiablities
    626     $DbResult = $this->Database->query('SELECT * FROM FinanceClaimsLiabilities WHERE (BillCode <> "") AND (Value >= 0)');
     626    $DbResult = $this->Database->query('SELECT * FROM FinanceClaimsLiabilities WHERE (BillCode <> "") AND (Value >= 0) AND (BillId = 0)');
    627627    while($Row = $DbResult->fetch_assoc())
    628628    {
Note: See TracChangeset for help on using the changeset viewer.