{{extend 'layout_shop.html'}} {{block header}} {{try:}}{{=breadcrumb}}{{except:}}{{pass}}{{pass}} {{try:}}{{=back}}{{except:}}{{pass}}{{pass}} {{try:}}{{=header_tools}}{{except:}}{{pass}}{{pass}} {{end}}
{{header = THEAD(TR(TH(T('Invoice #')), TH(T('Date')), TH(T('Due')), TH(T('Amount')), TH(T('Status')), TH()))}} {{table = TABLE(header, _class='table table-striped table-hover')}} {{for i, row in enumerate(rows):}} {{repr_row = list(rows[i:i+1].render())[0]}} {{pay_now = A(T('Pay now'), _href=URL('mollie', 'invoice_pay', vars={'iID':row.invoices.id}), _class='btn btn-success') if row.invoices.Status == 'sent' else ''}} {{table.append(TR(TD(repr_row.invoices.InvoiceID), TD(repr_row.invoices.DateCreated), TD(repr_row.invoices.DateDue), TD(repr_row.invoices_amounts.TotalPriceVAT), TD(repr_row.invoices.Status), TD(DIV(os_gui.get_button('print', URL('invoices', 'pdf', vars={'iID':row.invoices.id}), btn_size=''), _class='btn-group pull-right'), DIV(pay_now, _class='pull-right')), ) )}} {{pass}} {{=table}}