The simplest way would be to obtain or write a script in javascript to obtain 
the validation code. You'd insert that into a custom invoice report and display 
the result somewhere on the resulting invoice. 

The main downside of that approach is that you'll be querying for the 
validation code every time you run the report. If the API gives you the same 
validation code every time you send it the same information without complaint 
then that's not a problem. If it is a problem then the best alternative would 
be to add a persistent report option and use Guile's web client 
(https://www.gnu.org/software/guile/manual/html_node/Web-Client.html) module to 
fill in the validation code and figure out some place to store it.

Regards,
John Ralls

> On Jan 18, 2024, at 09:03, Carlos R. Pasqualini via gnucash-devel 
> <gnucash-devel@gnucash.org> wrote:
> 
> El jue, 18-01-2024 a las 14:38 +0100, Frank H. Ellenberger escribió:
>> Hello Carlos,
>> 
>> Am 18.01.24 um 12:13 schrieb Carlos R. Pasqualini via gnucash-devel:
>>> Hello
>>> 
>>> I am starting to using GNUCash for personal use, It's Great
>>> 
>>> Immediately started to searching ways to implement it on my small
>>> business, in Argentina, where we need to interact with  a
>>> government's
>>> API to post some information and get a code that must be present on
>>> the
>>> invoice to be a legal document.
>> 
>>  From my understanding of your description you should enter the code
>> as 
>> Company ID. See
>> https://www.gnucash.org/docs/v5/C/gnucash-manual/book-options.html#business-book-options
>> 
> 
> The Company ID is what we call CUIT which identified the Physical or
> Juridic Person. On other countries in South America (Brasil, Uruguay)
> it's called RUT.
> 
> The code I'm talking it's a transaction validation code, kind of CRC o
> hash, but numeric only and is generated/assigned by government's
> software and not on our side.
> 
>>> I came across a recent mail on this list which I can not respond
>>> to:
>>> https://lists.gnucash.org/pipermail/gnucash-devel/2024-January/046877.html
>>> 
>>> I would be thankful if John or anyone else can explain a bit
>>> further
>>> how that country-specific implementation will need to be done and
>>> how
>>> to distribute it in a way that other people can use it. Is there
>>> any
>>> plugin or extension interface we need to attach to? Or I can make
>>> the
>>> invoice to me sent to another API in a way that the development can
>>> be
>>> done there, outside of GC?
>>> 
>>> 
>>> Thanks
>>> 
>> I will add a few thoughts on that thread.
>> 
>> Regards
>> Frank
> 
> Thanks
> 
> -- 
> Carlos R. Pasqualini
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel@gnucash.org <mailto:gnucash-devel@gnucash.org>
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to