Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Person.php #2738

Closed
wants to merge 2 commits into from
Closed

Create Person.php #2738

wants to merge 2 commits into from

Conversation

phili67
Copy link

@phili67 phili67 commented Jul 7, 2017

Bug with the adress1 and adress2 person.
You can't join per_person and per_group and get adresses, cause the adresses are stored in per_fam

@ghost ghost assigned phili67 Jul 7, 2017
@ghost ghost added the In Review label Jul 7, 2017
Copy link
Contributor

@crossan007 crossan007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we cannot modify classes inside of model/churchcrm/base, as these are automatically generated at build time.

@phili67
Copy link
Author

phili67 commented Jul 8, 2017

So what can we do to solve the problem ????
capture d ecran 2017-07-08 a 07 49 21
I would like to have this like in my customize crm ....

@DawoudIO
Copy link
Contributor

DawoudIO commented Jul 9, 2017

There is another person class that extends this one that you can alter.

It is unclear from that pic what screen is listed above

@phili67
Copy link
Author

phili67 commented Jul 9, 2017

Ok for the answer.
But the person class is not completed, it's not a base virtual class ?
The outlets aren't all available ?
So the only solution is to do complete the incomplete outlets ?
No ?

@DawoudIO
Copy link
Contributor

@phili67
Copy link
Author

phili67 commented Jul 10, 2017

@DawoudIO Ok but your base class must contain the outlets you specify, it's not a virtual class ?

@phili67
Copy link
Author

phili67 commented Jul 10, 2017

Ok I try to do this I add this to the child class you mentioned above :
like this at the end :
public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
{
$ret = parent::hydrate($row, $startcol, $rehydrate, $indexType);

	$famID = $this->getFamId();
        
 if ($famID)
 {    	
			$sql = sprintf('SELECT fam_Address1, fam_Address2, fam_City, fam_State, fam_Zip FROM family_fam WHERE fam_ID=%s',$famID);

			$ret = RunQuery($sql);

			if ($row = mysqli_fetch_assoc($ret)) {
			   $this->setAddress1($row["fam_Address1"]);
			   $this->setAddress2($row["fam_Address2"]);
			   $this->setCity($row["fam_City"]);
			   $this->setState($row["fam_State"]);
			   $this->setZip($row["fam_Zip"]);
			}
		}
   return $ret;
}

The all churchCRM crashed, the Family.php class interfer with the person.php :
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (09 54 89 74 20) at position 0 (0): Unexpected character in /var/sites/erp/vendor/propel/propel/src/Propel/Runtime/Util/PropelDateTime.php:128 Stack trace: #0 /var/sites/erp/vendor/propel/propel/src/Propel/Runtime/Util/PropelDateTime.php(128): DateTime->__construct('09 54 89 74 20') #1 /var/sites/erp/ChurchCRM/model/ChurchCRM/Base/Family.php(1470): Propel\Runtime\Util\PropelDateTime::newInstance('09 54 89 74 20', NULL, 'DateTime') #2 /var/sites/erp/ChurchCRM/model/ChurchCRM/Map/FamilyTableMap.php(395): ChurchCRM\Base\Family->hydrate(Array, NULL, false, 'num') #3 /var/sites/erp/vendor/propel/propel/src/Propel/Runtime/Formatter/ObjectFormatter.php(123): ChurchCRM\Map\FamilyTableMap::populateObject(Array, NULL, 'num') #4 /var/sites/erp/vendor/propel/propel/src/Propel/Runtime/Formatter/ObjectFormatter.php(58): Propel\Runtime\Formatter\ObjectFormatter->getAllObjectsFromRow(Array) #5 /var/sites/erp/vendor/propel/propel/src/Propel/Runtime/Activ in /var/sites/erp/ChurchCRM/model/ChurchCRM/Base/Family.php on line 1530

@DawoudIO DawoudIO closed this Jul 13, 2017
@ghost ghost removed the In Review label Jul 13, 2017
@DawoudIO DawoudIO deleted the phili67-patch-7 branch July 18, 2017 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants