Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -104,7 +104,20 @@ class _File extends \IPS\nexus\Invoice\Item\Purchase
|
||||
return parent::clientAreaAction( $purchase );
|
||||
}
|
||||
$renewalCosts = json_decode( $file->renewal_price, TRUE );
|
||||
$currency = $purchase->original_invoice->currency;
|
||||
|
||||
/* If invoice doesn't exist, or currency no longer exists, use default */
|
||||
try
|
||||
{
|
||||
$currency = $purchase->original_invoice->currency;
|
||||
if( !isset( $renewalCosts[ $currency ] ) )
|
||||
{
|
||||
throw \OutOfRangeException();
|
||||
}
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
$currency = \IPS\nexus\Customer::loggedIn()->defaultCurrency();
|
||||
}
|
||||
|
||||
$tax = NULL;
|
||||
if ( $purchase->tax )
|
||||
|
||||
Reference in new issue
Block a user