VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: lindapowers on March 08, 2017, 08:27:12 AM

Title: Order edit backend fields
Post by: lindapowers on March 08, 2017, 08:27:12 AM
Quote from: AH on March 07, 2017, 11:00:34 AM
QuoteBut always, when you write something in a field, it is not overriden. It is imho a lot better than in vm1.1, but seems that even moderators dont know about.

Check back to old VM1 @milbo - "imho a lot better" - is not the same as user friendly

Select an existing product -
Add 1 or a qty of that product to the order
Change the  net, gross for the line if required and recalculate. 
Store the correct SKU / Product ID  in the order details
Update the order totals to f=reflect the product changes.


However - this has been raised before and we have moved no further with this function (IMHO)

http://forum.virtuemart.net/index.php?topic=124027.msg423904#msg423904 (http://forum.virtuemart.net/index.php?topic=124027.msg423904#msg423904)
http://forum.virtuemart.net/index.php?topic=131253.msg463599#msg463599 (http://forum.virtuemart.net/index.php?topic=131253.msg463599#msg463599)





In one of the linked post you mention people that say you should not edit and order due to legal reasons etc and Im definetly one of them but that said I do understand the need of editing and order.

However I'm more worried by the fact that some elements are not editable at all.

- You can't change payment methods.
- You can't change shipment methods.
- You can't edit custom fields.
- You can't edit the tax method.

So even if the calculations get fixed the order still is not editable 100%

For VM1-2 we used in the past Artio Invoices which allowed editing the order completely and even creating new orders from the backend but have no clue if this still would do the job with VM3, back in the day it was really simple.

Title: Re: Order edit backend fields
Post by: AH on March 08, 2017, 09:09:28 AM
I moved this post - Lindapowers

So you have a topic to yourself regarding editing shipping etc

Which is still editing an order and something you say you do not agree with  :)

QuoteIn one of the linked post you mention people that say you should not edit and order due to legal reasons etc and Im definetly one of them
Title: Re: Order edit backend fields
Post by: lindapowers on March 08, 2017, 13:53:15 PM
So im trying to help you and you create a topic for myself?

Bah Quit as moderator pls
Title: Re: Order edit backend fields
Post by: AH on March 08, 2017, 14:42:27 PM
I created a topic for you as you decided to talk about a different set of items in order editing which was off the topic for the original post relating to order product lines.

QuoteHowever I'm more worried by the fact that some elements are not editable at all.

- You can't change payment methods.
- You can't change shipment methods.
- You can't edit custom fields.
- You can't edit the tax method.

So even if the calculations get fixed the order still is not editable 100%

Splitting the topic gives you more of a chance of getting your "worries" answered specifically.

QuoteBah Quit as moderator pls

:'(




Title: Re: Order edit backend fields
Post by: jenkinhill on March 08, 2017, 14:55:34 PM
@lindapowers abuse of forum moderators at any time is unacceptable behaviour.
Title: Re: Order edit backend fields
Post by: lindapowers on March 08, 2017, 17:21:12 PM
I have no worries since we don't even use these feature but still see the need you and others have for improving it.

Still I find logical to talk about the general issue that most users will face which IMO is the fact that many of the elements of an order are not editable till this day including the calculation issues yes, cause the calculation itself for editing the order is just a small part in a bigger issue which could solve 5% of problems.

Nothing more to add, you can delete the topic anyway.
Title: Re: Order edit backend fields
Post by: nokedli99 on February 20, 2018, 16:06:32 PM
In 2018, and all of these problems still exist!

- You can't change payment methods.
- You can't change shipment methods.

I think its must be a basic feature in all simple ecommerce solution.
Title: Re: Order edit backend fields
Post by: jenkinhill on February 20, 2018, 17:55:01 PM
In many countries there are legal rules to be followed when editing orders and replacing invoices. Since the last stable release there has been more work for order/invoice handling done to move towards compliance with French legal requirements.
Title: Re: Order edit backend fields
Post by: Robert_ITMan on July 31, 2018, 15:41:38 PM
This seems to be the right topic for me to point out that my clients DO NEED TO EDIT THE ORDERS and since upgrading to VM 3 I have needed to do more unpaid work for them because any changes to the orders need additional editing directly in the database so the taxes and totals are correct. I have spent much time trying to see where the issue is and to make sure there are no settings that will make this work nor does it matter if I check 'calculate' and leave certain fields to be calculated blank nor does it matter if I have the taxes calculated 'per bill' or 'per product' ... so I can confirm this needs to be fixed by VirtueMart as it does not work. Any time we edit an order we need to go into the database and edit the amounts in both #__virtuemart_orders and #__virtuemart_order_calc_rules to get the order totals to show correctly (also every time the order is edited a new blank history is created so I also delete these extra lines in #__virtuemart_order_histories).

Happy to also discuss the legal implications here too - that is also a relevant discussion in this topic too, right? Legally: orders (sales orders) can be changed again and again - invoices can not be changed, once an invoice is issued it can not be edited or changed... adjustments to an invoice need a new transaction to balance the clients account.
Title: Re: Order edit backend fields
Post by: AH on July 31, 2018, 15:54:52 PM
QuoteI have spent much time trying to see where the issue is and to make sure there are no settings that will make this work nor does it matter if I check 'calculate' and leave certain fields to be calculated blank nor does it matter if I have the taxes calculated 'per bill' or 'per product' ... so I can confirm this needs to be fixed by VirtueMart as it does not work.

Firstly - you need to provide a use case for anyone to determine what you are doing

Secondly - I use 3.2.15 and order editing "WORKS" depending on what you are trying to do.

Ensure you hit calculate on rows that you change and change one field only - leaving others blank - else it will take the current value in that field

You can change payment charges and shipment charges - but not the methods.

It is up to the business owner to handle legal obligations and requirements IMHO.

Title: Re: Order edit backend fields
Post by: Robert_ITMan on July 31, 2018, 20:15:36 PM
AH - thanks for quick reply! Unfair you are using dev version 3.2.15 – current version is 3.2.14 ...are you saying this is now fixed and if so what was fixed, where are the release notes / activity for this?

My 'use case' is as standard as it gets when updating an order item and the calc rules are not updated and the order total is changed to be without taxes. For example 'use case 1' – I have an order with one item and I want to update the product name from 'product 1' to 'Product 1' so I click edit > make the change > click save > notice the total no longer includes the tax. For another example 'use case 2' - I have an order with 2 line items and want to refund one of the items, so I click edit > change the status and the amount of the item to be refunded to $0.00 > click save > notice order subtotal is correct, order tax is not changed, order total does not include tax.
Title: Re: Order edit backend fields
Post by: AH on July 31, 2018, 22:20:05 PM
Quoteif so what was fixed

For your use cases - For me - ensure the calculate checkbox is ticked if you change anything

Quote'use case 1' – I have an order with one item and I want to update the product name from 'product 1' to 'Product 1' so I click edit > make the change > click save > notice the total no longer includes the tax.
In 3.2.15 - ensure the checkbox is ticked for the item and the total ( I do this regardless of what change I perform!)

Quote'use case 2' - I have an order with 2 line items and want to refund one of the items, so I click edit > change the status and the amount of the item to be refunded to $0.00 > click save > notice order subtotal is correct, order tax is not changed, order total does not include tax.

In 3.2.15 - ensure the checkbox is ticked for the item and the total and set 0 for the product price - clear the remaining fields for that order line

In fact I have done an override to ensure that every item checkbox is always ticked just in case

When I edit a line I ensure that if it is a value - I just use the product price field - and clear out the rest - you can also use the product price with tax and clear out the rest -   The calculate checkbox is key for such adjustment

The totals are calculated when the Total checkbox is set

Unsetting the checkboxes - is telling VM that the entries shown are what you want - it does not then try and calculate or do anything sensible with them

This is all tested in 3.2.15.
Title: Re: Order edit backend fields
Post by: AH on July 31, 2018, 22:22:15 PM
Forgot to mention

Also other use case I have used/tested -

deleting a line
adding a line
changing shipping price to value and to 0 (happens a lot!!!)
Title: Re: Order edit backend fields
Post by: Robert_ITMan on August 01, 2018, 23:27:40 PM
AH - again thank you for replying so quickly and confirming this should work and how the calculate checkbox is supposed to work!

Can you provide your override php file(s) and/or code and/or some info as to what you fixed.

Looks to me like editing order is not updating the table data correctly no matter what I try.

Sorry to report it does not work for me and I can now confirm the issue is the same for me in VM 3.2.12 and 3.2.14 and 3.2.15(9877)

Same example 'use case 1' showing the totals, maybe this will help:

BEFORE - order totals are correct as received / unedited:
SubTotal:   $175.00              $0.00    $0.00    $175.00
TAX (13%)       $22.75       $22.75
Shipment Fee:    $0.00              $0.00         $0.00
Payment Fee:    $0.00              $0.00         $0.00
TAX (13%)       $22.75    
Total:                   $22.75    $0.00    $197.75

AFTER - I have an order with one item and I want to update the product name from 'product 1' to 'Product 1' so I click edit > make the change > click save > notice the total no longer includes the tax.
> I then try again and again and again > edit > delete all tax fields or all but one (tried each) > select calculate > save >  notice the total no longer includes the tax:
SubTotal:   $175.00              $0.00    $0.00    $175.00
TAX (13%)       $22.75       $22.75
Shipment Fee:    $0.00              $0.00         $0.00
Payment Fee:    $0.00              $0.00         $0.00
TAX (13%)       $22.75    
Total:                   $0.00    $0.00    $175.00

> I then try again > edit > enter tax in last line > un-select calculate > save > notice no tax in total and tax shows correctly:
SubTotal:    $175.00              $0.00    $0.00    $175.00
TAX (13%)      $22.75       $22.75
Shipment Fee:    $0.00              $0.00         $0.00
Payment Fee:    $0.00              $0.00         $0.00
TAX (13%)      $22.75    
Total:                   $22.75    $0.00    $175.00

Same issue no matter my settings in the Taxes & Calculation Rules, tried changing Ordering (0, 1, 10) tried changing Type of Arithmetic Operation (Tax per program, Tax per Bill).

Same issue no matter if any related VM and VirtueMart plugins are disabled.

Title: Re: Order edit backend fields
Post by: AH on August 02, 2018, 09:40:20 AM
I cannot provide overrides

Order editing was updated in VM 3.2.15 therefore I doubt that it work for you in your current version.

One caveat to all of this is that I tested 3.2.15 using product VAT tax.

I can only suggest that you setup a test environment on your current version - then update that to 3.2.15 and test your use cases.  That is what I had to do.

Title: Re: Order edit backend fields
Post by: Jörgen on August 02, 2018, 10:08:35 AM
Hello

I can confirm some odd behaviour on 3.2.15 if you click calculate and use custom fields, otherwise it looks ok (unchanged).
I loose both VAT and extra cost from custom field. (Both VAT and custom field clearly show ZERO)

But in your case there is something wrong in another way, You seem to see the VAT, mine is ZERO, using multi variant products, with extra custom fields.

Do this product use custom fields to calculate the total cost ?
How Do You specify VAT, I use calculation rule and default rule

If I use a "normal" product without multi variant och children, I get some similar results. VAT = 0 after save and calculate ticked.
Mixing this with a discount results in even more unpredictable prices. VM 3.2.15


regards

Jörgen @ Kreativ Fotografi
Title: Re: Order edit backend fields
Post by: Robert_ITMan on August 02, 2018, 14:21:24 PM
Jörgen - thanks for confiming this issue!
Quote from: Jörgen on August 02, 2018, 10:08:35 AM
Do this product use custom fields to calculate the total cost ?
How Do You specify VAT, I use calculation rule and default rule
Yes - I use custom fields, but I don't see how that affects this issue as the product totals and order subtotal are OK
I use Tax per Bill on all but one site which I am now using 'Tax per product' as that is the only way I can allow certain products to be tax exempt (I do not use VAT)
Tax is +%
I also have calc rules for certain shopper groups, for example shopper group '2 products' receives 10% discount
? I do not see any setting for default (maybe because I only have one tax) ?

Quote from: AH on August 02, 2018, 09:40:20 AM
setup a test environment on your current version - then update that to 3.2.15 and test your use cases.

I did that, you missed my note above:
Quote from: Robert_ITMan on August 01, 2018, 23:27:40 PM
confirm the issue is the same for me in VM 3.2.12 and 3.2.14 and 3.2.15(9877)

My test site is using VM 3.2.15 on Joomla! 3.8.11 PHP 7.1.2 MySQL 5.5.5
Title: Re: Order edit backend fields
Post by: AH on August 03, 2018, 10:43:04 AM
Quote"If I use a "normal" product without multi variant och children, I get some similar results. VAT = 0 after save and calculate ticked.
Mixing this with a discount results in even more unpredictable prices. VM 3.2.15"

When you change an order in admin - it does not function like adding a product to an order in FE

DO NOT expect this edit feature to do all the calculations for you based on every variant or discount or shoppergroup pricing etc etc

It works only with the value you give it - it does not uplift or modify this value.  If you want to calculate everything then you have to do this and enter all the values yourself and lave "calculate" unchecked,

1. Clear out every product price field except the one you are going to enter
2. Fill either the base price (net) OR the tax inclusive price
3. Ensure calculate is "checked" on order total and line item
4. Save

This works in my testing
Title: Re: Order edit backend fields
Post by: Jörgen on August 03, 2018, 10:56:19 AM
I did not change anything all values filled in at purchase, I just ticked calculate. Then I do not expect any already filled in values to recalculate. I know by experience that this works in mysterious ways, but You gave advice to have these ticked. I tested and failed.

I will check this more thoroughly when I get the chance. The purpose of the calculate check box is beyond me if it doesn´t use the parameters You say.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Order edit backend fields
Post by: AH on August 03, 2018, 12:26:04 PM
QuoteThe purpose of the calculate check box is beyond me if it doesn´t use the parameters You say.

The purpose of the calculate box is to calculate the pricing elements that have not been entered

If you dont change any prices then there should be nothing to worry about

However - if you change a price and don't hit calculate - you had better get all the other prices for that order line to be correct - rubbish in rubbish out  By not hitting calcualte - you are telling VM that the values in those fields are correct - and VM will use them regardless

As I said earlier

To change a price:-

1. Clear out every product price field except the one you are going to enter
2. Fill either the base price (net) OR the tax inclusive price (base - net - OR gross)
3. Ensure calculate is "checked" on order total and line item
4. Save

This is working perfectly for at least 2 live businesses that often change orders in admin edt

Title: Re: Order edit backend fields
Post by: Milbo on August 07, 2018, 20:23:43 PM
It works in any direction. You can also set an end price and leave the baseprice free.

you can also set the tax to 0.0 and you get a new result without tax. When you leave the final price, you get a new final price, when you leave the baseprice, you get a new baseprice.

and so on. It calculates always what is not entered. and it is a difference, if you enter nothing or 0.0! For example a product was with discount, should have no discount, set 0.0 for the discount and empty one price either final or base price. It will then also change the tax, imho.
Title: Re: Order edit backend fields
Post by: Robert_ITMan on August 08, 2018, 19:45:03 PM
Quote from: Milbo on August 07, 2018, 20:23:43 PM
It works in any direction. You can also set an end price and leave the baseprice free.

We are telling you this does not work as you describe - please investigate and let me know if I can help in any way. I have given you access to my test site so you can login and see for yourself.
Title: Re: Order edit backend fields
Post by: Robert_ITMan on September 30, 2018, 02:07:11 AM
No one can help with this?

Updating an order is a basic need - why does this not work?

Maybe this is related - I opened a new ticket / bug report: VirtueMart 3 product select 'apply no rule' does not work: http://forum.virtuemart.net/index.php?topic=141123.msg496647#msg496647

Again taxes not calculating correctly... how frustrating!
Title: Re: Order edit backend fields
Post by: Robert_ITMan on October 12, 2018, 17:16:59 PM
Please Help! Happy to pay for support. I have a test site (copy of live site) - I have wasted many hours trying to fix myself with no success. I am wasting even more time manually updating the database directly so the order totals are correct when making changes.
Title: Re: Order edit backend fields
Post by: GJC Web Design on October 12, 2018, 17:23:09 PM
you can email with a complete description and how to see the problem and I can have a quick look

have never tried editing orders
Title: Re: Order edit backend fields
Post by: AH on October 13, 2018, 10:14:23 AM
Same here - let me see some examples

In addition - I hope you are not trying to bother with this on 3.2.12  as all my testing and live work is on 3.2.15

It should be very much the same on 3.4
Title: Re: Order edit backend fields
Post by: Robert_ITMan on October 14, 2018, 13:56:38 PM
Thanks to AH, I see now what the issue is. Only VatTax (VAT tax per product) works when updating an order – the other options TaxBill (Tax per order) and Tax (Tax per product) will not calculate the taxes when updating an order. Even with suggested work around to instead use VatTax ... that only works for new orders received.

I need a solution that works for the orders I have in the system now... and so will all the other VM users not using VatTax (VAT tax per product) who want to update an order.

Unfortunately this needs fixing in the VM core - and seeing as I'm the only one asking for it to be fixed it is not a priority and might not be fixed anytime soon ...

So if you ever want to update an order and realize the totals did not add up correctly then let us know by replying here.

FYI - Notice even when not selecting the calculate boxes the taxes still need to be updated manually in the database directly as they are zeroed out when saving order item changes... depending on which tax was used when the order was created need to either update (1) TaxBill (Tax per order): both #__virtuemart_orders and #__virtuemart_order_calc_rules or (2) Tax (Tax per product): both #__virtuemart_orders and #__virtuemart_order_items
Title: Re: Order edit backend fields
Post by: Milbo on October 22, 2018, 21:30:29 PM
Hmm, I noticed myself another problem, when I want to change the tax of a product, better said, add a tax. The problem is that vm notices the used taxes and uses them for the recalculation. But maybe this problem is connected with your tax per invoice problem.
Title: Re: Order edit backend fields
Post by: Robert_ITMan on October 23, 2018, 15:18:01 PM
See new ticket under dev & bug reports: 'Only VatTax (VAT tax per product) works when updating an order': http://forum.virtuemart.net/index.php?topic=141225.0