Newbies timlit Posted September 18, 2010 Newbies Posted September 18, 2010 Hi. I typically find answers on my own but this one tops them all. A seemingly typical system: Invoice, invoice lines, Inventory of products (many to many). Products come under Groups, Categories, with three price fields - Purchase Price, SaleRef (expl. further) and Sale Price. All is fine but when products under Category 30 are selected prices are not copied to corr. invoice lines (actually show up as "0" - P, S and total). I tried manual change of Cat from 30 to 32 and all works fine again. The problem, I believe, began with the introduction of the following. Products may come from Inventory or be typed in. A global discount applies when t/s no Sale Price. (for this I created a SaleRef field which looks up the Sale Price and, if finds it empty, looks up the Global Discount). To give a bigger picture, the values are passed into Invoice lines via variables, which look up the Inventory if the Manual Entry Product is empty. I am lost and will greatly appreciate your ideas. PS. I notice an oddity in FMP. Sometimes, it won't evaluate a formula in a script, say Field1 > 1, but will okay Field1 > 2 - 1. What do you say?
comment Posted September 18, 2010 Posted September 18, 2010 I can't follow your description, esp. this part: the values are passed into Invoice lines via variables, which look up the Inventory if the Manual Entry Product is empty. Perhaps you should post a simplified file showing the problem. Sometimes, it won't evaluate a formula in a script, say Field1 > 1, but will okay Field1 > 2 - 1. I think you mean it won't evaluate a formula the way you think it should? There is a difference between comparing numbers and text. Text is compared alphabetically, so: "11" < "2" returns true.
Newbies timlit Posted September 18, 2010 Author Newbies Posted September 18, 2010 (edited) Mr. comment, please see file atcd. More explanation. The User can choose a product from the inventory or enter a title that's not in the system. When price is copied, from either manual feed or the inventory, it is reserved as a $var in a script and later passed to the appropriate Invoice line field. I have the value (not sure which - Category, price? ) lost along the way. The problem can be in the $sprice variable referring to a calculation. /Script Commmit Record/ the inventory items were originally in non-latin characters. I translated them into latin. And the system went on to work fine, even later - though i retranslated the product titles back to their original. i had to translate some things, or remove. Thank you. 2) Formula in scripts - thanks for the reminder, will look into it. Edited September 20, 2010 by Guest
Newbies timlit Posted September 20, 2010 Author Newbies Posted September 20, 2010 well, it was not in english, so i guess i did too much of my best to 'simplify' it. i have found a way around the problem - redid the function. I had redundant calcs for same 'data flows' on several levels inventory, scripts, invoice lines. Rushy me. comment, thank you for your willing to help, though.
Recommended Posts
This topic is 5179 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