# mgeus

Members

5

• Real Name
Jason K
1. ## [Contribution] Step-By-Step Manual Order

So I posted this in the forum for the complete order editing tool but I the problem may be related to the step by step manual order as well. If anyone has an idea what is going on here, PLEASE HELP. I am desperate to get this fixed. See message below: So I know that there are others that asked this before but I am still struggling to find a solution to the discount/tax/total calculations. These are some serious flaws to this contribution and I would like to see if anyone had luck fixing these problems. I AM WILLING TO PAY SOMEONE IF THEY CAN FIND A SOLUTION. DJmonkey, or anyone else, I will give you a generous donation if you can help me. 1. When you enter a discount amount, and click update, the tax does not calculate correctly. Example: (If tax rate is 5.6%) Sub-total: 100.00 discount: - 10.00 Tax: 5.60 (THis should be 5.04) Total: 95.60 So it is calculating the tax on the subtotal and not including the discount. 2. I use discount coupons contribution. If the customer creates an order and uses a coupon, it works just fine but if you update the order, it completely ignores the discount amount. Examples: (This is how it looks before you click update, completely correct!) Sub-Total: 100.00 Discount coupon: -10.00 Tax: 5.04 Total: 95.04 (THis is what happens after you click update) Sub-Total: 100.00 Discount Coupon: -10.00 Tax: 5.60 Total: 105.60 I have read just about every post and there are some fixes that people found. Unfortunatly, I am using the latest build of order editor and every fix that I found does not apply to the current build. The code seems to be completely different and I cannot adapt it to work correctly. I think these problems are both related to each other so hopefully there is an easy way to get them both to work correctly. I am using step by step manual order also. I did notice something wierd that order editor is doing. Maybe it is related to the problem. When the step by step manual order creates a new order, it automatically adds a "Discount" line item called "OT_discount" in the orders_total Table in MYSQL. If you edit the order at all, it actually changes this field to OT_custom_1 for some reason. So any help that you can offer will be appreciated and generously rewarded. Thanks in advance!
2. ## NEW! Complete Order Editing Tool!

So I know that there are others that asked this before but I am still struggling to find a solution to the discount/tax/total calculations. These are some serious flaws to this contribution and I would like to see if anyone had luck fixing these problems. I AM WILLING TO PAY SOMEONE IF THEY CAN FIND A SOLUTION. DJmonkey, or anyone else, I will give you a generous donation if you can help me. 1. When you enter a discount amount, and click update, the tax does not calculate correctly. Example: (If tax rate is 5.6%) Sub-total: 100.00 discount: - 10.00 Tax: 5.60 (THis should be 5.04) Total: 95.60 So it is calculating the tax on the subtotal and not including the discount. 2. I use discount coupons contribution. If the customer creates an order and uses a coupon, it works just fine but if you update the order, it completely ignores the discount amount. Examples: (This is how it looks before you click update, completely correct!) Sub-Total: 100.00 Discount coupon: -10.00 Tax: 5.04 Total: 95.04 (THis is what happens after you click update) Sub-Total: 100.00 Discount Coupon: -10.00 Tax: 5.60 Total: 105.60 I have read just about every post and there are some fixes that people found. Unfortunatly, I am using the latest build of order editor and every fix that I found does not apply to the current build. The code seems to be completely different and I cannot adapt it to work correctly. I think these problems are both related to each other so hopefully there is an easy way to get them both to work correctly. I am using step by step manual order also. I did notice something wierd that order editor is doing. Maybe it is related to the problem. When the step by step manual order creates a new order, it automatically adds a "Discount" line item called "OT_discount" in the orders_total Table in MYSQL. If you edit the order at all, it actually changes this field to OT_custom_1 for some reason. So any help that you can offer will be appreciated and generously rewarded. Thanks in advance!
3. ## NEW! Complete Order Editing Tool!

Did anyone find a solution to fix this tax not being applied correctly when using a custom OT field. I looked at this suggestion below but it seems that the edit_orders.php version that he is using is very old. I cannot find any code that looks remotely like stated below. There was another suggestion made by augenblicke-eingefangen shown below here. This looks like it should work but unfortunatly, it does not for me. There are quite a few people looking for answers to this problem. Any suggestions would be great. CODE if (\$ot_title != '') { //7 ADD: CODE //This changes the value of ot_tax if (\$order_totals[\$i]['code'] == 'ot_tax') { \$order_totals[\$i]['value'] += \$tax_to_add; \$order_totals[\$i]['text'] = \$currencies->format(\$order_totals[\$i]['value'], true, \$order->info['currency'], \$order->info['currency_value']); } //This calculates the tax on additional components if ((\$order_totals[\$i]['code'] != 'ot_total') && (\$order_totals[\$i]['code'] != 'ot_subtotal') && (\$order_totals[\$i]['code'] != 'ot_tax') && (\$order_totals[\$i]['code'] != 'ot_shipping')) { \$tax_to_add += \$order_totals[\$i]['value'] * \$tax / (100 + \$tax); } AFTER: CODE } elseif ( (tep_not_null(\$ot_value)) && (tep_not_null(\$ot_title)) ) { ADD: CODE //This calculates tax on ot_custom \$tax_to_add += \$ot_value * \$tax / (100 + \$tax);
4. ## Oder Editor tax problem

I gave this a try with no luck. You are definitly onto something here as this seems to be the best solution that I have seen so far. I am having a hard time understanding what is going on here. Why cant you just mimick what the calculations for shipping are doing to not count that again. This would be similar to the second solution above this post however, this solution is using a VERY old version of edit_orders.php which isnt even close to the code in the current. Any other ideas out there?
5. ## NEW! Complete Order Editing Tool!

I have been using order editor for some time now and I noticed a problem with the inventory not matching up lately. After investigation, I found that when editing an order, if you change the quantity of an item in the order and then click "Update", the inventory is reduced as you had just entered that item in for the first time. Example: Item ( Screws, begining with an inventory amount of 20. ) I add- ( Screws, quantity 2 ) Inventory is now at 18. I later edit the item "Screws" , I change the quantity to 3 then click update. At this point, the inventory SHOULD BE 17 but it is ACTUALLY 15. The system is disregarding the previous item and it is re-subtracting the entire quantity when you update anything. Does anyone else notice this problem?? If so, is there a fix?? Thanks in advance for any help. Jason
×