The issue 1735 <https://github.com/spree/spree/issues/1735> is still open,
so whats the suggested way of getting the promotion applied before
calculating tax?

Also, shouldn't tax after promotion be the default behavior? Is that not
the case for the US?

Thanks!

On Tuesday, July 3, 2012 12:25:29 AM UTC+5:30, Thomas von Deyen wrote:

I opened an issue. So maybe we could discuss this there:

https://github.com/spree/spree/issues/1735
--
You received this message because you are subscribed to the Google Groups "Spree" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/rrW0w8XvlyEJ.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Search Discussions

  • Jet at Jan 22, 2013 at 12:49 am
    Was not sure if this was really computing the tax incorrectly
    in Spree 1.3.2, but it really is!

    If an amount is $240, you give a 30% discount, the amount of sale is $168.

    However, if the tax rate is 10%,

    the amount of tax charged is $24

    instead of $16.80

    This is a very substantial problem for running promotions!

    Hope there are suggestions for correcting this.

    Thanks,

    Jet

    On Saturday, January 19, 2013 1:47:20 AM UTC-8, Jet wrote:

    Just checking in to see if anyone has given this some more thought and come
    up with some suggestions.

    At this time I am doing tax calculation solely through the state machine,
    after
    transition to payment state.

    I need to have a solution that takes a discount before applying tax,
    that is
    not the correct procedure.


    On Sunday, January 6, 2013 6:10:53 PM UTC-8, Ryan Bigg wrote:

    There isn't a suggested way right now. I don't know the answer to this
    problem.

    On Sun, Jan 6, 2013 at 12:30 AM, james wrote:

    The issue 1735 <https://github.com/spree/spree/issues/1735> is still
    open, so whats the suggested way of getting the promotion applied before
    calculating tax?

    Also, shouldn't tax after promotion be the default behavior? Is that not
    the case for the US?

    Thanks!

    On Tuesday, July 3, 2012 12:25:29 AM UTC+5:30, Thomas von Deyen wrote:

    I opened an issue. So maybe we could discuss this there:

    https://github.com/spree/**spree/issues/1735<https://github.com/spree/spree/issues/1735>

    --
    You received this message because you are subscribed to the Google
    Groups "Spree" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/spree-user/-/rrW0w8XvlyEJ.

    To post to this group, send email to spree...@googlegroups.com.
    To unsubscribe from this group, send email to
    spree-user+...@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/spree-user?hl=en.
    --
  • Jet at Jan 22, 2013 at 5:33 pm
    Since I am not setting a tax rate, does Spree then use Default Tax for
    calculations?

    That's what I assume.

    My tax calculation is hooked into the state machine:

    self.state_machine.after_transition :to => :payment,
    :do => :lookup_tax_cloud,
    :if => :tax_cloud_eligible?

    I created the following, similar to what John did but attempting to
    override default_tax:

    app/models/calculator/default_tax_decorator.rb

    with the following:

    Spree::Calculator::DefaultTax.class_eval do
    def compute(order)
    rate = self.calculable
    line_items = order.line_items.select { |i| i.product.tax_category ==
    rate.tax_category }
    adjusted_total = line_items.map(&:amount).sum + order.promotions_total
    line_items.empty? ? 0 : adjusted_total * rate.amount
    end
    end

    ...and the order_decorator.rb:

    Spree::Order.class_eval do
    def promotions_total
    (adjustments.eligible - adjustments.tax -
    adjustments.shipping).map(&:amount).sum
    end
    end

    I still am not getting the correct tax.

    Any suggestions or pointers greatly apprecaited.

    Thanks!

    Jet

    On Monday, January 21, 2013 4:49:26 PM UTC-8, Jet wrote:Was not sure if
    this was really computing the tax incorrectly
    in Spree 1.3.2, but it really is!

    If an amount is $240, you give a 30% discount, the amount of sale is $168.

    However, if the tax rate is 10%,

    the amount of tax charged is $24

    instead of $16.80

    This is a very substantial problem for running promotions!

    Hope there are suggestions for correcting this.

    Thanks,

    Jet
    On Monday, January 21, 2013 4:49:26 PM UTC-8, Jet wrote:

    Was not sure if this was really computing the tax incorrectly
    in Spree 1.3.2, but it really is!

    If an amount is $240, you give a 30% discount, the amount of sale is
    $168.

    However, if the tax rate is 10%,

    the amount of tax charged is $24

    instead of $16.80

    This is a very substantial problem for running promotions!

    Hope there are suggestions for correcting this.

    Thanks,

    Jet

    On Saturday, January 19, 2013 1:47:20 AM UTC-8, Jet wrote:

    Just checking in to see if anyone has given this some more thought and
    come
    up with some suggestions.

    At this time I am doing tax calculation solely through the state machine,
    after
    transition to payment state.

    I need to have a solution that takes a discount before applying tax,
    that is
    not the correct procedure.


    On Sunday, January 6, 2013 6:10:53 PM UTC-8, Ryan Bigg wrote:

    There isn't a suggested way right now. I don't know the answer to this
    problem.

    On Sun, Jan 6, 2013 at 12:30 AM, james wrote:

    The issue 1735 <https://github.com/spree/spree/issues/1735> is still
    open, so whats the suggested way of getting the promotion applied before
    calculating tax?

    Also, shouldn't tax after promotion be the default behavior? Is that
    not the case for the US?

    Thanks!

    On Tuesday, July 3, 2012 12:25:29 AM UTC+5:30, Thomas von Deyen wrote:

    I opened an issue. So maybe we could discuss this there:

    https://github.com/spree/**spree/issues/1735<https://github.com/spree/spree/issues/1735>

    --
    You received this message because you are subscribed to the Google
    Groups "Spree" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/spree-user/-/rrW0w8XvlyEJ.

    To post to this group, send email to spree...@googlegroups.com.
    To unsubscribe from this group, send email to
    spree-user+...@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/spree-user?hl=en.
    --
  • Matthieu at Jan 25, 2013 at 10:12 pm
    I'm having this issue too, if somebody has a working patch for Spree 1.3.1,
    he would be really cool to post it :)

    Thanks,
    Matt

    --
  • Jet at Jan 25, 2013 at 11:19 pm
    What Tax Calculator are you using?

    If you want to use the default tax calculator,

    I can create a patch for spree_promotion_tax;

    https://github.com/bluehandtalking/spree_promotion_tax.git

    so it will work with that and Spree v.1.3.x

    Cheers,

    Jet
    On Friday, January 25, 2013 2:12:24 PM UTC-8, Matthieu wrote:

    I'm having this issue too, if somebody has a working patch for Spree
    1.3.1, he would be really cool to post it :)

    Thanks,
    Matt
    --
  • Matthieu at Jan 26, 2013 at 10:58 am
    Thanks for your reply and help.

    Yes I'm using the default tax calculator, it would be awesome if you can
    fix that in your gem.

    Does it have to work with spree_tax_cloud gem and service ?

    Thanks again,
    Matt


    Le samedi 26 janvier 2013 00:19:47 UTC+1, Jet a écrit :
    What Tax Calculator are you using?

    If you want to use the default tax calculator,

    I can create a patch for spree_promotion_tax;

    https://github.com/bluehandtalking/spree_promotion_tax.git

    so it will work with that and Spree v.1.3.x

    Cheers,

    Jet
    On Friday, January 25, 2013 2:12:24 PM UTC-8, Matthieu wrote:

    I'm having this issue too, if somebody has a working patch for Spree
    1.3.1, he would be really cool to post it :)

    Thanks,
    Matt
    --
  • Jet at Jan 27, 2013 at 6:24 am
    I have pushed up a branch,

    1-3-default_tax

    which is at

    https://github.com/bluehandtalking/spree_promotion_tax.git

    This should correctly account for taxing promotions correctly.

    You will need to use the master branch if you wish to use it
    with SpreeTaxCloud

    Cheers,

    Jet
    On Saturday, January 26, 2013 2:58:44 AM UTC-8, Matthieu wrote:

    Thanks for your reply and help.

    Yes I'm using the default tax calculator, it would be awesome if you can
    fix that in your gem.

    Does it have to work with spree_tax_cloud gem and service ?

    Thanks again,
    Matt


    Le samedi 26 janvier 2013 00:19:47 UTC+1, Jet a écrit :
    What Tax Calculator are you using?

    If you want to use the default tax calculator,

    I can create a patch for spree_promotion_tax;

    https://github.com/bluehandtalking/spree_promotion_tax.git

    so it will work with that and Spree v.1.3.x
    Cheers,

    Jet
    On Friday, January 25, 2013 2:12:24 PM UTC-8, Matthieu wrote:

    I'm having this issue too, if somebody has a working patch for Spree
    1.3.1, he would be really cool to post it :)

    Thanks,
    Matt
    On Saturday, January 26, 2013 2:58:44 AM UTC-8, Matthieu wrote:

    Thanks for your reply and help.

    Yes I'm using the default tax calculator, it would be awesome if you can
    fix that in your gem.

    Does it have to work with spree_tax_cloud gem and service ?

    Thanks again,
    Matt


    Le samedi 26 janvier 2013 00:19:47 UTC+1, Jet a écrit :
    What Tax Calculator are you using?

    If you want to use the default tax calculator,

    I can create a patch for spree_promotion_tax;

    https://github.com/bluehandtalking/spree_promotion_tax.git

    so it will work with that and Spree v.1.3.x

    Cheers,

    Jet
    On Friday, January 25, 2013 2:12:24 PM UTC-8, Matthieu wrote:

    I'm having this issue too, if somebody has a working patch for Spree
    1.3.1, he would be really cool to post it :)

    Thanks,
    Matt
    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedJan 5, '13 at 1:31p
activeJan 27, '13 at 6:24a
posts7
users3
websitespreecommerce.com
irc#RubyOnRails

3 users in discussion

Jet: 4 posts Matthieu: 2 posts James: 1 post

People

Translate

site design / logo © 2022 Grokbase