Пример #1
0
 /**
  * Get all invoices of this template
  *
  * @return Invoice_Array
  * @param Invoice_Service $service
  * @param string $filter
  * @access public
  */
 public function getInvoices(Invoice_Service $service, $filter = null)
 {
     return $service->getAll($filter, $this);
 }
Пример #2
0
 /**
  * Send a reminder for the invoice
  * @param Invoice_Service $service
  * @param string $method Send method (email|hand|post); default: email
  * @param type $email Address to send to; default: contact e-mail
  * @param type $message
  * @return self 
  * @throws InvalidStateException
  */
 public function remind(Invoice_Service $service, $method = 'email', $email = null, $message = null)
 {
     if ($this->state == 'draft') {
         throw new InvalidStateException('Send invoice before reminding');
     }
     return $this->reload($service->remind($this, $method, $email, $message));
 }