Calculation Of invoice amount
AdvertisementI got Invoice_Amount two ways By Joining Some tables
The Query :
select max(wnd.STATUS_CODE) Status, wnd. DELIVERY_ID INV_NO,
Max(wdd.DATE_SCHEDULED) Inv_Date, Max(wdd.CUSTOMER_ID) CUSTOMER_ID, sum(nvl(wdd.SHIPPED_QUANTITY,0) * nvl(wdd.UNIT_PRICE,0)) Inv_Amt
from wsh_delivery_details wdd, wsh_new_deliveries wnd ,wsh_delivery_assignments wda
where wdd.DELIVERY_DETAIL_ID= wda.DELIVERY_DETAIL_ID
group by wnd. DELIVERY_ID
select max(cl.CUSTOMER_TRX_ID) Cust_trx_no ,max(ct.TRX_NUMBER) ct_trx
,cl.INTERFACE_LINE_ATTRIBUTE3 INV_No,max(cl.CREATION_DATE) Inv_date,
sum(cl.QUANTITY_INVOICED* cl.UNIT_SELLING_PRICE) inv_amt ,
Max(cl.SALES_ORDER) Ord_No ,Max(cl.SALES_ORDER_DATE) Order_date ,max(ct.TRX_DATE)
from ra_customer_trx_lines_all cl,ra_customer_trx_all ct
group by cl.INTERFACE_LINE_ATTRIBUTE3
Note:cl.INTERFACE_LINE_ATTRIBUTE3 is INV number.
But invoice Amounts are different. Why it is so? Shall i apply any more
conditions? Why same Data(ie selling price and Quantity) storing in two tables(ra_customer_trx_lines_all,wsh_delivery_details)?
U r using transaction types to generate your distributions, right?
Try to insert distribution info for each of your invoices in the table ra_interface_distributions_all, specifying REC, REV and TAX (tax where applicable) lines.
Hope this will solve your prob.
- 1Can't create a wireless network without a wireless card on my Mac 10-11
- 2Satellite L850: usage of AC adptor and battery at the same time? 10-11
- 3How can I add an address map to each contact? 10-11
- 4How to create unique shapes in Illustrator CS4 10-11
- 5Safe Output Rating for 240V USB adapter to charge my IPod Touch4. 10-11
- 6Magnavox 37MF331D/37 LCD 10-11
- 7How to fix application not found error 11-30
- 8SPATIAL : External fault handler failed: oracle.cep.execution.ExecException 11-30
- I am unable to access iCloud because my iPhone states that my Apple ID and\or password is incorrect. Based on Apple's own policy my current ID and P/W should be fine to access iCloud. Any suggestions?10/11
- Can't open com.apple.iwork.pages..alt-document10/11
- Use different iTunes and iCloud accounts only for backup10/11
- Query on report display in table format on 7970G10/11
- How to make a condition check on footer text in adobe forms ?10/11
- One record in the master Query, many in the child. Data Template Woes10/11
- Bring loaded external swf to the front10/11
- How to run the Oracle SOA Suite and all its prerequisites on different mach10/11
- Adobe Photoshop Album Starter Edition 3.2 with AOL desktop (AOL 10)10/11
- Error while starting MI Client on Windows Mobile 200511/30