News:

Looking for documentation? Take a look on our wiki

Main Menu

VM3.0.16 BE order admin is driving me mad

Started by innato, July 17, 2016, 18:57:22 PM

Previous topic - Next topic

innato

VM3.0.16 on J3.6.0 and PHP 5.6.
I am totally confused about the BE orders admin function, in specific the edit function. How can the product name and SKU be editable through this screen? There seems to be no check whether the new name/SKU exists.
Same for adding a new product to the order. You can fill the product's name and SKU fields with anything you like. No option to select from products that actually exist (like in VM1.1.9).
I couldn't find any documentation on this, and I honestly did do my best to search this forum. No success!

Besides this, the layout is horrendous: tables are running off my screen and money strings are broken (meaning the number is on a new line vs the euro sign, should be a 'nowrap').

Finally, there is a bug that has been reported before but appears not to have been taken care of in VM3.0.16:
- A customer has completed an order which can be opened at the BE in the VM 'orders' menu, see attached image named 160717_vm3.0.16_BE_orders_01.jpg
- Now at the BE in the same screen, just press the SAVE link from the "Save Cancel Edit New" link series just below the product line.
- Not having changed anything on the screen, the total order amount has now changed to an incorrect amount. In fact, the tax amount was added once again! See attached image named  160717_vm3.0.16_BE_orders_02.jpg

Regards
(PS: I love VM but it still needs a lot of fine-tuning!)
Regards
Rob

VM3.2.6 (enhanced) on J3.8.8 and PHP 7.1 or 7.2

Milbo

Please test with vm3.0.17.2, maybe it is fixed already
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

innato

#2
VM3.0.17.4 on J3.6.0 and PHP5.6
The layout problem of the backend order admin screen appears to have been solved. Well done! Edit: Sorry, I had not disabled my overrides. The layout problem is still there!
The amounts bug is still there. An order that includes a discount is a total mess: the sum of tax and undiscounted price is presented as the final sales price, in other words: discount gone and twice the tax.
I understand that odd version numbers (the 17 in this case) refer to 'development releases' so I do not trust 3.0.17 for my production site.
Regards
Rob

VM3.2.6 (enhanced) on J3.8.8 and PHP 7.1 or 7.2

Milbo

In this case it is meant for production, because it is the last vm3.0.17.4, if you look in the debug section of the forum, you can see that there are no problems left, except yours.

But I was not able to reproduce. I need to see your complete calculation rule setup to understand the reason for your problem. You may sent me all data per pn.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

innato

#4
Sorry but the layout problem is still there. I had forgotten to disable my overrides.
I'll dive into the calculation once more and let you know by pn.
Where do I find the debug section? Is it the developer portal?
Regards
Rob

VM3.2.6 (enhanced) on J3.8.8 and PHP 7.1 or 7.2

Milbo

I think there is no error, just the layout in joomla 3 is a bit misleading.  The order shows two times the vat. One time as "complete tax for all products", then the 21% tax and then anything together.

in your case the "anything" is just the product taxes, because you have no shipment taxes. If you have 2 products with different taxes, it becomes more clear.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

innato

#6
Thks Max. I am sorry but I believe that there really is an error. Look at the two screen shots in my first post of this topic and watch the "Total" column at the far right. In the first pic, the total amount is 5.50 as it should be (the amount is inclusive 0.95 tax). I then pressed the SAVE button and the bottom total amount changes into 6.45 (which is the correct total of 5.50 plus once more 0.95 tax added). This total is not correct. In pic 2 I have circled the problem red.
The layout is not an issue anymore because I have overridden the whole works.
Regards
Rob

VM3.2.6 (enhanced) on J3.8.8 and PHP 7.1 or 7.2

innato

VM3.0.18 on J3.6.2 and PHP 5.6

With the release of VM3.0.18, the problem is still there. It strikes me that no-one else seems to have mentioned it, so it must be my haunted website?
Attached two screen dumps from the VM order admin screen (back-end).
This time I have purchased a product that has a total price of 8.50 (incl 1.48 VAT). I used my 100% discount coupon, so the bottom line amount to pay is ZERO and this is all correct, see the bottom line "Total" in attached pic.
Then the only thing I do is to press the 'SAVE' link at the top right.
Now the numbers have changed as in the 2nd screen dump. The bottom line now says that I have to pay a total of 9.98, being the undiscounted total of 8,50 (incl 1.48 VAT!!) PLUS once more 1.48 VAT.
Can anyone try to reproduce this or is my website indeed haunted?

Attached two screen dumps
Regards
Rob

VM3.2.6 (enhanced) on J3.8.8 and PHP 7.1 or 7.2

GJC Web Design

can confirm your not nuts..

Clicking the Save does increase the total by the tax

in my test you see the Total goes from 52,46 to 61,92 -> increase of  9,46 - the tax

But assuming your not mad why would u click the save button if your not editing the order?
Or is this the first step in proving the edit does the calc wrong?

Strangely it only does this the first time you click Save.. subsequent clicks don't affect the Total

the first POST when u click Save is

item_id[1][product_quantity]:1
item_id[1][order_item_name]:Brody Neuenschwander ruling pen
item_id[1][order_item_sku]:BNRP-NB
item_id[1][order_status]:X
item_id[1][product_item_price]:40.00000
item_id[1][product_basePriceWithTax]:48.80000
item_id[1][product_final_price]:48.80000
item_id[1][product_tax]:8.80000
item_id[1][product_subtotal_discount]:0.00000
item_id[1][product_subtotal_with_tax]:48.80000
task:updateOrderItemStatus
option:com_virtuemart
view:orders
virtuemart_order_id:1
virtuemart_paymentmethod_id:1
virtuemart_shipmentmethod_id:1
order_total:52.46000
df9e926e1dc7632111fcebb9d617af25:1
order_shipment:3.00000
order_shipment_tax:0.66000
order_payment:0.00
order_payment_tax:0.00000
calc_rules[VatTax][1]:9.46000
order_billTaxAmount:9.46000
calculate_billTaxAmount:1

maybe because the tax is sent twice the updateOrderItemStatus is adding the 2nd

calc_rules[VatTax][1]:9.46000
order_billTaxAmount:9.46000

also notice on each save emails were triggered to vendor



GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

innato

Quote from: GJC Web Design on September 24, 2016, 23:04:49 PM
can confirm your not nuts..
But assuming your not mad why would u click the save button if your not editing the order?
Or is this the first step in proving the edit does the calc wrong?

Thank you GJC for confirming my sanity.
Why I press SAVE without having done anything else? Simply because the lack of documentation (I only found VM2 doc) and as a consequence trying to understand what it does and how to edit an order. Must say it's one of these VM3 adventures. Not intuitive at all. I can add an item to the order, but haven't discovered yet how to delete it.

Anyway, the total amount calculation messes up and I assume it will be corrected...
And yes, an email notice to customer is sent upon every save. Unnecessary. Just include a checkbox "notify customer?".
Regards
Rob

VM3.2.6 (enhanced) on J3.8.8 and PHP 7.1 or 7.2

GJC Web Design

Quotemaybe because the tax is sent twice the updateOrderItemStatus is adding the 2nd

I think it is this .. on the update single the data is compared so it appears the tax adds twice there
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

innato

Quote from: GJC Web Design on September 25, 2016, 19:20:13 PM
I think it is this .. on the update single the data is compared so it appears the tax adds twice there

Where in VM3.0.18 is the update done, I mean which file do I need to look at?
Regards
Rob

VM3.2.6 (enhanced) on J3.8.8 and PHP 7.1 or 7.2

GJC Web Design

look in VM admin -> models- > orders.php

func  updateOrderItemStatus

this passes off to single update (near the top of the file)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

innato

Thank you so much GJC. I'll have a look. I am impressed by the deep knowledge that you (and Max) have of the VM extension, plus the enormous amount of time that you guys spend on this forum trying to keep everybody happy. Believe me: I appreciate it.
Returning to the issue... In fact, if you ask me, the whole back-end order edit is a chaos. Try it yourself (if you haven't done so already): make an order and then play with the EDIT button at the left (back-end), under the product name, and the various entries you can make in the input fields that open up. Then save and see what happens to the various numbers.
And there is the NEW button as well. It copies the existing item as a new additional item to the order. Why?? And if I regret adding it, how do I get rid of it?
The VM team member who developed and coded this should have another close look at the whole order edit concept. I haven't got a clue of its intentions and how it is supposed to work, that's for sure.
Would you advise me to submit a new topic that summarises all this? Because this thread is about the faulty Total Amount calculation only.
I can also just forget about it...
Regards
Rob

VM3.2.6 (enhanced) on J3.8.8 and PHP 7.1 or 7.2

GJC Web Design

The project is Max's baby .. I take no kudos or have no claim on its development..  :)

I think it is more about priorities ... the team is small and different parts of the project must be prioritised.
The whole admin edit is as you say is  basic .. but there are other 3rd party extensions that deal with this if this were required as a full order management section ..
I support many sites and i think one client has ever asked for extensive order management

The core project can't do everything.. 

I haven't tried it but there is this from CMSmart for example
http://extensions.joomla.org/extension/invoice-management-advance-for-virtuemart

I do agree though that the Save altering the tax applied is a bug...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation