Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Wesley de Roo 38 posts 142 karma points
    Jan 20, 2015 @ 10:35
    Wesley de Roo
    0

    How to approach different tax values in the same category/shop

    We are working on a webshop with Merchello and we are not sure how to approach different tax values in the same category/shop. For example food is 6% and clothing 21%.

    Is it possible to extend the product with values or datatypes, like a Umbraco Document Type? Or is the a taxprovder the best choice, and how to match the product with the different tax?

    Thank in advance for any advice. Wesley

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 20, 2015 @ 17:34
    Rusty Swayne
    0

    Hi Wesley,

    I think you should probably do this in a Taxation provider. You could consider adding a DataType that would allow you to assign the tax code at a category or product level and then add it to the extended data collection when you add the item to the basket. Then in your tax provider, look for the extended data code and apply whatever tax rule you need.

    You could follow the pattern of the fixed rate tax provider: Merchello.Core.Gateways.Taxation.FixedRate. Just make sure to sub class the base classes and add the GatewayProviderActivationAttribute and you will see it resolve and become available in your back office.

    Does this help?

  • Wesley de Roo 38 posts 142 karma points
    Jan 21, 2015 @ 09:06
    Wesley de Roo
    1

    Hi Rusty,

    Thank you for giving a direction.

    I have to look at the code of the taxation provider and just start coding.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 21, 2015 @ 15:32
    Rusty Swayne
    0

    Sure - let me know if you need help getting going =)

  • Wesley de Roo 38 posts 142 karma points
    Jan 26, 2015 @ 15:14
    Wesley de Roo
    0

    Hi Rusty,

    I've started with a vartax provider (based on the fixed tax and some info from the jartax provider), but i'm stuck. It's shows up in the merchello backoffice and is active. I've added a datatype to select a tax value on a umbraco product, that come's nicely into the basket with extended data when added. I'm able to get the values when looping the items in CalculateTaxForInvoice (they show up in the log). But after that i'm getting a error in SalePreparationBase.cs line 307. And i don't know why, could you help.

    Source is on: https://github.com/wderoo/Merchello.Plugin.Taxation.VarTax

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 26, 2015 @ 23:42
    Rusty Swayne
    0

    Hi Wesley,

    Line 307 is just the Attempt of an invoice creation coming back as failed. My guess is there is something going on in the InvoiceBuilder task chain (probably in the ApplyTaxesToInvoiceTax task).

    Will I be able to step through without your data type or do I need that too?

  • Wesley de Roo 38 posts 142 karma points
    Jan 27, 2015 @ 11:00
    Wesley de Roo
    0

    Hi Rusty,

    It's only outputted in the log for now in the CalculateTaxForInvoice in VarTaxTaxationGatewayMethod. So you should step through the whole process without problems. In the solution, the kitten sample site is included with the datatype modification.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 28, 2015 @ 02:46
    Rusty Swayne
    0

    Ah - ok. I'll give it a go tomorrow.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 29, 2015 @ 05:35
    Rusty Swayne
    0

    Hi Wesley,

    Just wanted to give you the heads up that I am looking at your solutions, but none of the dlls were included in the git repository so I am trying to get it up and running based on version references in the web.config ... so I'm checking it out, but it is a bit slow going =)

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 29, 2015 @ 07:01
    Rusty Swayne
    0

    Hey Wesley,

    I've got it going and see where you are running into problems. In the code you are trying to use the FixedRateTaxCalculationStrategy which is meant to handle a single baseTaxRate for each taxable item and (I think) you need to change the base tax rate based on whatever data type value you've defined.

    If you have a look at Merchello.Core.Gateways.Taxation.FixedRate.FixedRateTaxCalculationStrategy I think you'll see what I mean.

    Probably the best way to proceed will be to make your own taxation strategy ... VarTaxCalculationStrategy(?) and instantiate that in your VarTaxTaxationGatewayMethod. You could even skip the Activator bit and simply new it up ... OR if you want to make things even more straight forward, simply eliminate the strategy bit altogether and do the operations within the method itself as you don't really need that level of abstraction.

    Can you jot down a description of how exactly each item should be taxed based on the var tax value. If it's as simple as the var tax value is a % rate that needs to be applied to each taxable line item and the tax total is the sum of those amounts I think your pretty close.

    Be happy to Skype with you about it as well if you need. Ping me on Twitter and we can set it up if your interested.

  • Wesley de Roo 38 posts 142 karma points
    Jan 29, 2015 @ 14:45
    Wesley de Roo
    0

    Hmm, sorry about the dll's. I'm not used to work with github. Glad you worked it out.

    In short it is exactly as you described: it's as simple as the var tax value is a % rate that needs to be applied to each taxable line item and the tax total is the sum of those amounts. And we want to build a option for the price in the merchello product if it is included or excluded with tax.

    I will do some more digging first before requesting more help.

    Thank you for helping. Keep you posted.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 29, 2015 @ 18:24
    Rusty Swayne
    0

    Hi Wesley,

    I found some time to get the tax method actually calculating taxes. I've submitted a pull request to your repository - https://github.com/wderoo/Merchello.Plugin.Taxation.VarTax/pull/1

    I went the more straight forward route and completely removed the strategy. You will need to review the code and verify that the calculations are being done correctly as I did not test the results beyond getting the invoice to display and verifying a value was returned - but it spot checked ok.

    I tried to add a lot of comments in the code so that you could follow it more easily. Let me know how it goes =)

  • Wesley de Roo 38 posts 142 karma points
    Jan 30, 2015 @ 10:45
    Wesley de Roo
    1

    Hi Rusty,

    Thnx! Was a big surprise this morning when receiving the pull request. Gives the right result. I'm gonna read your code and comments to understand it better. When needed i make improvements and update the git with instructions how to implement.

  • Tito 314 posts 623 karma points
    May 23, 2016 @ 17:17
    Tito
    0

    Hi, i am using this plugin from https://github.com/wderoo/Merchello.Plugin.Taxation.VarTax.

    It was working OK but now it does not work, i think it is because i have updated to Merchello 1.14.3. Have activated the plugin in Merchello backoffice but never gets called VarTaxLineItemVisitor nor the Visit method. Why could this be? do i have to add something to merchello.config?

    Thanks!

  • Tito 314 posts 623 karma points
    May 24, 2016 @ 09:44
    Tito
    0

    I set the taxes to be applyed to the product, and store product without taxes in Merchello. But when i add a product to the basket the plugin is not fired and items are showed without taxes. How can i configure this? Do i have to store items with taxes applied in merchello?

  • Tito 314 posts 623 karma points
    May 24, 2016 @ 12:57
    Tito
    0

    I have partially solved it by setting each product with the price with tax included. But at invoice, total price is summing the taxes so if:

    Total invoice price with taxes should be 50. Taxes = 5.

    the invoice is generating with total as 55 when should be 50.

    My questions are: How should i store my prices in merchello, tax included? If so, how can i configure my tax provider to tell merchello that products has included taxes?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 24, 2016 @ 16:13
    Rusty Swayne
    0

    Hey Tito, I would have to look at the VarTax provider again to see if it will work with product based taxation.

    The tax method must implement ITaxationByProductMethod which defines the method:

    /// <summary>
    /// Defines a <see cref="ITaxationGatewayMethod"/> that can be used for product based taxation.
    /// </summary>
    public interface ITaxationByProductMethod : ITaxationGatewayMethod
    {
        /// <summary>
        /// Calculates taxes for a product.
        /// </summary>
        /// <param name="product">
        /// The <see cref="IProductVariantDataModifierData"/>.
        /// </param>
        /// <returns>
        /// The <see cref="ITaxCalculationResult"/>.
        /// </returns>
        IProductTaxCalculationResult CalculateTaxForProduct(IProductVariantDataModifierData product);
    }
    

    The fixed rate provider is setup to do this. Can you take a look at configuring that to see how it works and verify that the VarTax method implements that method?

    When you say it was working "OK" before, did you have it set to product based taxation - or did you have it set to invoice when it was working?

    Extending VAT based taxation is something we have been talking about off and on, but have a few new features we are working on before we can look at that. I would love some help with this and will find the time to coordinate with people who are interested in working on this so we can get it into the Core more quickly.

  • Tito 314 posts 623 karma points
    May 25, 2016 @ 10:00
    Tito
    0

    Hi Rusty, it does not implement "CalculateTaxForProduct" only "CalculateTaxForInvoice". I have copied the fixed tax method:

    public virtual IProductTaxCalculationResult CalculateTaxForProduct(IProductVariantDataModifierData product)
            {
                var baseTaxRate = TaxMethod.PercentageTaxRate;
    
                var taxRate = baseTaxRate > 1 ? baseTaxRate / 100M : baseTaxRate;
    
                var priceCalc = product.Price * taxRate;
    
                var salePriceCalc = product.SalePrice * taxRate;
    
                return new ProductTaxCalculationResult(TaxMethod.Name, product.Price, priceCalc, product.SalePrice, salePriceCalc, baseTaxRate);
            }
    

    But it does not reach to it. How does it work and when it is reached? When i told it worked it was configured to Product, not invoice. I stored the prices without tax in Merchello. Is it the right way? may be it was working only at invoice level, not at basket, i cant remember.

    My problem is:

    If i store in Merchello price + tax: it shows ok but invoice total is wrong. If i store in Merchello base price: it shows wrong price (want to show with tax included) in product page. But invoice is generated ok.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 25, 2016 @ 13:58
    Rusty Swayne
    0

    Once you've extended the Tax Method you need to assign it to be the tax method used in product taxation in the Gateway Providers Taxation tab.

    Fixed Rate Provider

  • Tito 314 posts 623 karma points
    May 25, 2016 @ 15:36
    Tito
    0

    I think that may be the problem, i had already selected Vartax but dont have that check: "include in product pricing". How can i get that to render in backoffice? In merchello settings i have set taxing to Product, not Invoice.

    By the way, something is wrong with taxes. I have another project that use "Fixed rate tax provider" and have checked "include in product pricing". Everything is right but when generating the invoice it says zero taxes. Although taxes are included in product price, the invoice should reflect the taxes to the user (he is paying them).

    This would be an example:

    Fixed tax 21% Shipping = 10€ (not taxable). Product price with tax included: 560€

    So base price would be: 560/1,21=462,81€ So tax would be 462,81€ x 0,21 = 97,19€

    Invoice with shipping not taxable:

    Product: 560€ Tax: 97,19€ Shipping: 10€ Total: 570€.

    Invoice with shipping taxable (tax included):

    Product: 560€ Shipping: 10€ Tax: 98,92€ Total: 570€.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 25, 2016 @ 18:40
    Rusty Swayne
    0

    The tax breakdown is stored in each of the product line items extended data. If you want to include it in your view, you can sum the values stored in the extended data collection.

    Opinions as to whether or not to include them as an actual line item seem to vary greatly depending on country. In the US we do not have a VAT system so I had to ask the community =)

    I had not thought of this before, but it may make sense to provide a directive on the back office Sales Overview page to show this breakdown. We could also add an extension method to do the extended data summation. I think this would accomplish what you are looking for ... no?

    The biggest deficiency that I know of thus far is the lack of support for being able to put products in Tax Categories so the VAT can be applied at different percentage values based on tax category. I think this would be best done with a new tax provider and a small addition to product variants. Again, this would be a great community led project that we could either oversee or assist with as it deals with issues in taxation we don't really deal with day by day but at the same time know is extremely important to a decent sized group of the Merchello community and it would make a great Core feature.

  • Tito 314 posts 623 karma points
    May 26, 2016 @ 12:41
    Tito
    0

    Thanks @Rusty,

    To fully understand the issue, can i make something to render that checkbox (include in product pricing) in the tax manager for this custom tax provider? or is it hardcoded for the fixed tax provider?

    Setting that check to true, i understand should solve the issue for the view and the "CalculateTaxForProduct" should be called. If not, what is the aim of "CalculateTaxForProduct"?

    If i should take the extended data collection way, could you elaborate on this?

    For the invoice, i guess i could make a custom notifier to render the invoice as i want.

    Another stores like Nopcommerce define tax categories, i think that could be the correct way to do it. Merchello could have two tax providers in the Core: the fixed one and a tax category.

    This would be my idea:

    The tax category one could define some categories, that could be adjusted as now, by country and region. Then, i could set a tax category in the merchello product. For instance, i set tax category for spain, then it would render the categories created previously and then set the fees there.

    For the shipping fees, if i set that they are taxable (as now merchello does), in the shipping manager i could set a shipping method by country/region (as implemented right now) and then set the fee and the tax (it would be a fixed tax).

    I think that could solve all the possibilities. Then for the invoice (in backoffice), i understand that, although tax are included in products, you must not read "Taxes 0" in the summary. It should show the total taxes (after the shipping costs, so if shipping have taxes they are there too).

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 26, 2016 @ 15:26
    Rusty Swayne
    0

    Hey Tito,

    The checkbox will render if the taxation provider implements : ITaxationByProductProvider.

    A true setting keeps the provider taxation method instantiated in the TaxationContext cache so that when products render the CalculateTaxForProduct can be quickly accesses to adjust the pricing via the "DataModifier" chain which is executed within the MerchelloHelper or the CustomerItemCacheBase (base of the basket/Wishlist).

    When the product pricing data is modified in the IncludeTaxInProductPriceDataModifierTask https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web/DataModifiers/Product/IncludeTaxProductDisplayPriceModifier.cs#L42

    a record of the modification is created and then serialized to the ExtendedDataCollection https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Core/Models/DataModifierExtensions.cs#L68

    Each product line items with modified pricing should have at least one of these modified data records in the ExtendedDataCollection.

    Your description of the second tax provider roughly resembles what we've been internally chatting about albeit I'm not sure we ever dived down to the region level. Do the regions have a completely separate tax rate or are they in addition to the country tax rate per category?

    Also, the country is always the country of origin ... right? This differs in the US where in many cases we have to use the destination address (where it ships to) to calculate the taxes. There would be some head scratching required if there are instances where taxes added to products were based on delivery location as we would need the delivery address up front ... it does not make sense to me how that would work ...

  • Tito 314 posts 623 karma points
    May 26, 2016 @ 17:50
    Tito
    0

    Thanks Rusty, i am almost there.

    I have implemented that interface and now the checkbox appear, perfect!

    Now my articles render OK. The problem now is in my invoice summary. I prepare the invoice and get taxes and total:

    var invoice = checkoutManager.Payment.PrepareInvoice();
    model.Taxes = invoice.TotalTax();
    model.TotalInvoice = invoice.Total;
    

    The problem now is that invoice.Total is summing the taxes, and it should not as are already included in product price. Where could i change this behaviour?

    About your regions question, in Spain there are different tax categories and taxes change for the islands, I would tell that is a separate tax not an addition.

    The way i am doing it now is storing products in Umbraco nodes so i can create a tax property in my product and access them in my var tax provider searching for the detached content (i have the umbraco ID product there). If i needed i could create tax category nodes in Umbraco and relate to the product with a content picker. But I dont know how to adjust for regions, it now renders the "Include in product pricing" checkbox but cant select regions in edit mode, it does not render the checkbox for each region, do i have to implement some other interface?

    About the tax applied, for Spain i would look for the billing country and billing region, not the shipping addresss. Taxes must be showed on the invoice sent to the billing address, so it makes sense.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 26, 2016 @ 23:30
    Rusty Swayne
    0

    In product based taxation, a tax line item should not be created - so invoice.TotalTax() should be zero in that case since there should not be any tax line items. The tax is included in the product price.

    Here is the task the invoice builder uses https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Core/Chains/InvoiceCreation/CheckoutManager/ApplyTaxesToInvoiceTask.cs

    Note the condition at the start of the task checking this.CheckoutManager.Context.Settings.ApplyTaxesToInvoice which in product based taxation should be false.

    Make sense?

  • Tito 314 posts 623 karma points
    May 27, 2016 @ 10:09
    Tito
    0

    Thanks Rusty, now i know where is the problem. checkoutManager.Context.Settings.ApplyTaxesToInvoice was coming as true, although in merchello settings i set to product not invoice. What could be the reason?

    So i have modified my code as:

     var storeSettingService = MerchelloContext.Current.Services.StoreSettingService;
        bool applyTaxesToInvoice = storeSettingService.GetByKey(Merchello.Core.Constants.StoreSettingKeys.GlobalTaxationApplicationKey).Value == "Invoice";
        var settings = new CheckoutContextSettings()
         {
            ResetCustomerManagerDataOnVersionChange = false,
            RaiseCustomerEvents = false,
            EmptyBasketOnPaymentSuccess = true,
            ApplyTaxesToInvoice = applyTaxesToInvoice
        };
    var checkoutManager = this.Basket.GetCheckoutManager(settings);
    

    Now the invoice total is OK. As invoice.TotalTax() is zero i have done this:

    var taxationContext = MerchelloContext.Current.Gateways.Taxation;
    var tax = taxationContext.CalculateTaxesForInvoice(invoice, shipAd);
    model.Taxes = tax.TaxAmount;
    

    The only problem to solve now is how could adjust vartax for some regions. I would need to set it to zero for some regions. When i edit the regions it does not render the checkbox, only the textbox to adjust the ratio.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 27, 2016 @ 14:54
    Rusty Swayne
    0

    Hey Tito,

    In the fixed rate tax provider I handle the region overrides in the actual tax method but it requires a shipping address so it can get the country and from there figure out if it has any regions ...

    In your scenario, you need to do the override as your rendering the products correct. In that case, I would use the default warehouse address which is accessible through the WarehouseService (assuming you are using an origin based taxation - which is the only way I understand product based taxation could work since you don't know the destination when initially rendering the pricing).

    Warehouse Address on Shipping Configuration

    From there, if the Country had regions you could use them to override your tax settings when the data modifier kicks off if you applied the override in your CalculateTaxForProduct call.

  • Tito 314 posts 623 karma points
    May 30, 2016 @ 09:02
    Tito
    0

    Hi Rusty, yes, you are right, i guess it would be an origin based taxation. What method (and in what class) do i need to override to handle regions in backoffice? i cant see it in fixed rate provider..

    What i want is to check what regions can be taxed, other regions will have a zero tax. Now it does not render the checkbox:

    enter image description here

    If i click the pencil icon:

    enter image description here

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 30, 2016 @ 16:21
    Rusty Swayne
    0

    Hey Tito,

    In the FixedRateTaxMethod (for an invoice) there is a Strategy that gets loaded and passed to the base class.

     var typeName = MerchelloConfiguration.Current.GetStrategyElement(Constants.StrategyTypeAlias.DefaultInvoiceTaxRateQuote).Type;
    

    By default it loads: FixedRateTaxCalculationStrategy which is where the actual tax (with overrides) calculation happens: https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Core/Gateways/Taxation/FixedRate/FixedRateTaxCalculationStrategy.cs

    In your GatewayTaxMethod, I think you will want to override the regions in the

     public virtual IProductTaxCalculationResult CalculateTaxForProduct(...
    

    method but it would be done in a similar way.

  • Tito 314 posts 623 karma points
    May 31, 2016 @ 12:53
    Tito
    0

    Thanks Rusty, i can see the part where adjust the provinces:

    if (_taxMethod.HasProvinces)
                    {
                        baseTaxRate = AdjustedRate(baseTaxRate, _taxMethod.Provinces.FirstOrDefault(x => x.Code == TaxAddress.Region), extendedData);
                    }
    

    My problem is why it does not render the province checkbox in Merchello backoffice? if it does not render the checkbox i cant mark what provinces are taxed and what not. You can see in my captures in last post that a checkbox for each region is not rendered. In fixed tax it renders.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 31, 2016 @ 16:52
    Rusty Swayne
    0

    Ah, because the tax provider region editor is not being assigned the same way as the shipping providers (via an attribute) so you can't change it.

    What needs to happen is an editor view needs to be passed to the back office to load rather than the default view that is loading now - so it will take a bit of Angular to get it working.

    The attribute is already there GatewayMethodEditorAttribute - but it would need to be conditionally added in cases where regions are present.

    If you'd like to have a go I'd love a pull request, otherwise would you add that to the issue tracker as a feature request. I'll try to get it in for 2.1.0 but I'm under a big push to finish things up for CG ... only 10 days until I'm due to leave.

  • Tito 314 posts 623 karma points
    May 31, 2016 @ 17:20
    Tito
    0

    Thanks Rusty, i have created the issue:

    http://issues.merchello.com/youtrack/issue/M-1052

    Meanwhile i will try to figure a way around.. i will let you know.

  • Ole Martin Bakke 112 posts 624 karma points
    Jun 20, 2016 @ 09:12
    Ole Martin Bakke
    0

    Hi, Tito.

    Did you get the VarTax provider working? Looks like you have done some improvements to it, are they available on GitHub or something?

    Thanks, Ole Martin

  • Tito 314 posts 623 karma points
    Jun 20, 2016 @ 09:38
    Tito
    0

    Hi Ole, i dont have it on GitHub. I only took the wdroo project and adapted it to my needs, you can grab it here:

    https://github.com/wderoo/Merchello.Plugin.Taxation.VarTax

  • Ole Martin Bakke 112 posts 624 karma points
    Jun 20, 2016 @ 09:47
    Ole Martin Bakke
    0

    Ok, thanks.

  • Tito 314 posts 623 karma points
    Nov 22, 2016 @ 10:32
    Tito
    0

    Hi Rusty, i need to make a modification to the FixedRate tax provider and i have made a new custom tax provider similar to VarTax. How do i make to once i save the tax method to a country have rendered the textbox to set the tax rate?

    The motivation for this modification, is that although i set to include tax in product price, if my tax is for instance 21% and the product with taxes included are 100€, when i show taxes in my checkout proccess i do this:

    var invoice = checkoutManager.Payment.PrepareInvoice();
    var taxationContext = MerchelloContext.Current.Gateways.Taxation;
    var tax = taxationContext.CalculateTaxesForInvoice(invoice, shipAd);
    

    What this gets is 100€x0,21=21€ and thats wrong. The right one is (100€/1,21) to get the base and then x 0,21 = 17,35€.

    Thanks.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Nov 22, 2016 @ 17:35
    Rusty Swayne
    0

    Hey Tito,

    I'm having trouble following what you're trying to do ... are you trying to get the sub-total (without tax) for each line item and then include the tax amount as a separate line item for the invoice, but have the requirement that the taxes must be included in the product price when products are rendered?

    If this is the case, each line item will have the tax break down in the extended data collection - which includes the original (not taxed price) and the taxes applied as well as a discount adjustment (if applicable). These values can be used for that.

  • Tito 314 posts 623 karma points
    Nov 22, 2016 @ 18:31
    Tito
    0

    @Rusty, not exactly.

    I have set the fixedrate tax method and tax included on product price. Inside Merchello i have stored base prices. Then prices are calculated ok on the frontend.

    On the checkout page, i have a summary box with all the items in the basket. Below this i want to show total taxes applied and total of the order. The problem is that in the invoice taxes are 0 because the general setting has "taxes are applied to product" instead than to invoice. To solve this i call a method that returns this:

    var invoice = checkoutManager.Payment.PrepareInvoice();
    var taxationContext = MerchelloContext.Current.Gateways.Taxation;
    var tax = taxationContext.CalculateTaxesForInvoice(invoice, shipAd);
    

    This way i calculate order taxes to show the customer. This "CalculateTaxesForInvoice" method dont works well because it takes the total item price as the base price, and dont take into account that taxes are included.

    So, my option was to create another "FixedRate2" and modify the "CalculateTaxesForInvoice". When i do this, based on the vartax tax method implementation, i cant render the textbox when saving the method to a country. I think i need some editor option or some angularjs trickery...

    Now i have solved the problem this way: instead of creating a new tax method i have created my own "FixedRateModTaxCalculationStrategy", modified its "CalculateTaxesForInvoice" for my purpose and set this new strategy in the merchello.config.

    The only problem is that in the backoffice and in the email notification taxes are 0. I guess its the way Merchello works if i set taxes are applied to Product instead of to Invoice.. :(((

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Nov 22, 2016 @ 19:01
  • Tito 314 posts 623 karma points
    Nov 23, 2016 @ 09:18
    Tito
    0

    Yeah, i saw that post at first but it has the same problem that shows 0 taxes in the invoice at backoffice and email notification.

    I dont understand why Merchello does it that way. The option to set product include taxes only goal is to show prices with taxes included in the frontend. It does not mean that you dont want to show taxes in the invoice. It would make more sense to be a checkbox instead of a dropdown, so you could choose "taxes included in Product" and "taxes included in Invoice" so the invoice would be:

    subtotal 100€ taxes: 21€ total 100€ (it would not sum as the subtotal already includes taxes)

    The truth is the user is paying the taxes so it makes sense to show him the amount.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Nov 23, 2016 @ 17:16
    Rusty Swayne
    0

    I think it would work to simply include a new directive in the sales overview that shows the tax breakdown when taxes are included in the product pricing and have a couple of extensions that would allow the implementer to display the tax total in the invoice and in the email.

    That way it is up the the person to implement them (for customer presentation) and it would just be there in the back office.

  • Tito 314 posts 623 karma points
    Nov 23, 2016 @ 18:33
    Tito
    0

    Hi Rusty, I think that would work.

    I have another question. I have shipping requirements for Spain and Portugal, the rest of countries are equal. I have done that right in the backoffice.

    But on the tax provider configuration, i need to set taxes for all the UE countries. In my merchello version (1.14.3) to add a country i have to add it from the shipping configuration, i cant add it to the taxes configuration.

    Once is added from the shipping tab, it appears in the taxes tab. So i have added each UE country in the shipping tab and then moved to the taxes tab, set the tax and back to the shipping tab and deleted the country as i want them in the elsewhere configuration (all have the same shipping options).

    I think we need an "add country" in taxes tab.

    Thus, when i configure tax in a country and check "include in product pricing" all the other countries are unchecked. I dont understand the behaviour here. If i want all the countries checked how do i do it? i have checked and saved each one, hope this works.

    I have a mess understanding why do we have an "include in product pricing" as a global setting and a setting for each country in tax provider configuration.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Nov 23, 2016 @ 19:19
    Rusty Swayne
    0

    Hey Tito,

    There is actually an active effort to allow for shipping zones - which allows you to group different countries and apply shipping rates to a group rather than having to do it by individual country. Note, ELSE will still work for any country not assigned to a zone.

    Before this is released, as you've mentioned we will need to look at the tax setup as it is based off the country (but likely will have the option to use a zone as well ... not 100% on this yet).

    http://issues.merchello.com/youtrack/issue/M-1074

Please Sign in or register to post replies

Write your reply to:

Draft