Hi Andrie,

Though accounting is not forte, I think you could use the reference number
field to store the external invoice id and let the invoiceId be the
system's auto-generated value.

HTH
Thanks and regards,
Aditya Sharma

On Sun, Feb 21, 2021 at 4:38 PM Andrei Stan <[email protected]> wrote:

> Hello Michael,
> Thank you for reply.
> Can you suggest any best practices when having multiple invoices and at
> the end of the (fiscal) year one wishes to reset the invoice counter?
> Is there an option in ofbiz to do that?
> Thanks,
> A.
>
> On 21.02.2021 00:28, Michael Brohl wrote:
> > Hi Andrei,
> >
> > if you load data through XML files, there is no application logic in
> > play. It's a plain import to the database.
> >
> > So if you load invoices with the same invoice id (which is the primary
> > key for the invoice table), the second dataset will overwrite the first.
> >
> > The mentioned setting will not help with the problem during import.
> > Because of the primary key, you cannot have the same invoice id twice
> > so *I guess* the setting will generate an invoice id with the year and
> > id (like 2021-1 or similar). But I'm not sure though...
> >
> > Regards,
> >
> > Michael Brohl
> >
> > ecomify GmbH - www.ecomify.de
> >
> >
> > Am 20.02.21 um 09:48 schrieb Andrei Stan:
> >> Hello everyone,
> >>
> >> I want to import some of my old invoices into ofbiz, and some of
> >> those invoices have
> >>
> >> the same id, but were created in different time periods, different
> >> years.
> >>
> >> So, for example, i have *EU-1 *created in 2019**and *EU-1 *created in
> >> 2020.
> >>
> >> When importing the xml file with data for company, invoices etc.,
> >> only one of those two duplicates is imported, without erros from
> >> ofbiz's side.
> >>
> >> Have anybody tried this in the Accounting Preferences by set the *Old
> >> Invoice Sequence Enum ID *to *Restart on Fiscal Year (no gaps, per
> >> org, reset to one each year) *??
> >>
> >> Thank you,
> >>
> >> A.
> >>
> >>
>

Reply via email to