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; } }
public function doRenewForm($data, $form) { $holding = Holding::get()->filter("Barcode", $data['Barcode'])->first(); return $holding->saveRenew(); }