;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara ;;Auto Payments voucher [#Menu: GatewayofTally] Add : Item : Before : @@Locquit: AutoPayment Vouchers : ALTER : Auto PaymentVouchers [Report: AutoPaymentVouchers] ;; Interface to accept user Input Local : Field : Default : Local : Style : Default : Height : 8 Use : Simple Interest Calculator Local : Form : Interest Calc : On: Form Accept : Yes : Call : CreateProvVouchers:#InterestPrincipal:#InterestRate:#InterestNoOfYrs:#InterestResult:#AmountForexField:#InterestPrincipal1 Local : Form : Interest Calc : Local : Field : Form SubTitle : Info : "Auto Payment Voucher Details" Local : Field : Medium Prompt : Width : 25 Local : Part : Interest Calc : Add : Lines : ProvLedAmt Local : Line : Interest Principal: Local : Field : Medium Prompt : Info : "Starting Date :" Local : Line : Interest Principal: Local : Field : Simple Prompt : Info : "Ending Date :" Local : Line : Interest Principal: Local : Field : Simple Prompt : Width : @@Mediumwidth ;; Local : Field : Interest Principal : Type : Date ; Local : Field : Interest Principal1: Type : Date Local : Field : Interest Principal: Case : Title Case Local : Field : Interest Principal: Width : 50 Local : Field : Interest Principal: Align : Left Local : Line : Interest Rate : Local : Field : Medium Prompt : Info : "No. of Instalments :" Local : Field : Interest Rate : Type : Number Local : Line : Interest Rate : Local : Field : Interest Rate : Setas : #InterestPrincipal1-#InterestPrincipal Local : Field : Interest Rate : Format : "No Zero, No Percentage, No Comma" Local : Field : Interest Rate : Width : 50 Local : Field : Interest Rate : Align : Left Local : Line : Interest NoOfYrs : Local : Field : Medium Prompt : Info : "Cash/ Bank Ledger :" Local : Field : Interest NoOfYrs : Type : String Local : Field : Interest NoOfYrs : Table : Cash Ledgers Extract Local : Field : Interest NoOfYrs : Show Table: Always Local : Field : Interest NoOfYrs : Case : Title Case Local : Field : Interest NoOfYrs : Width : 50 Local : Field : Interest NoOfYrs : Align : Left Local : Line : Interest Result : Local : Field : Medium Prompt : Info : "Payee Ledger :" Local : Line : Interest Result : Local : Field : Default : Inactive : No Local : Field : Interest Result : Table : Expense Ledgers Extract Local : Field : Interest Result : Show Table: Always Local : Field : Interest Result : Set As : $$CollectionField:$Name:1:ExpenseLedgersExtract Local : Field : Interest Result : Case : Title Case Local : Field : Interest Result : Type : String Local : Field : Interest Result : Width : 50 Local : Field : Interest Result : Align : Left Fetch Collection: Cash Ledgers Extract, Expense Ledgers Extract [Line: ProvLedAmt] Field : Medium Prompt, Amount Forex Field Local : Field : Medium Prompt : Info : "Enter Ledger Amount :" ;; 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 : InputDate1 : Date Variable : Counter : Number Variable : VoucherTypeName : String Variable : FamilyVoucherFlag : Logical Variable : StartDate : Date Variable : PostDatedFlag : Logical ;; Procedural Block 00 : SET : Counter : ##InputNoofEnt 10 : SET : StartDate : ##InputDate ;; Variable introduced to retain original date reqd for filtering in daybook 20 : WHILE : ##Counter >= 1 ; 21 : IF : ##InputDate1=##InputDate 30 : SET : SVViewName : $$SysName:AcctgVchView 40 : NEW OBJECT : Voucher 50 : SET VALUE : Date : ##InputDate 60 : SET VALUE : Is Post Dated : if $LastVoucherDate:Company:##SVCurrentCompany < ##InputDate then "Yes" else "No" 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" 190 : SET TARGET : .. 200 : SET VALUE : PersistedView : ##SVViewName 210 : CREATE TARGET ; 211 : BREAK ; ; 212 : ENDIF 220 : SET : InputDate : ##InputDate+1 221 : IF : ##InputDate1=##InputDate 222 : BREAK 230 : DECREMENT : Counter 231 : END IF 240 : END WHILE 250 : DISPLAY : Prov Entries in Daybook 260 : RETURN [Report: Simple Interest Calculator] Form : Interest Calc Auto : Yes [Form: Interest Calc] Parts : Form SubTitle, Interest Calc Local : Field : Form SubTitle : Info : "Simple Interest Calculator" FullWidth : No FullHeight: No [Part: Interest Calc] Lines : Interest Principal, Interest Rate, Interest NoOfYrs, Interest Result [Line: Interest Principal] Fields : Medium Prompt, Interest Principal,Simple Prompt, Interest Principal1 Local : Field : Medium Prompt : Info : "Principal Amount :" [Field: Interest Principal] Use : ShortDate Field SetAlways : Yes Modifies : VarStratDate [Field: Interest Principal1] Use : Shortdate Field SetAlways :Yes Modifies : VarEndDate [Variable : VarStratDate] Type : Date [Variable : VarEndDate] Type : Date [System : Variable] VarStratDate : ##SVCurrentdate [Line: Interest Rate] Fields : Medium Prompt, Interest Rate Local : Field : Medium Prompt : Info : "Rate :" [Field: Interest Rate] Use : Number Field Format : "No Zero, Percentage" Align : Right Setalways : Yes Width : @@AmountWidth [Line: Interest NoOfYrs] Fields : Medium Prompt, Interest NoOfYrs Local : Field : Medium Prompt : Info : "Tenure :" [Field: Interest NoOfYrs] Use : Number Field Format : "NoZero" Align : Right Width : @@AmountWidth [Line: Interest Result] Fields : Medium Prompt, Interest Result Local : Field : Medium Prompt : Info : "Simple Interest Amount :" Local : Field : Default : Inactive : $$IsEmpty:#InterestPrincipal OR $$IsEmpty:#InterestRate OR $$IsEmpty:#InterestNoOfYrs SpaceTop: 1 [Field: Interest Result] Use : Amount Field Set Always : Yes Set As : $$SICalc:#InterestPrincipal:#InterestRate:#InterestNoOfYrs ;; Function to calculate Simple Interest [Function: SI Calc] ;; Definition Block Parameter : P : Amount Parameter : R : Number Parameter : T : Number Returns : Amount Variable : Interest : Amount ;; Procedural Block 01 : SET : Interest : (##P * ##R * ##T) / 100 02 : RETURN : ##Interest ;; End-of-File