On 2015-10-20 19:07, Albert Cervera i Areny wrote:2015-10-20 18:38 GMT+02:00 Cédric Krier <cedric...@b2ck.com>:Hi, I was discussing about issue5016 [1] which is indeed a continuation of issue4410 [2] and I came with the idea that we should remove the invoice/credit_note type on the Invoice object. Such types are really a big constraint that prevent us to generate mixed documents (half invoice and half credit note). So the idea will be to migrate the credit note to negate the quantity and keep in type only 'in' / 'out' (aka 'supplier' / 'customer'). The only difficulty will be for the sequence. Until now, we have the possibility to use different sequences for invoice and credit note. I think the way to manage such change will be to warn early enough users that such configuration will no more be possible in the future and so people should configure the next fiscalyear by using unique sequence for both types in prevision of the future migration.We need both sequences in Spain as it is a legal requirement [1].Could you point to which page?
Yet, it should not be all that difficult to choose the sequence depending on the sign of the invoice.I think if you have really this constraint, this means that you can not mix positive and negative lines on the same document otherwise it is not consistent.
-- Jordi Esteve Consultor Zikzakmedia SL jes...@zikzakmedia.com Mòbil 679 170 693 Zikzakmedia SL St. Jaume, 9, baixos, 2a 08720 Vilafranca del Penedès Tel 93 890 2108
Am 09.11.2015 18:45 schrieb "Cédric Krier" <cedric...@b2ck.com>:
>
> On 2015-11-09 18:21, 'Korbinian Preisler' via tryton wrote:
> > > I don't agree, negative amount is a credit note not a cancellation.
> > > The cancellation of an invoice is managed the cancellation move. This is
> > > the only way to ensure that the cancellation is really a cancellation.
> > > The amounts can not be modified, the invoice can only be cancelled once
> > > etc.
> > >
> > Could you please again define for me the credit note you are talking
> > about? What makes your credit note different from an invoice?
>
> A "credit note" in the future design is just an invoice with an amount
> negative
Can you please explain me the business case behind such a credit note? I ask this because i think that we are talking from different things and i really want to understand your plans as i think that the changes you plan are really important.
>
> > Could you explain me how you want to handle partial cancelation?
>
> You don't because it is not possible to cancel partially an invoice
> because of the rounding issue.
> So you have to cancel the all invoice and create a new one with what you
> did not want to cancel.
> The goal of cancelling an invoice is to make like if the invoice was
> never created (for the balance, the credit and the debit of accounts)
> but with rounding issue of partial cancellation, this goal can not be
> achieved.
This is not the only reason for a cancelation.
* The Wizard 'Credit Invoice' should be renamed to 'Cancel Invoice' and should multiply the quantities of the invoice lines with -1 * A constraint should be implemented that the total mount of an invoice must be positive and the total amount of an cancelation must be negativeI don't see the point of having a constraint. It is not needed to work correctly if the "type" is deducted from the sign of the amount.Which "type" are you talking about?You are talking about constraint on specific type of invoice so this will require to put a type on the invoice. But I think it is not necessary because the sign of the amount define the type.
On 09.11.2015 20:18, Cédric Krier wrote:
> On 2015-11-09 19:34, 'Korbinian Preisler' via tryton wrote:
>> Am 09.11.2015 18:45 schrieb "Cédric Krier"
>>> On 2015-11-09 18:21, 'Korbinian Preisler' via tryton wrote:
>>>>> I don't agree, negative amount is a credit note not a cancellation.
>>>>> The cancellation of an invoice is managed the cancellation move. This
>> is
>>>>> the only way to ensure that the cancellation is really a cancellation.
>>>>> The amounts can not be modified, the invoice can only be cancelled
>> once
>>>>> etc.
>>>>>
>>>> Could you please again define for me the credit note you are talking
>>>> about? What makes your credit note different from an invoice?
>>> A "credit note" in the future design is just an invoice with an amount
>>> negative
>> Can you please explain me the business case behind such a credit note? I
>> ask this because i think that we are talking from different things and i
>> really want to understand your plans as i think that the changes you plan
>> are really important.
> The usual usage of credit note is to correct mistakes made on invoice or
> to cancel an invoice because it has no reason to exist.
> This is because in many countries cancelling invoices are not allowed.
Ok. Now we are talking. Everything is clear for me now. What you call a
credit note is a cancelation for me and the cancelation you talk about
is just a special case of your credit note for me.
This also explains why you do not care about the self-billing boolean as
it is not part of your concept. We can keep it out as it is not really
important for the removal of the invoice/credit note type.
I will try to answer your last posts again as you now solved my
misunderstanding.