Re: remove gaps in a table

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Fri, 22 Dec 2017 09:28:07 -0500
Message-ID: <p1j4pi$be2$1_at_jstuckle.eternal-september.org>


On 12/22/2017 4:37 AM, The Natural Philosopher wrote:

> On 21/12/17 18:02, Thomas 'PointedEars' Lahn wrote:

>> J.O. Aho wrote:
>>
>>> On 12/20/17 20:27, J�rgen Exner wrote:
>>>> On Wed, 20 Dec 2017 19:20:09 +0100, "J.O. Aho" <user_at_example.net> wrote
>>>> in comp.databases.mysql:
>>>>> For you if you want completely gapless order numbers, don't delete,
>>>>> when
>>>>
>>>> ACK. Mark the order as "deleted" but never remove it from the DB. That
>>>> is the correct way to go.
>>
>> Full ACK.
>>
>>>>> an order is "deleted", you generate a new order which is the complete
>>>>> opposite of the original order, so if the original order is for 3
>>>>> nails
>>>>> of a value of 3 dollars, then the new one is for -3 nails for the
>>>>> value
>>>>> of -3 dollars. This way you have gapless order numbers for the
>>>>> accounting department and the numbers would be correct from an
>>>>> accounting point of view.
>>>> That is nuts. How would e.g. shipping package and send -3 nails?
>>>
>>> Yes, but you have a nuts requirement in the first place and accountants
>>> seems to like things nuts like this. ;)
>>
>> Your logic is flawed.  Consider shipping costs, for example.
>>
> Those go in the table called 'overheads'
> 
> 
> 

No, they are part of the invoice, just like any other item. And no matter where they are placed, they need to be reversed also.

A secure accounting system NEVER allows something to be changed once it is entered. Any change must be performed by creating another entry.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Fri Dec 22 2017 - 15:28:07 CET

Original text of this message