X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_lists.inc;h=08e73f0225032bb8f71a2bc4df297dcc740a1744;hb=a4db318fa0c84e099e0970ca82e36215782d661e;hp=77b34a0be0b4824a585ac6bf650cc11046acf51f;hpb=f894cd3d6fd2f6875382e5cd33020fb14245aa90;p=fa-stable.git diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index 77b34a0b..08e73f02 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ include_once($path_to_root . "/includes/banking.inc"); include_once($path_to_root . "/includes/reserved.inc"); include_once($path_to_root . "/includes/types.inc"); @@ -1283,26 +1292,38 @@ function movement_types_list_row($label, $name, $selected_id=null) } //----------------------------------------------------------------------------------------------- -/* -function bank_trans_types_list($name, $selected_id=null) +function _format_date($row) { - $sql = "SELECT id, name FROM ".TB_PREF."bank_trans_types"; - combo_input($name, $selected_id, $sql, 'id', 'name', array()); + return sql2date($row['reconciled']); +} + +function bank_reconciliation_list($account, $name, $selected_id=null, $submit_on_change=false, $special_option=false) +{ + $sql = "SELECT reconciled, reconciled FROM ".TB_PREF."bank_trans + WHERE bank_act=".db_escape($account)." AND reconciled IS NOT NULL + GROUP BY reconciled"; + combo_input($name, $selected_id, $sql, 'id', 'reconciled', + array( + 'spec_option' => $special_option, + 'format' => '_format_date', + 'spec_id' => '', + 'select_submit'=> $submit_on_change + ) ); } -function bank_trans_types_list_cells($label, $name, $selected_id=null) +function bank_reconciliation_list_cells($label,$account, $name, $selected_id=null, $submit_on_change=false, $special_option=false) { if ($label != null) echo "$label\n"; echo ""; - bank_trans_types_list($name, $selected_id); + bank_reconciliation_list($account, $name, $selected_id, $submit_on_change, $special_option); echo "\n"; } - -function bank_trans_types_list_row($label, $name, $selected_id=null) +/* +function bank_reconciliation_list_row($label, $account, $name, $selected_id=null, $submit_on_change=false, $special_option=false) { echo "\n"; - bank_trans_types_list_cells($label, $name, $selected_id); + bank_reconciliation_list_cells($label, $account, $name, $selected_id, $submit_on_change, $special_option); echo "\n"; } */ @@ -1703,49 +1724,6 @@ function payment_person_types_list_row($label, $name, $selected_id=null, $relate return $str; } -//------------------------------------------------------------------------------------------------ - -function quick_entries_list($name, $selected_id=null, $expense=-1, $bank_only=-1, $submit_on_change=false) -{ - $where = false; - $sql = "SELECT id, description FROM ".TB_PREF."quick_entries"; - if ($expense != -1) - { - $sql .= " WHERE deposit=$expense"; - $where = true; - } - if ($bank_only != -1) - { - if ($where) - $sql .= " AND bank_only=$bank_only"; - else - $sql .= " WHERE bank_only=$bank_only"; - } - combo_input($name, $selected_id, $sql, 'id', 'description', - array( - 'spec_id' => '', - 'order' => 'description', - 'select_submit'=> $submit_on_change, - 'async' => false - ) ); - -} - -function quick_entries_list_cells($label, $name, $selected_id=null, $expense=-1, $bank_only=-1, $submit_on_change=false) -{ - echo "$label\n"; - quick_entries_list($name, $selected_id, $expense, $bank_only, $submit_on_change); - echo ""; -} - -function quick_entries_list_row($label, $name, $selected_id=null, $expense=-1, $bank_only=-1, $submit_on_change=false) -{ - echo "\n"; - quick_entries_list_cells($label, $name, $selected_id, $expense, $bank_only, $submit_on_change); - echo "\n"; -} - - //------------------------------------------------------------------------------------------------ function wo_types_list($name, $selected_id=null) @@ -2028,5 +2006,63 @@ function printers_list($name, $selected_id=null, $spec_opt=false, $submit_on_cha )); } +//------------------------------------------------------------------------------------------------ + +function quick_entries_list($name, $selected_id=null, $type=null, $submit_on_change=false) +{ + $where = false; + $sql = "SELECT id, description FROM ".TB_PREF."quick_entries"; + if ($type != null) + $sql .= " WHERE type=$type"; + + combo_input($name, $selected_id, $sql, 'id', 'description', + array( + 'spec_id' => '', + 'order' => 'description', + 'select_submit'=> $submit_on_change, + 'async' => false + ) ); + +} + +function quick_entries_list_cells($label, $name, $selected_id=null, $type, $submit_on_change=false) +{ + echo "$label\n"; + quick_entries_list($name, $selected_id, $type, $submit_on_change); + echo ""; +} + +function quick_entries_list_row($label, $name, $selected_id=null, $type, $submit_on_change=false) +{ + echo "\n"; + quick_entries_list_cells($label, $name, $selected_id, $type, $submit_on_change); + echo "\n"; +} + + +function quick_actions_list_row($label, $name, $selected_id=null, $submit_on_change=false) +{ + global $quick_actions; + + echo "$label"; + array_selector($name, $selected_id, $quick_actions, + array( + 'select_submit'=> $submit_on_change + ) ); + echo "\n"; +} + +function quick_entry_types_list_row($label, $name, $selected_id=null, $submit_on_change=false) +{ + global $quick_entry_types; + + echo "$label"; + array_selector($name, $selected_id, $quick_entry_types, + array( + 'select_submit'=> $submit_on_change + ) ); + echo "\n"; +} + ?> \ No newline at end of file