Changeset 486 for trunk/finance/bills.php
- Timestamp:
- Feb 10, 2013, 9:20:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/bills.php
r477 r486 212 212 } 213 213 214 function CustomGenerate()215 {216 global $Database;217 218 $DbResult = $this->Database->select('finance_operations', '*', '(date="2008-02-01" AND comment="Poplatek za měsíc Únor") OR '.219 '(date="2008-01-01" AND comment="Poplatek za měsíc Leden") OR (date="2007-12-01" AND comment="Poplatek za měsíc Prosinec") AND (bill_id = 0)');220 while($Row = $DbResult->fetch_array())221 {222 echo($Row['id']."<br>\n");223 $Time = MysqlDateToTime($Row['date']);224 $BillId = $this->CreateBill($Row['user'], array(array('Description' => 'Poplatek za připojení k síti', 'Price' => (-$Row['money']), 'Quantity' => 1)), $Time, $Time + (date("t", time()) - 1) * 24 * 3600);225 $this->Database->update('finance_operations', 'id='.$Row['id'], array('bill_id' => $BillId));226 }227 }228 229 214 function ShowPage() 230 215 {
Note:
See TracChangeset
for help on using the changeset viewer.