Git Product home page Git Product logo

solidus_avatax's People

Contributors

adammathys avatar aitbw avatar athal7 avatar ericsaupe avatar exsuzme avatar hoyaboya avatar jhawthorn avatar jordan-brough avatar kamui avatar magnusvk avatar peterberkenbosch avatar philbirt avatar richardnuno avatar wbinnssmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solidus_avatax's Issues

[Rails 5 Deprecation] alias_method_chain is deprecated warnings

DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <top (required)> at /Users/djones/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/solidus_avatax-1df6862b0c1e/app/models/spree/order_contents_decorator.rb:23)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <top (required)> at /Users/djones/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/solidus_avatax-1df6862b0c1e/app/models/spree/order_contents_decorator.rb:24)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <top (required)> at /Users/djones/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/solidus_avatax-1df6862b0c1e/app/models/spree/order_contents_decorator.rb:25)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <top (required)> at /Users/djones/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/solidus_avatax-1df6862b0c1e/app/models/spree/promotion_handler/coupon_decorator.rb:10)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <top (required)> at /Users/djones/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/solidus_avatax-1df6862b0c1e/app/models/spree/tax/order_adjuster_decorator.rb:8)

Would be great to get these warnings cleared up.

hitting deprecation message: SpreeAvatax::TaxRateInvalidOperation - Spree::TaxRate#adjust should never be called when Avatax is present

block in adjust! () Users/jason/.bundle/ruby/2.1.0/bundler/gems/solidus-d7ac8e1285c8/core/app/models/spree/tax/item_adjuster.rb line 33:

        rates_for_item(item).map { |rate| rate.adjust(order_tax_zone(order), item) }

this line of code in solidus core appears to be calling deprecated method adjust found in Users/jason/.bundle/ruby/2.1.0/bundler/gems/solidus_avatax-31b8a15304be/app/models/spree/tax_rate_decorator.rb

this is happening for me when an order is moving from Shipping -> Delivery steps in checkout

full stacktrace here:

https://gist.github.com/jasonfb/a0416125155a0ac8718290c2d592f245

Rename "generate" methods

See discussion here.

It's surprising that SpreeAvatax::SalesInvoice.generate(order) modifies the order, rather than just creating an invoice. Something like SpreeAvatax::SalesInvoice.calculate_and_set_taxes(order) would probably be a better name.

There are at least three generate methods defined in solidus_avatax right now. We'd probably want to update all of them and deprecate the generate name.

Errors encountered when using admin trying to delete adjustments.

So posting here but I am on Spree 2.3.5 of the Bonobos fork with spree_avatax.
I am seeing a problem with the following workflow

  1. Customer service unlocks adjustments to modify an order.
  2. Customer service attempts to delete an adjustment
  3. Since the adjustment is unlocked the Spree::TaxRate#compute_adjustment(item) method is called which then raises an error as defined below
    def compute_amount(item)

    Avatax tax adjustments should always be in a closed state so Spree should never attempt to call this code

    raise SpreeAvatax::TaxRateInvalidOperation.new("Spree::TaxRate#compute_amount should never be called when Avatax is present")
    end

For a quick fix, I have changed this to:
def compute_amount(item)
item.amount
end

Which will just return the previously calculated tax, which should be correct.

Just wondering if this case was never considered or encountered as its very possible folks are managing customer service issues/refunds/adjustments in other ways?

Add timeouts and an enable/disable switch

We need to add timeouts and an enable/disable switch to solidus_avatax. (Avatax had an outage on Black Friday that caused us some pain.)

We want to be able to flip the disable switch or change the timeout length without having to restart our app.

Some options I can think of:

  1. Turn the existing SpreeAvatax::Config class into an ActiveRecord model and store these preferences in there.
  2. Add "preferences" to Spree::TaxRate:
class Spree::TaxRate
  preference :avatax_enabled, :boolean, default: true
  preference :avatax_timeout_seconds, :integer, default: 20
end

I think I prefer option 1. Option 2 feels a bit invasive to me. Any other recommendations or thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.