Purchase Requisition

Discussion in 'Tally Developer' started by Lishanthi Anoshika, Nov 5, 2021.

    
  1. Lishanthi Anoshika

    Lishanthi Anoshika New Member


    This TDL is working for Tally ERP9.3.3 But Its not working in 5.3.8
    Any experts can check this Please.

    [#Part: EI OrderInfo]
    Invisible : @@IsPurchase OR @@IsOnlyPuchOrder Or (NOT @@OrderTerms AND NOT @@OtherReference)
    [#Field: EI GetOrderNo]
    Set As : $TSPLFFEPRNOrder
    Set Always : Yes
    [#Part: EI Orders]
    Add : Options : TSPL FFE EI PRNRefOrder No : @@IsOnlyPuchOrder
    [!Part: TSPL FFE EI PRNRefOrder No]
    Add : Parts : At Beginning : TSPL FFE EI PRNRefOrder

    [Part: TSPL FFE EI PRNRefOrder]
    Lines : TSPL FFE PRN Details of Book

    [Line: TSPL FFE PRN Details of Book]
    Fields: Medium Prompt, TSPL FFE PRN Order Details, TSPL FFE PRN Order Date
    Local : Field : Medium Prompt : Info : "PRN Order No"
    [Field: TSPL FFE PRN Order Details]
    Use : Name Field
    Table : TSPL FFE PRN Order Table
    Storage : TSPL FFE PRNOrder
    Show Table : Always
    [Field: TSPL FFE PRN Order Date]
    Use : Uni Date Field
    Set As : $$Table:TSPLFFEPRNOrderDetails:$Date

    [Collection: TSPL FFE PRN Order Table Source]
    Type : Vouchers : VoucherType
    Childof : "Purchase Requisition"
    Filter : IsOptional
    [Collection: TSPL FFE PRN Order Table]
    Title : "PRN List"
    Source Collection : TSPL FFE PRN Order Table Source
    Walk : InventoryEntries
    By : Reference : $..Reference
    By : StockItemName : $StockItemName
    Aggr Compute : Billed Qty : SUM : $BilledQty
    Compute : Date : $..Date
    Compute : IsActivePRN : $$TSPLFFEPRNActive
    Filter : TSPL FFE IsActive
    Format : $Reference, 10
    Format : $Date, 10
    [Function: TSPLFFEPRNActive]
    RETURNS : Logical
    Variable : BillQtyPrn : Quantity
    11 : SET : BillQtyPrn : $BilledQty
    15 : WALK COLLECTION : TSPL FFE PRNCollToCheckRef
    20 : IF : ##BillQtyPrn = $BilledQty
    40 : RETURN : Yes
    50 : ENDIF
    60 : END WALK
    80 : RETURN : No
    [Collection: TSPL FFE PO Coll to Check PRN]
    Type : Vouchers : VoucherType
    Child Of : "Purchase Order"
    [Collection: TSPL FFE PRNCollToCheckRef]
    Source Collection : TSPL FFE PO Coll to Check PRN
    Walk : Inventory Entries
    By : SummReference : $Reference
    By : StockItemName : $StockItemName
    Aggr Compute : BilledQty : SUM : $BilledQty
    Filter : TSPLFFEIsReference

    [Function: TSPLFFEIsActiveFunc]
    Parameter : PReference : String
    Parameter : PActivePRN : String
    10 : RETURN: NOT ##PActivePRN
    [System: Formula]
    TSPLFFEIsReference : $SummReference = $$ReqObject:$Reference AND $StockItemName = $$ReqObject:$StockItemName
    TSPL FFE IsActive : $$TSPLFFEIsActiveFunc:$Reference:$IsActivePRN
    IsOnlyPuchOrder : ##SVVoucherType = "Purchase Order"
    IsPRNOrder : ##SVVoucherType = "Purchase Requisition"
    IsOptional : $IsOptional
    [System: Formula]
    OnlyRequisition : $$CollectionField:$VoucherTypeName:1:LedgerEntries = "Purchase Requisition"
    OnlyRequisition1 : $VoucherTypeName = "Purchase Requisition"
    NoRequisition : NOT @@OnlyRequisition
    [System: UDF]
    TSPL FFE PRNOrder : String : 1052
    [Variable: TSPL FFE VchFillDone]

    Type : Logical
    [System: Variable]

    TSPL FFE VchFillDone: False
    [#Report: Voucher]

    Variable : TSPL FFE VchFillDone
    SET : TSPL FFE VchFillDone : False
    [#Form: EI Supplementary]
    On : Form Accept : @@IsOnlyPuchOrder AND ($$IsEmpty:$$CollectionField:$StockItemName:1:InventoryEntries) +
    : CALL : TSPL FFE VoucherFill : #TSPLFFEPRNOrderDetails : #TSPLFFEPRNOrderDate
    On : Form Accept : @@IsOnlyPuchOrder : SET : TSPL FFE VCH Fill Done : True
    [Collection: TSPL FFE Vch Fill PO Coll ]
    Source Collection : TSPL FFE PO Coll to Check PRN
    Walk : Inventory Entries
    By : StockItemName : $StockItemName
    By : Reference : $Reference
    Fetch : *.*
    Aggr Compute : BilledQty : Sum : $BilledQty
    Aggr Compute : Amount : Sum : $Amount
    [Collection: TSPL FFE Vch FillPRN Coll]
    Source Collection : TSPL FFE PRN Order Table Source
    Walk : Inventory Entries
    By : StockItemName : $StockItemName
    By : Reference : $Reference
    Fetch : *.*
    Aggr Compute : BilledQty : Sum : $BilledQty
    Aggr Compute : Amount : Sum : $Amount
    Compute : Date : $..Date
    Filter : TSPL FFE Voucher Filter
    [Function: TSPL FFE Voucher Fill]
    Parameter : PRNNo : String
    Parameter : PRNDate : Date
    Variable : InvCounter : Number
    Variable : BatchCounter : Number
    Variable : UDCounter : Number
    Variable : NewBldQty : Quantity
    Variable : Temp : String

    List Variable : StkQtyList : Quantity
    10 : SET : InvCounter : 1
    20 : WALK COLLECTION : TSPL FFE Vch Fill PO Coll
    30 : IF : $$NumItems:BatchAllocations > 0
    40 : WALK COLLECTION : Batch Allocations
    50 : LIST ADD : StkQtyList : ($..Reference + $StockItemName + $BatchName) : $BilledQty
    60 : END WALK
    70 : END IF
    80 : LIST ADD : StkQtyList : ($Reference + $StockItemName) : $BilledQty
    90 : END WALK
    100: WALK COLLECTION : TSPL FFE Vch FillPRN Coll
    101: IF : $$ListFind:StkQtyList:($Reference + $StockItemName) AND $$ListValueFind:StkQtyList:1:$BilledQty
    102: Continue
    103: END IF
    110: SET : BatchCounter : 1
    111: SET : UD Counter : 1
    120: IF : ##InvCounter = 1
    130: SET TARGET : Inventory Entries[1]
    140: ELSE :
    180: INSERT COLLECTION OBJECT : Inventory Entries
    190: ENDIF
    200: SET VALUE : Stock Item Name
    210: SET VALUE : IsDeemedPositive :No
    220: WALK COLLECTION : User Description
    230: IF : ##UDCounter = 1
    240: SET TARGET : User Description[1]
    250: ELSE
    260: INSERT COLLECTION OBJECT : User Description
    270: END IF
    280: SET VALUE : USER DESCRIPTION
    290: SET TARGET : ..
    300: INCREMENT : UDCounter
    310: END WALK
    320: Walk COLLECTION : Batch Allocations
    330: IF : ##BatchCounter = 1
    340: SET TARGET : Batch Allocations[1]
    350: ELSE
    360: INSERT COLLECTION OBJECT : Batch Allocations
    370: END IF
    380: SET VALUE : Order Due Date ;;: $$DateRange:($$TgtObject:$Date):($$TgtObject:$Date):True
    390: SET VALUE : Batch Name
    460: SET VALUE : RATE
    400: SET : NewBldQty : $BilledQty
    410: IF : $BilledQty > $$ListValue:StkQtyList:($..Reference + $..StockItemName+ $BatchName)
    420: SET : NewBldQty : $BilledQty - $$ListValue:StkQtyList:($..Reference + $..StockItemName+ $BatchName)
    430: END IF
    440: SET VALUE : BilledQty : ##NewBldQty
    450: SET VALUE : Actual Qty
    470: SET VALUE : AMOUNT : $$TgtObject:$Rate * $$TgtObject:$BilledQty
    480: SET VALUE : Godown Name
    490: INCREMENT : BatchCounter
    500: END WALK
    510: SET TARGET : ..
    520: IF : NOT $$IsEmpty:$$NumItems:BatchAllocations
    530: SET VALUE : Billed Qty : $$TgtObject:$$CollQtyTotal:BatchAllocations:$BilledQty
    540: SET VALUE : Actual Qty : $$TgtObject:$$CollQtyTotal:BatchAllocations:$ActualQty
    541: SET VALUE : Rate : $$TgtObject:$$CollectionField:$ActualQty:1:BatchAllocations
    542: SET VALUE : Amount : $$TgtObject:$Rate * $$TgtObject:$BilledQty
    550: ELSE
    560: SET : NewBldQty : $BilledQty
    570: IF : $BilledQty > $$ListValue:StkQtyList:$Reference + $StockItemName
    580: SET : NewBldQty : $BilledQty - $$ListValue:StkQtyList:$Reference + $StockItemName
    590: END IF
    595: SET VALUE : Billed Qty : ##NewBldQty
    600: END IF
    610: SET VALUE : Rate
    620: SET VALUE : Amount
    630: SET TARGET : ..
    640: INCREMENT : InvCounter
    650: END WALK
    [System: Formula]
    TSPL FFE Voucher Filter : $Date = ##PRNDate AND $Reference = ##PRNNo
    ;; End-of-File

    ;;;;;;;;;;;;;;;;Hiding rates And Amount;;;;;;;;;;;;;;;;;
    [#field:VCH RateTitle]
    add:eek:ption: New Rate hide9 :mad:@IsPRNOrder
    [!fIELD:New Rate hide9]
    Invisible :Yes
    [#field:VCH AmtTitle]
    add:eek:ption: New Rate hide10 :mad:@IsPRNOrder
    [!fIELD:New Rate hide10]
    Invisible : Yes
    [#Line: STKVCH Batch2]
    add:eek:ption: New Rate hide8 :mad:@IsPRNOrder
    [!line: New Rate hide8]
    Local:field:VCHBATCH Rate:Invisible : yes
    Local:field:VCHBATCH Value:Invisible : yes
    [#Line: EI InvInfo]
    add:eek:ption: Disc NEW4 :mad:@IsPRNOrder
    [!Line:Disc NEW4]
    Local:field:VCH Rate:Invisible : Yes
    Local:field:VCH Value:Invisible :yes
    [#Line: STKVCH BatchTotal]
    add:eek:ption: New Rate hide8A :mad:@IsPRNOrder

    [!Line:New Rate hide8A]
    Local:field:VCHBATCH ValueTotal:Invisible : Yes
    [#Line: EI InvSubTotal]
    add:eek:ption: Disc EI Column14:mad:@IsPRNOrder
    [!line: Disc EI Column14]
    Local:field:EI ValueSubTotal:Invisible : yes
    [#Line : VCH NarrPrompt ]
    add:eek:ption: Disc EI Column1:mad:@IsPRNOrder
    [!Line: Disc EI Column1]
    Local:field: EI ValueTotal:invisible : yes
    ;; End-of-File
    [#Line: EI Consignee]
    Local : Field : Simple Prompt: invisible:mad:@IsPRNOrder

    [#Field: EI Consignee]
    add:eek:ption: New Party9 :mad:@IsPRNOrder

    [!field:New Party9]
    set as: "PRN Party"
    skip:yes
    invisible:yes
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If it is not working in OLD version, means certain features/FIELD/rEPORT etc were not existing in the old version and hence it will not work.
     


Share This Page