Version 4.1.19.4
This commit is contained in:
1 parent
2bd5025018
commit
0dc2aee5ed
312 files changed
+53730
-32118
No files matched your search
@@ -1527,11 +1527,13 @@ class _Invoice extends \IPS\Patterns\ActiveRecord
|
||||
* Mark as paid
|
||||
*
|
||||
* @param \IPS\Member|NULL $member The member changing the status. Only set if the status is being manually changed by an admin.
|
||||
* @return void
|
||||
* @return \IPS\Member|NULL If the invoice belonged to a guest, a member will be created by approving and returned here
|
||||
* @note It is the responsibility of the code calling this to log the action on the customer's account *before* calling this method
|
||||
*/
|
||||
public function markPaid( \IPS\Member $member = NULL )
|
||||
{
|
||||
{
|
||||
$return = NULL;
|
||||
|
||||
if ( $this->status !== static::STATUS_PAID )
|
||||
{
|
||||
/* Create the member account if this was a guest */
|
||||
@@ -1554,6 +1556,7 @@ class _Invoice extends \IPS\Patterns\ActiveRecord
|
||||
$memberToSave->changed[ $k ] = $v;
|
||||
}
|
||||
$memberToSave->save();
|
||||
$return = $memberToSave;
|
||||
}
|
||||
$this->member = $memberToSave;
|
||||
$this->guest_data = NULL;
|
||||
@@ -1959,6 +1962,8 @@ class _Invoice extends \IPS\Patterns\ActiveRecord
|
||||
$this->status_extra = $extra;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user