Home » Fusion Middleware & Colab Suite » Business Intelligence » How To add query ROUND / how to calculate TAX (Oracle receivable, 12.0.5, Linux x86)
How To add query ROUND / how to calculate TAX [message #502534] Thu, 07 April 2011 01:41 Go to next message
pichied
Messages: 2
Registered: April 2011
Location: Indonesia
Junior Member

Hi,

How to rounding off the TAX and TAX_VALAS from this query :

,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(AMOUNT_SO.AMOUNT_SO,0)+NVL(ADJUST_SO.ADJUST_SO,0),nvl(AMOUNT_VALAS.AMOUNT,0)) AMOUNT_VALAS
,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(ROUND((AMOUNT_SO.AMOUNT_SO +NVL(ADJUST_SO.ADJUST_SO,0)) * rcta.EXCHANGE_RATE),2),nvl(AMOUNT.AMOUNT,0)) AMOUNT
,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(ROUND (NVL(DISC_SO.DISC_SO,0)+NVL(DISC_VALAS.DISC_VALAS,0),2),nvl(DISC_VALAS.DISC_VALAS,0))) DISC_VALAS
,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(ROUND (NVL(DISC_SO.DISC_SO,0)+NVL(DISC_VALAS.DISC_VALAS,0),2) * rcta.EXCHANGE_RATE,0),nvl(DISC.DISC,0)) DISC
,TAX_VALAS.AMOUNT TAX_VALAS
,TAX.AMOUNT TAX



[MERGED by LF]

[Updated on: Wed, 13 April 2011 02:16] by Moderator

Report message to a moderator

Re: How To add query ROUND [message #502535 is a reply to message #502534] Thu, 07 April 2011 01:45 Go to previous messageGo to next message
Michel Cadot
Messages: 58605
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use ROUND.

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.

Use SQL*Plus and copy and paste your session, the WHOLE session including the complete SQL statement and table description.

Regards
Michel
How to calculate the TAX [message #503115 is a reply to message #502534] Wed, 13 April 2011 01:53 Go to previous messageGo to next message
pichied
Messages: 2
Registered: April 2011
Location: Indonesia
Junior Member

Hi,

I'm using Ms. Word 2007 and Oracle Applications R12 not sure about the XML publisher.
I want round the tax and so it's will follow the amount and the result is same.

Can you tell me which field i have to change or how to calculate it ?
Re: How To add query ROUND / how to calculate TAX [message #503512 is a reply to message #502534] Sat, 16 April 2011 23:02 Go to previous message
Barbara Boehmer
Messages: 7937
Registered: November 2002
Location: California, USA
Senior Member
pichied wrote on Wed, 06 April 2011 23:41

How to rounding off the TAX and TAX_VALAS from this query :

,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(AMOUNT_SO.AMOUNT_SO,0)+NVL(ADJUST_SO.ADJUST_SO,0),nvl(AMOUNT_VALAS.AMOUNT,0)) AMOUNT_VALAS
,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(ROUND((AMOUNT_SO.AMOUNT_SO +NVL(ADJUST_SO.ADJUST_SO,0)) * rcta.EXCHANGE_RATE),2),nvl(AMOUNT.AMOUNT,0)) AMOUNT
,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(ROUND (NVL(DISC_SO.DISC_SO,0)+NVL(DISC_VALAS.DISC_VALAS,0),2),nvl(DISC_VALAS.DISC_VALAS,0))) DISC_VALAS
,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(ROUND (NVL(DISC_SO.DISC_SO,0)+NVL(DISC_VALAS.DISC_VALAS,0),2) * rcta.EXCHANGE_RATE,0),nvl(DISC.DISC,0)) DISC
,TAX_VALAS.AMOUNT TAX_VALAS
,TAX.AMOUNT TAX




,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(AMOUNT_SO.AMOUNT_SO,0)+NVL(ADJUST_SO.ADJUST_SO,0),nvl(AMOUNT_VALAS.AMOUNT,0)) AMOUNT_VALAS
,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(ROUND((AMOUNT_SO.AMOUNT_SO +NVL(ADJUST_SO.ADJUST_SO,0)) * rcta.EXCHANGE_RATE),2),nvl(AMOUNT.AMOUNT,0)) AMOUNT
,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(ROUND (NVL(DISC_SO.DISC_SO,0)+NVL(DISC_VALAS.DISC_VALAS,0),2),nvl(DISC_VALAS.DISC_VALAS,0))) DISC_VALAS
,decode(rcta.ATTRIBUTE_CATEGORY,'Sales Order',NVL(ROUND (NVL(DISC_SO.DISC_SO,0)+NVL(DISC_VALAS.DISC_VALAS,0),2) * rcta.EXCHANGE_RATE,0),nvl(DISC.DISC,0)) DISC
, ROUND (TAX_VALAS.AMOUNT) TAX_VALAS
, ROUND (TAX.AMOUNT) TAX

[Updated on: Sat, 16 April 2011 23:03]

Report message to a moderator

Previous Topic: flexcube could not display account statements
Next Topic: How To Compare Date Field in Xml Publisher Report
Goto Forum:
  


Current Time: Mon Jul 28 14:31:30 CDT 2014

Total time taken to generate the page: 0.06062 seconds