1 (edited by jlinkels 01/17/2014 07:48:55 pm)

Topic: Change invoice date

Currently I am entering a lot of purchase orders, items receptions and supplier invoices into FrontAccounting as to catch up 2013.

Because I am transferring to FA from another accounting system I want the booking dates to be equal, or at least in the same period. If not, it will be hell to find back something.

What bugs me all the time is the mistake I make in entering the invoice date.

For both PO and items reception, the default date is the date of last transaction.

However for the invoice date, the default date is today's date. It already happened a few times that I received goods in 2013, but they were only invoiced in 2014. This looks very strange on the 2013 balance sheet. I simply don't want it that way.

I can credit the invoice, but then I lose the connection between received goods and the related invoice. From an accounting point of view the transaction is correct, but it is very hard to trace whether and invoice for those goods has been received and paid.

Question is, if I would hack the database and change the date in supp_trans, and the associated records in gl_trans, would that change the invoice date without side effects. Side effects meaning the database become inconsistent or reporting becoming incorrect.

What I would do, is change the date in supp_trans for that invoice, change the date in gl_trans for records matching the type and type_no.

Is this doable?

I understand this is in no way the recommended way to do accounting. It is also dangerous because a typo could really ruin the database. Therefor I want to write a small script which does these two transactions for me so errors are unlikely once the script is correct. It is also a temporary solution. Once I cleared the backlog in old invoices over 2013, in 2014 I can book invoices as they are received. At least they won't be booked in the incorrect year.

jlinkels

Re: Change invoice date

A date should not be revised. If the product was shipped to the customer when originally recorded, a customer request to change the date is grossly inappropriate and should not be considered, as you may facilitate a fraud on their part, for at least financial reporting failures. iproaccou.tant@gmail.com

Re: Change invoice date

You did not read what I wanted to do, you did not read the reason why I need to change the date, you did not understand that the case is exceptional and a workaround to get a backlog entered correctly. Instead you are just blurting out some common phrases saying that it is undesired. Had you read my post you would have known that I knew that already.

I am sure according to your standards is it much better keep in incorrectly booked invoice received in May 2013 in Februari 2014, right?

jlinkels

Re: Change invoice date

Just ignore iproaccount. It's one of those. smile

As for changing the transaction dates in the db... Just try it and see what happens. As long as you have a good backup, you should be able to get back to your current situation no matter what happens.

I'm not familiar enough with the inner workings of FA to give you a "proper" answer, but it seems unlikely to corrupt the database. After all, the whole point of having a database is to avoid storing redundant information.

Re: Change invoice date

i think it is doable. But please remember that every transaction in invoice might affect different queries. So i think it's best to recreate the error and see the queries.
Sorry I haven't touch the fa database for a long time.
I suspect you have to correct the date in the gl_trans, supp_trans, and also correct the amount in the balance sheet table for the gl account and period affected.

6 (edited by jlinkels 06/07/2014 02:43:11 pm)

Re: Change invoice date

tm wrote:

Just ignore iproaccount. It's one of those. smile

Hehe... I was upset, I admit. smile

tm wrote:

As for changing the transaction dates in the db... Just try it and see what happens. As long as you have a good backup, you should be able to get back to your current situation no matter what happens.

Yeah, I figured I could try it. My fear was that I changed something which would affect certain queries which I would not see until the year end or so. After all I am poking directly in the database, and if I change something only half my database is inconsistent. If no error occur while testing but suddenly after entering 300 transactions report X or Y proves to be inconsistent you'd wish never to start a business.

I have been using OpenERP 6.0 before, so I can tell you how it feels when your database is non-consistent and you have no idea where the problem is. Only in the case of OpenERP it is the application itself which creates the inconsistencies, you don't have to poke into the database yourself.

Anyway, in the mean time I have finished entering 2013 into FA a few months ago. Now I am maintaining the accounting on a regular basis and all for 2014. A date which is off for a few weeks is awkward but no disaster. And I also learned a very important command: Remove a transaction. So instead of crediting an invoice I can simple remove and re-enter it. Which is satisfactory.

jlinkels

7 (edited by apmuthu 06/16/2014 03:52:20 am)

Re: Change invoice date

Best is to make a single non-normalised table of all the transactions in an excel sheet like manner from the old program and then in FA use a subset of the data for the textcart extension and import them in!
If the excel sheet is standardized and and FA Import extension is made for it, that would be great!

Re: Change invoice date

I often find myself in the same situation as jlinkels as I usually enter my transactions in batch.
In fact there are two "traps" that I find I always fall into:
1. The date; having the wrong date for the invoice or payment
2. Wrong bank account for payment.

There is a simple solution that would be nice to have implemented.
A checkbox is added near the Date and also near the Bank Account (In payments). Unless the box is checked, the invoice or payment will not be accepted.

The ability to switch off the extra checkboxes should be made available either in the preferences menu or in the Company Setup menu.

Re: Change invoice date

carmelr wrote:

There is a simple solution that would be nice to have implemented.
A checkbox is added near the Date and also near the Bank Account (In payments). Unless the box is checked, the invoice or payment will not be accepted.

The ability to switch off the extra checkboxes should be made available either in the preferences menu or in the Company Setup menu.

I like the suggestion. Taking one step forward, instead of adding a checkbox, you could implement the option to blank the date field. And have no bank account set as default account but force the user to select one. Adding those options might even be easier both from implementation point of view as from a user point of view. There is no check box you can forget.

The same goes for creating a sales order for the wrong customer. There are so many mistakes which can be made inadvertently. Altough date and bank account occur most often with me.

BTW, paying from the wrong bank account is one of the least uncorrectable errors: a simple journal entry transferring an amount from one account to the other does the job. But it is awkward that the transactions show up in the bank book eventually.  Not making the mistake would be preferable.

jlinkels

Re: Change invoice date

I am also having exactly the same issues...and it is driving me nuts, I have to keep manually correcting in the database.

Re: Change invoice date

One modification I made to FA was for the Bank Account to always default to the last used for the given Supplier.  I always tend to use the same account per supplier. e.g. Some are Direct Debit from a particular account, some are always via Credit Card.  That practically eliminated incorrect bank account selection in my case.

Cambell https://github.com/cambell-prince

12 (edited by apmuthu 12/29/2016 09:35:42 am)

Re: Change invoice date

@cambell: Your commit is quite nice. You might want to restrict the use of the TB_PREF to the FROM table alone and not in the other parts of the select statement. The WHERE clause can check for on or before instead of just before date.

$sql = "SELECT supp_trans.trans_no,
       supp_trans.type,
       supp_trans.supplier_id,
       supp_trans.tran_date,
       supp_trans.ov_amount,
       bank_trans.ref AS bank_ref,
       bank_trans.amount AS bank_amount,
       bank_accounts.id AS bank_id,
       bank_accounts.bank_name,
       bank_accounts.bank_account_name,
       bank_accounts.bank_curr_code 
FROM " . TB_PREF . "supp_trans supp_trans INNER JOIN 
     " . TB_PREF . "bank_trans bank_trans ON (supp_trans.trans_no = bank_trans.trans_no 
                                   AND supp_trans.type=bank_trans.type) INNER JOIN 
     " . TB_PREF . "bank_accounts bank_accounts ON (bank_trans.bank_act = bank_accounts.id)
WHERE supp_trans.supplier_id=" . $supplier_id . "
  AND supp_trans.tran_date <= '" . $date . "' 
  AND supp_trans.type=" . ST_SUPPAYMENT . " 
ORDER BY supp_trans.tran_date DESC 
LIMIT 1";

@joe: Want to pull it in?

Re: Change invoice date

The original PR was here: https://github.com/FrontAccountingERP/FA/pull/10 Feb 2016.

Cambell https://github.com/cambell-prince