Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9024

Re: limiting the result of a varible to a maximum?

$
0
0

I'm sorry, the code should have been:

 

Whileprintingrecords;

numbervar COM;

if {@margin by grouptest} > 0 then

(

  If COM + (({@COMSALESREP%} * {#rate by group test} * {@COMTERMCONV} *{@COMPOFITMARGIN%}) + ({@display chargerate max}/2)) >= 4000 then

  (

  COM := 4000;

  (({@COMSALESREP%} * {#rate by group test} * {@COMTERMCONV} *{@COMPOFITMARGIN%}) + ({@display chargerate max}/2));

  )

  Else

  (

  COM := COM +(({@COMSALESREP%} * {#rate by group test} * {@COMTERMCONV} *{@COMPOFITMARGIN%}) + ({@display chargerate max}/2));

  (({@COMSALESREP%} * {#rate by group test} * {@COMTERMCONV} *{@COMPOFITMARGIN%}) + ({@display chargerate max}/2));

  )

)

Else if {@margin by grouptest} <= 0 then

(

  COM := COM +(({@COMSALESREP%} * {#rate by group test} * {@COMTERMCONV} * {@COMPOFITMARGIN%}));

    (({@COMSALESREP%} * {#rate by group test} * {@COMTERMCONV} * {@COMPOFITMARGIN%}));

)

 

-Abhilash


Viewing all articles
Browse latest Browse all 9024

Trending Articles



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