Stock Journal & Voucher Type

Discussion in 'Tally Developer' started by Loïc, Dec 9, 2015.

    
  1. Loïc

    Loïc New Member


    Hello everybody, I recently started to create my own TDL and I am currently facing a issue. I want to create an option in voucher type creation to add fields in inventory vouchers. So I had first had this option : [#Part: VTYP Basic] Add:Line: After: VTYP Abbr : VTYP Gasoil [Line: VTYP Gasoil] Field: Medium Prompt,VTYP Gasoil Local: Field: Medium Prompt: Set As: "For gasoil ?" [Field: VTYP Gasoil] Use: Logical Field Set as: No Storage: VTYPGasoil [System: UDF] VTYPGasoil: Logical: 21001 Till here, things seems alright. [System: UDF] MatChaufOper : String: 1011 [#Part: SJ MainTitle] Option: SJ Gasoil: $$IsStockJrnl:##SVVoucherType [!Part: SJ Gasoil] Add: Line: lnMatChaufOper [Line: lnMatChaufOper] Add: Field: lblMatChaufOper Add: Field: fldMatChaufOper [Border : MyBorder] Right : Thin Top: Thin [Field: lblMatChaufOper] Info: "Matricule, nom et postnom opérateur/chauffeur : " Width: 40 Border: MyBorder [Field: fldMatChaufOper] Use: String Field Storage: MatChaufOper Width: 30 Border: MyBorder The option part is actually display if the voucher type is stock journal. I would like to change that condition for it become : display the optional part if the voucher type is stock journal AND VTYPGasoil is set to YES. I don't know how to get the name of the current inventory voucher to access to the value VTYPGasoil in the voucher type master and change the condition for the option part. Thank you for your assistance. Regards, Loïc
     


  2. Loïc

    Loïc New Member


    Hello everybody,

    I recently started to create my own TDL and I am currently facing a issue. I want to create an option in voucher type creation to add fields in inventory vouchers. So I had first had this option :

    [#Part: VTYP Basic]
    Add:Line: After: VTYP Abbr : VTYP Gasoil

    [Line: VTYP Gasoil]
    Field: Medium Prompt,VTYP Gasoil
    Local: Field: Medium Prompt: Set As: "For gasoil ?"


    [Field: VTYP Gasoil]
    Use: Logical Field
    Set as: No
    Storage: VTYPGasoil

    [System: UDF]
    VTYPGasoil: Logical: 21001


    Till here, things seems alright.

    [System: UDF]
    MatChaufOper : String: 1011

    [#Part: SJ MainTitle]
    Option: SJ Gasoil: $$IsStockJrnl:##SVVoucherType

    [!Part: SJ Gasoil]
    Add: Line: lnMatChaufOper

    [Line: lnMatChaufOper]
    Add: Field: lblMatChaufOper
    Add: Field: fldMatChaufOper

    [Border : MyBorder]
    Right : Thin
    Top: Thin

    [Field: lblMatChaufOper]
    Info: "Matricule, nom et postnom opérateur/chauffeur : "
    Width: 40 Border:
    MyBorder

    [Field: fldMatChaufOper]
    Use: String Field
    Storage: MatChaufOper
    Width: 30
    Border: MyBorder

    The option part is actually display if the voucher type is stock journal. I would like to change that condition for it become : display the optional part if the voucher type is stock journal AND VTYPGasoil is set to YES. I don't know how to get the name of the current inventory voucher to access to the value VTYPGasoil in the voucher type master and change the condition for the option part.

    Thank you for your assistance.

    Regards,

    Loïc
     


  3. admin

    admin Administrator Staff Member


    [#Part: SJ MainTitle]
    Option: SJ Gasoil: @@IsStockJrnl and $VTYPGasoil:VoucherType:##SVVoucherType

    ;; You need to use calling method by reference concept. Kindly study objects and collections
     


  4. Loïc

    Loïc New Member


    Thank you for your assistance. I will try as soon as I am back from holidays. Buy I will already follow your advice. Regards, Loïc
     


  5. Loïc

    Loïc New Member


    Works perfectly. Thank you !
     


  6. Loïc

    Loïc New Member


    Dear Admin,
    Dear all,

    What should I had in a collection as filter to only collect the voucher type stock journal and where the VTYPGasoil is set to yes ?

    [Collection: VoucherApprosGasoil]
    Type: Voucher
    Filter : NameFilter

    [System : Formula]
    NameFilter : ...

    Kind regards,

    Loïc
     


  7. Loïc

    Loïc New Member


    I just found that solution which works

    NameFilter: $$IsStockJrnl:$VoucherTypeName AND $VTYPGasoil:VoucherType:$VoucherTypeName
     


  8. Maulik Patel

    Maulik Patel Active Member


    Hi,

    There are two cases
    Case 1 You do not want to include Manufacturing Journal
    Case 2 You want to include Manufacturing Journal

    Case 1
    Code:
    NameFilter   : $$IsStockJrnl:$VoucherTypeName AND NOT $VTYPGasoil AND NOT $$VchTypeMfgJrnl
    Case 2
    Code:
    NameFilter   : $$IsStockJrnl:$VoucherTypeName AND NOT $VTYPGasoil
    Hope this will help to you
     


  9. Loïc

    Loïc New Member


    Thank you
     


  10. Anshul Garg

    Anshul Garg Member


    NameFilter : $$IsStockJrnl:$VoucherTypeName AND NOT $VTYPGasoil AND NOT $$VchTypeMfgJrnl

    its not working please help if i do not want add manufacturing vouchers
     


  11. Maulik Patel

    Maulik Patel Active Member


    You can use @@AsMfgJrnl
     


Share This Page