Date Format

Discussion in 'Tally Developer' started by Access, Nov 24, 2022.

    
  1. Access

    Access Member


    [Line: VchMainTL]
    Left Field : Name Field
    Right Field:Simple Prompt
    Local : Field : Name Field : Set As : "Voucher No From : "+$$String:##TSPLFFEVoucherNumberFrom + " to " + $$String:##TSPLFFEVoucherNumberTo
    Local : Field : Name Field : Align:Left
    Local : Field : Simple Prompt : Set As : "Date : " +$$String:##SVFromDate ; (Eg:24-11-2022)
    Local : Field : Simple Prompt : Align:Right
    Local : Field : Default : Color : White
    Local : Field : Default : Style : Large Bold
    Local : Field : Default: Background : Blue
    Local : Field : Default : Full Width : Yes
    Local : Field : Default : Align : Center

    Dear Experts Any One Help i Want Date Format 24-11-2022 Like That
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Local : Field : Simple Prompt : Set As : "Date : " +$$String:$$DDMMYYYYDateFormat:##SVFromDate:"-"
     


  3. Access

    Access Member


    Thanks
     


  4. Lynch

    Lynch Member


    Dear @Amit Kamdar ,
    I have a periodical report. I can able to change the period with F2Change period button and declare the SVFromDate and SVTodate variables in the Report level. But when I change the period of the report, it changes the period of the main data. How to prevent this change in the main data.

    Like, when we choose a ledger report, we can change the period, but it wont affect the period of the main data. Main data uses Alt+F2 for change period, ledger report uses F2 for change period. In my report both the button F2ChangePeriod changes the main data as well.

    Just for the reference I've mentioned the code here., Assume other this in the code work correctly, except the F2ChangePeriod Button.

    I'm not just able to understand that button for a very long time.. Little advice from your end is much more helpful.

    Code:
    
    [Report:GST report Fetch]
        Variable:SVFromDate, SVToDate
        Form:GST report Fetch
         Full Screen    : No
         Auto:Yes
         Set:SVFromDate:$$MonthStart:##SVCurrentDate
         Set:SVToDate:$$MonthEnd:##SVCurrentDate
        [Form:GST report Fetch]
            Space Top       : @@CmpNavFormSpaceTop
            Space Bottom    : @@CmpNavFormSpaceBottom
            Space Left      : @@CmpNavFormSpaceLeft
            Space Right     : @@CmpNavFormSpaceRight
    
            Full Width      : No
            Full Height     : No
    
            Vertical Align  : Top
            Option            : Small Size Form
            Button:F2ChangePeriod, Download returns
            Part:form Subtitle, Directory title;, Directory Details
            Local:Field:form Subtitle:Set as:"GST Returns"
            [Button:Download returns]
                Title:Download returns
                Key:Ctrl + D
                Action:Call:Download returns:#ReturnType
              
            [Function:Download returns]
                Parameter:pRtype:String
                Variable:vMonthsList:String:""
                Variable:vGSTIN:String
                Variable:vTransid:String
                Variable:vCounter:Number
                Variable:counter:Number:1
              
                00:Log:$$NumOfMonths:##SVFromDate:##SVTodate
                10:Walk Collection:period
                    ;15:Log:$FullMonthName + $$LocaleString:$year
                    15:Set:vMonthsList:if ##counter=$$NumItems:period then ##vmonthslist +$FullMonthName + $$LocaleString:$year +
                                                                        else ##vmonthslist +$FullMonthName + $$LocaleString:$year + ","
                    25:Increment:counter
                30:End Walk
                40:Set:vTransid:$$CollectionField:$GAuthToken:1:GAuth
                50:Set:vGSTIN:@@SocialbeatGSTIN
                60:Set:vCounter:$$NumOfMonths:##SVFromDate:##SVTodate
                70:Do If:##pRtype="GSTR2B": Exec COM Interface:getGSTR2B:##vMonthsList:##vGSTIN:##vTransid:##vCounter
                80:Do If:##pRtype="GSTR1": Exec COM Interface:getGSTR1:##vMonthsList:##vGSTIN:##vTransid:##vCounter
                90:Do If:##pRtype="e-Invoice": Exec COM Interface:geteInvoice:##vMonthsList:##vGSTIN:##vTransid:##vCounter
               100:Do If:##pRtype="GSTR2A": Exec COM Interface:getGSTR2A:##vMonthsList:##vGSTIN:##vTransid:##vCounter
            [Part:Directory title]
                Part:form Subtitle,return type, Directory list title
                Scroll:Vertical
                Local:Field:form Subtitle:Set as:"(Change Period then download/updated returns data for the missing months)"
                Local:Field:form Subtitle:Style:Normal Italic
                [Part:return type]
                    Line:Return Type
                  
                    [Line:Return Type]
                        Field:medium prompt, return type
                        Local:Field:Medium prompt:Set as:"Select the return type"
                        Local:Field:Medium prompt:Full Width:Yes
                        Local:Field:Medium prompt:Align:left
                      
                        [Field:return type]
                            Use:Name Field
                            Full Width:Yes
                            Table:return type
                            ;Table:List of Digital Signatures
                            Show Table:Default
                            Set as:"GSTR2B"
                            Set Always:Yes
                          
                [Part:Directory list title]
                    Line:files
                  
                    [Line:Files]
                        Field:files
                      
                        [Field:Files]
                            ;Use:Table Config Template
                            Use                    : Name Field
                            Width        : 50
                            Show Table            : Always and Never Hide
                            Table                : GSTR Files
              
        ;Filter:gstr2b
    ;    10:Log:$$CollectionField:$GAuthToken:1:GAuth
    
    [Function:getGAuth]
        00:Exec COM Interface:getGAuthData
        10:Return:$$LastResult
      
    
    [COM Interface:getGAuthData]
        Project:GSTOnlineReports
        Class:Class1
        Interface:getGAuthData
        Returns:String
      
    [COM Interface:getGSTR2B]
        Project:GSTOnlineReports
        Class:Class1
        Interface:GSTR2B
        Parameter:prds:String:In
        Parameter:GSTIN:String:In
        Parameter:TransID:String:In
        Return:String
    [COM Interface:getGSTR1]
        Project:GSTOnlineReports
        Class:Class1
        Interface:GSTR1
        Parameter:prds:String:In
        Parameter:GSTIN:String:In
        Parameter:TransID:String:In
        Return:String
    
      
    [COM Interface:geteInvoice]
        Project:GSTOnlineReports
        Class:Class1
        Interface:eInvoice
        Parameter:prds:String:In
        Parameter:GSTIN:String:In
        Parameter:TransID:String:In
        Return:String
    [COM Interface:getGSTR2A]
        Project:GSTOnlineReports
        Class:Class1
        Interface:GSTR2A
        Parameter:prds:String:In
        Parameter:GSTIN:String:In
        Parameter:TransID:String:In
        Return:String
      
    [Collection:GSTINDataBase]
        Data Source:File JSON:"G:\My Drive\GST Tally connector\GSTINDataBase\GSTINDataBase\bin\Debug\token.json"
        JSON Object Path:"valueRange:1"
        Fetch:data.*
      
    [Collection:GSTINrelDataBase]
        Source Collection:GSTINDataBase
        Walk:data
        By:GSTIN:$GSTIN
        Compute:Name:$Name
        Search Key:$GSTIN
    
              
                          
    [Collection:GSTR Files]
        Use            : Cmp Selection Style
        Title        : $$LocaleString:"List of "+ #returntype + " Data locations "
        Sub Title    : "File Name", "FIle Size", "Read Only", "Last Modified Date", "Last Modified Time"
        Data Source    : Directory: "G:\My Drive\GST Tally connector\Online Records json\" + #returntype + "\" + @@SocialbeatGSTIN
        Format : $Name, 25
        Format : $FileSize, 15
        Format : $IsReadOnly, 15
        Format : $LastModifiedDate, 15
        Format : $LastModifiedTime, 15
        Align            : Center
        Style            : Small Bold
        Filter:onlyJson
      
    
    [Collection:return type]
        Title:"Return Type"
        List:"GSTR1", "e-Invoice", "GSTR2A", "GSTR2B";, "GSTR3B", "GSTR9"
        Align:Right
      
    
    [Collection: Period]
        Type        : Period
        Repeat      : ##SVPeriodicity
        Compute        : FullMonthName            : $$ZeroFill:($$LocaleString:$$MonthOfDate:$$PeriodDateFrom):2
        Compute        : Year                    : $$YearOfDate:$$PeriodDateFrom
      
    
    
    [Collection:GAuthFile]
        Data Source:File JSON:$$getGAuth
        JSON Object Path:"valueRange:1"
        Fetch:data.*
      
    [Collection:GAuth]
        Source Collection:GAuthFile
        Walk:data
        Compute:GSTIN:$gstnum
        Compute:GAuthToken:$AuthenticationCode
        Filter:GSTnumber
      
    [System:Formula]
        GSTnumber:$GSTIN=@@SocialbeatGSTIN
        onlyJson:$Name Contains "json"
    
     


Share This Page