Hi,
Would you mind converting the example below so i have two of you answers to work with pls.
Thanks
WhilePrintingRecords;
numberVar totalgoods;
if ( {?SP_INVCREDNEG} = 0 and {delvitems.dqty} < 0.0 ) and {delv.dcurrency} <> {?SP_LEHOMECURR} then
totalgoods := totalgoods + ROUND( ( {delvitems.diforeignprice} * -1 ), {currency.currvaldp} )
else if ( {?SP_INVCREDNEG} = 0 and {delvitems.dqty} < 0.0 ) and {delv.dcurrency} = {?SP_LEHOMECURR} then
totalgoods := totalgoods + ROUND( ( {delvitems.dtpr} * -1 ), {currency.currvaldp} )
else if {delv.dcurrency} <> {?SP_LEHOMECURR} then
totalgoods := totalgoods + ROUND( ( {delvitems.diforeignprice} ), {currency.currvaldp} )
else
totalgoods := totalgoods + ROUND( {delvitems.dtpr}, {currency.currvaldp} )