Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -927,6 +927,14 @@ class _Invoice extends \IPS\Patterns\ActiveRecord
|
||||
$tax = $tax->add( $amount->amount );
|
||||
}
|
||||
$return['taxTotal'] = new \IPS\nexus\Money( $tax, $this->currency );
|
||||
|
||||
/* Discounts applied */
|
||||
$discount = new \IPS\Math\Number( '0' );
|
||||
foreach( $couponTaxReductions as $itemId => $amount )
|
||||
{
|
||||
$discount = $discount->add( $amount );
|
||||
}
|
||||
$return['discount'] = new \IPS\nexus\Money( $discount, $this->currency );
|
||||
|
||||
/* Add it all together */
|
||||
$return['total'] = new \IPS\nexus\Money( $subtotal->add( $shipping )->add( $tax ), $this->currency );
|
||||
@@ -1408,7 +1416,7 @@ class _Invoice extends \IPS\Patterns\ActiveRecord
|
||||
$return['delete'] = array(
|
||||
'title' => 'delete',
|
||||
'icon' => 'times-circle',
|
||||
'link' => $url->setQueryString( 'do', 'delete' )->csrf(),
|
||||
'link' => $url->setQueryString( 'do', 'delete' )->csrf()->getSafeUrlFromFilters(),
|
||||
'data' => array( 'confirm' => '', 'confirmSubMessage' => \IPS\Member::loggedIn()->language()->addToStack('invoice_delete_warning') )
|
||||
);
|
||||
}
|
||||
@@ -1605,7 +1613,18 @@ class _Invoice extends \IPS\Patterns\ActiveRecord
|
||||
}
|
||||
}
|
||||
$this->member = $memberToSave;
|
||||
$postBeforeRegister = isset( $this->guest_data['pbr'] ) ? $this->guest_data['pbr'] : NULL;
|
||||
|
||||
/* Get the PBR data */
|
||||
$postBeforeRegister = NULL;
|
||||
if( isset( $this->guest_data['pbr'] ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$postBeforeRegister = \IPS\Db::i()->select( '*', 'core_post_before_registering', array( 'secret=?', $this->guest_data['pbr'] ) )->first();
|
||||
}
|
||||
catch ( \UnderflowException $e ){}
|
||||
}
|
||||
|
||||
$referredBy = isset( $this->guest_data['referred_by'] ) ? $this->guest_data['referred_by'] : NULL;
|
||||
|
||||
$this->guest_data = isset( $this->guest_data['guestTransactionKey'] ) ? array( 'guestTransactionKey' => $this->guest_data['guestTransactionKey'] ) : NULL;
|
||||
|
||||
Reference in new issue
Block a user