コード例 #1
0
 public function saveIssue($memberID, $barcode)
 {
     $holding = Holding::get()->filter("Barcode", $barcode)->first();
     $member = Member::get()->byID($memberID);
     if ($holding != null && $member != null && $holding->Available() == true) {
         $this->MemberID = $memberID;
         $this->HoldingID = $holding->ID;
         $holding->Issued = true;
         $holding->write();
         $this->write();
         return true;
     } else {
         return false;
     }
 }
コード例 #2
0
 public function doRenewForm($data, $form)
 {
     $holding = Holding::get()->filter("Barcode", $data['Barcode'])->first();
     return $holding->saveRenew();
 }