Just wanted to say thanks @Joe, you are a rock star and are highly appreciated!

Hi Again,

This morning I went to credit an invoice so I could regenerate another and came across another page that has only the link to go back:

under sales=>Inquiries and Reports=>Customer Transaction Inquiry, Select customer, set type to Sales Invoice.  Click the red arrow icon for credit this, get a page with only the tabs and a "back" link.

Another php8* issue?

Thanks @Joe, you rock!!

For the sake of completeness, there is an error in the apache logs when visiting the reconcile page:

Fri Jul 22 08:52:05.754731 2022] [php:notice] [pid 2431809] [client 192.168.25.212:46626] 0:bob:sysprefs.inc:36: Undefined property: sys_prefs::$time_zone, referer: https://fa.computerisms.ca/gl/bank_account_reconcile.php?

However, this error raises on every page, so not sure it is relevant.

Good morning!

I have just upgraded from 2.4.11 to 2.4.12 in an attempt to fix another problem, which succeeded.  Unfortunately, after the upgrade I am no longer able to generate recurring invoices.

When I go to the "Create and Print Recurring Invoices" page, I am presented with some invoices that are due to be generated and sent.  When I click the icon in the far right column, I am taken to the page that has the create and cancel buttons, and clicking the create button takes me to a page that has nothing on it except the main tabs and a "back" link.

The problem seems to occur under all the themes.

I see the following entry in the apache error logs, but I see this for every page and since it is only a php Notice, I am not certain it has any relevance:

[Fri Jul 22 08:56:58.372406 2022] [php:notice] [pid 2432294] [client 192.168.25.212:46648] 0:bob:sysprefs.inc:36: Undefined property: sys_prefs::$time_zone, referer: https://fa.computerisms.ca/sales/create_recurrent_invoices.php?

fwiw; I did not have a default timezone set in my php.ini, but setting it did not fix the error in the logs, or the invoice creation issue.  I think there is a timezone setting in FA some where, too, but so far I haven't found it.

I set $debug and $go_debug to 1 in the config.php file, but I got no additional text on the page and no additional entries in the apache log.

Any other suggestions on diagnosing and fixing this?

Hi @Joe,

Thanks for checking!

just to update;

Paypal page is working now

Checkboxes on the recconcile page are working after upgrading from 2.4.11 to 2.4.12.

Unfortunately, today, I am not having any luck generating recurring invoices, but I will make a separate post for that.

Don't know if it is a temporary situation, but the donate button on the main website doesn't appear to be working.

Aha!

I found a new release is available, 2.4.12.  problem is fixed in this version.

Hi Folks,

I updated a bunch of things on my system about a month ago, php8.1 and Frontaccounting among them. 

Today I went to do some reconciling, perhaps not as soon as I should have, granted, and found that I have no checkboxes any more.  Where checkboxes used to be, there are no only little double-dash icons. 

I tried different browser and got the same behaviour, checked logs for errors and found none, tried pointing apache at the backup set of files I took before I upgraded, but none of those changed anything.  Maybe a php8.1 issue?

Am I the only one who is missing the checkboxes?

10

(1 replies, posted in Accounts Receivable)

Hi Folks,

This week I upgraded my debian server so that now it has php8.1.  Today I was going to do bookkeeping, but when I tried to email an invoice to a gmail address, I got a bounce back like this one:

Remote host said: 550-5.7.1 [69.60.111.174] Messages with multiple addresses in From: header are
550 5.7.1 not accepted. bs14-20020a05620a470e00b006a6c64ef202si3081371qkb.698 - gsmtp

So I instead ended up spending most of my afternoon tracking down the solution to this problem.  As far as I can tell, this bounce only comes from gmail, I wasn't able to reproduce this issue with any microsoft-hosted accounts, or with any other email servers I sent test messages to.

It appears that php8(.1) has changed the way it handles line feeds, which is the source of the problem.  The fix, or at least the one that worked for me, was to modify the following line in my php.ini file thusly:

sendmail_path =  "/usr/bin/dos2unix -u|/usr/sbin/sendmail -t -i"

And of course make sure you have dos2unix installed wink

Hopefully this saves someone some time.

After traversing many dead-end rabbit holes, the answer was found here:

https://github.com/php/php-src/issues/8086

Many thanks to hansherlighed for the insight and solution.

Hi Folks,

I might find myself in a situation at some point in the near future where I will want a few instances of FA on the same server, where each instance appears as a standalone instance to each of it's users.  I am thinking it might be a good idea to try and run each of these instances from one code base.

I have done this before with Mediawiki; basically it is done by having a folder with the code, then symlink all the files in that directory to the DocumentRoot.  Remove the links to the site specific files and create them for each instance, and then use the apache config to export an environmental variable that configures mediawiki to run from a hardcoded install path.

I tried similar with FA; the files are stored in /usr/src/fa, the DocumentRoot is /var/ww/fa.  link all files in /usr/src to /var/www, rm company, lang, modules, sql, themes, and tmp from /var/www/ and copy them from /usr/src into /var/www.  Set permissions, etc, and the installer ran without problems.

When logging in, though, only the front page shows, and the logs clearly show that it cannot find the config files due to them being referenced by a relative path from /usr/src that do not lead to the site specific config files in /var/www.

I tried hardcoding $path_to_root in index.php  with /var/www/fa, but that messes the browser's URL and doesn't work.  setting it to / also doesn't work.

Wondering if there is a trick that can make path_to_root always work from an absolute path like /var/www/fa instead of a relative one like .?  or is the experiment doomed to fail?

12

(7 replies, posted in Accounts Receivable)

@Joe,

just a little bit more follow up.

I restored my original company that I had been working on and using to report this issue, removed the BCC field, and set rep107 to 'invoice' and false and branch contacts to invoice and mail delivery works as expected.

To see what would happen, I set rep107 to 'general' and false, and this caused it to email the customer contact, which was still set to general.  I guess this is expected behaviour in that if it couldn't find a correct contact type in branch contact, it fails over the customer contact, so good up to here.

From here, I change the action type on the two branch contacts to general, and I get the same behaviour as the BCC field being set; a duplicate email is sent to the 2nd branch contact.  My expectation is that it would behave the same for general contacts as it would for invoice contacts, ie send one email to each general contact type in the branch contacts.

Maybe these two anomalies causing duplicate mails are related, or a clue that point to the same root cause?

As per the wiki, invoice type will do invoices, receipts and statements, but not quotations.  I don't do a lot of quotes, but it's not like I never use the feature, so my prediction is that if branch contacts are set to invoice, it will fail over to customer contact of general type; testing proves this to be true, the quote is emailed to the general type of customer contact.  And set customer contact to invoice, and error says no contact of the correct type to email to.  So all of that behaving as expected, can't be sending quotes if all the contact types are set to invoice.

My concern here is that if I need to keep the same list of contacts in both branch and customer and make sure one is set to invoice and one is set to general, or eliminate one set of contacts altogether, then I am back in the same position I am trying to fix, which is to make contact management less error prone and more intuitive for other users.  It would seem that being able to use general type for multiple contacts in the branch would be the solution; that way contacts just go in with more or less default settings and the end users don't have to remember to do special things every time they add a customer or contact.

13

(7 replies, posted in Accounts Receivable)

@Joe,

So by good fortune the problem was at the beginning of the config process and not at the end smile

Problem setting is the BCC field under company setup=>company setup.  When it is set, an email to the 2nd branch contact is generated twice.

Hi Joe,

Thanks for the clarification, tested and working as you described.

15

(7 replies, posted in Accounts Receivable)

@Joe

Thanks so much for sticking with me on this.

I decided to start from the cleanest slate possible to eliminate any possibility I did a configuration mistake.  so brand new unpacking of the files, empty database: go through the installer, used English Canada CoA, otherwise all defaults except db info.  First thing when logged in is make a tax group, name it GST and select 7% VAT, just to use something very default.  Next add non-exempt item tax type.  Next add item using service category and service item type, everything else default.  Next add customer with customer name, short name, one word in the address field, and my email address, everything else defaults.  Here is my starting platform.

Generate direct invoice and email it: page says one email sent, one email received.

Update Customer contact to have first and last name of Bob Miller, generate invoice: Page says one email sent, one email received.

Clone customer contact, change first name Sally , last name Smith, use alternate email address, generate invoice: Page says one email sent, one email received.

cp reporting/rep107.php company/0/reporting/
vi company/0/reporting/rep107.php
*change line 138 to this:
*$contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no'], false);

Modify Branch contact to have first name Fred, last name Jones, contact active for invoice generate invoice: pages says one email sent, Fred Jones received an email.

Clone branch contact, change first name Joe, last name Public, use alternate email address.  generate invoice: page says two emails sent, Fred and Joe received emails.  Woot!! first time I have seen this work.  So something else about my install is causing the problem.

Install (my preferred) Response theme and switch to it in preferences, generate invoice: page says two emails sent, Fred and Joe receive emails. 

So it seems that it does work as advertised, but something I did made it not work that way.  Fortunately I took fairly careful notes about all the things I did to do my setup, so I will step through them again one by one and see if I can nail down exactly where in the process it breaks and I will report back.

Thanks again for your help!

Hi Gurus,

When setting up a service item, there is an option to set the COGS account.  My understanding when selling a service item that there is no asset to transfer to the COGS account, so it wouldn't be used?  To be sure, I tried invoicing a few service items in my test environment and as expected nothing was added to the COGS account.

That got me to wondering what it is there for?

I thought maybe it's an AP thing? Tried in my test environment doing a direct supplier invoice, paid it, sold it and paid that, but nothing is showing up in the COGS account that way either.

So I am still wondering, is there a use for that account on Service items?  if so, can anyone enlighten me?

17

(7 replies, posted in Accounts Receivable)

@Joe

I was hashing this over in my sleep last night, thinking I must be doing something wrong.  So this morning I rolled back to my first backup, so basically at the point where I have only my tax number setup.  Tried to setup a customer, but had to get the tax groups setup first, tried to add an item, but had to get item tax types setup first; just illustrating that there isn't much of anything added to the system.

I then added 2 contacts in customer with type general, with unique names, and 2 contacts in branch with type invoice, with unique names.  I then modified rep107 to be invoice and false; then generated a direct invoice; emailed the invoice, and was able to replicate yesterday's situation where I got one invoice to the first branch contact and 2 copies of the invoice to the second branch contact.

So can definitely reproduce the same results.  And still thinking this is not intended behaviour.

Is there any further info I can provide to get this figured?

18

(7 replies, posted in Accounts Receivable)

@Joe

Thanks for the reply, and the clarification.  I took Apmuthu's comments in the original post to mean it should work for general and invoice action types, but when you pointed out the "invoice" type requirement it became obvious.  My bad for not connecting that before.

For testing, I am using 2 branch contacts with different emails that are both configured on my desktop, and one of those contacts is auto-created from the contact that was created when I entered the customer.  As mentioned I am working on a fairly pristine instance; a few things setup under company setup to make the system work, but only one customer and 1 service item in inventory.  To test the sending of mail I have generated a single invoice in the system and am using the reports and analysis page to print/email invoices as required.

I copied rep107 and changed line 138 to false as you suggested, and set the action types to invoice for my 2 branch contacts, and it is now sending me 3 emails; 1 to the first branch contact and 2 to the 2nd branch contact.  I am not clear where it is getting the idea to send 2 emails to the 2nd contact from, but I can see in the local exim logs that it is indeed sending 3 mails instead of 2.  the 0_crm_contacts table is showing one general type of contact for customer, and 2 invoice types of contact for cust_branch.

For grins and giggles, I changed 'invoice' to 'general' on line 138 of rep107.php, on the premise that that will send to all the general type branch contacts, and set the contact types back to general for both branch contacts.  This results in a yellow triangle on the web page, and 4 emails being sent.  Either 3 to the first branch contact and 1 to the second, or one to each branch contact and one to the customer contact and one extra because it is over achieving. 

I deleted both branch contacts, so left with only one customer contact, and this results in one invoice going to the customer contact.  Add a 2nd contact to the customer (not the branch), and I again get the yellow triangle, and 3 emails; one to the first contact and 2 to the 2nd contact.  change rep107 to be 'general' and true, and back to one email to the first contact (expected behaviour).

Change rep107 back to 'general' and false, added 2 contacts back to the branch, so now have 2 branch contacts, 2 customer contacts where one contact is the same between customer and cust_branch, and rep107 is set to general and false.  Now I get 1 email to first customer contact, 2 emails to first branch contact, and 2 emails to second customer contact (using different names on all the contacts so I can see it is sending to both customer and cust_branch), and nothing to the second branch contact.  Exim logs confirm 5 mails leave the system.

So I think still not working as expected.  I can't imagine what, but is it possible I am doing or not doing something that is causing this to not work? 

Very much open to further suggestions.

19

(7 replies, posted in Accounts Receivable)

Hi Folks,

I have taken it upon myself to migrate into a new instance of FA for my next fiscal year.  Nothing particularly wrong with my existing instance, just did all of my learning in there and want a fresh database. 

Way back when I first started using FA I reported an email problem:

https://frontaccounting.com/punbb/viewtopic.php?id=5258

so now in my fresh install with only a minimal amount of setup done, I am seeing that this problem is still present where it only sends to the first contact in the list.

It was never confirmed absolutely in the above mentioned post if anyone can actually successfully send to multiple recipients with out messing with the code, so I would start by asking if anyone can do that?  It would be very unexpected that I am the only one who needs or wants to use this feature, but maybe it is the case?

Assuming a negative answer, I am just going through the basics:

*As per @Apmuthu's suggestion in the above mentioned post, I have changed the last parameter of line 138 of reporting/rep107.php from true to false, however, as before, this results in an error about no contact defined and does not send an email.

*I see there is now a wiki page on the topic, but nothing actually addresses the multiple recipients other than the link back to my forum post.  I tried installing the mail extension anyway, and tried both the php and smtp options, however both are still only sending to the first contact.

https://frontaccounting.com/fawiki/index.php?n=Devel.EMailIssues

*Also, I have posted a bug in Mantis on this issue, bug number 0003671, but it seems nobody has looked at it yet.  (Sadly/Happily my business is keeping me busy enough that I still have not developed the PHP skills necessary to fix this problem myself). 

So I am posting this so that maybe it comes back into the light as something people need.  The ability to CC some contacts and TO others would also be a really handy asset, though a minor drop in the bucket compares to actually needing to send to multiple recipients in any form.

I do have the work around I figured out way back when (commenting lines 208-215 of sales/includes/db/branches_db.inc and deleting all branch contacts), but now that I am not the only person working in FA in my own company, it would be nice to not have to mess with the code on every update, and not have to go back and delete contacts every time we add a customer.  It works, but it's error prone, and people who come from Microsoft environments (ie practically everyone) don't wrap their head around using workarounds the same as I do, it seems.

20

(37 replies, posted in Installation)

Did not find the issue reported in Mantis, so I created an entry there.

21

(37 replies, posted in Installation)

Hi Folks,

Kudos to guabeff and gnurob; on a fresh install of 2.4.10, I can confirm that both situations are correct; password must be less than 21 characters long, *and* must not contain an ampersand.  Did not test other special characters, I just removed them all from the password, and got by that screen.

22

(2 replies, posted in Reporting)

To save the next person some mental gymnastics, the following query worked for me:

SELECT `name`,email FROM crm_persons where id IN (SELECT person_id FROM crm_contacts WHERE type='customer');

I think most people will have to set

type='cust_branch'

, but should be easy enough to figure out how to modify the statement for your own system.

you could log into the mantis bug tracker and add a feature request.  This would be a good thing, I often forget credits are available until after I have taken money from a customer.

24

(4 replies, posted in Accounts Receivable)

nailed this a while back, but posting here in case I need it later, and in case it helps others:


                //text_row(_('Invoice notice:'), 'memo', sprintf(_("Recurrent Invoice covers period %s - %s."), $from, add_days($to, -1)),
        $newto = add_months($to, $myrow['monthly']);
        $newto = add_days($newto, $myrow['days']);
        text_row(_('Invoice notice:'), 'memo', sprintf(_("Recurrent Invoice covers period %s - %s."), $to, add_days($newto, -1)),

Hi,

I have a client that gets two recurring invoices from me, and it was pointed out to me that the invoices I am sending them do not indicate which invoice is for which service.  The comments in the original invoice do note this information, but it is not being included in the subsequent recurring invoices.

I see this topic was covered way back in 2009:

https://frontaccounting.com/punbb/viewtopic.php?pid=3008#p3008

wondering how I can implement this?