Quantcast
Channel: Sage 100
Viewing all articles
Browse latest Browse all 37010

Forum Post: script for creating new cost markup %

$
0
0
Hi... I have written a small script to automatically populate a udf on the price code screen.  The field will do a small calculation, and upon the entry of the new cost, will quickly calculate the new cost markup percentage.  Here is the script:  I don't get any errors now, but nothing seems to happen when the entry of the new cost gets made.  It is supposed to fire on the post validate of the new cost field. percent = 0 std = 0 price = 0 pctnew = 0 item = "" cust = ""     retVal= oBusObj.GetValue("CustomerNo$", cust) retVal= oBusObj.GetValue("ItemCode$", item) retVal= oBusObj.GetValue("DiscountMarkup1", percent) retVal= oBusObj.GetValue("StandardUnitCost", std) retVal= oBusObj.GetValue("UDF_UNIT_COST", price) retVal= oBusObj.GetValue("UDF_COSTPCT", pctnew)   if std 0 then   retVal = oBusObj.SetValue = pctnew = ((std - price) / std) * -100   end if Any ideas?  This would be great if we can make it work. B

Viewing all articles
Browse latest Browse all 37010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>