Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -147,17 +147,31 @@ class _Nexus
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_paid', FALSE, array( 'htmlsprintf' => array( $transaction, $invoice, $byStaff, \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_status_' . $val['status'] ) ) ) );
|
||||
}
|
||||
|
||||
|
||||
case 'status':
|
||||
if ( $val['status'] === \IPS\nexus\Transaction::STATUS_REFUNDED or $val['status'] === \IPS\nexus\Transaction::STATUS_PART_REFUNDED )
|
||||
{
|
||||
if ( $val['refund'] === 'gateway' )
|
||||
{
|
||||
$refundedTo = ( is_object( $transaction ) and $transaction->method ) ? $transaction->method->_title : \IPS\Member::loggedIn()->language()->addToStack('history_transaction_refunded_gateway');
|
||||
if ( isset( $val['amount'] ) and $val['amount'] )
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_part_refunded', FALSE, array( 'htmlsprintf' => array( new \IPS\nexus\Money( $val['amount'], $val['currency'] ), $transaction, $byStaff ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_refunded', FALSE, array( 'htmlsprintf' => array( $transaction, $byStaff ) ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$refundedTo = mb_strtolower( \IPS\Member::loggedIn()->language()->addToStack( 'refund_method_credit' ) );
|
||||
if ( isset( $val['amount'] ) and $val['amount'] )
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_part_credited', FALSE, array( 'htmlsprintf' => array( new \IPS\nexus\Money( $val['amount'], $val['currency'] ), $transaction, $byStaff ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_credited', FALSE, array( 'htmlsprintf' => array( $transaction, $byStaff ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $val['status'] === \IPS\nexus\Transaction::STATUS_REFUNDED )
|
||||
@@ -174,6 +188,9 @@ class _Nexus
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_status', FALSE, array( 'htmlsprintf' => array( $transaction, \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_status_' . $val['status'] ), $byStaff ) ) );
|
||||
}
|
||||
|
||||
case 'undo_credit':
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_undo_credit', FALSE, array( 'htmlsprintf' => array( new \IPS\nexus\Money( $val['amount'], $val['currency'] ), $transaction, $byStaff ) ) );
|
||||
|
||||
case 'delete':
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'history_transaction_delete', FALSE, array( 'htmlsprintf' => array( $transaction, $byStaff ) ) );
|
||||
}
|
||||
@@ -378,8 +395,6 @@ class _Nexus
|
||||
}
|
||||
|
||||
case 'giftvoucher':
|
||||
|
||||
$currency = isset( $val['currency'] ) ? $val['currency'] : \IPS\nexus\Customer::load( $val['by'] )->defaultCurrency();
|
||||
switch ( $val['type'] )
|
||||
{
|
||||
case 'used':
|
||||
@@ -393,6 +408,8 @@ class _Nexus
|
||||
$customer = new \IPS\nexus\Customer;
|
||||
}
|
||||
|
||||
$currency = isset( $val['currency'] ) ? $val['currency'] : $customer->defaultCurrency();
|
||||
|
||||
return
|
||||
\IPS\Member::loggedIn()->language()->addToStack( 'history_giftvoucher_used', FALSE, array( 'htmlsprintf' => array(
|
||||
new \IPS\nexus\Money( $val['amount'], $currency ),
|
||||
@@ -412,6 +429,8 @@ class _Nexus
|
||||
$customer = new \IPS\nexus\Customer;
|
||||
}
|
||||
|
||||
$currency = isset( $val['currency'] ) ? $val['currency'] : $customer->defaultCurrency();
|
||||
|
||||
return
|
||||
\IPS\Member::loggedIn()->language()->addToStack( 'history_giftvoucher_redeemed', FALSE, array( 'htmlsprintf' => array(
|
||||
new \IPS\nexus\Money( $val['amount'], $currency ),
|
||||
@@ -421,7 +440,6 @@ class _Nexus
|
||||
) ) );
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'info':
|
||||
@@ -521,9 +539,16 @@ class _Nexus
|
||||
break;
|
||||
|
||||
case 'alternative':
|
||||
try
|
||||
{
|
||||
$altContact = \IPS\nexus\Customer::load( $val['alt_id'] );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
$altContact = new \IPS\nexus\Customer;
|
||||
}
|
||||
|
||||
$altContact = \IPS\nexus\Customer::load( $val['alt_id'] );
|
||||
$altContact = $altContact->member_id ? $altContact->link() : $val['alt_name'];
|
||||
$altContact = $altContact->member_id ? $altContact->link() : htmlspecialchars( $val['alt_name'], ENT_DISALLOWED, 'UTF-8', FALSE );
|
||||
|
||||
switch ( $val['type'] )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user