1

(31 replies, posted in Modules Add-on's)

Thanks elax for fixing the update problem.

I merged what appear to be the appropriate changes (specifically, the changes in the elax/fa-textcart repository for the latest push, which was titled "Fix PO update problems"). That amounted to two changes in includes/textcart_manager.inc. I worked from the change log in fa-textcart, so that I only took changes that you made in that push. I think that I did not take any changes that are specific to your fork.

Those changes work for me, though my testing was pretty light; I did an insert, then made some changes and did an update, and it looked good.

Here is a link to a .zip file that contains my updates for 2.4.6 and this fix: https://rlhamilton.net/textcart/textcart-2.4.6.zip

Be aware that my experience with programming php and frontaccounting is pretty slim, so although this does work fine for the ways that I use textcart, it would be good if some more experienced people looked at this, too.

Thanks to elax and apmuthu for your help. I hope this update can be useful to others in the FA community.

I think I solved the problem. I discovered the Transaction References tab under Setup, and reset the reference. Once I did that, the problem was solved. The references now increment.

It looks like an off-by-one error of some kind in the update, where the value for the reference was set to the most recent reference, rather than the next reference.

Thanks for your help.

This was an upgrade from 2.3.5 to 2.4.6.

I did some testing, and what seems to be happening is that reference is no longer auto-incrementing. It is stuck at the last value it had before the upgrade. The last transaction before the upgrade was transaction 1507 with reference number 884 (I supply a check number as the reference on some payments, so the auto-generated reference lags numerically). When I did the first payment after the upgrade, the default reference came up as 884, which failed as a duplicate.

I was able to create a successful payment by setting the reference to 885, but when I tried to enter another payment, the reference came up as 884, again.

This seems to be limited to Payment. I tested in Sales Order Entry and Purchase Order Entry, and those values increment correctly and without any confusion. I also didn't see a problem with Deposits in Banking and General Ledger.

Thanks very much for your help.
Richard

P.S. I see that my original post was inaccurate. The auto-generated reference was never as high as 1500. I misinterpreted the problem. I think my post here has got the problem more accurately stated.

I recently upgraded to 2.4.6. When I go to Banking and General Ledger --> Payments, the default value that comes up for Reference is incorrect.

I was up to about 1500 for this reference number before upgrading. Now, the default value that comes up is 884.

I suspect that somewhere in the database there are variables that track the current value of the reference for each type of transaction. I'm guessing the value for this transaction got clobbered somehow and needs to be reset. All of the other transaction types where I use a default reference seem to be fine. This is the only one that is causing a problem.

Can someone explain where that value is stored and how to change it?

Thanks in advance for your help.

Best regards,
Richard Hamilton

5

(31 replies, posted in Modules Add-on's)

I'm glad to do that. It may take a little while, because I still haven't figured out what's going on with update. But if I can make that fix, I'll get you an update.

6

(31 replies, posted in Modules Add-on's)

Hi elax,

Thanks for the response. At first, the problem was that when I went to a function such as Sales/Direct Invoice, I would get a blank page. I didn't look any further, since I didn't want to waste time if there was a 2.4 version available.

Once I knew there wasn't a formal 2.4+ version, I looked a little closer, tracking things through the error.log file.

There were four easy changes:

1) The contents of includes/manufacturing.inc were moved into inventory.inc in 2.4, so I changed the include call in textcart_manager.inc.

2) There is a call to check_edit_conflicts() in textcart/sales/sales_order_entry.php that had no arguments. That raised a fatal error, which didn't occur in 2.3.6, but I suspect the reason there is that I'm using a newer version of php (7.2), which might be pickier. I changed that call to match the equivalent call in the base version of sales_order_entry.php.

3) The base function get_standard_cost doesn't exist in 2.4.6. It was replaced by get_unit_cost, which appears to do the same thing (or close enough for my purposes). I changed calls to that function in textcart/sales/sales_order_entry.php, textcart/purchasing/po_entry_items.php, and textcart/includes/textcart_manager.inc.

4) I changed the version to 2.4.6 in textcart/_init/config so that FA would allow the extension to be enabled. (I had already done that before I sent my first message).

That got things running, with one exception.

The one problem I ran into (and which still exists), is with the update option on the text tab. In sales it works fine, but in purchasing, it doesn't. Here is how to duplicate the problem:

- Open a Purchase Order Entry or Direct Supplier Invoice
- Add a couple of items to the invoice normally
- Select the text tab, and you will see lines for the items you added:
9780982219102    + 1    $ 5.66    ^ 03/03/2019    | "Managing Writers First Edition"
9780982219119    + 1    $ 5.44    ^ 03/03/2019    | "Conversation and Community First Edition"
- Click update.
- The date moves to the item description, and the date is replaced with 0. If you select the text tab again, you will see the following:
9780982219102    + 1    $ 5.66    ^ 0    | "03/03/2019"
9780982219119    + 1    $ 5.44    ^ 0    | "03/03/2019"

I don't use update, in fact, I'm not sure what it does that can't be done with replace. Fortunately, both replace and insert appear to work fine.

I am now going another step further, merging your versions of the files under sales, purchasing, and inventory with the 2.4.6 files to see if I can come up with a version of textcart that will more closely match 2.4.6. I'm glad to share those changes with you if they work, and if you'd like to have them.

So, the bottom line is that with the changes described above, textcart works with the only exception (so far) being the update issue, which I'm able to work around.

Thanks for your help.
Richard

7

(31 replies, posted in Modules Add-on's)

Is there a version of textcart that will work with 2.4.6 or is there an alternate extension that does the same thing?

I tried the version in this forum thread, as well as the one in github, but neither works with 2.4.6, and I haven't been able to find a newer version.

Thanks for your help.

Thanks for the suggestion. Timeouts are not an issue, but the backups are close to 1MB, compressed, just over 6MB uncompressed.

It turns out that the memory_limit in php.ini was just 8M, so I increased it to 32M, and the problem went away.

Thanks again for the quick response and the really useful suggestion.

I'm running into a strange problem regarding backups. When I click Create Backup, I get the status bar for a few seconds, then that disappears and the process has clearly ended with neither an error or completion message. However, no backup file is shown in the backup list (I checked the backup directory and confirmed that it contains no new backup file). I see no error messages in any log (apache, mysql, etc.).

This is relatively recent; until about a week ago (long after I last updated Frontaccounting), I was able to successfully create, save, and restore backups.

I'm running front accounting 2.3.25 on Ubuntu 14.04 LTS with MySQL 14.14, Apache2, and PHP 5.5.9.

I suspect this is not a front accounting problem (other than the lack of error messages), but I'm hoping someone has some insight into what might be happening or some suggestions on troubleshooting the problem.

Thanks in advance for any insight you can provide.

Nice, elegant solution. Thanks very much, it is exactly what I need.

I have a supplier who is also a customer. I currently have an invoice due to that supplier ($X) and they have an invoice due to me ($Y). $X is larger than $Y, so we've agreed that I will pay the difference, rather than us paying $X and them paying $Y.

I can't figure out how to handle the invoices in FA. You can credit an invoice, but that implies a sale was cancelled, which isn't the case here.

The best I can figure is to record the transaction as if the two payments actually occurred. But that means that I will need to account for that when I reconcile my bank account, which, of course, will only show one payment from us. If there aren't too many of these situations, that would be a possibility, but it seems to me there should be a better way.

Does anyone have a suggestion on the best way to handle this situation?