Changeset 552 for trunk/Modules/Finance
- Timestamp:
- Jul 7, 2013, 10:41:07 PM (12 years ago)
- Location:
- trunk/Modules/Finance
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Manage.php
r551 r552 99 99 $Output .= '<a href="?Operation=ProcessMonthlyPayment">Generovat faktury</a>'; 100 100 return($Output); 101 } 102 103 function InsertInvoice($Subject, $TimeCreation, $TimeDue, $Items, 104 $DocumentLine, $PeriodFrom, $PeriodTo) 105 { 106 global $LastInsertTime; 107 108 $BillCode = $this->System->Modules['Finance']->GetNextDocumentLineNumber($DocumentLine); 109 $SumValue = 0; 110 foreach($Items as $Item) 111 $SumValue = $SumValue + $Item['Price']; 112 $this->Database->insert('FinanceInvoice', array( 113 'Subject' => $Subject, 'TimeCreation' => TimeToMysqlDateTime($TimeCreation), 114 'TimeDue' => TimeToMysqlDateTime($TimeDue), 'Value' => $SumValue, 'BillCode' => $BillCode, 115 'PeriodFrom' => TimeToMysqlDate($PeriodFrom), 'PeriodTo' => TimeToMysqlDate($PeriodTo), 116 'Generate' => 1)); 117 $InvoiceId = $this->Database->insert_id; 118 foreach($Items as $Item) 119 $this->Database->insert('FinanceInvoiceItem', array('FinanceInvoice' => $InvoiceId, 120 'Description' => $Item['Description'], 'Price' => $Item['Price'], 'Quantity' => $Item['Quantity'], 'VAT' => $Item['VAT'])); 121 //$LastInsertTime = $Time; 122 //$this->CheckAdvancesAndLiabilities($Subject); 123 return($InvoiceId); 101 124 } 102 125 -
trunk/Modules/Finance/UserState.php
r548 r552 34 34 $DbResult = $this->Database->query('SELECT Member.*, MemberPayment.MonthlyPlus AS MonthlyPlus '. 35 35 'FROM Member LEFT JOIN MemberPayment ON MemberPayment.Member=Member.Id WHERE Member.Subject='.$Subject['Id']); 36 if($DbResult->num_rows == 0) 37 { 38 return($this->SystemMessage('Položka nenalezena', 'Zákazník nenalezen')); 39 } 36 40 $Member = $DbResult->fetch_assoc(); 37 41 $Output = '<table width="100%" border="0" cellspacing="0" cellpadding="3"><tr><td valign="top">';
Note:
See TracChangeset
for help on using the changeset viewer.