TaiChi56 Posted September 6, 2005 Posted September 6, 2005 I am developing a database for a customer. He wanted me to be able to calculate tax based on a price put in a field. That was not a problem. The problem now is he only wants the tax amount to show if it is resale, but not if it is wholesale. So I was thinking, that I could put a resale button and a wholesale button. If it is resale he just clicks yes in the field and the tax amount will be figured out. Not sure how to do this. How can I trigger that button when he clicks yes to take the Price and put the tax amount in the "Tax amount field"? Hope this makes sense. Here is what I used when I figured his tax. When a price is put in the Sale field it calculates and puts the tax in the Tax field. Inventory = Sale * .0825
Osman Posted September 6, 2005 Posted September 6, 2005 May be this calculation solves your problem without any scrtipt or button: Inventory= If(SaleTypeField = "Resale";Sale*0.0825;Sale) Adam Djuby
Lee Smith Posted September 6, 2005 Posted September 6, 2005 A case statement would work here. Case (WholeSale = "Yes"; Sale Amount; Sale Amount * Sales Tax + Sale Amount) WholeSale = text and I attach a choice of Yes or No Sales Tax = is a field that you can put your tax rate HTH Lee
TaiChi56 Posted September 6, 2005 Author Posted September 6, 2005 Excellent. I have been working with this. Where do I put the case statement? Do I attach it to a field or do I do it in scriptwriter? Thank you.
Lee Smith Posted September 6, 2005 Posted September 6, 2005 I made a quick sample so you can see the parts. SalesRetail_Whole_Sale.fp7.zip
TaiChi56 Posted September 6, 2005 Author Posted September 6, 2005 (edited) Fantastic. That worked great. Just two small problems though. If it is wholesale then there is not any tax being added. That part works. But want happens is the Sale Price amount shows also in the Total field. I have to have that null if it is not resale. How do I correct that. Also it is giving me the total sale; price plus tax amount. I just need the actual tax amount showing, i.e. $850.00 at 0.0825 is $70.125 tax. I need the $70.125 tax to show, not $920.125. Also your example was excellent. Thank you for the great help and such quick response. I am new at this but really enjoying it. The best forum I have ever been on. Edited September 6, 2005 by Guest
TaiChi56 Posted September 6, 2005 Author Posted September 6, 2005 (edited) Excellent. I figured it out myself. I just took the plus Sale amount out. It worked great. Hey I am acutally learning something with all the help in this forum. I still have the problem of the Sale Amount showing up in the Total Tax if it is Wholesale. This field needs to be empty of it is Wholesale. What do I need to do? Thank you. Thank you again. Edited September 6, 2005 by Guest
Keith LaMarre Posted September 6, 2005 Posted September 6, 2005 You should separate TAX from The Total - i.e.: you should have a Subtotal (which is either a number or some calculated value--- then you should have several other fields: WholeSale (Yes or No) as described in Lee's example - Tax Rate - default to .0825 if you wish - but I would NEVER make it a calculation - rates change and you want to keep older invoices with older rates. Tax Amount - Case(Wholesale="No", 0 , Tax Rate * Subtotal) then - Grand total (or whatever) = Subtotal + Tax
TaiChi56 Posted September 6, 2005 Author Posted September 6, 2005 Thank you. I took what you had and changed it a little and it worked just they way I needed it to. Thank you again.
Recommended Posts
This topic is 7365 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now