Menu

#766 Invoice document number must be strictly consecutive

X-R2.4.4
closed
5
2003-09-05
2003-09-02
No

Dear Jorge,

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
invoice date
09/01/03, the next one need ABSOLUTELY have
consecutive document number, like we've previously
said, and
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
08/31/03).

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
callouts but
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
select if
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

Sergio Ramazzina

Discussion

  • Kathy Pink

    Kathy Pink - 2003-09-02
    • assigned_to: kmpink --> jjanke
     
  • Jorg Janke

    Jorg Janke - 2003-09-03
    • status: open --> pending
     
  • Jorg Janke

    Jorg Janke - 2003-09-03

    Logged In: YES
    user_id=87038

    It's a combination of things here.
    a) The sequence within months must be controlled by
    openung/closing periods
    --- problem is that at the moment you can process
    documents in closed periods, we assume that you then just
    open the period.
    b) The sequence within a month may have gaps, if you
    change the document type e.g. convert a Standard Order to
    a POS Order - But Invoices should not have that problem.
    c) In some situations, it "skips" a number. That is a bug.

    The "One shot" does not work as you within a month, you
    want to print invoices .. and you cannot change the
    document number afterwards / at the end of the month.

    [are you in Bonn, we might want to discuss it there?]

     
  • Jorg Janke

    Jorg Janke - 2003-09-03

    Logged In: YES
    user_id=87038

    *** Status set to PENDING *** If the issue solved, please CLOSE
    this request - otherwise set the status back to OPEN (we only
    check OPEN items). If there is no reaction within a week, the
    system will automatically CLOSE it. To speed up response time,
    you may want to consider a support agreement.
    ***

     
  • Sergio Ramazzina

    • status: pending --> open
     
  • Sergio Ramazzina

    Logged In: YES
    user_id=478694

    Jorge,

    we've solved the problem in a more easy way for now. I know
    that "OneShot" doesn't work in a month. But because I think
    it's an interesting feature I think we need to fill the gap. I
    can do that if you want but I need more help from you on the
    internal of the system. If you re interested we can continue
    the discussion privately.

    Thanks

    Sergio

     
  • Jorg Janke

    Jorg Janke - 2003-09-05
    • status: open --> closed
     
  • Jorg Janke

    Jorg Janke - 2003-09-05

    Logged In: YES
    user_id=87038

    Absolutely.

     

Log in to post a comment.