Accounting-Companion / TallyConnector

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

Using RemoteID in voucher creation for seamless Voucher entry #4

Closed sanketgroup closed 3 years ago

sanketgroup commented 3 years ago

During the Voucher Creation, this project use following method. <VOUCHER DATE="20220331" TAGNAME="Voucher Number" TAGVALUE="test123" VCHTYPE="Payment"> At first transaction, there should be no issue. But now let's say, same voucher is being sent again with minor modification. It will throw an error saying "voucher number already exists", and to alter this voucher we have to specify Action = "Alter"

But if we use following method, Tally will automatically decide for Create or Alter with following method. <VOUCHER REMOTEID="test123" VCHTYPE="Payment" >

If voucher number does not exist then above method will Create a new voucher, if exists then it will alter the Voucher without any error of "Voucher Already Exists"

Isn't it more convenient?

sanketgroup commented 3 years ago

more over, with method in current project, if we want to alter the voucher then we also have to pass the Voucher date.

Now let's imagine that we sent voucher XML from our source (excel or database) having Voucher Date = "2021-04-01" and Voucher Number="Test123". Tally will successfully create a new Voucher.

But now if someone changes the voucher date in Source (excel or database) then how it will alter the voucher in Tally, because we do not know old date now,

So with this scenario, I believe passing Voucher Number into RemoteID would be more beneficial. Correct me if I am wrong with this suggestion.

Thanks

saivineeth100 commented 3 years ago

During the Voucher Creation, this project use following method. <VOUCHER DATE="20220331" TAGNAME="Voucher Number" TAGVALUE="test123" VCHTYPE="Payment"> At first transaction, there should be no issue. But now let's say, same voucher is being sent again with minor modification. It will throw an error saying "voucher number already exists", and to alter this voucher we have to specify Action = "Alter"

But if we use following method, Tally will automatically decide for Create or Alter with following method. <VOUCHER REMOTEID="test123" VCHTYPE="Payment" >

If voucher number does not exist then above method will Create a new voucher, if exists then it will alter the Voucher without any error of "Voucher Already Exists"

Isn't it more convenient?

I think without remoteid also this is possible for creating voucher or altering voucher action attribute is optional if you send voucher with same masterid or with same voucher number and date it will alter I didn't tested but as per tally documentation if you didn't set action tag first it will check whether voucher exists if voucher exists it will fire alter action else will create same for other objects also

I will test and update if it doesn't work

saivineeth100 commented 3 years ago

It is working perfectly without changing action attribute

image

Even voucher action is null or alter or create if we send voucher with already existing voucher number and date it fires alter only