[Tex/LaTex] How to make a simple framebox with round corners

mdframed

I have seen related questions about this one but ever since I tried, none of them worked out.
All I want is to make a framebox with a slightly rounded corners with a table inside.

I've tried this simple example using mdframed (in this case inside the fancy footer):

\documentclass{article}
\usepackage[paperheight=11in,paperwidth=8.5in,top=0.6in,bottom=1.5in,left=0.1in,right=0.1in,headheight=3.0in,footskip=0.1in,includehead]{geometry}
\usepackage{longtable}
\usepackage{graphicx}
\usepackage{lastpage}
\usepackage{fancyhdr}
\usepackage{booktabs}
\usepackage{framed}
\usepackage[xcolor]{mdframed}
\usepackage{ulem}
\pagestyle{fancy}
\usepackage[absolute]{textpos}
\renewcommand\headrulewidth{0pt}
\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\newmdenv[roundcorner=5pt]{myframe}

\fancyhf{}
\fancyhead[l]{

}
\fancyfoot[l]{
        \renewcommand\arraystretch{1.0}
        \small{
        \begin{textblock}{5}(0.5,15.8)
                \begin{tabular}{l}
                        \textbf{ All stocks received are subject to our final inspection. } \\
                        \textbf{ We reserve the right not to accept delivery should the } \\
                        \textbf{ above items do not meet our standards. }
                \end{tabular}
        \end{textblock}
        }
        \normalsize{
        \renewcommand\arraystretch{1.2}
        \begin{textblock}{4.0}(7.1,15.8)
                \begin{myframe}
                        \begin{tabular}{ p{1.85in} }
                                Prepared By: \\
                                \centering{ \textbf{ {.\prepared_by\} } }
                        \end{tabular}
                \end{myframe}
        \end{textblock}
        \begin{textblock}{4.1}(11.3,15.8)
                \begin{myframe}
                        \begin{tabular}{ p{1.85in} }
                                Approved By: \\
                                \centering{ \textbf{ {.\approver\} } }
                        \end{tabular}
                \end{myframe}
        \end{textblock}
        }
}

\begin{document}
\setlength\heavyrulewidth{1.5pt}
\renewcommand\arraystretch{1.5}
\normalsize{
\begin{longtable}[c]{ p{0.6in} p{0.75in} p{3.65in} p{0.8in} p{1.1in} }
        \toprule
        \centering{ \textbf{Qty} } & \textbf{Unit} & \centering{ \textbf{Description} } & \hfill\textbf{Unit Price} & \hfill\textbf{Total} \\
        \hline
        \endfirsthead
        \toprule
        \centering{ \textbf{Qty} } & \textbf{Unit} & \centering{ \textbf{Description} } & \hfill\textbf{Unit Price} & \hfill\textbf{Total} \\
        \hline
        \endhead
        \endfoot
        \endlastfoot
        {.while SELECT b.`description`, a.po_no, a.`item_id`, IF(a.`uom`=0, UPPER(if(a.qty>1,ifnull(c.plural_name,c.short),c.`short`)), UPPER(d.`name`)) AS du_name, a.`uom`, replace(a.qty,'.00','') as qty, a.`price` AS price, a.`total_amt` AS total, IFNULL(purchases.poRRQty(a.client, a.module_id, a.po_no, a.po_dtl_id,0), '0.00')  AS rr_qty, CONCAT(DATE_FORMAT(f.`need_date`, '%m/%d/%Y'), " ",f.`need_time`) AS delivery_date, purchases.`getLocation`(a.`loc_type`, a.`loc`) AS location, a.adj_amt, ifnull(a.remarks,'') as dtl_remarks
                FROM purchases.`purchase_details` a
                        LEFT JOIN items.`profile` b ON a.`item_id`=b.`item_id`
                        LEFT JOIN items.`uoms` c ON b.`uom`=c.`id`
                        LEFT JOIN items.`du` d ON a.`uom`=d.`id` AND a.`item_id`=d.`item_id`
                        LEFT JOIN purchases.`request_details` f ON a.`pr_no`=f.`pr_no` AND a.`pr_dtl_id`=f.`pr_dtl_id` AND f.module_id = a.module_id and f.client = a.client
                WHERE a.`po_no`=0@po_no  and  a.module_id = 0@MODULE_ID  and a.client = 0@T_CLIENT  order by delivery_date,b.description limit -1}
                \centering{ {.\qty\} } & {.\du_name\} & {.\description\} & \hfill{.x`p2:price} & \hfill{.x`p2:total}  \\
                {.if select '@dtl_remarks'!=''}
                        & & \centering{ \small{ {.\dtl_remarks\} } } & & \\
                {.endif}
        {.wend}

        %&&& \hfill PO Total: & \hfill\textbf{ {.x`p2:total_GT} } \\

\end{longtable}
\begin{textblock}{15}(0.5,13.8)
        \begin{tabular}{ p{5.5in} }
                \footnotesize{ \textbf{ {.\notes\} } } \\
        \end{tabular}
\end{textblock}
\begin{textblock}{13.5}(0.3,14.7)
        \begin{tabular}{ p{0.6in} p{0.75in} p{3.65in} p{0.8in} p{1.1in} }
                &&&&\\
                \hline
        \end{tabular}
\end{textblock}
\begin{textblock}{3}(11.1,15.1)
        \begin{tabular}{ p{0.7in} p{1.0in} }
                \underline{ PO Total } : &\textbf P \hfill\textbf{ {.x`p2:total_GT} }\\
        \end{tabular}
\end{textblock}
}
\end{document}

But it's not working. Any suggestions?

Best Answer

Here's an example showing a footer formed by a tabular material surrounded by a frame with rounded corners:

\documentclass{article}
\usepackage[a6paper]{geometry}
\usepackage{fancyhdr}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}

\newmdenv[
  linecolor=cyan,
  linewidth=2pt,
  roundcorner=5pt,
  innertopmargin=0pt,
  innerbottommargin=0pt,
]{myframe}

\pagestyle{fancy}
\fancyhf{}
\fancyfoot[C]{%
  \begin{myframe}
  \begin{tabular}[t]{@{}l@{}}
  text1 \\
  text2
  \end{tabular}
  \end{myframe}%
}

\begin{document}
\lipsum[2]\lipsum[2]\lipsum[2]\lipsum[2]
\end{document}

enter image description here

A not so fancy alternative:

\documentclass{article}
\usepackage[a6paper]{geometry}
\usepackage{fancyhdr}
\usepackage{fancybox}
\usepackage{lipsum}

\pagestyle{fancy}
\fancyhf{}
\fancyfoot[C]{%
  \Ovalbox{\parbox[t]{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{
  \begin{tabular}[t]{@{}l@{}}
  text1 \\
  text2
  \end{tabular}}}%
}

\begin{document}
\lipsum[2]\lipsum[2]\lipsum[2]\lipsum[2]
\end{document}

enter image description here