Sir please resolve errors TDL function =auto generate vouchers period wise and expense wise. error = no generate 365 vouchers as per period 1-4-2012 to 31-3-2013 [Report: Auto Payments] Form: Interest Calcs Auto: Yes [Form: Interest Calcs] Parts: Form SubTitle, Interest Calcs Local: Field: Form SubTitle: Info: "Auto Payments" on :form accept :yes:call:CreateProvVouchers:#InterestPrincipal:#EndingDate:#InterestNoOfYrs:#InterestResult:#AmountForexField:#Narration Width: 50% Page Height : 45% Page Background : Soft Violet [Part: Interest Calcs] Lines: Interest Principal,Ending Date,Interest NoOfYrs, Interest Result,ProvLedAmt,Narration [Line: Interest Principal] Fields: Long Prompt, Interest Principal Local: Field: Long Prompt: Info: "Starting Date :" [Field: Interest Principal] Type: Date Case: Title Case Width: 50 Align: Left [Line: Ending Date] Fields: Long Prompt, Ending Date Local: Field: Long Prompt: Info: "Ending Date :" Space Bottom : 1 [Field: Ending Date] Type: Date Case: Title Case Width: 50 Align: Left [Line: Interest NoOfYrs] Fields: Long Prompt, Interest NoOfYrs Local :Field: Long Prompt: Info: "Cash/ Bank Ledger :" [Field:Interest NoOfYrs] Type: String Table: Cash Ledgers Extract Show Table: Always Case: Title Case Width: 50 Align: Left [Line: Interest Result] Fields: Long Prompt, Interest Result Local: Field: Long Prompt: Info: "Payee Ledger :" Local: Field: Default: Inactive: No Space Bottom : 1 [Field:Interest Result] Table: Expense Ledgers Extract Show Table: Always Set As: $$CollectionField:$Name:1:ExpenseLedgersExtract Case: Title Case Type: String Width: 50 Align: Left [Line : Narration] Fields: Long Prompt, Narration Local: Field: Long Prompt: Info: "Narration :" [Field:Narration] Use : Voucher Narration Field Lines : 4 Width : 50% Screen Set Always : Yes [Line: ProvLedAmt] Field: Long Prompt, Amount Forex Field Local: Field: Long Prompt: Info: "Enter Ledger Amount :" [Field: ProvLedAmt] use: amount field width : 50 ;; Report designed to open daybook with newly created entries ;; immediately after the execution of current function call [Report: Prov Entries in Daybook] Use: Daybook Set: VoucherTypeName: "Payment" Set: SVFromDate: $$FinYearBeg:##StartDate:$StartingFrom:Company:##SVCurrentCompany Set: SVToDate: $$FinYearEnd:##StartDate:$StartingFrom:Company:##SVCurrentCompany Local: Collection: Default: Add: Filter: Prov Filter [System: Formula] Prov Filter: $Amount = ##InputAmt ;; Function to create Provisional Vouchers automatically ;; and display list of vouchers created instantaneously [Function: Create Prov Vouchers] ;; Definition Block Parameter : InputDate: Date Parameter: InputNoofEnt: Number Parameter: InputCBLed: String Parameter: InputOthLed: String Parameter: InputAmt: Amount Parameter: InputNrra: String Variable : Counter: Number Variable: VoucherTypeName: String Variable: FamilyVoucherFlag: Logical Variable: StartDate: Date Variable:EndDateate ;; Procedural Block 00: SET: Counter: ##InputNoofEnt 10: SET: StartDate: ##InputDate ;; Variable introduced to retain original date reqd for filtering in daybook 20: SET: endDate: ##InputDate 20: WHILE : ##Counter >= 1 30 : SET : SVViewName : $$SysName:AcctgVchView 40:NEW OBJECT: Voucher 50:SET VALUE: Date: ##InputDate 70:SET VALUE: VoucherTypeName: $$VchTypePayment 80: INSERT COLLECTION OBJECT: LedgerEntries 90: SET TARGET: LedgerEntries 100:SET VALUE: LedgerName: ##InputOthLed 110:SET VALUE: Amount: -1 * ##InputAmt 120:SET VALUE: Is Deemed Positive: "Yes" 130:SET TARGET: .. 140: INSERT COLLECTION OBJECT: LedgerEntries 150: SET TARGET: LedgerEntries 160:SET VALUE: LedgerName: ##InputCBLed 170:SET VALUE: Amount: ##InputAmt 180:SET VALUE: Is Deemed Positive: "No" 181:SET VALUE: VOUCHER NARRATION FILED: ##InputNrra 190:SET TARGET: .. 200 : SET VALUE : PersistedView: ##SVViewName 210:CREATE TARGET 220: SET : InputDate: $$NextMonth:##InputDate 230ECREMENT: Counter 240: END WHILE 250: DISPLAY: Prov Entries in Daybook 260: RETURN ;; End-of-File
Dear Mr.Gurpreet, Please find the attached code Similar to your requirement , make the necessary changes like below and above the required dates validation and controls , let me the use of the attached code(Tell me this code is working /meeting your requirement) Thanking you , Vikram