[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Records in AR table with NULL amount field

On Sun, Jan 8, 2012 at 12:12 PM, Erik Huelsmann <..hidden..> wrote:
> On Fri, Dec 23, 2011 at 12:24 AM, Chris Travers <..hidden..> wrote:
>> On Thu, Dec 22, 2011 at 2:19 PM, Erik Huelsmann <..hidden..> wrote:
>>> Hi all,
>>> As part of my efforts to establish that my LSMB database hasn't been
>>> damaged by the multi-currency problems that we found and fixed in
>>> 1.3.10, I'm looking at the AR table and finding rows which have a NULL
>>> amount field. These rows are not referenced from the ACC_TRANS table,
>>> but nevertheless, I'm not sure they ought to be there.
>>> So, here's my question: is it normal to have rows with NULL amounts in
>>> the AR table? If not, can I safely remove them, if they're not
>>> referenced from ACC_TRANS? Any idea how they might have appeared?
>> AR table?  no idea how they got there.  Yes, I would think they can be
>> safely deleted.
> Ok. I found that they have in common that the INVNUMBER contains a
> date field (all different, but an example: Wed Dec 28 15:59:01
> 201131932). None of the items are marked as 'invoice' (invoice column
> value 'f').
> None of the AR records are being referenced in ACC_TRANS. Could this
> be a case of a transaction being prematurely committed and then
> cancelled?
>> As far as determining how they might have gotten there, I would note
>> the transdate and id fields and then look for transactions with
>> similar id's (+/- 10 maybe) to see what else was going on at the time.
> Hmm. Maybe these are records from SL's create-unique-and-then-update
> strategy. Maybe it's impossible to install a NOT NULL constraint on
> the records at this time. That's a pity; I thought I'd be able to find
> out what causes it by installing one and waiting for people to run
> into trouble :-)

Yeah, these would be insert-the-update records where the update never

Best Wishes,
Chris Travers