X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_lists.inc;h=6b9d714d504787d877bbf5ba0a7e25bdf1857bfc;hb=348062667e6a96e9849bf25de0f2a426b4f0b9c6;hp=acfe058cb56a1584d996e446f1003505c61c56e3;hpb=bf343dcf1df5d82c25ed8079bed766a54bd1b17c;p=fa-stable.git
diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc
index acfe058c..6b9d714d 100644
--- a/includes/ui/ui_lists.inc
+++ b/includes/ui/ui_lists.inc
@@ -887,26 +887,26 @@ function tax_groups_list($name, $selected_id=null,
array(
'order' => 'id',
'spec_option' => $none_option,
- 'spec_id' => 0,
+ 'spec_id' => reserved_words::get_all_numeric(),
'select_submit'=> $submit_on_change,
'async' => false,
) );
}
-function tax_groups_list_cells($label, $name, $selected_id=null, $submit_on_change=false)
+function tax_groups_list_cells($label, $name, $selected_id=null, $none_option=false, $submit_on_change=false)
{
if ($label != null)
echo "
$label | \n";
echo "";
- $str = tax_groups_list($name, $selected_id, false, $submit_on_change);
+ $str = tax_groups_list($name, $selected_id, $none_option, $submit_on_change);
echo " | \n";
return $str;
}
-function tax_groups_list_row($label, $name, $selected_id=null, $submit_on_change=false)
+function tax_groups_list_row($label, $name, $selected_id=null, $none_option=false, $submit_on_change=false)
{
echo "\n";
- $str = tax_groups_list_cells($label, $name, $selected_id, false, $submit_on_change);
+ $str = tax_groups_list_cells($label, $name, $selected_id, $none_option, $submit_on_change);
echo "
\n";
return $str;
}
@@ -1225,7 +1225,61 @@ function bank_accounts_list_row($label, $name, $selected_id=null, $submit_on_cha
echo "\n";
return $str;
}
+//-----------------------------------------------------------------------------------------------
+
+function cash_accounts_list_row($label, $name, $selected_id=null, $submit_on_change=false)
+{
+ $sql = "SELECT ".TB_PREF."bank_accounts.account_code, bank_account_name, bank_curr_code
+ FROM ".TB_PREF."bank_accounts, ".TB_PREF."chart_master
+ WHERE ".TB_PREF."bank_accounts.account_code=".TB_PREF."chart_master.account_code"
+ . " AND ".TB_PREF."bank_accounts.account_type=3";
+ if ($label != null)
+ echo "$label | \n";
+ echo "";
+ $str = combo_input($name, $selected_id, $sql, 'account_code', 'bank_account_name',
+ array(
+ 'format' => '_format_add_curr',
+ 'select_submit'=> $submit_on_change,
+ 'async' => true
+ ) );
+ echo " |
\n";
+ return $str;
+}
+//-----------------------------------------------------------------------------------------------
+
+function pos_list_row($label, $name, $selected_id=null, $spec_option=false, $submit_on_change=false)
+{
+ $sql = "SELECT id, pos_name FROM ".TB_PREF."sales_pos";
+
+ default_focus($name);
+ echo '';
+ if ($label != null)
+ echo "$label | \n";
+ echo "";
+
+ $str = combo_input($name, $selected_id, $sql, 'id', 'pos_name',
+ array(
+ 'select_submit'=> $submit_on_change,
+ 'async' => true,
+ 'spec_option' =>$spec_option,
+ 'spec_id' => -1,
+ ) );
+ echo " |
\n";
+
+ return $str;
+}
+//-----------------------------------------------------------------------------------------------
+
+function sale_payment_list_cells($label, $name, $selected_id=null, $submit_on_change=false)
+{
+ if ($label != null)
+ echo "$label | \n";
+ echo "";
+ $str = yesno_list($name, $selected_id, _('Cash'), _('Delayed'), $submit_on_change);
+ echo " | \n";
+ return $str;
+}
//-----------------------------------------------------------------------------------------------
function class_list($name, $selected_id=null, $submit_on_change=false)
@@ -1506,6 +1560,33 @@ function payment_person_types_list_row($label, $name, $selected_id=null, $relate
return $str;
}
+//------------------------------------------------------------------------------------------------
+
+function quick_entries_list($name, $selected_id=null, $expense=true, $submit_on_change=false)
+{
+ $sql = "SELECT * FROM ".TB_PREF."quick_entries";
+ if ($expense)
+ $sql .= " WHERE deposit=0";
+ else
+ $sql .= " WHERE deposit=1";
+ combo_input($name, $selected_id, $sql, 'id', 'description',
+ array(
+ 'spec_id' => '',
+ 'order' => 'description',
+ 'select_submit'=> $submit_on_change,
+ 'async' => false
+ ) );
+
+}
+
+function quick_entries_list_row($label, $name, $selected_id=null, $expense=true, $submit_on_change=false)
+{
+ echo "$label | \n";
+ quick_entries_list($name, $selected_id, $expense, $submit_on_change);
+ echo " |
\n";
+}
+
+
//------------------------------------------------------------------------------------------------
function wo_types_list($name, $selected_id=null)