Accounting-Companion / TallyConnector

You can use Tally Connector to Connect your desktop/Mobile Applications with Tally seamlessly.
47 stars 29 forks source link

Add TDL capability to save a voucher of a particular GST ID #41

Closed nareshkolimi closed 5 months ago

nareshkolimi commented 5 months ago

"This TDL that I have created below is not working."

1.I have multiple companies available in Tally Prime, so I need to save the voucher XML based on the selected company's GST number in Tally Prime. Below is the TDL file that will save the voucher as an XML file upon saving the voucher.

[#Form: sales color]
    On : Form Accept: @@IsSales : Call  :IsGSTNoExists

[Function : sendxml]

10:set:SVexportlocation:"\Export\Voucher\"
20:set:SVexportformat:$$sysname:xml
30:set:SVprintFileName : ##SVexportlocation + $$string:$PartyLedgerName + " " + $$string:$VoucherNumber

;;$$string:$VoucherTypeName
;;$$string:$MachineDate
;;$$string:$MachineTime
;;$$string:$CmpUserName

40:Set:SVPrintFileName : $$MakeExportName:##SVprintFileName:##SVExportFormat
50:Set:SVPrintFileName :##ExportLocation+"]"+#SVPrintFileName
40:Export Report : . : True

[Function: IsGSTNoExists]
Variable: Gstin12:String:"22AAAAA0000A1Z5"

Variable : Cmpgstin : String

01:Log:$Cmpgstin
02:Log:##Gstin12
03 :IF : $Cmpgstin:##Gstin12 

04:ELSE 
05:call: sendxml
06:End If

2.In the provided TDL file, there are variables defined as follows:

Variable: Gstin12:String:"22AAAAA0000A1Z5"

Variable: Cmpgstin:String

The GST number '22AAAAA0000A1Z5' represents the actual GST of the company, and I need to save the data when saving the voucher. The variable 'Cmpgstin' represents the company's GST, which is available when creating the voucher.

I have created a function called 'IsGSTNoExists' to compare the GST number of the actual company GST with the selected GST number. If both GST numbers are equal, then another function is called within the same function. If they are not equal, the voucher is not saved. 05:call: sendxml

""Please correct the TDL file so that it saves the XML file based on the selected GST number.""

saivineeth100 commented 5 months ago

not related to this library ask your query in relevant forms like tdlexpert or stackoverflow