Tally Chapter 105 TDL for Receipt contra Payment BULK Entry by Rajiv Mishra Computer Class

 TDL CODE







--------------TDL CODE STARTS HERE------------------------





[#Menu: Gateway of Tally]


Add : Item : "Bulk Pay/ Rec/ Contra Entry" : Alter : JennyPayment EntryRpt


[Report : JennyPayment EntryRpt]


Form : JennyPayment EntryFrm

Title : $$LocaleString:"Bulk Payment Entry"

Object : Company



[Form : JennyPayment EntryFrm]


Part : Form SubTitle, JennyPayment DrLedPrt;JennyPayment CrLedPrt, JennyPayment DrLedPrt

Width : 100% Page

Height : 100% Page

Space Left : 0.25

Space Right : 0.25

Horizontal Align: Left


Local : Field : Form SubTitle : Info : "Bulk Payment / Receipt / Contra Entry"


On : Form Accept : yes : Form Accept

On : Form Accept : yes : Call : CphSale BulkAutoEntry

;; Sales Credit Part ;;

;;------------------------------------------------------------------------------------------




; [Part : JennyPayment CrLedPrt]

;

; Line : JennyPayment CrLedLne;,JennyPayment SalesLedName

;

; [Line : JennyPayment CrLedLne]

;

; Field : Medium Prompt, JennyPayment CrLedFld ;,JennyPayment SalesLedName

; Local : Field : Medium Prompt : Info : $$LocaleString:"Credit Ledger"

; Space Bottom : 0.50

;

;

; [Field : JennyPayment CrLedFld]

;

; Type : String

;

; Use : Name Field

; Table : JennyPayment SalesLed

; Storage : LedgerName

; Show Table : Always

; Case : Title Case

; Width : 50

; Align : Left

; Border : Thin Box

;

; [Collection: JennyPayment SalesLed]

;

; Title : "List of Ledgers"

; Type : Ledger

; ;Child of : $$GroupBank

; Belongs to : yes

; Format : $Name,30

; Align : Right

; Full Height : Yes


;;;;;;;;;



;; Sales Debit Part ;;

;;------------------------------------------------------------------------------------------

[Part : JennyPayment DrLedPrt]


Line : JennyPayment DrLedTtleLne, JennyPayment DrLedDetlsLne

Repeat : JennyPayment DrLedDetlsLne : JennyPaymentCollection

;Repeat : JennyPayment CrLedLne : JennyPaymentCollection

Scroll : Vertical

Common Border : Yes

Break On : $$IsEndOfList:$PartyLedgerName



[Line : JennyPayment DrLedTtleLne]


Field :JennyPaymentSerialNoFld1,JennyPaymentDateFld1,JennyPaymentVchtypeFld1,JennyPaymentDebitLedgerFld1,JennyPaymentCreditLedgerFld1,JennyPaymentDrAmountFld1,JennyPaymentSALESLEDNAME1

Right Field : JennyPaymentLednarration1

;Use : JennyPayment DrLedDetlsLne


; Local : Field : Default : Inactive : No

;Local : Field : Default : Delete : Storage

Local : Field : Default : Type : String

Local : Field : Default : Style : Normal Bold

Local : Field : Default : Align : Center

Local : Field : Default :Border : Thin Box


[Field : JennyPaymentSerialNoFld1]; : Info : $$LocaleString:"Sno."

Width :5

Set as : "Sno."

Skip : Yes


[Field : JennyPaymentDateFld1]; : Info : $$LocaleString:"Date"


Width : @@ShortWidth

Set as : "Date"

Skip : Yes

[Field : JennyPaymentVchtypeFld1]; : Info : $$LocaleString:"Voucher Type"


Width : 8


Set as : "Voucher Type"

Skip : Yes


[Field : JennyPaymentDebitLedgerFld1]; : Info : $$LocaleString:"Debit Ledger"


Width : 25

Set as :"Debit Ledger"

; Set as : If #JennyPaymentVchtypeFld = "Payment" then $$LocaleString:"(Dr) Party Ledger" else +

; If #JennyPaymentVchtypeFld = "Receipt" then $$LocaleString:"(Cr) Party Ledger" else +

; If #JennyPaymentVchtypeFld = "Contra" then $$LocaleString:"(Dr) Cash / Bank Name" else "Debit Ledger"

Skip : Yes



[Field : JennyPaymentCreditLedgerFld1]; : Info : $$LocaleString:"Credit Ledger"

Width : 25

Set as :"Credit Ledger" ;JennyPaymentCreditLedgerFld

; Set as : If #JennyPaymentVchtypeFld = "Payment" then $$LocaleString:"(Cr) Bank Name" else +

; If #JennyPaymentVchtypeFld = "Receipt" then $$LocaleString:"(Dr) Bank Name" else +

; If #JennyPaymentVchtypeFld = "Contra" then $$LocaleString:"(Cr) Cash / Bank Name" else "Credit Ledger"

Skip : Yes

[Field : JennyPaymentDrAmountFld1]; : Info : $$LocaleString:"Amount"

Set as : "Amount"

Width : @@ShortWidth

Skip : Yes


[Field : JennyPaymentSALESLEDNAME1]; : Info : $$LocaleString:"Bank Ledger"

Set as :"Bank Ledger"

Width: 5

Invisible: Yes

Skip : Yes



[Field : JennyPaymentLednarration1]; : Info : $$LocaleString:"Narration"

Set as : "Narration"

Full Width : Yes

Skip : Yes



[Line : JennyPayment DrLedDetlsLne]


Field : JennyPayment SerialNoFld, JennyPayment DateFld, JennyPayment VchtypeFld , JennyPayment DebitLedgerFld,JennyPayment CreditLedgerFld, JennyPayment SalesLedName,JennyPayment DrAmountFld

Right Field : JennyPayment Lednarration


Space Top : 0.25


[Field : JennyPayment SerialNoFld]


Use : Short Name Field

;Width : @@SymWidth

Width :5

Set as : $$Line

Skip : Yes




[Field : JennyPayment DateFld]


Type : Date

Use : Short Date Field

Storage : Date

Width : @@ShortWidth

Border : Thin Box

[Field : JennyPayment VchtypeFld ]


Type : String

Table : JennyVchtypeFld, EndOfList

;Set as : ##SVVoucherType

Use : Name Field

Set always : Yes

Storage : JennyPaymentVchtypeFld

;Set always : Yes

Show Table : Always

Case : Title Case

Width : 8

Align : Left

;Inactive : $$IsEndOfList:$JennyPaymentVchFld

Border : Thin Box


[Collection: JennyVchtypeFld]


Title : $$LocaleString:"Voucher Types"

Collection : Contra Vouchers

Collection : Payment Vouchers

Collection : Receipt Vouchers

Fetch : Name, ActualVoucherType

Format : $$Name, 10


; Type : Vouchers : VoucherType

; List Name: "Payment","Receipt","Contra"

; Belongs to : yes

; Format : $Name,30

; Align : Right

; Full Height : Yes



[Field : JennyPayment DebitLedgerFld]


Type : String

Use : Name Field

Table : JennyPayment SundryDebtorsLed, EndOfList

Storage : PartyLedgerName

;;Set as : $Name

Show Table : Always

Case : Title Case

Width : 25

Align : Left

Inactive : $$IsEndOfList:$PartyLedgerName

Border : Thin Box





[Collection: JennyPayment SundryDebtorsLed]


Title : "List of Ledgers"

Type : Ledger

;Child of : $$GroupIndirectExpenses

Belongs to : yes

Format : $Name,30

Align : Right

Full Height : Yes

;Filter : PaymentDebitledgerFld



[Field :JennyPayment CreditLedgerFld]


Type : String


Use : Name Field

Table : JennyPayment SalesLed

Storage : LedgerName

Show Table : Always

Case : Title Case

Width : 25

Align : Left

Border : Thin Box


[Collection: JennyPayment SalesLed]


Title : "List of Ledgers"

Type : Ledger

;Child of : $$GroupBank

Belongs to : yes

Format : $Name,30

Align : Right

Full Height : Yes




[Field : JennyPayment SALESLEDNAME]

Type : String

;Table : JennyPayment SalesLed


Set as: #JennyPaymentCreditLedgerFld

Storage : SalesLedgerName

;Show Table : Always

Width : 5

Skip : Yes

Align : Left

;Inactive : $$IsEndOfList:$PartyLedgerName

Invisible: Yes

[Field : JennyPayment DrAmountFld]


Type : Amount

Use : Amount Field

Storage : Amount

Width : @@ShortWidth

Inactive : $$IsEndOfList:$PartyLedgerName

Border : Thin Box



[Field : JennyPayment Lednarration ]


Type : String

Use : Name Field

Storage : Narration


Full Width : Yes

Inactive : $$IsEndOfList:$PartyLedgerName




[Collection: JennyPaymentCollection]


Title : "Bulk Payment Entry"

Type : JennyPayment BulkEntry : Company

Child Of : ##SVCurrentCompany




[System: UDF]

JennyPayment BulkEntry : Aggregate : 41071

Date : Date : 41072

PartyLedgerName : String : 41073

Amount : Amount : 41074

SalesLedgerName : String : 41075

Narration : String: 41076

JennyPaymentVchtypeFld : String: 41077

[System: UDF]

LedgerName : String : 41068

;; ---------------------------------------

[System: Variable]

[Variable : Counter]

Type: Number

;; Bulk Auto Entry ;;

;;-----------------------------------------------------------------------------------------------------------------------

[Function: CphSale BulkAutoEntry]

;; Procedural Block

Parameter : JennyVTypeName : String : ##SVVoucherType

;Parameter : pVoucherType : String

Variable : SVVoucherType : String


Variable : CphDate : Date

Variable : CphDrLedgerName : String

Variable : CphCrLedgerName : String

Variable : CphAmount : Amount

Variable : CphNarration : String

Variable : CphJennyPaymentVchtype: String


Variable : Counter : Number: 1


;00: Set : SVVoucherType : ##pVoucherType

001 : Start Batch Post : 10

005 : START PROGRESS : ($$NumItems:JennyPaymentCollection) : "Creating Vouchers" : @@CmpMailName : "Creating Sales Vouchers ..."

007 : WALK COLLECTION : JennyPaymentCollection

010 : SET : CphDate : $$Date:$Date

010a : Set : CphJennyPaymentVchtype :""

015 : SET : CphJennyPaymentVchtype :$JennyPaymentVchtypeFld

020 : SET : CphDrLedgerName : $PartyLedgerName

030 : SET : CphCrLedgerName : $SalesLedgerName

040 : SET : CphAmount : $$AsAmount:$Amount

045 : SET : CphNarration : $Narration

050 : SET : SVViewName : $$SysName:AcctgVchView

060 : NEW OBJECT : Voucher

070 : SET VALUE : Date : ##CphDate

080 : SET VALUE : VoucherTypeName :##CphJennyPaymentVchtype; ##SVVoucherType;$$VchTypePayment ; $$VchTypeReceipt;VoucherTypeName

080a : Log: #JennyPaymentVchtypeFld

090 : SET VALUE : Narration : $Narration

;100 : SET VALUE : Narration : "For Invoice No : " + $VoucherNumber + " Auto Receipt "

;;----------------------------------------------------------------------------

;;Debit Entry

110 : INSERT COLLECTION OBJECT : AllLedgerEntries

;115 : SET VALUE : VoucherTypeName : ##CphJennyPaymentVchtype


; 110a :Do If:#JennyPaymentVchtypeFld = "Payment" :Set Value :Is Deemed Positive : "Yes"

;110b :Do If:#JennyPaymentVchtypeFld = "Receipt" :Set Value :Is Deemed Positive : "No"

120 : SET VALUE : Ledger Name : ##CphDrLedgerName


140 : SET VALUE : IsDeemedPositive : "Yes"


;140a :Do If:#JennyPaymentVchtypeFld = "Payment" :Set Value : Amount : ##CphAmount * (-1)

;140b :Do If:#JennyPaymentVchtypeFld = "Receipt" :Set Value :Amount : ##CphAmount

141 : SET VALUE : Amount : ##CphAmount * (-1)

150 : SET TARGET : ..

150a : LOG : $$String:##CphDrLedgerName



;----------------------------------------------------------------------------

;;Credit Entry

160 : INSERT COLLECTION OBJECT : AllLedgerEntries

;160a : SET TARGET : LedgerEntries


;160a :Do If:#JennyPaymentVchtypeFld = "Payment" :Set Value :Is Deemed Positive : "Yes"

; 160b :Do If:#JennyPaymentVchtypeFld = "Receipt" :Set Value :Is Deemed Positive : "No"


; 160a : If: $$JennyPaymentVchtypeFld = ##CphJennyPaymentVchtype

; 160b: Do If:$LedgerName=##CphCrLedgerName:SET VALUE : Is Deemed Positive : "Yes"

; 160c : Else

; 160d: Do If:$LedgerName=##CphCrLedgerName:SET VALUE : Is Deemed Positive : "No"

; 160e : End If

170 : SET VALUE : Ledger Name : ##CphCrLedgerName


;170a :Do If:#JennyPaymentVchtypeFld = "Payment" :Set Value : Amount : ##CphAmount * (-1)

; 170b :Do If:#JennyPaymentVchtypeFld = "Receipt" :Set Value :Amount : ##CphAmount

180 : SET VALUE : Amount : ##CphAmount

190 : SET VALUE : IsDeemedPositive : "No"

200 : SET TARGET : ..

210 : SET VALUE : PersistedView : ##SVViewName

220 : CREATE TARGET

230 : INCREMENT : Counter

230a : SHOW PROGRESS : ##Counter

240 : END WALK

260 : END PROGRESS

280 : RETURN

290 : End Batch Post

[Report: JennyPayment Daybook]

Use : Daybook


Set : SVFromDate : $$FinYearBeg:##StartDate:$StartingFrom:Company:##SVCurrentCompany

Set : SVToDate : $$FinYearEnd:##StartDate:$StartingFrom:Company:##SVCurrentCompany

 







--------------TDL CODE ENDED HERE------------------------

टिप्पणियाँ

इस ब्लॉग से लोकप्रिय पोस्ट

Tally Chapter 153 TDL for Custom List of Stock Item By Rajiv Mishra Computer Class

TDL CODE for New Column in Invoice by Rajiv Mishra Computer class