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.
- 1HT4972 i am not getting notification on most of my apps, e.g twitter and facebook...except i go to the app and refreshed manually. its an iphone 4 and running on ios5...i have gone through everything and its still the same..help please........I seem to be 10-11
- 2I want to delete all music not Syncing, iTune want to delete everything 10-11
- 3Which is better XI 3.0 or PI 7.1 for SOAP- RFC scenario. 10-11
- 4Click-and-drag to select multiple points in puppet warp 10-11
- 5EP 6.0 SP2 Filter development .. 11-30
- 6Error while starting VM Image 11-30
- 7Are Disc Menu Templates Restricted to Certain Versions of Premiere Elements 11-30
- 8Issues installing Photoshop CS5 in my Mac Book Pro 11-30
- ITunes insists on rearranging my iPad apps, even with 'Sync apps' unchecked10/11
- How can I make mail retry sending messages in the Outbox?10/11
- Error while restore control file10/11
- Hide some folders from the "Photo" gallery?10/11
- 10g to 11g Migration - ESB Process10/11
- Rosettanet STK credentials file in TomcatRN\webapps\rosettanet11/30
- Form List: Display only on certain columns based on values11/30
- Last time database accessed11/30
- JAVA Game DEV11/30
- I have purchased iphone 4s in UK and now i have plan to go back india. So will siri work in India?11/30