Version 4.1.19.4

This commit is contained in:
Neo committed 2025-12-19 05:42:01 -08:00
1 parent 2bd5025018
commit 0dc2aee5ed
312 files changed
+53730 -32118

No files matched your search

+16 -2
View File
@@ -2476,7 +2476,14 @@ class _Package extends \IPS\Node\Model
*/
protected function upgradeDowngradeForm( \IPS\nexus\Purchase $purchase, $overrideRestrictions = FALSE )
{
$currency = $purchase->original_invoice->currency;
try
{
$currency = $purchase->original_invoice->currency;
}
catch ( \Exception $e )
{
$currency = $purchase->member->defaultCurrency();
}
$options = array();
$desciptions = array();
$toggles = array();
@@ -2578,7 +2585,14 @@ class _Package extends \IPS\Node\Model
protected function costToUpgrade( \IPS\nexus\Purchase $purchase )
{
$package = \IPS\nexus\Package::load( $purchase->item_id );
$currency = $purchase->original_invoice->currency;
try
{
$currency = $purchase->original_invoice->currency;
}
catch ( \Exception $e )
{
$currency = $purchase->member->defaultCurrency();
}
$priceOfExistingPackage = json_decode( $package->base_price, TRUE );
$priceOfExistingPackage = $priceOfExistingPackage[ $currency ]['amount'];