Plugin Directory

Changeset 356307

Timestamp:
03/06/2011 09:47:40 PM (13 years ago)
Author:
jghazally
Message:

Fix the tax on your account page ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-e-commerce/branches/3.8-development/wpsc-theme/functions/wpsc-user_log_functions.php

    r354326 r356307  
    490490            echo "</tr>";
    491491
     492
    492493            $endtotal = $total_shipping = 0;
    493494            foreach ( (array)$cart_log as $cart_row ) {
     
    523524                echo " <td>";
    524525                $gst = $cart_row['tax_charged'];
    525                 if($gst > 0)
    526                     $endtotal += $gst * $cart_row['quantity'];
    527 
     526                if( $gst > 0)
     527                    $gsttotal += $gst;
    528528                echo wpsc_currency_display( $gst , array('display_as_html' => false) );
    529529                echo " </td>";
     
    564564            $endtotal += $purchase['wpec_taxes_total'];
    565565            echo wpsc_currency_display( $total_shipping, array('display_as_html' => false)  ) . "<br />";
    566             echo wpsc_currency_display( $purchase['wpec_taxes_total'] , array('display_as_html' => false) ). "<br />";
     566            if ( $gsttotal ){ //if false then must be exclusive.. doesnt seem too reliable needs more testing
     567                echo wpsc_currency_display( $gsttotal , array('display_as_html' => false) ). "<br />";
     568            } else {
     569                echo wpsc_currency_display( $purchase['wpec_taxes_total'] , array('display_as_html' => false) ). "<br />";
     570            }
    567571            echo wpsc_currency_display( $endtotal , array('display_as_html' => false) );
    568572            echo " </td>";
     
    606610                            break;
    607611                        default:
    608                             echo "  <tr><td>" . $form_field['name'] . ":</td><td>" . $form_field['value'] . "</td></tr>";
     612                            echo "  <tr><td>" . $form_field['name'] . ":</td><td>" . . "</td></tr>";
    609613
    610614                    }
Note: See TracChangeset for help on using the changeset viewer.