Dear Experts Please suggest how to prevent an auto Journal entry ... checking the Narration of already entered Journal Voucher for the Specfied Dates using Function. Thanks
My Fuction is as below: [Key:MB_EMP_AutoJrnl] Title:Auto Jrnl Key:Alt+J Action:Call:MB_Emp_AutoJrnlFunc:##SVToDate [Function:MB_Emp_AutoJrnlFunc] Parameter MBToDtate Variable MBToDateate Variable :vMBExpLedger : String Variable :vMBEmpAmount : Amount Variable :vMBEmpNameVar: String Variable :vMBMnthNm:String Variable :vMBYear:String Variable :vMBRate:String Variable :vMBOT:String Variable :vMBwrkdDays:String Variable :vMBSplAmt:String Variable :vMBHDAmt:String Variable :vMBExtraDays:String Variable : Counter : Number 0001 : Set : Counter : 1 0002 : Start Progress : ($$NumItems:MB_Emp_AutoJrnlColl):"Employee Salary Journal Vouchers":"Creating.." 01 : Walk Collection:MB_Emp_AutoJrnlColl 01a : SetMBToDate:$$MonthEnd:##pMBToDt 02 : Set: vMBExpLedger:"Wages and Salary" 04 : Set: vMBEmpAmount:$$Round:$MBmnthTotSalary:1 05 : Set: vMBEmpNameVar:$Name 05A : Set: vMBMnthNm:$$FullMonthName:##pMBToDate 05B : Set: vMBYear:$$YearOfDate:##pMBToDate 05C : Set: vMBRate:$$String:"Rate = " + $$String:$MBLEDEmpRate 05D : Set: vMBOT:$$String:"OT = "+$$String:$MBEmpSSOvrTm 05E : Set: vMBwrkdDays:$$String:"Days = "+$$String:$MBEmpSSWrkdDays 05F : Set: vMBSplAmt:$$String:"SPLDayAmt = "+$$String:$MBMnthSplAmt 05G : Set: vMBHDAmt:$$String:"HDAmt = "+$$String:$MBMnthHDAmt 05H : Set: vMBExtraDays:$$String:"ExtraDays = "+$$String:$MBEmpSSOvrTmDays 06 : New Object:Voucher 07 : Set Value: VoucherTypeName:"Journal" 08 : Set Value: Date:$$Date:##pMBToDate 09 : Set Value:Narration@MBEmpJrnlNarr 25a : Insert Collection Object : AllLedgerEntries 26 : Set Value : LedgerName : ##vMBExpLedger 27 : Set Value : Amount : ##vMBEmpAmount 28 : Set Value : IsDeemedPositive : Yes 29 : Set Target : .. 11 : Insert Collection Object : Ledger Entries 12 : Set Value : IsDeemedPositive : No 13 : set value : Ledger Name : ##vMBEmpNameVar 14 : Set value : Amount :##vMBEmpAmount 15 : Set Target :.. 32 : Create Target 33 : Increment : Counter 34 : Show Progress : ##Counter 35 : End Walk 36 : End Progress [Collection: MB_Emp_AutoJrnlColl] Data Source: Report: selected Fetch: *.* [System:Formulae] MBEmpJrnlNarr:$$String:##vMBMnthNm +" - " +$$String:##vMBYear + " "+$$String:##vMBRate+ " "+$$String:##vMBOT+ " "+$$String:##vMBwrkdDays+ " "+$$String:##vMBSplAmt+ " "+$$String:##vMBHDAmt+ " "+$$String:##vMBExtraDays
When we create the JV with this Function it writes the month of the Date field in selected in Narration of new Journal Voucher(JV). Like Novemver-2020 for any November-2020 date.