Ejemplo n.º 1
0
 public function Cancel($member, $reason = "")
 {
     $this->CancelledByID = $member->ID;
     $this->write();
     $obj = new OrderStatusLog_Cancel();
     $obj->AuthorID = $member->ID;
     $obj->OrderID = $this->ID;
     $obj->Note = $reason;
     if ($member->IsShopAdmin()) {
         $obj->InternalUseOnly = true;
     }
     $obj->write();
 }
Ejemplo n.º 2
0
 /**
  * cancel an order.
  * @param Member $member - the user cancelling the order
  * @param String $reason - the reason the order is cancelled
  * @returns OrderStatusLog_Cancel
  */
 public function Cancel(Member $member, $reason = "")
 {
     $this->CancelledByID = $member->ID;
     if (!$this->Archive()) {
         $this->write();
     }
     $log = OrderStatusLog_Cancel::create();
     $log->AuthorID = $member->ID;
     $log->OrderID = $this->ID;
     $log->Note = $reason;
     if ($member->IsShopAdmin()) {
         $log->InternalUseOnly = true;
     }
     return $log->write();
 }