Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -12,7 +12,7 @@
namespace IPS\nexus\Invoice;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -137,7 +137,7 @@ abstract class _Item
* @brief Group With Parent
*/
public $groupWithParent = FALSE;
/**
* Constructor
*
@@ -181,7 +181,7 @@ abstract class _Item
*/
public function taxRate( \IPS\GeoLocation $location = NULL )
{
return new \IPS\Math\Number( $this->tax ? $this->tax->rate( $location ?: $this->billaddress ) : '0' );
return new \IPS\Math\Number( $this->tax ? $this->tax->rate( $location ) : '0' );
}
/**
@@ -338,7 +338,7 @@ abstract class _Item
*/
public function requiresBillingAddress()
{
return in_array( 'other', explode( ',', \IPS\Settings::i()->nexus_require_billing ) );
return \in_array( 'other', explode( ',', \IPS\Settings::i()->nexus_require_billing ) );
}
/**
@@ -388,8 +388,8 @@ abstract class _Item
* @apiresponse int parentItem If when the item has been purchased it will be a child of another item on the same invoice, the ID number of the item that will be the parent
* @apiresponse bool groupWithParent If when the item has been purchased it will have its renewals grouped with its parent
* @apiresponse \IPS\nexus\Customer payTo If the payment for this item goes to another user (for example for Downloads files), the user who will receive the payment
* @apiresonse float commission If the payment for this item goes to another user (for example for Downloads files), the percentage of the price that will be retained by the site (in addition to fee)
* @apiresonse \IPS\nexus\Money fee If the payment for this item goes to another user (for example for Downloads files), the fee that will be deducted by the site (in addition to commission)
* @apiresponse float commission If the payment for this item goes to another user (for example for Downloads files), the percentage of the price that will be retained by the site (in addition to fee)
* @apiresponse \IPS\nexus\Money fee If the payment for this item goes to another user (for example for Downloads files), the fee that will be deducted by the site (in addition to commission)
*/
public function apiOutput( \IPS\Member $authorizedMember = NULL )
{
@@ -413,7 +413,7 @@ abstract class _Item
'expireDate' => isset( $this->expireDate ) ? $this->expireDate->rfc3339() : null,
'details' => $this->details,
'parentPurchase' => ( isset( $this->parent ) and $this->parent instanceof \IPS\nexus\Purchase ) ? $this->parent->apiOutput( $authorizedMember ) : null,
'parentItem' => ( isset( $this->parent ) and is_int( $this->parent ) ) ? $this->parent : null,
'parentItem' => ( isset( $this->parent ) and \is_int( $this->parent ) ) ? $this->parent : null,
'groupWithParent' => isset( $this->groupWithParent ) ? $this->groupWithParent : false,
'payTo' => $this->payTo ? $this->payTo->apiOutput( $authorizedMember ) : null,
'commission' => $this->commission,