Changeset 413 for trunk/finance/manage.php
- Timestamp:
- Oct 7, 2012, 4:35:04 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/manage.php
r409 r413 105 105 if(array_key_exists('generate', $_GET)) 106 106 { 107 $Output .= $this->System->Modules['Bill']->CreateBill(1, array(array('Description' => 'Poplatek za připojení k síti', 'Price' => 1000, 'Quantity' => 1)), time(), time());107 $Output .= $this->System->Modules['Bill']->CreateBill(1, array(array('Description' => 'Poplatek za připojení k Internetu', 'Price' => 1000, 'Quantity' => 1)), time(), time()); 108 108 } else 109 109 { … … 352 352 $Output .= $TimePeriodText.': '.$Member['MonthlyTotal'].' * '.$Period['MonthCount'].' = '.$PayPerPeriod.'<br />'; 353 353 $BillCode = $Finance->GetNextDocumentLineNumber(6); // Faktury vydané 354 $BillId = $this->System->Modules['Bill']->CreateBill($Member['Subject'], array(array('Description' => 'Připojení k síti', 'Price' => $PayPerPeriod, 'Quantity' => 1)), time(), time() + 3600 * 24 * 15, $BillCode);355 $this->Database->insert('FinanceClaimsLiabilities', array('Value' => $PayPerPeriod, 'Subject' => $Member['Subject'], 'TimeCreation' => 'NOW()', 'TimeDue' => 'DATE_ADD(NOW(), INTERVAL 15 DAY)', 'Text' => 'Připojení k sítiza období '.$TimePeriodText, 'Bill' => $BillId, 'BillCode' => $BillCode));354 $BillId = $this->System->Modules['Bill']->CreateBill($Member['Subject'], array(array('Description' => 'Připojení k Internetu', 'Price' => $PayPerPeriod, 'Quantity' => 1)), time(), time() + 3600 * 24 * 15, $BillCode); 355 $this->Database->insert('FinanceClaimsLiabilities', array('Value' => $PayPerPeriod, 'Subject' => $Member['Subject'], 'TimeCreation' => 'NOW()', 'TimeDue' => 'DATE_ADD(NOW(), INTERVAL 15 DAY)', 'Text' => 'Připojení k Internetu za období '.$TimePeriodText, 'Bill' => $BillId, 'BillCode' => $BillCode)); 356 356 $Output .= $this->SendPaymentEmail($Member['Id']); 357 357 $this->Database->update('Member', 'Id='.$Member['Id'], array('BillingPeriodLastDate' => TimeToMysqlDateTime($Period['To']))); … … 415 415 'Vaše platební období: <strong>'.$this->System->Modules['Finance']->BillingPeriods[$Member['BillingPeriod']]['Name'].'</strong><br />'."\n". 416 416 'Pravidelná platba za období: <strong>'.$MemberPayment['MonthlyTotal'].' Kč</strong><br />'."\n". 417 'Bankovní účet: <strong>2600134781 / 2010</strong> (EUR Slovensko 2600134781 / 8330, Fio banka)<br/>'."\n". 418 'Variabilní symbol: <strong>'.$Member['Subject'].'</strong><br/>'."\n". 417 419 'Stav vašeho účtu: <strong>'.($MemberPayment['Cash'] - $MemberPayment['MonthlyTotal']).' Kč</strong><br /><br />'."\n"; 418 420 $Content .= 'Nové finanční operace:<br/>'. … … 440 442 { 441 443 // FinanceClaimsLiablities 442 $DbResult = $this->Database->query('SELECT * FROM FinanceClaimsLiabilities WHERE (BillCode <> "") AND (Value >= 0) AND (Bill = 0)');444 $DbResult = $this->Database->query('SELECT * FROM FinanceClaimsLiabilities WHERE (BillCode <> "") AND (Value != 0) AND (Bill = 0)'); 443 445 while($Row = $DbResult->fetch_assoc()) 444 446 {
Note:
See TracChangeset
for help on using the changeset viewer.