we have a real big problem for our italian customization.
THE PROBLEM: The italian state fiscal law requires that
the invoice document numbers MUST be absolutely
consecutive one to each other WITHOUT any hole
between a document number and the following.
So for example I can have this sequence: 1, 2, 3, 4,
5, .... but not this one 1, 2, 5 where
the numbers 3 and 4 are not presents. Then, we have
another issue that we've almost covered. Given
an invoice with a certain document number and a
certain invoice date, for example doc number1 with
09/01/03, the next one need ABSOLUTELY have
consecutive document number, like we've previously
invoice date that need ABSOLUTELY be greater than or
equal to the invoice date of the immediately
following invoice document. So, like we've said, if we
have invoice number 1 with invoice date 09/01/03
the invoice with document number 2 need to have
invoice date greater than or equal to the invoice date
of invoice 1 (example: 09/01/03 or greater, NOT
Now that I've exposed you the problem I'll explain what
we're doing and our questions.
We're customizing the way Compiere works to reach the
solution to that problem.
We've almost solved the date problem using triggers and
we've a real problem in solving the numbering problem.
The way Compiere normally operates isn't good because
it gives the document number immediately whenever you
save the invoice header. Also immediately updates
the next number in the AD_SEQUENCE table. In that
way, because the invoice isn't locked until a user
doesn't press the "Complete" button, we can always
delete the invoice losing a precious number and leaving
and enumeration hole that isn't good for us.
The ideal solution for us is that all the invoice data
could be saved in a, let me say, "one shot way"
and not like now where every time I click on a tab to
change form the data is immediately saved to the
database. We've tried to apply this solution but the
code is too much heavy tied in a continuos conversation
with the db. But if you can help me we can apply this
solution together. What I've thought
is to insert a flag in the Window configuration
application (Windows/Tab/Field) where a user would
to activate this "One shot save" or not. This could be
really useful in applications like Orders, Invoices or
other where the tabs in the windows are going to build a
unique application or a single unit of work (this
is the best term we can use).
Ok, so, just to came back to the point. Above we have
given the ideal solution but we think it's not
simply applicable because of the way the things are
designed. At this point we're going to ask your
opinion and a solution.
Thanks a lot and regards
Log in to post a comment.