getInvoices() public method

public getInvoices ( $addText = false )
Example #1
0
    public function showInvoiceAction()
    {
        print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Statement</title><style type="text/css">
body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, font, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;padding: 0;border: 0;outline: 0;font-size: 100%;vertical-align: baseline;background: transparent;color: #000;}
table {width: 100%;border-spacing: 0;border-collapse: collapse;}
body {background-color: #ffffff;}
body, #billing_statement_wrapper {font-family: Verdana, Arial, sans-serif;font-size: 12px;text-align: left;}
#billing_statement_wrapper {width: 580px;background-color: #ffffff;padding: 10px 10px 0 10px;margin: 0px auto;border: 2px solid #d5d5d5;}
#billing_statement {width: 580px;}
#billing_statement td {padding: 0 0 15px 0;text-align: left;vertical-align: top;}
#billing_statement table.billing_statement_listing {margin: 0 0 15px 0;}
#billing_statement table.billing_statement_listing td, #billing_statement table.billing_statement_listing th {padding: 3px 5px 3px 5px;text-align: left;vertical-align: bottom;}
#billing_statement table.billing_statement_listing th {font-weight: normal;border-bottom: 1px solid #666666;}
#billing_statement table.billing_statement_listing td {border-bottom: 1px solid #e5e5e5;}
#billing_statement table.billing_statement_detail_listing th.billing_statement_listing_cell_datetime {width: 20%;}
#billing_statement table.billing_statement_detail_listing th.billing_statement_listing_cell_type {width: 15%;}
#billing_statement table.billing_statement_detail_listing th.billing_statement_listing_cell_detail {width: 50%;}
#billing_statement table.billing_statement_detail_listing th.billing_statement_listing_cell_money {width: 15%;}
#billing_statement table.billing_statement_listing tr.billing_statement_listing_tfoot td {font-weight: bold;text-align: right;border: none;border-bottom: 1px solid #666666;}
#billing_statement table.billing_statement_listing td.billing_statement_listing_cell_money, #billing_statement table.billing_statement_listing th.billing_statement_listing_cell_money {text-align: right;}
h2.billing_statement_section_title {background-color: #e5e5e5;padding: 2px 5px;margin: 0 0 15px 0;font-size: 13px;}
h3 {margin: 0 0 5px 0;}
#billing_statement_merchant_information, #billing_statement_information, #billing_statement_account_information, #billing_statement_summary {width: 50%;}
#billing_statement_account_information h2.billing_statement_section_title {margin: 0 10px 15px 0;}
#billing_statement_account_information .adr {margin: 15px 0;}
#billing_statement_account_information .adr h3 {margin: 0;}
#billing_statement_information div {text-align: right;}
#billing_statement_merchant_name, #billing_statement_title {font-size: 18px;font-weight: bold;}
#billing_statement_summary_usage_period, #billing_statement_summary_balance_summary {padding: 0 0 5px 0;}
#billing_statement_summary_balance_paid_stamp {text-align: right;color: #ff0000;font-size: 18px;}
</style></head><body><div id="billing_statement_wrapper">';
        $invoices = $this->billing->getInvoices(true);
        foreach ($invoices as $invoice) {
            if ($invoice['id'] == $this->getParam(self::CALL_PARAM_NAME)) {
                print $invoice['text'];
                print "</div></body></html>";
                exit;
            }
        }
        print "Invoice not found";
        exit;
    }