Example #1
0
 /**
  * Mark a field as modified
  * @param string $strKey The field key
  */
 public function markModified($strKey)
 {
     if ($strKey == 'locked') {
         throw new \InvalidArgumentException('Cannot change lock status of collection');
     }
     if ($strKey == 'document_number') {
         throw new \InvalidArgumentException('Cannot change document number of a collection, must be generated using generateDocumentNumber()');
     }
     $this->arrItems = null;
     $this->arrSurcharges = null;
     $this->arrCache = array();
     parent::markModified($strKey);
 }