Friday, October 27, 2023

how to get vouchar transactions from Purchase order Receipt

 how to get voucher transactions from Purchase order Receipts.

internal final class RunnableClass

{

   /// <summary>

   /// Class entry point. The system will call this method when a designated menu

   /// is selected or when execution starts and this class is set as the startup class.

   /// </summary>

   /// <param name = "_args">The specified arguments.</param>

   public static void main(Args _args)

   {

       GeneralJournalEntry generalJournalEntry;

       VendInvoiceJour       VendInvoiceJour;

       GeneralJournalAccountEntry      GeneralJournalAccountEntry;

 

       while select GeneralJournalAccountEntry

           join generalJournalEntry

           where GeneralJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId

           && generalJournalEntry.DocumentNumber == 'return12283'

       {

           Info(strFmt("%1",generalJournalEntry.SubledgerVoucher));

       }

   }

}

==========================

SQL statement:-

select * from GeneralJournalAccountEntry

join GeneralJournalEntry

on GeneralJournalAccountEntry.GENERALJOURNALENTRY = GeneralJournalEntry.RECID

and GeneralJournalEntry.DOCUMENTNUMBER = 'AP-0001'

Output:-



No comments:

Post a Comment

My Requirement is Delete option in Vendor Master for all roles except System Administrator

   [FormControlEventHandler(formControlStr(VendParameters, VendParameters_YNV_VendorMasterDeletionOption), FormControlEventType::Modified)] ...