alter on enter is not working please help

Discussion in 'Tally Developer' started by Anshul Garg, Sep 3, 2022.

    
  1. Anshul Garg

    Anshul Garg Member


    when i am trying display voucher on enter on line
    but it is not working please

    Code:
    [#Menu: Gateway of Tally]
    
    Item: Sales Report : Display: SLs Report
    
    [Report: SLs Report]
    Variable: StkItemName
    Form: SLs Form
    Variable: SVfromdate, SVTodate
    Set: SVFromdate:$$MonthStart:##SVCurrentDate
    Set: SVTodate:$$Monthend:##SVCurrentDate
    ;Object:Voucher
    [Form: SLs Form]
    
    Part: SLS TitPart, SLs part
    Use: Dsp Template
    ;Button : AESItemCLmnrItemFilter
    
    [Part: SLS TitPart]
    
    Line: Slsrepotit, Slsperiod, SLSparticulartit
    
    [Line: Slsrepotit]
    
    Field: Formsubtitle
    Local: Field: Formsubtitle:Info:"Detailed sales Register"
    Space Bottom: 2 mms
    
    [Line: Slsperiod]
    
    Right Field: slsperiod
    
    [Field: slsperiod]
    
    Field: slsfrom, slshyphen, slsto
    
    [Field: slsfrom]
    
    Use: short Date Field
    Set as: ##SVfromdate
    Width: 7% page
    Align: center
    
    [Field: slshyphen]
    
    Width: 1% page
    Set as: "-"
    
    [Field: slsto]
    
    Use: short Date Field
    Set as: ##SVTodate
    Width: 7% page
    Align: center
    
    
    [Line: SLSparticulartit]
    
    Field: slsitem
    Right Field: slsdate, slsgodown, Slsopeingqty,voucherNumber, slsbilledqty, Slsclosingqty
    
    Local: Field: slsitem :Info: "Item Name"
    Local: Field: slsdate : Info: "Date"
    Local: Field: slsgodown : Info: "From Godown"
    Local: Field: Slsopeingqty : Info: "opening Qty"
    Local: Field: slsbilledqty : Info: "Sold Qty"
    Local: Field: Slsclosingqty : Info: "Closing qty"
    Local: Field: voucherNumber : Info: "Voucher No"
    Border: Column Titles
    
    [Part: SLs Part]
    
    Line: Sls Line
    Repeat: Sls Line : ASS SLs vch coll
    Scroll: Vertical
    
    [Line: Sls Line]
    
    Field: slsitem
    Right Field: slsdate, slsgodown, Slsopeingqty,voucherNumber, slsbilledqty, Slsclosingqty
    Option : Alter on enter
    
    
    [Field: slsitem]
    
    Width: 20% Page
    Set as: $stockitemName
    [Field: voucherNumber]
    
    Width: 5% Page
    
    Set as:$MasterId
    Variable:VchMasterIDNo
    Modifies:vchMasterIdNo
    Alter:Voucher
    [Field: slsdate]
    
    Use: Short date Field
    Set as: $Date
    Width: 10% Page
    Align: Right
    ;Variable : LedgerName
    ;Display : Ledger Vouchers
    
    Alter:Voucher
    [Field:slsgodown ]
    
    Width: 10% Page
    Set as: $GodownName
    Align: Right
    
    
    [Field: Slsopeingqty]
    
    Use: Qty primary Field
    Width: 10% Page
    Set as: $$AsSignedQty:$$GodownItemValue:#slsgodown:#slsitem:$openingbalance;;
    Align: Right
    
    [Field: slsbilledqty]
    
    Use: Qty Primary Field
    Set as: $Billedqty
    Width: 10% Page
    Align: Right
    
    [Field: Slsclosingqty]
    
    Use: qty Primary Field
    Set as: #Slsopeingqty-#slsbilledqty
    Width: 10% Page
    Align: Right
    
    [Collection: ASS SLs vch collSRC]
        ParmVAR        : pvsStockItemNamea        : String    : "Tin Plate"
    
    Type        : Vouchers : Stock Item
    Child of    : ##pvsStockItemNamea
    Fetch:stockitemName
    ;Type: vouchers : StockItem
    ;;Child Of:"Tin Plate"
    ;Belongs To: Yes
    Walk: Inventory Entries, Batch Allocations
    Fetch:stockitemName,GodownName,VoucherNumber,masterid
    
    [Collection: ASS SLs vch coll]
    ;
    Source Collection: ASS SLs vch collSRC
    ;Object:Vouchers:$MasterId
    Walk: Inventory Entries, Batch Allocations
    
    By: MasterId : $MasterId
    Compute: Billedqty : $Billedqty
    ;Compute: Date : $..Date
    Fetch:stockitemName,GodownName,VoucherNumber,Date
    ;Filter : VchFilters
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    [System:Formula]
    VchFilters :if $stockitemName="Tin Plate" Then 1=1 Else No; If $$IsEmpty:##StkItemName Or $$IsEndOfList:##StkItemName Then True Else $StockItemName = #FSSStockName
    
    
    
    
    [Button : AESItemCLmnrItemFilter]
    
    Title : "Filter Item"
    Key : Alt + f
    Action : Alter : FilterItem
    
    
    
    [Collection : FilterItem]
    
    Type : StockItem
    Belongs To : Yes
    Title : $$LocaleString:"List of Stock Items"
    Format : $Name, 20
    
    [Report: FilterItem] ;;Auto Report
    Title : $$LocaleString:"Batch Items"
    Form : FilterItem
    Local : Form : FilterItem : Vertical Align : Top
    Local : Collection: Default : Align : Right
    Variable : StkItemName
    
    [Form: FilterItem]
    No Confirm : Yes
    Space Top : 0.5
    Space Left : 1
    Space Right : 1
    Full Width : No
    Full Height : No
    Vertical Align : Top
    Part : FilterItem
    
    [Part: FilterItem]
    
    Line : FilterItem Title
    Line : FilterItem ItemName
    
    [Line: FilterItem Title]
    Fields : Long Prompt
    Local : Field : Long Prompt : Info : $$LocaleString:"Select Item"
    Local : Field : Long Prompt : Full Width : Yes
    Local : Field : Long Prompt : Alignment : Center
    Space Bottom: 0.5
    
    [Line: FilterItem ItemName]
    Fields : Medium Prompt, FilterGrp ItemName
    Local : Field : Medium Prompt : Info : $$LocaleString:"Name of Item"
    Space Bottom: 0.5
    [Field: FilterGrp ItemName]
    Use : Name Field
    Table : FilterItem, End Of List
    Show Table : Always
    Variable : StkItemName
    Modifies : StkItemName
    
    [Variable : StkItemName]
    
    Type : String
    Default:"Tin Plate"
    
    [System : Variable]
    
    StkItemName
    
     



  2. upload_2022-9-3_20-18-54.png
    Code:
    [#Menu: Gateway of Tally]
    
    Item: Sales Report : Display: SLs Report
    
    [Report: SLs Report]
    Variable: StkItemName
    Form: SLs Form
    Variable: SVfromdate, SVTodate
    Set: SVFromdate:$$MonthStart:##SVCurrentDate
    Set: SVTodate:$$Monthend:##SVCurrentDate
    ;Object:Voucher
    [Form: SLs Form]
    
    Part: SLS TitPart, SLs part
    Use: Dsp Template
    ;Button : AESItemCLmnrItemFilter
    
    [Part: SLS TitPart]
    
    Line: Slsrepotit, Slsperiod, SLSparticulartit
    
    [Line: Slsrepotit]
    
    Field: Formsubtitle
    Local: Field: Formsubtitle:Info:"Detailed sales Register"
    Space Bottom: 2 mms
    
    [Line: Slsperiod]
    
    Right Field: slsperiod
    
    [Field: slsperiod]
    
    Field: slsfrom, slshyphen, slsto
    
    [Field: slsfrom]
    
    Use: short Date Field
    Set as: ##SVfromdate
    Width: 7% page
    Align: center
    
    [Field: slshyphen]
    
    Width: 1% page
    Set as: "-"
    
    [Field: slsto]
    
    Use: short Date Field
    Set as: ##SVTodate
    Width: 7% page
    Align: center
    
    
    [Line: SLSparticulartit]
    
    Field: slsitem
    Right Field: slsdate, slsgodown, Slsopeingqty,voucherNumber, slsbilledqty, Slsclosingqty
    
    Local: Field: slsitem :Info: "Item Name"
    Local: Field: slsdate : Info: "Date"
    Local: Field: slsgodown : Info: "From Godown"
    Local: Field: Slsopeingqty : Info: "opening Qty"
    Local: Field: slsbilledqty : Info: "Sold Qty"
    Local: Field: Slsclosingqty : Info: "Closing qty"
    Local: Field: voucherNumber : Info: "Voucher No"
    Border: Column Titles
    
    [Part: SLs Part]
    
    Line: Sls Line
    Repeat: Sls Line : ASS SLs vch coll
    Scroll: Vertical
    
    [Line: Sls Line]
    ;Field        : DSPVCHMASTERID
    Field: slsitem
    Right Field: slsdate, slsgodown, Slsopeingqty,voucherNumber, slsbilledqty, Slsclosingqty
    Key    : YourKey
    
    [Key:YourKey]
        Key        : Enter
        Action    : Alter    : YourVoucher
    [Report: YourVoucher]
        Use        : Voucher
        Object    : Voucher     : #voucherNumber
        Form    : Voucher
       
    [Field: slsitem]
        Width: 20% Page
        Set as: $stockitemName
    
    [Field: voucherNumber]
        Width: 5% Page
        Set as:$$SPrintf:@@VchMasterID:$MasterID
       
    [Field: slsdate]
    
    Use: Short date Field
    Set as: $Date
    Width: 10% Page
    Align: Right
    ;Variable : LedgerName
    ;Display : Ledger Vouchers
    
    Alter:Voucher
    [Field:slsgodown ]
    
    Width: 10% Page
    Set as: $GodownName
    Align: Right
    
    
    [Field: Slsopeingqty]
    
    Use: Qty primary Field
    Width: 10% Page
    Set as: $$AsSignedQty:$$GodownItemValue:#slsgodown:#slsitem:$openingbalance;;
    Align: Right
    
    [Field: slsbilledqty]
    
    Use: Qty Primary Field
    Set as: $Billedqty
    Width: 10% Page
    Align: Right
    
    [Field: Slsclosingqty]
    
    Use: qty Primary Field
    Set as: #Slsopeingqty-#slsbilledqty
    Width: 10% Page
    Align: Right
    
    [Collection: ASS SLs vch collSRC]
    ParmVAR        : pvsStockItemNamea        : String    : "Item-001"
    
    Type        : Vouchers : Stock Item
    Child of    : ##pvsStockItemNamea
    Fetch:stockitemName
    ;Type: vouchers : StockItem
    ;;Child Of:"Tin Plate"
    ;Belongs To: Yes
    Walk: Inventory Entries, Batch Allocations
    Fetch:stockitemName,GodownName,VoucherNumber,masterid
    
    [Collection: ASS SLs vch coll]
    ;
    Source Collection: ASS SLs vch collSRC
    ;Object:Vouchers:$MasterId
    Walk: Inventory Entries, Batch Allocations
    
    By: MasterId : $...MasterId
    Compute: Billedqty : $Billedqty
    ;Compute: Date : $..Date
    Fetch:stockitemName,GodownName,VoucherNumber,Date
    ;Filter : VchFilters
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    [System:Formula]
    VchFilters :if $stockitemName="Tin Plate" Then 1=1 Else No; If $$IsEmpty:##StkItemName Or $$IsEndOfList:##StkItemName Then True Else $StockItemName = #FSSStockName
    
    
    
    
    [Button : AESItemCLmnrItemFilter]
    
    Title : "Filter Item"
    Key : Alt + f
    Action : Alter : FilterItem
    
    
    
    [Collection : FilterItem]
    
    Type : StockItem
    Belongs To : Yes
    Title : $$LocaleString:"List of Stock Items"
    Format : $Name, 20
    
    [Report: FilterItem] ;;Auto Report
    Title : $$LocaleString:"Batch Items"
    Form : FilterItem
    Local : Form : FilterItem : Vertical Align : Top
    Local : Collection: Default : Align : Right
    Variable : StkItemName
    
    [Form: FilterItem]
    No Confirm : Yes
    Space Top : 0.5
    Space Left : 1
    Space Right : 1
    Full Width : No
    Full Height : No
    Vertical Align : Top
    Part : FilterItem
    
    [Part: FilterItem]
    
    Line : FilterItem Title
    Line : FilterItem ItemName
    
    [Line: FilterItem Title]
    Fields : Long Prompt
    Local : Field : Long Prompt : Info : $$LocaleString:"Select Item"
    Local : Field : Long Prompt : Full Width : Yes
    Local : Field : Long Prompt : Alignment : Center
    Space Bottom: 0.5
    
    [Line: FilterItem ItemName]
    Fields : Medium Prompt, FilterGrp ItemName
    Local : Field : Medium Prompt : Info : $$LocaleString:"Name of Item"
    Space Bottom: 0.5
    [Field: FilterGrp ItemName]
    Use : Name Field
    Table : FilterItem, End Of List
    Show Table : Always
    Variable : StkItemName
    Modifies : StkItemName
    
    [Variable : StkItemName]
    
    Type : String
    Default:"Tin Plate"
    
    [System : Variable]
    
    StkItemName
       
    
    
     
    gangstar and Anshul Garg like this.


Share This Page