ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Oberreuter <goberreu...@gmail.com>
Subject Re: different Invoice types with same Invoice ID range -> Chilean case
Date Wed, 20 Jan 2016 15:13:07 GMT
For the record, at the end we implemented it like this:

1) Add new fields for entity Invoice: invoiceTypeSII and invoiceNumberSII.
invoiceTypeSII is defined by the Tax Authority (SII) in Chile and must be
implemented strictly by their specification. It is "similar" to ofbiz OOTB
invoiceTypeId (like SALES_INVOICE), but we decided that it was easier to
just implement a new field for this. invoiceNumberSII is the "folio": each
invoice issued in Chile must have a number (BigInteger), and those numbers
must be previously approved by SII before using them. (in fact, one has to
submit a request of a range of these folios to SII).

2) The ID of an Invoice (in Chile, generally speaking), is unique nationwide
if one consider: the ID of the company who issue the invoice (the RUT, like
the tax id in USA), the invoiceNumberSII, and the invoiceTypeSII. So, for us
to keep control of this uniqueness, we build the invoiceId ourselves, using
those 3 parameters:
invoiceId = <partyId>_<invoiceTypeSII>_<invoiceNumberSII>

And for Party, we defined partyId as the RUT for each company in Chile.

Hope this help someone else.

View this message in context: http://ofbiz.135035.n4.nabble.com/different-Invoice-types-with-same-Invoice-ID-range-Chilean-case-tp4672808p4676257.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

View raw message