Getting all the invoices from table 17

poppinspoppins Member Posts: 647
Hi everyone,
I want to getall the entries that were generated by sales invoices and purchase invoices from table 17 (just from invoices, not from journals)
I applied the following filters:
For sales invoices:
RecGlEntry.SETRANGE("Source Type",RecGlEntry."Source Type"::Customer);
RecGlEntry.SETRANGE("Document Type",RecGlEntry."Document Type"::Invoice);
RecGlEntry.SETRANGE("Journal Batch Name",'');
For purchase invoices:
RecGlEntry.SETFILTER("Source Type",'%1|%2',RecGlEntry."Source Type"::Vendor,RecGlEntry."Source Type"::"Fixed Asset");
RecGlEntry.SETRANGE("Document Type",RecGlEntry."Document Type"::Invoice);
RecGlEntry.SETRANGE("Journal Batch Name",'');
Is it correct or am I missing something?

Comments

  • gideongideon Member Posts: 17
    Hi,

    If said only Sales Invoices... Sales Order will have the same footprint in table 17. Document type will still reflect "Invoice".

    other than that it seems accurate.
Sign In or Register to comment.