'' ), $atts ); if(!isset($_GET['invoice'],$_GET['each_day_discount'],$_GET['how_many_paid'],$_GET['how_much_want'])){ echo '

Choose Your Sale Parameters

This section can help you understand the auction price settings

Your Invoice Value

What is the discount rate you are willing to pay each 30 days? (max 8% per 30 days)

%

How many days until your invoice is due to be paid? (maximum 180)

How much do you want now?
(maximum 80.00%)

%
'; }else{ $invest = $_GET['invoice']; $each_day_discount = (($_GET['invoice']/100)*2); $each_day_discount_double =($_GET['invoice']/100); $how_much_want = (($_GET['how_much_want'])/100)*$_GET['invoice']; $advanced_upfront =($how_much_want - $each_day_discount_double); $upfront_paid =($invest-($each_day_discount+$each_day_discount_double + $advanced_upfront)); $result = $advanced_upfront+$upfront_paid; echo '
'; echo '

Cash You Receive

'; echo '

Invoice Total :

'.$invest.'
'; echo '
'; echo '
Fees for this transaction
'; echo '

Maximum Fee :

'.$each_day_discount.'
'; echo '

Invoice discount amount :

'.$each_day_discount_double.'
'; echo '
'; echo '
What you will receive
'; echo '

Your advanced upfront :

'.$advanced_upfront.'
'; echo '

Paid to you on settlement :

'.$upfront_paid.'
'; echo '
'; echo '
'; echo '
YOUR MONEY

'.($invest-($each_day_discount+$each_day_discount_double)).'

'; echo ''; } } add_shortcode( 'view_calculator', 'aa_view_window' );