Expiry Date Print in MM/YY Format in Invoice

Discussion in 'Tally Developer' started by Amol Ashok Bhalgat, Jan 23, 2013.

    

  1. [System : Formula]
    ExpiryPeriodOfItem : $$String:$Expiryperiod
    ExpiryPeriodofPart: $$StringPart:mad:@ExpiryPeriodofItem:3:2 + $$Stringpart:mad:@ExpiryPeriodOfItem:8:2

    [Field]
    [Field : Global ExpEI]
    Use: Short Date Field
    Invisible: @@NoOfColumnsInBody <4
    Set As: @@ExpiryPeriodofPart
    Format: Short Date,Separator:"/",MMYY
    Align: Centre
    Width: @@ShortDateWidth
    Border: Thin Left
    Skip: YES
     



  2. Hi, remove "use : short date field" & "format:..." attributes from the field and try.
     



  3. yes checked but having still problem
     


  4. Ritesh Mehta

    Ritesh Mehta New Member


    Dear Amol,

    With help of bellow code you get mm/yy in Invoice print.

    [#Line : EXPINV AddExpDates]
    Add : Field : After : EXPINV ExpDate : Global ExpEI ;; This new field added to get Expiry date as per your requirement
    Local : Field : EXPINV ExpDate : Invisible : Yes ;; This invisible Tally's default Expiry date in Print

    [Field : Global ExpEI]
    Use : Name Field
    Set As: $$StringPart:mad:Test1:3:3 + " - " + $$StringPart:mad:Test1:9:2
    Test1 : $$String:$Expiryperiod
    Align: Left
    Width: 8

    Hope you get solution by using above code.

    Ritesh Mehta
     



  5. checked but having error

    Error in TDL
    'Function:StringPartTest1'
    could not find description!
     



  6. hai amol,

    Use like this

    [Field : Global ExpEI]
    Use : Name Field
    Set As: $$StringPart:Test1:3:3 + " - " + $$StringPart:Test1:9:2
    Test1 : $$String:$Expiryperiod:ShortDate
    Align: Left
    Width: 8

    Which will slove your problem. But try to work it out.
     



  7. "$$StringPart" is the function Name in Tally. (No "$$StringPartTest1")

    Pl. refer "$$StringPart" Parameters in default TD9.
     



  8. Hi
    done the changes getting the output but not exact what was i excepting
    If the Item is having the Expiry Date or not every item is getting the same display

    below is the output getting in display

    Output = T1-
     



  9. Dear All

    I have tried all the steps but it was giving the error because Expiry Date was not having stable format like
    example below:
    1. D D - M M - Y Y Y Y
    0 1 2 3 4 5 6 7 8 9

    2. D D - M - Y Y Y Y
    0 1 2 3 4 5 6 7 8

    3. D - M M - Y Y Y Y
    0 1 2 3 4 5 6 7 8

    4. D - M - Y Y Y Y
    0 1 2 3 4 5 6 7
    there should be possibility to work on the code but i have not tried more just gone to cheque printing format & copied the function for D D M M Y Y Y Y & replace in my code its working fine
     



  10. I want to Change the Basic Format of $ExpiryDate because the format is DD-MMM-YYYY & I want to change it to DD-MM-YY format in item batch allocation

    Thanx
     



  11. got the solution
     
    farrakh hayat likes this.


  12. psjain_jal

    psjain_jal Member


    share the full code
     



  13. see please refer the default TDL for this solution use the function of cheque printing date
     


  14. farrakh hayat

    farrakh hayat Member


    what is the solution? please share here.
     


Share This Page