X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_lists.inc;h=24939a1a0326c0f5e529ef0d5958ece20fcd974b;hb=50606312fee0bb0dbe984e2c08af53b7dab229bd;hp=14eb54436083283ba3f40cbaa5d4355ea2a499bc;hpb=4e4ce8577f8582967995919860c66aa94d633afd;p=fa-stable.git
diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc
index 14eb5443..24939a1a 100644
--- a/includes/ui/ui_lists.inc
+++ b/includes/ui/ui_lists.inc
@@ -1407,8 +1407,10 @@ function bank_accounts_list_row($label, $name, $selected_id=null, $submit_on_cha
}
//-----------------------------------------------------------------------------------------------
-function cash_accounts_list_row($label, $name, $selected_id=null, $submit_on_change=false)
+function cash_accounts_list_row($label, $name, $selected_id=null, $submit_on_change=false, $all_option=false)
{
+ global $all_items;
+
$sql = "SELECT ".TB_PREF."bank_accounts.id, bank_account_name, bank_curr_code, inactive
FROM ".TB_PREF."bank_accounts
WHERE ".TB_PREF."bank_accounts.account_type=".BT_CASH;
@@ -1418,6 +1420,8 @@ function cash_accounts_list_row($label, $name, $selected_id=null, $submit_on_cha
echo "
";
echo combo_input($name, $selected_id, $sql, 'id', 'bank_account_name',
array(
+ 'spec_option' => $all_option,
+ 'spec_id' => $all_items,
'format' => '_format_add_curr',
'select_submit'=> $submit_on_change,
'async' => true
@@ -2327,4 +2331,82 @@ function coa_list_row($label, $name, $value=null)
echo array_selector( $name, $value, $coas );
echo " | \n";
}
+
+function tax_algorithm_list($name, $value=null, $submit_on_change = false)
+{
+ global $tax_algorithms;
+
+ return array_selector($name, $value, $tax_algorithms,
+ array(
+ 'select_submit'=> $submit_on_change,
+ 'async' => true,
+ )
+ );
+}
+
+function tax_algorithm_list_cells($label, $name, $value=null, $submit_on_change=false)
+{
+ if ($label != null)
+ echo "$label | \n";
+ echo "";
+ echo tax_algorithm_list($name, $value, $submit_on_change);
+ echo " | \n";
+}
+
+function tax_algorithm_list_row($label, $name, $value=null, $submit_on_change=false)
+{
+ echo "$label | ";
+ tax_algorithm_list_cells(null, $name, $value, $submit_on_change);
+ echo "
\n";
+}
+//----------------------------------------------------------------------------------------------
+
+function subledger_list($name, $account, $selected_id=null)
+{
+ global $all_items;
+
+ $type = is_subledger_account($account);
+ if (!$type)
+ return '';
+
+ if($type > 0)
+ $sql = "SELECT DISTINCT d.debtor_no as id, debtor_ref as name
+ FROM "
+ .TB_PREF."debtors_master d,"
+ .TB_PREF."cust_branch c
+ WHERE d.debtor_no=c.debtor_no AND c.receivables_account=".db_escape($account);
+ else
+ $sql = "SELECT supplier_id as id, supp_ref as name
+ FROM "
+ .TB_PREF."suppliers s
+ WHERE s.payable_account=".db_escape($account);
+
+ $mode = get_company_pref('no_customer_list');
+
+ return combo_input($name, $selected_id, $sql, 'id', 'name',
+ array(
+ 'type' => 1,
+ 'size' => 20,
+ 'async' => false,
+ ) );
+}
+
+function subledger_list_cells($label, $name, $account, $selected_id=null)
+{
+ if ($label != null)
+ echo "$label | \n";
+ echo "";
+ echo subledger_list($name, $account, $selected_id);
+ echo " | \n";
+}
+
+function subledger_list_row($label, $name, $selected_id=null, $all_option = false,
+ $submit_on_change=false, $show_inactive=false, $editkey = false)
+{
+ echo "$label | ";
+ echo subledger_list($name, $account, $selected_id);
+ echo " | \n
\n";
+}
+
+
?>
\ No newline at end of file