[Ledger-smb-devel] vendor invoices problems

2007-09-21 Thread Victor Sterpu
The back button from the browser creates a lot of problems. When a new invoice is created operator can press "Post", then the "Back" button and then "Post" again. This heappens to my users very often. To prevent this I created a index: CREATE UNIQUE INDEX ap_transdate_vendorid_invnumber ON ap(tran

Re: [Ledger-smb-devel] inventory function

2007-07-16 Thread Victor Sterpu
The last 2 queryes that I posted were proven to be wrong after a little testing. I've just looked on Ed's queryes. It can't last 2 hours on a database like you described(it takes a few seconds on my db). Maybe you nedd a "vacuum analyze" and an update to max_fsm_pages - I had the same problem

Re: [Ledger-smb-devel] inventory function

2007-07-15 Thread Victor Sterpu
This should be the query that will show the quantities also: SELECT p.id, p.description, p.partnumber, sum(i1.qty), sum(i.qty), sum(i.sellprice*-i.qty), sum(acc.amount), sum(i.sellprice*-i.qty)-sum(acc.amount) FROM invoice i JOIN ap a ON (a.id=i.trans_id AND a.transdate<='2007-7-15') JOIN part

Re: [Ledger-smb-devel] inventory function

2007-07-15 Thread Victor Sterpu
I made a query that takes 4 seconds for a database with 3689 ap invoices and 68834 ar invoices. My test system is a dual xeon 2.2Gh with 2Mega RAM. It requires 2 indexes. CREATE INDEX parts_inventory_accno_id ON parts (inventory_accno_id); CREATE INDEX acc_trans_invoice_id ON acc_trans (invoice_

Re: [Ledger-smb-devel] inventory function

2007-07-13 Thread Victor Sterpu
Chris Travers wrote: On 7/13/07, Victor Sterpu <[EMAIL PROTECTED]> wrote: I'm want to make a inventory function that to print the inventory at a specific date. The inventory must show the quantities and also the value of the inventory account for each group of products. So it wi

[Ledger-smb-devel] inventory function

2007-07-13 Thread Victor Sterpu
I'm want to make a inventory function that to print the inventory at a specific date. The inventory must show the quantities and also the value of the inventory account for each group of products. So it will show the quantities and the values of the ramaining items. Do you want to integrate sutc

Re: [Ledger-smb-devel] reposting invoices

2007-07-07 Thread Victor Sterpu
Yes. Thank you. Chris Travers wrote: > BTW you are correct on the patch you submitted :-) I am applying the > patch now and putting through some final testing. > > Is it OK to include your email in the CONTRIBUTORS file? > > Best Wishes, > Chris Travers > > On 7/

Re: [Ledger-smb-devel] reposting invoices

2007-07-07 Thread Victor Sterpu
at when a ap invoice is posted and COGS are allocated on ar invoices, the "allocated" field is not updated on the ap invoice. And this way they can be reallocated. Chris Travers wrote: > On 7/7/07, Victor Sterpu <[EMAIL PROTECTED]> wrote: > >> It's true I reported a

Re: [Ledger-smb-devel] reposting invoices

2007-07-07 Thread Victor Sterpu
also). And this solution is more simple. :) Chris Travers wrote: > On 7/7/07, Victor Sterpu <[EMAIL PROTECTED]> wrote: > >> You are right, my solution is not GAAP-compliant. >> >> I'll try then to define why COGS is wrong in my opinion. >> 1) I create a

Re: [Ledger-smb-devel] reposting invoices

2007-07-07 Thread Victor Sterpu
ted) in the "invoice" table for the same product, at the same price. The "allocated" field is updated to match that 2 entryes. Thank you. Chris Travers wrote: > On 7/7/07, Victor Sterpu <[EMAIL PROTECTED]> wrote: > >> I must implement a way to repost invoic

[Ledger-smb-devel] reposting invoices

2007-07-07 Thread Victor Sterpu
I must implement a way to repost invoices, mentaining the correct COGS. I'm thinking to do this by creating a new table where too keep all the necesary information. Are you interested in adding this functionality in ledgersmb? Why do I need to repost a invoice? Suppose there is a wrong date, invo