Changeset 302
- Timestamp:
- Jan 20, 2011, 6:37:24 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/aktuality/index.php
r252 r302 16 16 if(array_key_exists('category', $_GET)) $Category = $_GET['category'] * 1; 17 17 if(array_key_exists('category', $_POST)) $Category = $_POST['category'] * 1; 18 $DbResult = $this->Database->select('NewsCategory', '*', 'Id='.$Category );18 $DbResult = $this->Database->select('NewsCategory', '*', 'Id='.$Category.' ORDER BY Sequence'); 19 19 if($DbResult->num_rows > 0) 20 20 { -
trunk/aktuality/news.php
r252 r302 94 94 $this->NewsSetting = array(); 95 95 $I = 1; 96 $DbResult = $this->Database->select('NewsCategory', '*' );96 $DbResult = $this->Database->select('NewsCategory', '*', '1 ORDER BY Sequence'); 97 97 while($NewsCategory = $DbResult->fetch_array()) 98 98 { -
trunk/finance/manage.php
r297 r302 143 143 } 144 144 145 function InsertLiability($Subject, $Value, $Time , $BillId, $Text, $TimePayment = '')145 function InsertLiability($Subject, $Value, $TimeCreation, $TimeDue, $Text, $DocumentLine) 146 146 { 147 147 global $LastInsertTime; 148 148 149 if($TimePayment != '') $TimePayment = TimeToMysqlDateTime($TimePayment);150 $this->Database->insert('FinanceClaimsLiabilities', array('Text' => $Text, 'Subject' => $Subject, 'TimeCreation' => TimeToMysqlDateTime($Time ), 'TimeDue' => TimeToMysqlDateTime($Time + 3600*24*15), 'TimePayment' => $TimePayment, 'Value' => $Value, 'Bill' => $BillId));149 $BillCode = $this->System->Modules['Finance']->GetNextDocumentLineNumber($DocumentLine); 150 $this->Database->insert('FinanceClaimsLiabilities', array('Text' => $Text, 'Subject' => $Subject, 'TimeCreation' => TimeToMysqlDateTime($TimeCreation), 'TimeDue' => TimeToMysqlDateTime($TimeDue), 'Value' => $Value, 'BillCode' => $BillCode)); 151 151 $Output = '.'; //$this->Database->LastQuery.'<br />'; 152 152 $LastInsertTime = $Time; 153 $this->CheckAdvancesAndLiabilities($Subject);154 return($Output); 155 } 156 157 function InsertMoney($Subject, $Value, $Cash, $Taxable, $Time, $Text )153 //$this->CheckAdvancesAndLiabilities($Subject); 154 return($Output); 155 } 156 157 function InsertMoney($Subject, $Value, $Cash, $Taxable, $Time, $Text, $DocumentLine) 158 158 { 159 159 global $LastInsertTime; 160 160 161 $this->Database->insert('FinanceCashFlow', array('Text' => $Text, 'Subject' => $Subject, 'Cash' => $Cash, 'Value' => $Value, 'Time' => TimeToMysqlDateTime($Time), 'Taxable' => $Taxable)); 162 if($Value >= 0) 161 $BillCode = $this->System->Modules['Finance']->GetNextDocumentLineNumber($DocumentLine); 162 $this->Database->insert('FinanceOperation', array('Text' => $Text, 'Subject' => $Subject, 'Cash' => $Cash, 'Value' => $Value, 'Time' => TimeToMysqlDateTime($Time), 'Taxable' => $Taxable, 'BillCode' => $BillCode)); 163 /*if($Value >= 0) 163 164 { 164 165 $this->Database->insert('FinanceAdvances', array('Subject' => $Subject, 'Value' => $Value, 'TimeCreation' => TimeToMysqlDateTime($Time), 'CashFlowId' => $this->Database->insert_id, 'Direction' => 'In')); 165 166 } 166 167 $LastInsertTime = $Time; 167 $this->CheckAdvancesAndLiabilities($Subject); 168 */ 169 //$this->CheckAdvancesAndLiabilities($Subject); 168 170 } 169 171 … … 216 218 $Form = new Form('NewPayment'); 217 219 $Form->LoadValuesFromForm(); 218 $this->InsertMoney($Form->Values['Subject'], $Form->Values['Value'], $Form->Values['Cash'], $Form->Values['Taxable'], $Form->Values['Time'], $Form->Values['Text'] );220 $this->InsertMoney($Form->Values['Subject'], $Form->Values['Value'], $Form->Values['Cash'], $Form->Values['Taxable'], $Form->Values['Time'], $Form->Values['Text'], $Form->Values['DocumentLine']); 219 221 $Output = $this->SystemMessage('Finance', 'Platba vložena.'); 220 222 $this->System->Modules['Log']->NewRecord('Finance', 'NewPaymentInserted'); … … 235 237 $Form->LoadvaluesFromForm(); 236 238 //print_r($Form->Values); 237 //$this->InsertLiability($Form->Values['Subject'], $Form->Values['Value'], $Form->Values['Time'], $BillId, $Text, $TimePayment = '')239 $this->InsertLiability($Form->Values['Subject'], $Form->Values['Value'], $Form->Values['TimeCreation'], $Form->Values['TimeDue'], $Form->Values['Text'], $Form->Values['DocumentLine']); 238 240 $Output = $this->SystemMessage('Finance', 'Faktura vložena..'); 239 241 $this->System->Modules['Log']->NewRecord('Finance', 'NewInvoiceInserted'); -
trunk/form_classes.php
r219 r302 5 5 'Title' => 'Nová platba', 6 6 'Items' => array( 7 'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => 3), 7 8 'Time' => array('Type' => 'Time', 'Caption' => 'Čas', 'Default' => 'Now'), 8 9 'Subject' => array('Type' => 'TFinanceSubject', 'Caption' => 'Subjekt', 'Default' => 0), 9 10 'Value' => array('Type' => 'Float', 'Caption' => 'Částka [Kč]', 'Default' => '0'), 10 'Text' => array('Type' => 'String', 'Caption' => 'Popis', 'Default' => ' Přijatá záloha'),11 'Text' => array('Type' => 'String', 'Caption' => 'Popis', 'Default' => 'Vklad'), 11 12 'Cash' => array('Type' => 'Boolean', 'Caption' => 'Hotovost', 'Default' => '1'), 12 13 'Taxable' => array('Type' => 'Boolean', 'Caption' => 'Ovlivňující daňový základ', 'Default' => '1'), … … 16 17 'Title' => 'Nová faktura', 17 18 'Items' => array( 18 'Time' => array('Type' => 'Time', 'Caption' => 'Čas', 'Default' => 'Now'), 19 'Contractor' => array('Type' => 'TFinanceSubject', 'Caption' => 'Dodavatel', 'Default' => 1), 20 'Customer' => array('Type' => 'TFinanceSubject', 'Caption' => 'Odběratel', 'Default' => 0), 21 'Items' => array('Type' => 'Array', 'Caption' => 'Položky', 'ItemClass' => 'FinanceInvoiceItem'), 19 'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => 5), 20 'TimeCreation' => array('Type' => 'Time', 'Caption' => 'Čas vytvoření', 'Default' => 'Now'), 21 'TimeDue' => array('Type' => 'Time', 'Caption' => 'Čas splatnosti', 'Default' => 'Now'), 22 'Subject' => array('Type' => 'TFinanceSubject', 'Caption' => 'Subjekt', 'Default' => 0), 23 'Text' => array('Type' => 'String', 'Caption' => 'Popis', 'Default' => 'Nákup zařízení'), 24 'Value' => array('Type' => 'Float', 'Caption' => 'Částka [Kč]', 'Default' => '0'), 25 //'Items' => array('Type' => 'Array', 'Caption' => 'Položky', 'ItemClass' => 'FinanceInvoiceItem'), 22 26 ), 23 27 ), … … 185 189 'Filter' => '1', 186 190 ), 191 'TDocumentLine' => array( 192 'Type' => 'Reference', 193 'Table' => 'DocumentLine', 194 'Id' => 'Id', 195 'Name' => 'Name', 196 'Filter' => '1', 197 ), 187 198 'TNetworkDevice' => array( 188 199 'Type' => 'Reference', -
trunk/forms.php
r239 r302 98 98 if($Row['Id'] == $this->Values[$Index]) $Selected = ' selected="selected"'; 99 99 else $Selected = ''; 100 $Edit .= '<option value="'.$Row['Id'].'"'.$Selected.'>'.$Row[' Name'].'</option>';100 $Edit .= '<option value="'.$Row['Id'].'"'.$Selected.'>'.$Row['Id'].': '.$Row['Name'].'</option>'; 101 101 } 102 102 $Edit .= '</select>';
Note:
See TracChangeset
for help on using the changeset viewer.