Exemplo n.º 1
0
 /**
  * inserts data into the biblio_copy table
  * and create barcodes for the insterted titles
  * barcode is a 12 char code based on the book id
  * @param $data
  * @param $lastInsertID the last inserted id from the biblio table
  * @return nothing
  */
 function insertBiblioCopy($data, $lastInsertID)
 {
     $copy = new BiblioCopy();
     $copy->setBibid($lastInsertID);
     $copy->setCreateDt(date("Y-m-d H:i:s"));
     $copy->setBarcodeNmbr($data[0]);
     $copy->setStatusCd($data[3]);
     $copy->setStatusBeginDt(date("Y-m-d H:i:s"));
     $copy->setBasketNumber($data[5]);
     $copy->setCopyDesc($data[6]);
     $bibcopyQ = new BiblioCopyQuery();
     if ($bibcopyQ->insert($copy) == false) {
         return $bibcopyQ->getError();
     }
     return null;
 }
Exemplo n.º 2
0
 function _mkObj($array)
 {
     $copy = new BiblioCopy();
     $copy->setBibid($array["bibid"]);
     $copy->setCopyid($array["copyid"]);
     $copy->setCreateDt($array["create_dt"]);
     $copy->setCopyDesc($array["copy_desc"]);
     $copy->setBarcodeNmbr($array["barcode_nmbr"]);
     $copy->setStatusCd($array["status_cd"]);
     $copy->setLocationid($array["locationid"]);
     $copy->setStatusBeginDt($array["status_begin_dt"]);
     $copy->setDueBackDt($array["due_back_dt"]);
     $copy->setDaysLate($array["days_late"]);
     $copy->setMbrid($array["mbrid"]);
     $copy->setRenewalCount($array["renewal_count"]);
     $copy->_custom = $this->getCustomFields($array['bibid'], $array['copyid']);
     return $copy;
 }
Exemplo n.º 3
0
 function fetchCopy()
 {
     $array = $this->_conn->fetchRow();
     if ($array == false) {
         return false;
     }
     $copy = new BiblioCopy();
     $copy->setBibid($array["bibid"]);
     $copy->setCopyid($array["copyid"]);
     $copy->setCreateDt($array["create_dt"]);
     $copy->setCopyDesc($array["copy_desc"]);
     $copy->setBarcodeNmbr($array["barcode_nmbr"]);
     $copy->setStatusCd($array["status_cd"]);
     $copy->setStatusBeginDt($array["status_begin_dt"]);
     $copy->setDueBackDt($array["due_back_dt"]);
     $copy->setDaysLate($array["days_late"]);
     $copy->setMbrid($array["mbrid"]);
     $copy->setRenewalCount($array["renewal_count"]);
     return $copy;
 }
 function _mkObj(&$array, &$customs = NULL)
 {
     // jalg multi 5-7-2015 ALX
     $copy = new BiblioCopy();
     $copy->setBibid($array["bibid"]);
     $copy->setCopyid($array["copyid"]);
     $copy->setCreateDt($array["create_dt"]);
     $copy->setCopyDesc($array["copy_desc"]);
     $copy->setBarcodeNmbr($array["barcode_nmbr"]);
     $copy->setStatusCd($array["status_cd"]);
     $copy->setStatusBeginDt($array["status_begin_dt"]);
     $copy->setDueBackDt($array["due_back_dt"]);
     $copy->setDaysLate($array["days_late"]);
     $copy->setMbrid($array["mbrid"]);
     $copy->setRenewalCount($array["renewal_count"]);
     if (is_null($customs)) {
         $copy->_custom = $this->getCustomFields($array['bibid'], $array['copyid']);
     } else {
         Fatal::dbError($array["copyid"], "not implemented multycopy method", 'No DBMS error.');
         if (isset($customs[$array['copyid']])) {
             $copy->_custom = $customs[$array['copyid']];
         }
     }
     return $copy;
 }