Topic: Due Date is Before Invoice Date on Cash Only Direct Invoices

I installed FA yesterday, and I'm moving my sales data into FA by doing direct invoices.  I just noticed that when I print a direct invoice the due date is before the invoice date for Cash Only sales (i.e. with payment type set to "cash" in the payment terms setup).  Shouldn't the invoice date and due date be the same for payment type cash?  Btw, when I post the transaction, the payment date in the G/L is the invoice date, not the (incorrect) due date according to the invoice, so at least everything is posting correctly.  But, the invoice sure looks dumb (payment is "due" before I even do the invoice???).  LOL!

Any help in fixing this would be greatly appreciated!

Thanks!

Regards,

Chris

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

Please check that your Cash Only is not set to Prepayment type in Setup tab, Payment Terms. It should be set to cash.

/Joe

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

joe wrote:

Please check that your Cash Only is not set to Prepayment type in Setup tab, Payment Terms. It should be set to cash.

/Joe

Hi, Joe!

Nope.  It's set to "Cash" in payment terms.  Btw, just for giggles I tried setting up another payment term with due after number of days set to zero to see if that would work differently, but when I saved the recordt FA flipped the payment type to cash.

Thanks for you help!

Chris

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

Uhhhh....  I think I may have figured out what's happening, although I haven't a clue why it's happening or how to fix it.  It looks like for payment type "cash" it's taking the due date from the invoice date of the previous invoice.  Here's a couple of examples of what I mean:

Invoice # 109 has an invoice date of 2012/04/15, terms of "first day of next month", and a due date of 2014/05/01 (correct!).

Invoice # 110 has an invoice date of 2012/04/17, terms of "cash", and a due date of 2014/04/15 (wrong!).

Invoice # 111 has an invoice date of 2012/04/28, terms of "cash", and a due date of 2014/04/17 (wrong again!)

I haven't done that many direct invoices, but I've checked them all and it's consistent that whenever the payment terms is set to "Cash Only" (which has a payment type set to "Cash" in the setup) FA always sets the due date to the invoice date of the previous invoice not the invoice date of the current invoice.

Hope that helps you track down the solution  Thanks again for your help!

Chris

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

This is strange. I cannot reproduce this (only if the invoice date is before todays date, the due date is todays date, when payment type is cash).

Which release of FA are you using?

/Joe

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

joe wrote:

This is strange. I cannot reproduce this (only if the invoice date is before todays date, the due date is todays date, when payment type is cash).

These are invoices with an invoice date before today's date, but that shouldn't matter, should it?  For any invoice where the payment terms are "Cash" the invoice and due dates should be the same.

joe wrote:

Which release of FA are you using?

/Joe

I'm using version 2.3.13 db version 2.3rc (according to version.php).  I checked the database and it is posting the wrong date to fl_debtor_trans so the problem is in the posting routine somewhere.

Thanks, again, for your help!

Regards,

Chris

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

Any luck in figuring this out?

As a short-term workaround, I have created another payment term with a days_before_due of "1" instead of "0" and I'm using that for cash sales.  That gets the due date "close enough" but then I have to remember to move the due date back one day on the entry screen so that it's the same date as the invoice date (not a big deal if I miss that, though).  When I post the transaction the invoice and due dates match, but then I have to go and manually allocate and post the payment.  That's a bit of a PITA but I can deal with it until we get this solved.

Thanks for your help.

Regards,

Chris

8 (edited by apmuthu 01/12/2013 08:34:07 am)

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

Is the server date/timezone affecting the issue?

Want to try it out in the later Mercurial build ?

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

apmuthu wrote:

Is the server date/timezone affecting the issue?

I don't see how that could be a factor?  It appears to me that the program is grabbing the last invoice's invoice date instead of the current invoice's invoice date when it posts the transaction.  What would that have to do with the server's date/timezone setting?

apmuthu wrote:

Want to try it out in the later Mercurial build ?

I guess if you folks are totally stumped I could install on that build, but that would require quite a bit of work on my part (installing and configuring the build, setting-up accounts, adding data, etc.).  Are we at that point yet?

Thanks for replying, and thanks for your help!

Regards,

Chris

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

Hi, apmuthu!

I have decided that I wouldn't mind trying the Mercurial build, but can you explain to me how to do it so that the Mercurial build accesses the same database so I don't have to set-up everything from scratch?  I tried uploading the files (to a separate directory, of course!) and then copying the config.php and config_db.php files  from the 2.3.13 directory to the new mercurial directory, but when I tried accessing the site that bombed big time.

Thanks!

Regards,

Chris

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

Date functions use date subtraction and date intervals usually. Hence the PHP/Apache TimeZone in general is assumed to match the MySQL TimeZone setting. I have not had the time as yet to look into the exact code and why this occurs and if it is an exception for your environment.

As for the Mercurial Build, it is advisable to work on a clone of the earlier db and try Setup -> SoftwareUpgrade. Alternatively on a new database and mercurial build, try with the demo data.

12 (edited by chrison 01/14/2013 12:03:17 am)

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

Apache and MySQL are both on the same server, so I'm assuming that the time zone variable for both are identical, but even if they aren't the difference would be a matter of hours, not days.

My problem is that FA is consistently grabbing the invoice date for the previous invoice, not the current one, when posting invoices that have a payment term of "cash."  If I'm entering an invoice with an invoice date of 2013/01/13 and the previous invoice has an invoice date of 2012/07/01 then the due date for my new invoice will be set to 2012/07/01 when I post it if the payment terms is set to "cash."  So, again, I doubt than error has anything to do with how Apache and SQL time zones are setup.

As for the Mercurial Build, I suppose I could do a db backup of the production server, install Mercurial, and then restore the data into Mercurial.  That would save me from having to re-enter the data again.

Thanks for the help and suggestion!

Regards,

Chris

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

A working mercurial build is available for download here.

Re: Due Date is Before Invoice Date on Cash Only Direct Invoices

I downloaded it.  Thanks!

Regards,

Chris