Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,13 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Transactions
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Nexus
|
||||
* @since 11 Feb 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\modules\admin\payments;
|
||||
@@ -60,7 +59,7 @@ class _transactions extends \IPS\Dispatcher\Controller
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__nexus_payments_transactions');
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->block( 'title', (string) $table );
|
||||
\IPS\Output::i()->output = (string) $table;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -318,7 +317,7 @@ class _transactions extends \IPS\Dispatcher\Controller
|
||||
$form = new \IPS\Helpers\Form;
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'refund_method', ( $method and $method::SUPPORTS_REFUNDS ) ? 'gateway' : 'credit', TRUE, array( 'options' => $refundMethods, 'toggles' => $refundMethodToggles ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'refund_amount', ( $transaction->status === \IPS\nexus\Transaction::STATUS_PART_REFUNDED ? $transaction->amount->amount->subtract( $transaction->partial_refund->amount ) : 0 ), TRUE, array( 'unlimited' => 0, 'unlimitedLang' => \IPS\Member::loggedIn()->language()->addToStack( 'refund_full', FALSE, array( 'sprintf' => array( $transaction->amount ) ) ), 'max' => (string) $transaction->amount->amount->subtract( $transaction->partial_refund->amount ), 'decimals' => TRUE ), NULL, NULL, $transaction->amount->currency, 'refund_amount' ) );
|
||||
if ( $transaction->invoice->status === \IPS\nexus\Invoice::STATUS_PAID )
|
||||
if ( $transaction->invoice !== NULL and $transaction->invoice->status === \IPS\nexus\Invoice::STATUS_PAID )
|
||||
{
|
||||
$field = new \IPS\Helpers\Form\Radio( 'refund_invoice_status', \IPS\nexus\Invoice::STATUS_PENDING, TRUE, array(
|
||||
'options' => array(
|
||||
@@ -353,20 +352,23 @@ class _transactions extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
|
||||
/* Handle invoice */
|
||||
if ( isset( $values['refund_invoice_status'] ) and $values['refund_invoice_status'] !== \IPS\nexus\Invoice::STATUS_PAID )
|
||||
if( $transaction->invoice !== NULL )
|
||||
{
|
||||
$transaction->invoice->markUnpaid( $values['refund_invoice_status'] );
|
||||
if ( isset( $values['refund_invoice_status'] ) and $values['refund_invoice_status'] !== \IPS\nexus\Invoice::STATUS_PAID )
|
||||
{
|
||||
$transaction->invoice->markUnpaid( $values['refund_invoice_status'] );
|
||||
|
||||
$transaction->invoice->member->log( 'invoice', array(
|
||||
'type' => 'status',
|
||||
'new' => $values['refund_invoice_status'],
|
||||
'id' => $transaction->invoice->id,
|
||||
'title' => $transaction->invoice->title
|
||||
) );
|
||||
$transaction->invoice->member->log( 'invoice', array(
|
||||
'type' => 'status',
|
||||
'new' => $values['refund_invoice_status'],
|
||||
'id' => $transaction->invoice->id,
|
||||
'title' => $transaction->invoice->title
|
||||
) );
|
||||
}
|
||||
|
||||
/* Send Email */
|
||||
$transaction->sendNotification();
|
||||
}
|
||||
|
||||
/* Send Email */
|
||||
$transaction->sendNotification();
|
||||
|
||||
/* Redirect */
|
||||
$this->_redirect( $transaction );
|
||||
|
||||
Reference in new issue
Block a user