Jump to content

Alec

Members
  • Content Count

    56
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Alec

  • Rank
    Newbie
  1. Alec

    Case Inside a Case

    Hi, I am using the following script but I am getting errorWould you please help me figuring out what's wrong Case WHEN C.#COTYP = 'LA' THEN CASE WHEN C.#COFBD = H.#SOEDT THEN (I.#SISLS * C.#CONPY) ELSE 0 END WHEN C.#COTYP = 'LZ' THEN (I.#SISLS * C.#CONPY)// WHEN C.#COTYP = 'LS' THEN (I.#SISLS * C.#CONPY)// WHEN C.#COTYP = 'MA' THEN (I.#SISLS * C.#CONPY) // WHEN C.#COTYP = 'MD' THEN (I.#SISLS * C.#CONPY)// WHEN C.#COTYP = 'MM' THEN (I.#SISLS * C.#CONPY)// WHEN C.#COTYP = 'MP' THEN (I.#SISLS * C.#CONPY)Else I.#SISLSEND AS SALESPRICE, Thxs
  2. Hmm..I didnt understand that..is it possible to get more details on how to write the code.Thxs for your help
  3. HI,I have a column and it has the names of the employees but has some extra characters to the right and the left such as:CN= John Smith/O=CorpHow can I Substr to get John Smith?Thxs
  4. Alec

    Joomla PHP error

    well, there is no error but the function works when I add items to the shoppping cart, ...adding more items and deleting some in the shopping cart and updating the cart is updating the price to the regular price instead of the discounted one.Thanks
  5. Alec

    Joomla PHP error

    Hi guys,I am having an issue with my php code on Joomla.I am trying to hack the code to build to set the discounted price of a product if two or more product are chosen.the way I am doing it is by matching the category ID...so if the shopping cart has the same category ID for two times or more then apply the discounted prices for those products. "in my case the categoryID = 142"somehow it is not working...I would appreciate your helpthe code of the page is below and the red text is holding the get product method.. function get_price($product_id, $check_multiple_prices=false, $overrideShopperG
  6. Alec

    Date Validation

    You rock!it is working perfect now.would you please explain to me what the different and when to be used.I am new to JS and trying to learn quicklyThanks!
  7. Hi GuysI have the below script.it sets the previous day of the week in the title of a chart.The If case verfiy if the previous day is Sunday and set it to Friday so we can avoid weekends.Today I noticed I am still seeing Friday on the title!!I tried to put == in the If case, I ended up having Friday as a previous day of tuesday.Anybody can help?!Thanks! <script>/*** Called before generation of chart model to GeneratedChartState.* * @param chart* Chart* @param icsc* IChartScriptContext*/ function beforeGeneration( chart, icsc ){importPackage (Packages.java.text); yesterday = BirtDateTime
  8. Alec

    Name Validation

    I have found the soultion if someone need s it.RTRIM(SUBSTR(M.#SLNAM,POSSTR(M.#SLNAM,',')+1)) ||' ' || RTRIM(SUBSTR(M.#SLNAM,1,POSSTR(M.#SLNAM,',')-1)) as NAME,
  9. Alec

    Name Validation

    Hi GuysI have the following query. it is working perfect.the output of the Names is coming with (Last name , First Name) like (Smith, John)is there anything I can add to the query to have the name as (John Smith). SELECT Name, DECIMAL(SUM(Amount),8,0) as Total FROM get_matching_rows WHERE Manager1 = 6651 AND QUERYDATE = DATE(SUBSTR(DIGITS( ENTERDATE), 5, 2)||'/' || SUBSTR(DIGITS( ENTERDATE), 7, 2)||'/'||SUBSTR(DIGITS( ENTERDATE), 1, 4)) GROUP BY Name ORDER BY Total DESC FETCH FIRST 5 ROWS ONLY Thanks!
  10. HiI have the following script it set the title in a birt chart for a previous day.yesterday it was Monday and as I am looking at a previous day I wanted to avoid having weekends.the query, as is, works perfect to validate on Monday to have Friday on the title.Today while testing the query I still see Friday on the title of the chart. <script>/*** Called before generation of chart model to GeneratedChartState.** @param chart* Chart* @param icsc* IChartScriptContext*/ function beforeGeneration( chart, icsc ){importPackage (Packages.java.text); yesterday = BirtDateTime.addDay(new Date()
  11. Hi Guys!I am running the following query which pulls up data for a previous day.today is Monday and i run the query..it works perfect and showed me the data from Sunday.do you know how to exclude weekends!I triedDATEPART(w,[date_created]) NOT IN (6,7)but it didnt work. The Query: SELECTM.#SLNAM as Name,M.#SLMG1 as Manager1,C.#COSLS * C.#COPCT as AmountFROM SDDTA.CUSORD CINNER JOINSDDTA.SALESMAN MON (M.#SLSMN = C.#COSMN)WHERE C.#COENT = 40and DATE(SUBSTR(DIGITS(#COEDT), 5, 2)||'/' || SUBSTR(DIGITS(#COEDT), 7, 2)||'/'||SUBSTR(DIGITS(#COEDT), 1, 4)) = (current_date-1 DAY) Thanks!
  12. Alec

    Date Validation

    I have modified the query to look simpler!
  13. Alec

    Date Validation

    Thank you so much..easy enough !!everything is perfect !
  14. Hi guysI have the following script. it gets the the name of the date for yesterday.can anybody help exclude Sunday.Like today is Monday so i want the script to type in Friday instead of Sunday.Thanks! <script>/** * Called before generation of chart model to GeneratedChartState. * * @param chart * Chart * @param icsc * IChartScriptContext */function beforeGeneration( chart, icsc ){importPackage (Packages.java.text);yesterday = BirtDateTime.addDay(new Date(), -1);df = new SimpleDateFormat("EEEE");stringYesterday = df.format(yesterday).toString();chart.getTitle().getLabel().getCa
×
×
  • Create New...