projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3162979
)
GL acounts in seletors always grouped by type.
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Mon, 8 Dec 2008 16:16:42 +0000
(16:16 +0000)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Mon, 8 Dec 2008 16:16:42 +0000
(16:16 +0000)
gl/includes/ui/gl_bank_ui.inc
patch
|
blob
|
history
gl/includes/ui/gl_journal_ui.inc
patch
|
blob
|
history
gl/manage/bank_accounts.php
patch
|
blob
|
history
gl/manage/gl_accounts.php
patch
|
blob
|
history
gl/manage/gl_quick_entries.php
patch
|
blob
|
history
includes/ui/ui_lists.inc
patch
|
blob
|
history
purchasing/includes/ui/invoice_ui.inc
patch
|
blob
|
history
sales/manage/customer_branches.php
patch
|
blob
|
history
diff --git
a/gl/includes/ui/gl_bank_ui.inc
b/gl/includes/ui/gl_bank_ui.inc
index cf44945ea6226cdf0e12e6a7026871575e8ee84a..5f95c3dfa63dd10b6de3c74393905d4c17f69b0c 100644
(file)
--- a/
gl/includes/ui/gl_bank_ui.inc
+++ b/
gl/includes/ui/gl_bank_ui.inc
@@
-222,7
+222,7
@@
function gl_edit_item_controls(&$order, $dim, $Index=null)
$_POST['code_id'] =
get_company_pref($payment ? 'default_cogs_act':'default_inv_sales_act');
}
$_POST['code_id'] =
get_company_pref($payment ? 'default_cogs_act':'default_inv_sales_act');
}
- gl_all_accounts_list('code_id', null, false,
false,
true);
+ gl_all_accounts_list('code_id', null, false, true);
if ($dim >= 1)
dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
if ($dim > 1)
if ($dim >= 1)
dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
if ($dim > 1)
diff --git
a/gl/includes/ui/gl_journal_ui.inc
b/gl/includes/ui/gl_journal_ui.inc
index 0f39203bd9708157ceca236ba78b239229ccd8a4..bae82d3b511805b73fc5f6f16cc03f51ed443ffb 100644
(file)
--- a/
gl/includes/ui/gl_journal_ui.inc
+++ b/
gl/includes/ui/gl_journal_ui.inc
@@
-180,7
+180,7
@@
function gl_edit_item_controls(&$order, $dim, $Index=null)
}
$skip_bank = ($_SESSION["wa_current_user"]->access != 2);
}
$skip_bank = ($_SESSION["wa_current_user"]->access != 2);
- gl_all_accounts_list('code_id', null, $skip_bank,
false,
true);
+ gl_all_accounts_list('code_id', null, $skip_bank, true);
if ($dim >= 1)
dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
if ($dim > 1)
if ($dim >= 1)
dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
if ($dim > 1)
diff --git
a/gl/manage/bank_accounts.php
b/gl/manage/bank_accounts.php
index a3a59b3eb45a14563428c38dd87ee2b4a9209b88..54a7a61066237223056c88edea75f1a7939d1fae 100644
(file)
--- a/
gl/manage/bank_accounts.php
+++ b/
gl/manage/bank_accounts.php
@@
-176,7
+176,7
@@
else
if($is_editing)
label_row(_("Bank Account GL Code:"), $_POST['account_code']);
else
if($is_editing)
label_row(_("Bank Account GL Code:"), $_POST['account_code']);
else
- gl_all_accounts_list_row(_("Bank Account GL Code:"), 'account_code', null
, false
);
+ gl_all_accounts_list_row(_("Bank Account GL Code:"), 'account_code', null);
text_row(_("Bank Name:"), 'bank_name', null, 50, 60);
text_row(_("Bank Account Number:"), 'bank_account_number', null, 30, 60);
text_row(_("Bank Name:"), 'bank_name', null, 50, 60);
text_row(_("Bank Account Number:"), 'bank_account_number', null, 30, 60);
diff --git
a/gl/manage/gl_accounts.php
b/gl/manage/gl_accounts.php
index 2520d355cfd7e43038e023123e378dfa4bc07bcf..5c88705d83c8f9bcd0c7943eccf725d62d775449 100644
(file)
--- a/
gl/manage/gl_accounts.php
+++ b/
gl/manage/gl_accounts.php
@@
-198,7
+198,7
@@
if (db_has_gl_accounts())
{
echo "<center>";
echo _("Select an Account:") . " ";
{
echo "<center>";
echo _("Select an Account:") . " ";
- gl_all_accounts_list('AccountList', null, false, false,
false,
+ gl_all_accounts_list('AccountList', null, false, false,
_('New account'), true);
echo "</center>";
}
_('New account'), true);
echo "</center>";
}
diff --git
a/gl/manage/gl_quick_entries.php
b/gl/manage/gl_quick_entries.php
index fae60668a55553564b21f80487abc4b8aa85b987..323580a777c497c82fe681c2df10a7effc653b0f 100644
(file)
--- a/
gl/manage/gl_quick_entries.php
+++ b/
gl/manage/gl_quick_entries.php
@@
-268,7
+268,7
@@
if ($selected_id != -1)
}
}
}
}
- gl_all_accounts_list_row(_("Account"), 'account', null
, true
);
+ gl_all_accounts_list_row(_("Account"), 'account', null);
yesno_list_row(_("Use Tax:"), 'tax_acc', null, "", "", false);
yesno_list_row(_("Use Percent:"), 'pct', null, "", "", false);
amount_row(_("Amount"), 'amount', null);
yesno_list_row(_("Use Tax:"), 'tax_acc', null, "", "", false);
yesno_list_row(_("Use Percent:"), 'pct', null, "", "", false);
amount_row(_("Amount"), 'amount', null);
diff --git
a/includes/ui/ui_lists.inc
b/includes/ui/ui_lists.inc
index 9c8cb2d6f22d48a6605063fd152e925cb967dd19..7b8f503e4f8cd912875c3b703b37a5b3e7910db5 100644
(file)
--- a/
includes/ui/ui_lists.inc
+++ b/
includes/ui/ui_lists.inc
@@
-1518,7
+1518,7
@@
function gl_account_types_list_row($label, $name, $selected_id=null, $all_option
//-----------------------------------------------------------------------------------------------
function gl_all_accounts_list($name, $selected_id=null, $skip_bank_accounts=false,
//-----------------------------------------------------------------------------------------------
function gl_all_accounts_list($name, $selected_id=null, $skip_bank_accounts=false,
- $
show_group=true, $
cells=false, $all_option=false, $submit_on_change=false)
+ $cells=false, $all_option=false, $submit_on_change=false)
{
if ($skip_bank_accounts)
$sql = "SELECT chart.account_code, chart.account_name, type.name
{
if ($skip_bank_accounts)
$sql = "SELECT chart.account_code, chart.account_name, type.name
@@
-1545,7
+1545,7
@@
function gl_all_accounts_list($name, $selected_id=null, $skip_bank_accounts=fals
'cells' => true,
'select_submit'=> $submit_on_change,
'async' => false,
'cells' => true,
'select_submit'=> $submit_on_change,
'async' => false,
- 'category' =>
($show_group ? 2 : false)
+ 'category' =>
2
) );
}
) );
}
@@
-1555,22
+1555,23
@@
function _format_account($row)
return $row[0] . " " . $row[1];
}
return $row[0] . " " . $row[1];
}
-function gl_all_accounts_list_cells($label, $name, $selected_id=null,
$skip_bank_accounts=false,
- $s
how_group
=false, $cells=false, $all_option=false)
+function gl_all_accounts_list_cells($label, $name, $selected_id=null,
+ $s
kip_bank_accounts
=false, $cells=false, $all_option=false)
{
if ($label != null)
echo "<td>$label</td>\n";
echo "<td>";
{
if ($label != null)
echo "<td>$label</td>\n";
echo "<td>";
- gl_all_accounts_list($name, $selected_id, $skip_bank_accounts, $show_group, $cells, $all_option);
+ gl_all_accounts_list($name, $selected_id,
+ $skip_bank_accounts, $cells, $all_option);
echo "</td>\n";
}
echo "</td>\n";
}
-function gl_all_accounts_list_row($label, $name, $selected_id=null,
$skip_bank_accounts=false,
- $s
how_group
=false, $cells=false, $all_option=false)
+function gl_all_accounts_list_row($label, $name, $selected_id=null,
+ $s
kip_bank_accounts
=false, $cells=false, $all_option=false)
{
echo "<tr>\n";
{
echo "<tr>\n";
- gl_all_accounts_list_cells($label, $name, $selected_id,
$skip_bank_accounts,
- $s
how_group
, $cells, $all_option);
+ gl_all_accounts_list_cells($label, $name, $selected_id,
+ $s
kip_bank_accounts
, $cells, $all_option);
echo "</tr>\n";
}
echo "</tr>\n";
}
diff --git
a/purchasing/includes/ui/invoice_ui.inc
b/purchasing/includes/ui/invoice_ui.inc
index 07f0d0e9bb78ba62a7a9df9b32be1844252a2b08..d0bd3fa65226334b9a8981283ab010251d84648f 100644
(file)
--- a/
purchasing/includes/ui/invoice_ui.inc
+++ b/
purchasing/includes/ui/invoice_ui.inc
@@
-36,7
+36,7
@@
function copy_to_trans(&$supp_trans)
{
foreach ( $supp_trans->grn_items as $grn)
{
{
foreach ( $supp_trans->grn_items as $grn)
{
- $supp_trans->ov_amount += round(($grn->this_quantity_inv * $grn->chg_price),
+ $supp_trans->ov_amount += round
2
(($grn->this_quantity_inv * $grn->chg_price),
user_price_dec());
}
}
user_price_dec());
}
}
@@
-154,7
+154,7
@@
function display_gl_controls(&$supp_trans, $k)
$_POST['gl_code'] = $accs['purchase_account'];
alt_table_row_color($k);
$_POST['gl_code'] = $accs['purchase_account'];
alt_table_row_color($k);
- gl_all_accounts_list('gl_code', null, true,
false,
true);
+ gl_all_accounts_list('gl_code', null, true, true);
$dim = get_company_pref('use_dimension');
if ($dim >= 1)
dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
$dim = get_company_pref('use_dimension');
if ($dim >= 1)
dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
@@
-331,9
+331,9
@@
function display_grn_items_for_selection(&$supp_trans, $k)
null, null, $dec);
amount_cells(null, 'ChgPrice'.$n, price_format($myrow["unit_price"]));
if ($supp_trans->is_invoice)
null, null, $dec);
amount_cells(null, 'ChgPrice'.$n, price_format($myrow["unit_price"]));
if ($supp_trans->is_invoice)
- amount_cell(round($myrow["unit_price"] * ($myrow["qty_recd"] - $myrow["quantity_inv"]), user_price_dec()));
+ amount_cell(round
2
($myrow["unit_price"] * ($myrow["qty_recd"] - $myrow["quantity_inv"]), user_price_dec()));
else
else
- amount_cell(round($myrow["unit_price"] * max($myrow['quantity_inv'], 0), user_price_dec()));
+ amount_cell(round
2
($myrow["unit_price"] * max($myrow['quantity_inv'], 0), user_price_dec()));
if ($supp_trans->is_invoice)
submit_cells('grn_item_id'.$n, _("Add"), '', _("Add to Invoice"), true);
else
if ($supp_trans->is_invoice)
submit_cells('grn_item_id'.$n, _("Add"), '', _("Add to Invoice"), true);
else
@@
-449,7
+449,7
@@
function display_grn_items(&$supp_trans, $mode=0)
}
qty_cell(abs($entered_grn->this_quantity_inv), true, $dec);
amount_cell($entered_grn->chg_price);
}
qty_cell(abs($entered_grn->this_quantity_inv), true, $dec);
amount_cell($entered_grn->chg_price);
- amount_cell( round($entered_grn->chg_price * abs($entered_grn->this_quantity_inv), user_price_dec()), true);
+ amount_cell( round
2
($entered_grn->chg_price * abs($entered_grn->this_quantity_inv), user_price_dec()), true);
if ($mode == 1)
{
if ($mode == 1)
{
@@
-459,7
+459,7
@@
function display_grn_items(&$supp_trans, $mode=0)
}
end_row();
}
end_row();
- $total_grn_value += round($entered_grn->chg_price * abs($entered_grn->this_quantity_inv),
+ $total_grn_value += round
2
($entered_grn->chg_price * abs($entered_grn->this_quantity_inv),
user_price_dec());
$i++;
user_price_dec());
$i++;
diff --git
a/sales/manage/customer_branches.php
b/sales/manage/customer_branches.php
index 7401941b87d77b2950901379c3ab66cf0531c4bb..844e92170e414eaf1b1793a7405a25861234c8aa 100644
(file)
--- a/
sales/manage/customer_branches.php
+++ b/
sales/manage/customer_branches.php
@@
-321,7
+321,7
@@
table_section(2);
table_section_title(_("GL Accounts"));
// 2006-06-14. Changed gl_al_accounts_list to have an optional all_option 'Use Item Sales Accounts'
table_section_title(_("GL Accounts"));
// 2006-06-14. Changed gl_al_accounts_list to have an optional all_option 'Use Item Sales Accounts'
-gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', null, false,
false,
false, true);
+gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', null, false, false, true);
gl_all_accounts_list_row(_("Sales Discount Account:"), 'sales_discount_account');
gl_all_accounts_list_row(_("Sales Discount Account:"), 'sales_discount_account');