/** * Send a receipt if one has not already been sent. */ public function sendReceipt() { if (!$this->ReceiptSent) { $receipt = new ReceiptEmail($this->Member(), $this); if ($receipt->send()) { $this->ReceiptSent = true; $this->write(); } } }