3 include_once($path_to_root . "/includes/ui.inc");
5 //--------------------------------------------------------------------------------------
7 function display_dimension_payments($id)
9 global $path_to_root, $table_style;
11 $result = get_bank_trans(null, null, payment_person_types::dimension(), $id);
15 if (db_num_rows($result) == 0)
17 display_note(_("There are no transactions for this dimension."));
21 display_heading2(_("Transactions for this Dimension"));
22 start_table($table_style);
23 $th = array(_("Type"), _("#"), _("Reference"),
24 _("Date"), _("Debit"), _("Credit"));
29 while ($myrow = db_fetch($result))
32 alt_table_row_color($k);
34 // projects are always in home currency...get the home equivalent of the banktrans
35 // from it's gl postings
36 $home_value = get_gl_trans_value($myrow["bank_act"], $myrow["type"], $myrow["trans_no"]);
38 label_cell(systypes::name($myrow["type"]));
39 label_cell(get_trans_view_str($myrow["type"], $myrow["trans_no"]));
40 label_cell($myrow["ref"]);
41 label_cell(sql2date($myrow["trans_date"]));
42 display_debit_or_credit_cells($home_value);
44 $total += $home_value;
50 label_cell(_("Total"), "colspan=4");
51 display_debit_or_credit_cells($total);
58 //--------------------------------------------------------------------------------------