phpBMS

Ticket #266 (closed enhancement: duplicate)

Opened 4 years ago

Last modified 2 years ago

Multi-line memo field on Invoice/Order creation

Reported by: Patrick Owned by: brieb
Priority: minor Milestone: unknown
Component: phpbms Version: 0.92
Keywords: 0.96 Memo invoice Cc:

Description

As a services provider, I find I am usually running out of space to describe the work performed on the Invoice.

I checked the LineItems? table and see that the memo field is of type TEXT (216 or 65536 characters), but it seems as though only around ~250 characters can be entered, and this on a 1-line entry field.

I would like to request that the memo field control on the Order/Invoice? be enlarged to perhaps 3 or 4 lines with vertical scrollbar and the size limit expanded to at minimum 1,024 characters.

Also, since the maximum number of characters that can be entered is far less than 65,536 and TEXT fields require that the OPTIMIZE TABLE command be executed periodically to maintain performance and keep the table from fragmenting, I wonder if changing the field type to VARCHAR(1024) might be more efficient.

Change History

Changed 4 years ago by brieb

Things to keep in mind is that while your particular business may benefit form a large memo entry with 3-4 rows, with vertical scrollbars and the such, do most? If not, how could it be designed in such a way that is not prohibitive/unwieldy to other business types, who rarely use the memo field.

Also, creating a varchar > 255 requires the use of MySQL 5.0.3 or higher, and would limit MySQL compatibility.

Changed 4 years ago by Patrick

I have extended the length of the control to 1024 (an arbitrary number) on my modules/bms/invoice_addedit.php by changing the following line.

<!--    <td><input name="memo" type="text" id="memo" size="12" maxlength="255" />
</td> -->
        <td nowrap="wrap"><input name="memo" type="text" id="memo" size="12" maxlength="1024"></td>

And this works fine for the length. I need to include some php functions (htmlspecialchars/htmlspecialchars_decode) to handle any apostrophies (') or quotes (") in the memo field before the SQL insert and on the SQL select.

I was thinking of perhaps a "hidden" edit box such as the ones you have created for Discount, Tax, Shipping, and Payment as an edit control for the memo field. I am relatively new to PHP programming, but thought I could possibly learn from your code.

What do you think?

Changed 4 years ago by brieb

Well, this is going to get a bit tricky... You will need to increase the maxlength of the memo input field as you did above, but also some php and JS that displays saved lineitems on load and when they are added to the sales order (by the JS) This is where you will find the code that correctly handles specials chars.

Once you have made the changes, submit them as a SVN patch to this ticket.

Changed 2 years ago by anonymous

And this works fine for the length. I need to include some php functions (htmlspecialchars/htmlspecialchars_decode) to handle any apostrophies (') or quotes (") in the memo field before the SQL insert and on the SQL select.  nike air yeezy shoes I was thinking of perhaps a "hidden" edit box such as the ones you have created for Discount, Tax, Shipping, and Payment as an edit control for the memo field. I am relatively new to PHP programming, but thought I could possibly learn from your code.

Changed 2 years ago by brieb

  • status changed from new to closed
  • resolution set to duplicate

duplicate of #262

Note: See TracTickets for help on using tickets.
Scanned by Orvant Copyright © 2010 Kreotek, LLC. All Rights reserved.