Simple Invoice Export not working

Discussion in 'Tally Developer' started by torsky, Jan 12, 2019.

         
  1. torsky

    torsky New Member


    Hello!

    I'm trying to automatically export invoice voucher after the user clicks accept.

    Following is the very simple code. But after the execution, nothing actually happens. Can anyone please point me in right direction?

    Code:
    [#Form: Sales Color] 
    
    Add : On : At End : Form Accept : Yes : CALL : export
    On:Form Accept:Yes:Form Accept 
    
    [Function : export]
    
    010:SET: SVExportLocation:"D:\tallyexports\New folder"
    060:SET : SVExportFileName:"test.pdf"
    072: SET: SVExportFormatVar:$$SysName:PDF
    084:SET : SVExportFormat:$$SysName:PDF
    090:Action:Export
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Try This..........

    Code:
    [#Form: Sales Color]
    On : Form Accept : Yes : CALL : export
    
    [Function : export]
    
    010:SET: SVExportLocation:"D:\tallyexports\New folder"
    060:SET : SVExportFileName:"test.pdf"
    072: SET: SVExportFormatVar:$$SysName:PDF
    084:SET : SVExportFormat:$$SysName:PDF
    090:Export Report: .    : True
     
    ONKAR likes this.


  3. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir, I want to send this to direct to WhatsApp like invoice as JPEG FORMAT
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    replace PDF with jpeg
     
    ONKAR likes this.


  5. Jay kumar tailor

    Jay kumar tailor Active Member


    Code:
    [Function: SALES Export Report]
    
    10: SET : SVExportLocation : "D:\Tally Exported Vouchers"
    20: SET : SVExportFormat :$$SysName:JPEG(Image)
    30: Set : SVPrintFileName : $$String:$Vouchertypename+"_"+$$String:$vouchernumber
    40: SET : SVPrintFileName : $$MakeExportName:##SVPrintFileName:##SVExportFormat
    50: Set : SVPrintFileName :##SVExportLocation+"\"+#SVPrintFileName
    60: EXPORT REPORT : . : TRUE
     
    ONKAR likes this.


  6. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir and @Jaykumartailor sir, I know this, my point is, this code can save this invoice directly to the desired folder but I want to export/send directly to WhatsApp to a specific number, so how to send an invoice to WhatsApp ??
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Make another function........
    the above function saves the file in JPEG to a folder...... make that filepath and filename into a variable.
    then the second function will send the file to the whatsapp. (use the variable from above function)

    Both the above TDL are available separately in this forum.......... so you need to perform a marriage/merger of the two.
     
    ONKAR likes this.


  8. ONKAR

    ONKAR Active Member


    :D
     


  9. Bipin Damania

    Bipin Damania Member


    Amitji, Jayji

    Getting Error..

    Error in TDL.

    'Form:printed Invoice'

    Vertical Page Breaks are too big!

    Please reply.
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    in PDF or Jpeg ???
     


  11. Bipin Damania

    Bipin Damania Member


    Amitji

    For both getting same error...

    Please reply.
     
    ONKAR likes this.


  12. ONKAR

    ONKAR Active Member


    @Bipin Damania sir do you have completed this code, so we can send sales to invoice directly to WhatsApp
     


  13. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir , like this sir


    [#Form: Sales Color]
    Add : Button : WhatsApp

    [Button: WhatsApp]
    Key : Alt + W
    Action :Browse URL : "http://web.whatsapp.com/send?Phone=" + @@mobileno


    [System: Formula]
    Mobileno :$$String:"91" + $Ledgermobile:Ledger:$Ledgername


    [Function: SALES Export Report]
    10: SET : SVExportLocation : "D:\Tally Exported Vouchers"
    20: Set: SVExportFormat : $$SysName: JPEG(Image)
    30: Set: SVPrintFileName: $$String:$PartyLedgerName + "_" + $$String:$vouchernumber + "_" + $$String:$Vouchertypename
    40: Set: SVPrintFileName: $$MakeExportName:##SVPrintFileName:##SVExportFormat
    50: Set : SVPrintFileName :##SVExportLocation+"\"+#SVPrintFileName
    60: EXPORT REPORT : . : TRUE

    [System : Formulae]

    SVPrintFileName : $$ApplicationPath + "\D:\Tally Exported Vouchers\"

    [Function : Accounting Voucher]

    Variable : SVExportLocation : "D:\Tally Exported Vouchers : String
     


  14. Bipin Damania

    Bipin Damania Member



    Onkarji

    Not creating JPEG(Image) file of define path i.e. D:\Tally Exported Vouchers and also not sending to Whatsapp No too...

    Please check & reply.
     


  15. ONKAR

    ONKAR Active Member


    yes sir, thats why I asked @Amit Kamdar sir, is it right or wrong because I can't understand the exact formula
     


  16. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir please help us

    [#Form: Sales Color]
    Add : Button : WhatsApp

    [Button: WhatsApp]
    Key : Alt + W
    Action :Browse URL : "http://web.whatsapp.com/send?Phone=" + @@mobileno


    [System: Formula]
    Mobileno :$$String:"91" + $Ledgermobile:Ledger:$Ledgername


    [Function: SALES Export Report]
    10: SET : SVExportLocation : "D:\Tally Exported Vouchers"
    20: Set: SVExportFormat : $$SysName: JPEG(Image)
    30: Set: SVPrintFileName: $$String:$PartyLedgerName + "_" + $$String:$vouchernumber + "_" + $$String:$Vouchertypename
    40: Set: SVPrintFileName: $$MakeExportName:##SVPrintFileName:##SVExportFormat
    50: Set : SVPrintFileName :##SVExportLocation+"\"+#SVPrintFileName
    60: EXPORT REPORT : . : TRUE

    [System : Formulae]

    SVPrintFileName : $$ApplicationPath + "\D:\Tally Exported Vouchers\"

    [Function : Accounting Voucher]

    Variable : SVExportLocation : "D:\Tally Exported Vouchers : String
     


Share This Page