Professional Documents
Culture Documents
txt
;; product-id: ae535cfa-1r7f-3h7a-31h3-a5r55a984e6e
;; author: shweta computers
;;objective:-
;;using the explode attribute to display ledgers details in
;;my daybook format
;;======================================================================
[report: my report]
form : my form
[form: my form]
part: my part
[part: my part]
line: my line
scroll: vertical
;;shows border
common border: yes
[line: my line]
left fields: myfld1,myfld2,myfld3,myfld4
[field: myfld1]
;;type attribute specifies the data-type of the field
type : date
set as : $date
[field: myfld2]
;;the use keyword inherits the functionality/properties of the specified object
use : short name field
set as : $vouchertypename
[field: myfld3]
use : name field
set as : $$collectionfield:$ledgername:1:allledgerentries
[field: myfld4]
use : amount field
set as : $amount
;;important:-
;;this part is displayed when explodeflag variable is set to yes
;;i.e. when user presses alt+f1 key
[part: myexplodepart]
line : myexplodline
;; specify the fields that you wish to display when the part is exploded
[line: myexplodline]
;;amount field
[field: fldexplodeamount]
use : amount field
set as : $amount
style : small italic
width : @@shortwidth
;;collection definition
[collection: my collection]
type: voucher
;; notes:-
;; 1) explode attribute is used at line definition level to display (i.e explode)
;; additional details.
;;
;; 2) when the user presses alt+f1 key, the ledger details are shown.
;;
;; 3) the attribute empty is used at line definition level as shown below:-
;;
;; empty: $$isfirstobj
;;
;; syntax:- empty : <condition>
;; the empty attribute is used at the line definition level to skip the line,
;; if the condition is true. herein, we have specified that 1st object of the
;; collection "allledgerentries" must be skipped.
;;
;; 4) $$isfirstobj
;; return value: logical
;; checks whether the object is the 1st object or not in the given collection
;;
;;
;; 5) collectionfield is a tally internal function. it returns the method/field
;; data of the specified collection as applied on the "nth" object of the
;; collection. in the above code, it fetches the 1st ledgername from the
;; collection "allledgerentries".
;;
;; syntax: $$collectionfield: <method/field> : <positionnumber> : <collection>
;; return value: method/field value as specified as the 1st argument
;;
;; 6) allledgerentries is a pre-defined collection that contains ledger details
;; for the voucher object. $ledgername is a method/field of this collection.
;;
;; 7) date,vouchertypename,vouchernumber,amount are methods/fields of
;; voucher object.
;;
;; 8) namewidth, shortwidth, small italic are pre-defined global formulaes.