Tax Query

What is difference between Tax Code and Withholding Tax code while preparing the IV?
Where are they configured in SAP?
How the entries are posted to GL account in SAP?

Hi,
Tax code is nothing Input and output tax codes,
at the time of procurment mm side they calculated input tax,
At the time of Sale out put tax calculated.
Like vat
Regarding WTh tax service parties like profesional pay and servese wth tax used this are the img activity so u need to configue in back end,
Posting at the time of entry end user select relevant tax code
ex f-43 at the time of invoice select relevent tax code and select calculate tax check box is there tax automatically calculated and posted to tax account.
If helpful assign points
Regards

Similar Messages

  • Tax query builder with "workflow status" property

    Hi,
    is it possible to create a tax query builder with "workflow status" property? For example: folder A only with documents "Relased", folder B only with document "In progress"?
    In property meta data I saw that there is a property "cm_workflowState", I made it indexable, but it doesn't work....
    thanks,
    Paolo

    Hi,
    Thanks to share your post.
    For the issue, I think it may due to the wrong handling of the encoding type “UTF-8”, please refer to the followed article, they may give you a hand:
    http://blogs.sun.com/shankar/entry/how_to_handle_utf_8.
    http://devlog.info/2008/08/24/php-and-unicode-utf-8/.
    Hope this could help you!
    Leo

  • Need help in tax query!

    Hi All,
    Greetings!!
    we have a discoverer query which calculates the withholding tax details.
    the query used to run fine in 11i before.
    Now client in on R12.
    Query has input parameter as TAX_CODE_ID....
    But now as the architechtural change... TAX_CODE_ID is coming as NULL when we enter invoices in front end.
    We want to change the query such that the same details as that of 11i should come in R12 as well.
    Can you plese suggest the ways to achieve this.
    PFB the 11i query for your reference.
    SELECT
         ail.invoice_num,
         ail.description,
         ail.invoice_date,
         aps.due_date payment_due_date,
         ack.check_date payment_date,
         pov.segment1 supplier_num,
         pov.vendor_name supplier_name,
         pos.vendor_site_code supplier_site_name,
         adl.description inv_line_desc,
         adl.attribute6 statutory_memo,
         ail.attribute5 batch,
         adl.period_name,
         adl.awt_group_id,
         adl.tax_code_id,
         adl.invoice_distribution_id,
         ail.invoice_id
    FROM apps.ap_invoices_all ail,
    apps.ap_invoice_distributions_all adl,
    apps.ap_awt_groups awt,
    apps.ap_lookup_codes alc,
    apps.ap_payment_schedules_all aps,
    apps.hr_organization_units hou,
    apps.gl_sets_of_books gsob,
    apps.gl_code_combinations gcc,
    apps.po_vendors pov,
    apps.ap_invoice_payments_all aip,
    apps.ap_checks_all ack,
    apps.po_vendor_sites_all pos
    WHERE ail.invoice_id=adl.invoice_id
    AND adl.line_type_lookup_code in ('ITEM','AWT','ERV','IPV')
    AND alc.lookup_type(+) = 'NLS TRANSLATION'
    AND alc.lookup_code = DECODE (adl.match_status_flag,'A', 'APPROVED' )
    AND ail.org_id = hou.organization_id(+)
    AND hou.name = 'JP OU'
    AND adl.awt_group_id = awt.GROUP_ID(+)
    AND adl.set_of_books_id = gsob.set_of_books_id
    AND ail.invoice_id = aps.invoice_id
    AND adl.dist_code_combination_id=gcc.code_combination_id
    AND ail.vendor_id=pov.vendor_id
    AND ail.invoice_id=aip.invoice_id(+)
    AND aip.check_id=ack.check_id(+)
    AND ail.vendor_site_id=pos.vendor_site_id
    AND adl.tax_code_id = :P_TAX_CODE_ID;
    Thanks,
    Sachin

    SELECT invoice_id,
    invoice_line_number,
    substr(distribution_line_number,1,8) distribution_line_number,
    substr(line_type_lookup_code,1,9) line_type_lookup_code,
    accounting_date,
    period_name,
    amount,
    base_amount,
    posted_flag,
    substr(dist_code_combination_id,1,15) dist_code_combination_id,
    substr(accounting_event_id,1,15) accounting_event_id,
    substr(invoice_distribution_id,1,15) invoice_distribution_id,
    substr(parent_reversal_id,1,15) parent_reversal_id,
    substr(po_distribution_id,1,15) po_distribution_id,
    org_id
    FROM AP_INVOICE_DISTRIBUTIONS_ALL
    WHERE invoice_id = &inv_id
    ORDER BY invoice_distribution_id asc
    The line_type_lookup_code should contain the tax_code.
    Run this query for some invoice having tax lines. You should get all the required details.
    Hope that helps.
    Thanks,
    Anil

  • Invoice validation Tax Query

    Hi,
    we have some invoices being loaded by AP interface with just ITEM lines and no TAX lines. This worked fine, till recently some patches were applied and now on running the validation it generates a tax line for them.
    Some setup in ETax seems to have changed due to patches. Any specific pointers to what may be causing this or I can check in the setups ?
    Thanks

    Hi
    Could you please check the following note: AP: Tax Calculated Twice For Invoices Imported With Tax Lines On Invoice Validation [ID 233859.1]
    Altough it relates to earlier version of Oracle Apps, however just you can check it once.
    Thanks
    Manish

  • Itemwise GRPO report with tax query.

    Greetings of the day, Experts,
    We require a report of the GRPO created for Item wise passed.  The report desired is Itemwise will all taxes, namely Excise Duty, HECess, EDCess, VAT4%, VAT5%, etc.  Though we did try to fetch but the same are being displayed in the row level and wish to have in the Column format where in distinctly indicating the values in the columns for the respective columns.
    We have tried this but get the values displayed are all the same.
    SELECT
    T0.DocEntry,
    T0.ItemCode,
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-90' and T1.DocEntry = T0.DocEntry), 0) 'Excise Duty',
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-60' and T1.DocEntry = T0.DocEntry),0) 'Educ Cess',
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-55' and T1.DocEntry = T0.DocEntry),0) 'HECess',
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '1' and  T1.StaCode = 'VAT4' and T1.DocEntry = T0.DocEntry),0) 'Vat - 4%',
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '1' and  T1.StaCode = 'VAT5' and T1.DocEntry = T0.DocEntry),0) 'Vat - 5%',
    from PDN1  T0
    Need your guidance.
    Thanks and regards.

    Hi........
    Try this......
    SELECT
    T0.DocEntry,
    T0.ItemCode,
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-90' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum ), 0) 'Excise Duty',
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-60' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum),0) 'Educ Cess',
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-55' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum),0) 'HECess',
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '1' and T1.StaCode = 'VAT4' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum),0) 'Vat - 4%',
    ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '1' and T1.StaCode = 'VAT5' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum),0) 'Vat - 5%',
    from PDN1 T0
    Regards,
    Rahul

  • Sales Tax Query

    Dear Experts
    I have read in a document the following about sales tax:
    Kindly clarify the genuineness of the statements as follows and please let me know what the corrections are if any incorrectness is found: 
    "Both CST and LST rates can be maintained in one tax code in the same jurisdiction. The rates are maintained at Tax code level. But formula 352 elimates one of them based on region of ship to party and region of delivering plant"
    Regards
    SDC

    Hi,
    Here you cant put two different taxes in single tax code, if you want then you need to specify different tax code for different tax like LST and CST and you should have different gl accounts to assigned in OB40, for this you should have different condition type and account keys.
    All you get it in SPRO  -> FIN ACCOUNTING  ->FIN ACC GLOBAL SETTINGS -> TAX ON SALE AND PURCHASE-> BASIC SETTINGS..
    Hope understood and you can assigh points if you are cleared.
    Thanks,
    Vasu..

  • Error In MIRO GL  account allows only output tax

    Hello All,
    We are facing an error in MIRO that GL account xxxxx allows only out put tax. The scinario & settings are as  below.
    FB60
    There is no error when using the particular tax code sytem posts the document
    MIRO
    Same vendor & tax code used as in FB60
    The systemshows an error that GL  ***** allows only output tax.
    TAX CODE settings in FTXP
    The GL showing error is in tax code
    GL settings
    In GL master data in control tab , the tax category is defined as out put tax
    QUERY
    Why in FB60 it allows the GL & not in MIRO ( Both are vendor invoice and suppose to work in similar manner)
    please note in both the cases the entries are same
    Vendor Cr
    Expense / Stock Dr
    VAT GL **** Cr
    VAT GL-2 Dr
    VAT GL**** is not picking @ MIRO & Picks @ FB60 with out any error
    Any Idea !!!
    Thanks & Regards
    Arun R

    Hi,
    The problem is resolved .
    The error was due to the fact that the VAT was an aquisiton tax for europe.
    The details are in note  373587
    Thanks for the support
    Regards
    Arun

  • Is AutoClassification for Taxonomies in EP6 SP2 fully functional?

    Hello Again,
    I've implemented a query-based taxonomy in EP6 with auto classification. I've created 11 taxonomies in total all under 1 index.  But the functionality seems to be inconsistent and/or non-functional.
    After creating the index I follow this process to create each Taxonomy:
    1) (Index Admin) New Taxonomy. (query-based w/ autoclassification)
    2) (taxonomy explorer) Add sub-folders to the taxonomy (new folder)
    3) (Tax Query Builder) Define the queries for each folder
    4) (Tax Query Builder) Click Update
    5) (Index Admin) ReIndex the Index or Data Source
    When I do one test taxonomy with one subfolder things normally work as planned, the couple of test files get assigned to the test folders.  But when I try to do the full implementation of 11 taxonomies, 40 total folders, and roughly 1000 documents to classify. None of the files autoclassify. All the files can be seen in the Index, but during the classification process I get many of these errors: [ Indexing document failed. taxonomy not found (Errorcode 2422) ]
    1)Is there another step that I'm missing?
    2)What does Taxonomy Syncronization do?
    3)What does the datasource incremental update do?
    4)Are there any known bugs in EP6 SP2 taxonomies?
    Thanks, DAN

    Update:
    After lots of trial and error in this area I've finally found a suitable sequence of events.
    OLD WAY  (Didn't work) :
    1) (Index Admin) New Taxonomy. (query-based w/ autoclassification)
    2) (taxonomy explorer) Add sub-folders to the taxonomy (new folder)
    3) (Tax Query Builder) Define the queries for each folder
    4) (Tax Query Builder) Click Update
    5) (Index Admin) ReIndex the Index or Data Source
    NEW WAY:  (Reindex moved to step 3, Save & Update queries afer any document update)
    1) (Index Admin) New Taxonomy. (query-based w/ autoclassification)
    2) (taxonomy explorer) Add sub-folders to the taxonomy (new folder)
    3) (Index Admin) ReIndex the Index at the root index level
    4) (Tax Query Builder) Define the queries for each folder
    5) (Tax Query Builder) Click update for each taxonomy when complete
    6) (Inbox) verify that documents classified correctly
    If new KM documents or folders are added
    1) (Index Admin - Data Source) Incrementally update the datasource at the datasource level
    2) (Tax Query Builder) Touch the Taxonomy by selecting 1 query per each Taxonomy and clicking save
    3)  (Tax Query Builder) Click update for each taxonomy - monitor the app log to make sure the update completes before running the next.
    Notes:
    *Don't upload KM files with the same name to same dir.
    *Be very careful removing/changing KM folder names.
    *Changes to the files removes the classification.
    FYI:  I still find the implementation of taxonomies in EP6 SP2 beta, but with enough trial and error suitable work-around's can be found.

  • Help on Query - A/p Invoice Tax Breakup

    Hi Xperts,
    declare @todate as datetime
    declare @enddate as datetime
    SELECT @todate= /*min(T0.DocDate) FROM OINM T0 WHERE T0.DocDate=*/ '[%0]'
    SELECT @enddate= /*max(T0.DocDate) FROM OINM T0 WHERE T0.DocDate=*/'[%1]'
    select DISTINCT a.Docnum as "Invoice No" ,a.Numatcard AS "Customer Reference" ,a.comments, a.cardcode as "Cust.Code", a.cardname as "Customer Name" ,(Select max (T2.TaxId2) from CRD7 T2 where T2.CardCode = a.CardCode) [Tin#],  a.docdate AS "Invoice Date" ,(SELECT SUM(Quantity) FROM INV1 where docentry =a.docentry)as "Quantity" ,
    (select sum(LineTotal) from INV1 where docentry = a.docentry)as "Basic Value" ,(Select sum(taxsum) FROM INV4 where docentry = a.docentry and statype=-90) as "BED" ,
    (Select SUM(taxsum) FROM INV4 where docentry = a.docentry and statype=-60) as "Cess" ,(Select SUM(taxsum) FROM INV4 where docentry = a.docentry and statype=7) as "HeCess" ,(Select SUM(taxsum) FROM INV4 where docentry = a.docentry and statype=1) as "VAT" ,
    (Select SUM(taxsum) FROM INV4 where docentry = a.docentry and statype=4) as "CST" ,
    A.VatSum as "Total Tax" ,(select sum(linetotal) from inv3 where docentry = a.docentry) as 'Freight' ,
    A.DocTotal as "Net Value"
    FROM OINV A left OUTER JOIN INV3 B ON A.DOCENTRY = B.DOCENTRY left OUTER JOIN INV4 C ON A.DOCENTRY = C.DOCENTRY left outer join INV3 h on A.DocEntry = h.DocEntry left outer join INV1 d on a.docentry = d.docentry left outer join crd7 e on a.cardcode = e.cardcode, oitm g left outer join ochp f on f.absentry= g.chapterid where a.Docdate >=@todate and a.Docdate <=@enddate and g.itemcode=d.itemcode ORDER BY A.DOCNUM
    In the above query Item type service posted document is not coming. 
    Thanks in Advance
    Balaji Sampath

    Hi Balaji........
    In service Document Items do not come and you have made Inner Join your Invoice with OITM so that it is not coming.....
    declare @todate as datetime
    declare @enddate as datetime
    SELECT @todate= /*min(T0.DocDate) FROM OINM T0 WHERE T0.DocDate=*/ '[%0]'
    SELECT @enddate= /*max(T0.DocDate) FROM OINM T0 WHERE T0.DocDate=*/'[%1]'
    select DISTINCT a.Docnum as "Invoice No" ,a.Numatcard AS "Customer Reference" ,a.comments,
    a.cardcode as "Cust.Code", a.cardname as "Customer Name" ,(Select max (T2.TaxId2) from CRD7 T2 where T2.CardCode = a.CardCode) [Tin#],  a.docdate AS "Invoice Date" ,(SELECT SUM(Quantity) FROM INV1 where docentry =a.docentry)as "Quantity" ,
    (select sum(LineTotal) from INV1 where docentry = a.docentry)as "Basic Value" ,
    (Select sum(taxsum) FROM INV4 where docentry = a.docentry and statype=-90) as "BED" ,
    (Select SUM(taxsum) FROM INV4 where docentry = a.docentry and statype=-60) as "Cess" ,
    (Select SUM(taxsum) FROM INV4 where docentry = a.docentry and statype=7) as "HeCess" ,
    (Select SUM(taxsum) FROM INV4 where docentry = a.docentry and statype=1) as "VAT" ,
    (Select SUM(taxsum) FROM INV4 where docentry = a.docentry and statype=4) as "CST" ,
    A.VatSum as "Total Tax" ,(select sum(linetotal) from inv3 where docentry = a.docentry) as 'Freight' ,
    A.DocTotal as "Net Value"
    FROM OINV A left OUTER JOIN INV3 B ON A.DOCENTRY = B.DOCENTRY left OUTER JOIN INV4 C
    ON A.DOCENTRY = C.DOCENTRY left outer join INV3 h on A.DocEntry = h.DocEntry left outer join
    INV1 d on a.docentry = d.docentry left outer join crd7 e on a.cardcode = e.cardcode Left Outer Join
    oitm g On d.ItemCode=g.ItemCode left outer join ochp f on f.absentry= g.chapterid where a.Docdate >=@todate
    and a.Docdate <=@enddate and g.itemcode=d.itemcode ORDER BY A.DOCNUM
    Please try above......
    Regards,
    Rahul

  • How to get tax break up of TDS using SQL query ?

    Hi all,
    We are developing a TDS report using SQL query
    Report will contain VendorCode,Date(ap inv date),Vendor name,
    Bill value,TDS Amount,
    Bill Value – 100.000,
    TDS (2%) - 2.000,
    TDS Surcharge(10% on TDS) - 0.2,
    TDS Cess(2%(TDS+TDS Surcharge)) - 0.044,
    TDS HeCess(1%(TDS+TDS Surcharge)) - 0.022.
    We have developed this report which displays upto
    VendorCode,Date(ap inv date),Vendor name,
    Bill value,TDS Amount.
    How to show tax break up of TDS in SQL query ?
    Thanks,
    With regards,
    Jeyakanthan.

    Hi gauraw,
    Thank for your reply.
    I modified the query , pasted the query
    as below in query generator,
    Select T0.DocNum,T0.DocDate,T0.CardCode as 'Ledger',T1.TaxbleAmnt As 'Bill value',T1.WTAmnt as 'TDSAmt',(TDSAmt * 0.1) as 'TDS_Surch',
    (((TDSAmt0.1) + TDSAmt)0.02)  as 'TDSCess',
    (((TDSAmt0.1) + TDSAmt)0.01)  as 'TDSHCess'
    FROM OPCH T0  INNER JOIN PCH5 T1 ON T0.DocEntry = T1.AbsEntry
    WHERE (T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]')
    on clicking execute its showing error message invalid column
    name 'TDSAmt'.
    With regards,
    Jeyakanthan

  • Query related to withhold tax

    Hi  Freinds,
    This is mamatha i have a query related to withhold tax .what is diff b/w business place and section code.what is importance of section code.
    Regards
    S Mamatha
    Please, search SDN

    For India, witholding tax, you need to create the business place and section code with the same id.
    Section code is additional field provided by sap for tds related processig, reports etc.
    Regards,
    SDNer

  • How to incorporate Current Tax Period in Select Query.

    i need to extract the data based on the Current Tax Period
    say current tax perios is
    06-04-2007  to 05-04-2008
    how to incorporate this in my select query.
    i need to fetch
    PERNR
    BEGDA
    ENDDA
    STAT2
    FROM PA0001 INTO TABLE IT_P0001
    for all entries in T_TXT_UPLOAD
    WHERE PERNR = T_TXT_UPLOAD-PERNR.
    In this t_txt_upload is an internal table.(input file which is taking using GUI_UPLOAD).

    Use this FM  HR_ID_TAX_YEAR to get the starting and end date for tax year and pass the date to your SELECT command for BEGDA & ENDDA.
    Regards,
    Amit
    Reward all helpful replies.
    <b>P.S</b> Close the queries when get solved.

  • Calculate sales tax rate using a query

    Hello,
    I am not sure if I can ask this question in the correct forum, excuse me if I am in the wrong place. Below is the question
    We are using STATE.COUNTY.CITY combination for computing the tax.
    I am fetching the sales tax rate in a custom form based on the ship_to of the customer from ar_location_rates, below is a query to fetch the state tax rate
         SELECT      NVL(arr.TAX_RATE, 0
         FROM      hz_cust_site_uses_all      HCSU,
                   hz_cust_acct_sites_all      HCAS,
                   hz_party_sites               HPS,
                   hz_locations               HLC,
                   hz_loc_assignments           HLA,
                   ar_location_combinations alc,
                   ar_location_rates           arr,
                   hz_cust_accounts           hca
         WHERE      HCSU.site_use_id = v_site_use_id
         AND      hcsu.CUST_ACCT_SITE_ID = hcas.CUST_ACCT_SITE_ID
         AND      hcas.PARTY_SITE_ID = hps.PARTY_SITE_ID
         AND      hps.LOCATION_ID = hlc.LOCATION_ID
         AND      hlc.LOCATION_ID = HLA.LOCATION_ID
         AND      hla.LOC_ID = alc.LOCATION_ID
         AND alc.LOCATION_ID_SEGMENT_1 = arr.LOCATION_SEGMENT_ID
         AND     hca.CUST_ACCOUNT_ID = v_cust_acct_id
         AND      SUBSTR(hlc.POSTAL_CODE, 1,5) BETWEEN arr.FROM_POSTAL_CODE AND SUBSTR(arr.to_POSTAL_CODE, 1,5)
         AND     TO_CHAR(arr.end_date,'DD-MM-YYYY') = '31-12-2199';
    I want to make sure if I am going the correct route, since the query is working in one instance and isn't working in another.
    Thanks

    Dear Jitendra,
    maybe it would be better to post your question to forum <Expert Forums\SAP Business One\SAP Business One SDK>. There you will  find experts in programming DI and UI.
    The forum <Expert Forums\SAP Business One\SAP Business One> you posted to is rather for questions concerning the use of SAP Business One and not the programming of its interfaces. Of course, it may be possible that someone answers your question here, too. But it is more likely to find answers in the others forum.
    Regards,
    Frank Romeni

  • How to make a query which gives sales tax as output

    can any body help me, I am making a report for sales tax i only want the amount of VAT & CST in the output of the query, as we are manufacturer so we charge both excise duty & Sales tax from customer, i only want the system to retrieve cst & vat amount. when i am making a query on oinv table it is giving the total tax amt as output.

    Hi
    SELECT  T0.DocNum as 'SO. No.',
    T0.DocDate as 'SO. Date',
    T2.DocNum AS 'Del.Doc.No.',
    T2.DocDate AS 'Delivery Date',
    M.DocNum as 'A/R Invoice No.',
    M.DocDate as 'Inv. Date',
    M.CardName as 'Vendor Name',
    M.NumAtCard as 'Bill No. & Date',
    ISNULL(L.ItemCode,'Service Item') as 'Item Code',
    L.Dscription,
    L.Quantity,
    (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Sum(TaxSum) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT Sum(TaxSum) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT Sum(TaxSum) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    (SELECT Sum(TaxSum) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=10 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
    (SELECT Sum(TaxSum) FROM INV4 where statype=8 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
    (Select Sum(LineTotal) From INV3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN ODLN T2 ON T2.DocEntry = T1.TrgetEntry
    INNER JOIN DLN1 T3 on T3.DocEntry = T2.Docentry
    INNER JOIN OINV M ON M.DocEntry = T3.TrgetEntry
    LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
    WHERE M.DocDate >= '[%0]'
    GROUP BY
    T0.DocNum,T0.DocDate,T2.DocNum,T2.DocDate, M.DocNum,M.DocDate,M.CardName,M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,
    M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    ORDER BY
    T0.DocNum,T0.DocDate,T2.DocNum,T2.DocDate, M.DocNum,M.DocDate,M.CardName,M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,
    M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
    U can modify this query little bit as per ur Need
    Giri

  • Query on Withholding Tax

    Hi Expert,
    I'm using the following query to inquire on withholding tax.
    SELECT T0.[DocDate], T0.[TransId], T0.[CardName], T0.[LicTradNum] as 'TIN', T0.[WTApplied], T0.[WTSum], T0.[WTSum]-T0.[WTApplied] as 'Tax Due' FROM OPCH  T0 WHERE T0.[DocDate] >=[%0] and  T0.[DocDate] <=[%1] and   T0.[WTSum] > 0 ORDER BY T0.[CardName]
    I have setup different withholding tax rate depending on the payment however I want to include in the query the withholding tax rate.
    How can I include the tax rate on the query.
    Thanks,
    Arlmi2000

    Hi Hendry
    Thanks for your reply. I tried your query but there was a syntax error in your query.
    1). [Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '0'. 2). [Microsoft][SQL Native Client][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
    But I was able to get an Idea on what table I need to include in my query.
    Below is the query I develop and it already include the tax rate. 
    SELECT T0.[DocDate], T0.[TransId], T0.[CardName], T0.[LicTradNum] as 'TIN', T1.[Rate], T0.[WTApplied], T0.[WTSum], T0.[WTSum]-T0.[WTApplied] as 'Tax Due' FROM OPCH  T0 INNER JOIN PCH5 T1 ON T0.DocEntry = T1.AbsEntry WHERE T0.[DocDate] >=[%0] and  T0.[DocDate] <=[%1] and   T0.[WTSum] > 0 ORDER BY T0.[CardName]
    However, I still facing problem, How can I exclude in the result  the documents with previously applied Credit Memo?
    Thanks,
    Arlmi2000

Maybe you are looking for

  • Itunes will only play one song at a time, not continuously through library

    I recently had to reload all of my song files onto an external hard drive...and now only one song will play at a time from my itunes library,instead of it continuously playing through the entire library. why is this happening? Its driving me nuts.  

  • Capture re pricing during order creation/change

    Hi, I have to differentiate between standard pricing and re-pricing ( when user has pressed update button on the conditions tab ) in a sales order. How and where can i get this information during order creation / change. Thanks for your replies. Abhi

  • Delete Statement is not working correctly

    Hello, The following delete statement is not working correctly. If I press delete it will delete everything in the category table I don't know whats wrong with it. ----delete row from category if there is not infrastructure to support------ IF :P12_D

  • ITS window opening and closing by itself

    Hello Everybody, We have a MSS service which calls a ITS service. it shows different report based on our selection.  When there is no data coming from the backend, its closing automatically by itself.  whereas its supposed to show some message that n

  • Network settings not sticking?

    Noob (Win convert) question, I think. Leopard 10.5 with DHCP enabled on my home and work networks. All settings from the DHCP servers come across and are correct in the Network prefernces. But, when I open the Network preferences panel and select Adv