19 replies [Last post]
zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Was this information Helpful?

Hi there,

I'm coming with my new 2$ ideas but today,

When you enable the tax module, it should be good to show the subtotal without tax before adding a tax. In addition, it should be good to show the rate of the tax near his name.

I believe that showing the subtotal before adding tax is required in europe (not sure) but, in all case, it's a good feature to implement to provide to customer an easy to understand order payment.

zmove

kulvik's picture
Offline
Uber DonorBug FinderEarly adopter... addicted to alphas.Cool profile pic award.Internationalizationizer
Joined: 08/14/2007
Juice: 336
Re: Add a subtotal without tax before adding the tax

You're absolutely right zmove Smiling Showing the subtotal before adding tax is required on most of the european countries.

I think this would be a good (and fairly easy) improvement Smiling

______________
Best regards,
Thomas Kulvik
Ny Media AS
www.nymedia.no

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Add a subtotal without tax before adding the tax

I like this idea. I think there should be a way for any line_item type module to put a Subtotal line before it's own. Ryan may have some ideas about how to do that.

psynaptic's picture
Offline
Early adopter... addicted to alphas.Not KulvikTheminator
Joined: 08/28/2007
Juice: 731
Re: Re: Re: Add a subtotal without tax before adding the tax

If this hasn't already been done +1 for it.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Re: Re: Re: Add a subtotal without tax before adding the tax

I didn't see the modification in alpha 7e... It is planed for the beta version ?

thanks

zmove

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Add a subtotal without tax before adding the

Added to my feature requests list, but I can't promise I'll be able to get to it.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Add a subtotal without tax before adding the tax

I'm poping up the thread because no more news about this feature Eye-wink

It is still planed ?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Add a subtotal without tax before adding the tax

I still have it in my "feature requests" folder, but unfortunately it's non-essential for me at the moment. I will be moving onto the line items API before too long. Smiling

jorditr's picture
Offline
Getting busy with the Ubercode.
Joined: 10/31/2007
Juice: 256
Re: Re: Re: Add a subtotal without tax before adding the tax

I would like to add more preasure to this question Cool

This questions are essential for european users (at least on euro area) which I would say is a pretty big market Eye-wink for something that is relatively small Smiling

sbordage's picture
Offline
Joined: 12/08/2007
Juice: 16
+1

We are trying to spread UC but without this it's pretty hard.

Thanks in advance for your help & time

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: +1

Can someone do a mock-up to help me understand? In my test sites, the subtotal is usually the only line before tax anyways, so it seems like it's always the "subtotal before tax." I'm guessing you're looking for something w/ discounted items, but I thought you still had to pay tax on the pre-discounted price. Maybe not? Puzzled

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Re: +1

This is the current Ubercart behavior about line item :

Subtotal : 45$
Discount : -10$
Shipping : 5$
Taxe : 8.43$
Total : 48.43$

This is non correct for european shop, because before adding the Tax, you need to specify the amount that serve to calculate it, so it should be like this.

Subtotal : 45$
Discount : -10$
Shipping : 5$
Subtotal excluding tax : 40$
Taxe : 8.43$
Total : 48.43$

So we need to specify the amount that serve to calculate the tax, it's easy to find it just by make simple calculation, but this is the law, this line have to be mentionned before tax. In invoice too

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: +1

My perspective, then, is that this would have to be included in the tax module and should be made optional for stores that don't require it. (For example, stores that have no shipping, no discount, or simply don't want the subtotal there.)

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Re: Re: Re: +1

Yes, I think it should be a configurable option of the tax module too.

junaid.baloch's picture
Offline
Joined: 12/25/2010
Juice: 11
Re: Re: Re: Re: +1

junaid.baloch's picture
Offline
Joined: 12/25/2010
Juice: 11
I'm already getting the

I'm already getting the "Subtotal excluding tax" on my checkout page. i'm trying to get rid of it.
Now, My question:
Ryan, I've been reading your posts. u r doing a good job!
I have my own module for discounts.
can u plz tell me how the line items are calculated?

In my module i have changed the order of line items according to our requirements.
but problem is that after calling the set_line_item from jquery, the Order total: of Order total preview: pane is updated but it remains same on the "Cart Contents" pane. and on the review page picks the amount form "Cart Contents" pane.

any suggestion or solution is appreciated

Regards,
JQ

akamarvin's picture
Offline
Joined: 11/19/2007
Juice: 18
European problem

with the last working version of the discounts contrib given by detour here
http://www.ubercart.org/contrib/143#comment-8611

Not only it isn't clear but incorrect too :

it shows this in cart checkout :

Subtotal: 115,70€
Discount: -20,50€
VAT : 24,30€ // it's a tax rule named "VAT" (21%, Belgium)
Total : 119,50€

which is very wrong because the 21% VAT has to be calculated on the discounted price, like this :

Subtotal: 115,70€
Discount: -20,50€
(Subtotal : 95,20€)
VAT : 19,99€ // which is the good 21% of 95,20 and not 115,70
Total : 115,19€

How can i tweak the discount module (as provided by detour)
to apply discounts and add line item BEFORE the tax module does his job in the checkout.

Lyle talked about the fact that the discount module was not doing its main things in the good op case of its checkout_pane hook ( it does things in 'review' , maybe it should do in 'process' )
It's maybe a clue. I really don't know and I'm stuck with this incorrect behaviour.

The discount module does a uc_order_line_item_add() in uc_discounts_order() but I believe i's too late because the uc_taxes module cannot take it into account then .

Any help GREATLY appreciated. thanks.

drupal 5.5, ubercart alpha8, discounts 20071210.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: European problem

Yes the discount module is not compatible with the tax module. I see this problem some month ago, and, as I had no time to maintain the discount module, I abandonned the idea.

If it was coded with the ubercart way, you should have a discount checkbox in your tax module to condiser discount when applying a tax. Maybe it's the case with all module improvement made in the module reply.

If not, you need to make some PHP to make it compatible Smiling but it's not a tax or a subtotal display problem, the problem come from the discount module.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Add a subtotal without tax before adding the tax

As my client ask me to add this feature very quickly on his store, I tried on the hack of core tax module to implement this function.

in uc_taxes_javascript(), I added some lines :

<?php
  $taxes
= uc_taxes_calculate($order);
   
$total = uc_order_get_total($order);
     
$taxes[] = array(
       
'id' => 'taxes_subtotal',
   
'name' => t('Taxes subtotal'),
   
'amount' => $total,
   
'weight' => 8,
      );
?>

My goal ATM is to test where to implement in this subtotal in the code, I will take care admin options later. My problem is that this code works, the line item is successfully added to the line item, but the subtotal take care of this line.

So I'm asking about some opinions : what is the best way to don't take care of this subtotal ? DO I have to hack the order module to say to total calculation function to don't add the 'taxes_subtotal' line item or is there a better solution ?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Add a subtotal without tax before adding the tax

Got to looking at this problem and ended up fixing a couple others as well.

The tax module now adds a subtotal line before the taxes, but only if there are taxes and other line items. I had to modify the payment module so it wouldn't add this subtotal into the order total on the checkout preview.

All these changes are available in the bazaar repository.