July 4, 200619 yr I am struggling with a simple calculation. Dealing with standard Invoice Stuff.. QTY x UNIT = EXT Here is my EXT formula now... If ( UNIT = "" ; "" ; QTY * UNIT ) This make it so that I do not NEED a unit price.... I also want the reverse... if there is no QTY; EXT = UNIT Something like that. The reasoning... if someone orders a product and it is specially discounted, I want the list the QTY and Description and return no cost value or unit cost. On the Next line... we'd usually put "AS ESTIMATED" without a QTY and add the unit price. Therefore, UNIT SHOULD = EXTENDED PRICE when there is no QTY. I hope that makes Sense.... I am attaching a JPEG for more understanding : ) Did I ever tell you all how you ALL ROCK! I don't even know any of you, and your all there to just help me! I don't even know who "you" are... I just you you are the best! One day, I will be smart enough to help "YOU" out... right now though Im a Filemaker in Training! Thanks "YOU"! Help.zip
July 4, 200619 yr Author Wow... I solved this one on my own... If ( UNIT = "" ; "" ; QTY * UNIT ) & If ( QTY = "" ; AUTO UNIT ) I just stink at calcs...... this took a few guesses. Thanks for listening to my brain!!!!
July 5, 200619 yr Author To be honest, I am learning a I go here. I was more familiar with "IF" than "Case," but I see how similar they are, thanks to you, and how "CASE" may have been a more direct approach. Thats the thing about Filemaker... in most cases, there are so many ways to get from point A to B, and we're limited to this direction based on what we know ourselves. I came into a whole bunch if new problems now. I forgot to consider that some invoicing lines may be tax exempt, regardless if a company is tax exempt or not, and have yet to plot out how I plan on dealing with this issue. Any suggestions? Thanks for you ears and suggestions! Mike
July 5, 200619 yr It's not fully embraced to use comparisons with empty stings when the type of the fields involved are NUMBER, and setting a numberfield to "" is perhaps working, but it's due to a typecast which may prove disfunctional in upgrade versions of filemaker - lets play it safe: Choose( IsEmpty ( qty )* 2+ IsEmpty ( unit );qty * unit;qty;unit) Here is a NULL (undefined) value and not "" returned if both fields are empty! --sd
July 5, 200619 yr Author I like that one.... and yet another way to get from point A to B, but perhaps the safest route. Another new trick. Thanks for the input. Mike
July 5, 200619 yr Hi Mike, Add two fields to your detail line item 1)to designate if this line is taxable,(Set it to default (auto-enter) the most common response, ie. "Y" 4taxable.) 2) to Calculate the taxable extended price. Case (taxable;extendedprice;0) HTH Tim
July 6, 200619 yr Author Yes, this issue was solved quite easily. Pretty much 2 extra fields.. one for tax (yes or no) and then a field to collect the taxable amount (if "yes"), so my tax rate only multiplies tax against the sum of that field. Something like that.... I just kind of wiggle my way through this stuff.
Create an account or sign in to comment