/**
  * Return payments by invoice
  *
  * @param Invoice $invoice
  * @return array
  */
 function findByInvoice($invoice)
 {
     return InvoicePayments::find(array('conditions' => array('invoice_id = ?', $invoice->getId()), 'order' => 'paid_on'));
 }