def payment(self):
        if not self.order.balance_remaining:
            try:
                payment = self.order.payments.authorized()[0]
            except __HOLE__:
                payment = None

            if payment and payment.payment_method:
                self.pdf.p(
                    _('Already paid for with %(payment_method)s'
                        ' (Transaction %(transaction)s).') % {
                        'payment_method': payment.payment_method,
                        'transaction': payment.transaction_id,
                        })
            else:
                self.pdf.p(_('Already paid for.'))
        else:
            self.pdf.p(_('Not paid yet.'))
dataset/ETHPy150Open matthiask/plata/plata/reporting/order.py/OrderReport.payment