Merged changes up to version 2.3.4 into unstable.
[fa-stable.git] / includes / ui / ui_input.inc
index ee84f0fd61cb80b9925f9cab4ee7ac448662d2ae..9048cac4641d00e536164537c6a5657482a05956 100644 (file)
@@ -949,7 +949,20 @@ function edit_trans_link($trans_type, $trans_no, $url='')
                $link_text = user_graphic_links() ? set_icon(ICON_EDIT, _('Edit')) : _('Edit');
                return "<a href='".$path_to_root . sprintf($url, $trans_no, $trans_type)."'>$link_text</a>";
        }
+}
 
+function bank_balance_row($bank_acc, $parms='')
+{
+       global $path_to_root;
+       
+       $to = add_days(Today(), 1);
+       $bal = get_balance_before_for_bank_account($bank_acc, $to);
+       label_row( _("Bank Balance:"),
+               "<a target='_blank' " . ($bal<0 ? 'class="redfg"' : '')
+               ."href='$path_to_root/gl/inquiry/bank_inquiry.php?bank_account=".$bank_acc."'"
+               ." onclick=\"javascript:openWindow(this.href,this.target); return false;\" >&nbsp;"
+               . price_format($bal)
+               ."</a>", $parms);
 }
 
 ?>
\ No newline at end of file