Tally ERP 9 | Tally 9 | Tally 8.1 | Tally 7.2 | Tally 6.3 | Learn Tally TDL

Saturday, June 23, 2007

Voucher Statistics using $$IsPayment, $$IsReceipt etc

You can fetch Voucher statistics using $$IsPayment, $$IsReceipt and others similar functions. For more information on these TDL functions, refer www.rtslink.com

Syntax:-
$$IsPayment: <VoucherTypeName>

Return Value:
Logical

Download TDL27 program.

This TDL program creates a Collection/table which contains Voucher statistics data. To view the Collection data, you can use SQLRequest() function of RTSlink DLL. Refer, rtslink.blogspot.com for more information.

;; PRODUCT: TDL27
;; PRODUCT-ID: ad157cfa-2s7f-4g9a-52f8-ade40a2983be
;; AUTHOR: Shweta Computers
;;==========================================================================
;;This program defines a Collection called VCHStatistics.
;;This collection can be accessed using SQLRequest() function of RTSlink DLL
;;==========================================================================

;;****** Collection definition ******
;;VCHStatistics is a collection that contains a single Object (record) called MyObjects.
;;IsODBCTable is set as YES so that this collection is accessible to external programs

[Collection: VCHStatistics]
Object: MyObjects
IsODBCTable: Yes

;;******* Object Definition *********
;;Herein we are defining an Object called "MyObjects" which comprises of THREE fields
;;1st: PaymentVouchers - Number of Payment Vouchers
;;2nd: ReceiptVouchers - Number of Receipt Vouchers
;;3rd: AllVouchers - Total Number of Vouchers

;;The FilterCount function requires a Formula (i.e. condition) as the 3rd parameter.
[Object: MyObjects]
PaymentVouchers : $$FilterCount:RTSAllVouchers:HasPaymentVouchers
ReceiptVouchers : $$FilterCount:RTSAllVouchers:HasReceiptVouchers
AllVouchers : $$FilterCount:RTSAllVouchers:AlwaysTrue

;;******* Global Formula definition ********
;;$VoucherTypeName refers to the Field NAME of Voucher Collection

[System: Formula]
HasPaymentVouchers : $$IsPayment:$VoucherTypeName
HasReceiptVouchers : $$IsReceipt:$VoucherTypeName
AlwaysTrue : $$IsWindows


;;******* Collection Definition ********
;;This makes the pre-defined Voucher Collection accessible to external programs
;;and also to the user-defined collection VCHStatistics
;;
[Collection: RTSAllVouchers]
Type: Voucher
IsODBCTable: Yes

;;Notes
;;=====
;; $$IsPayment is a Tally Interenal Function that is used to check whether a Voucher is
;; Payment Voucher or not
;; Syntax :- $$IsPayment:
;; Return Value:- Logical
;;
;; $$IsReceipt is a Tally Interenal Function that is used to check whether the Voucher is
;; Receipt Voucher or not
;; Syntax :- $$IsReceipt:
;; Return Value:- Logical
;;
;; $$IsWindows is a Tally Internal Function which checks whether the OS is Windows or not.
;; Syntax :- $$IsWindows
;; Return Value:- Logical

Tally; Tally Developer and Tally Definition Language are trademarks or registered trademarks of "Tally Solutions FZ LLC", Bangalore.