Found this thread as the most recent one on search for a similar issue: I wanted my order comments to ONLY show the ones where customer had been notified, and NOT print transaction ID details, etc on the invoice (which gets printed out and sent in customer package)
Found several threads all dealing with issues, tried with the setting to "1" which only prints the FIRST comment, but 2 prints ALL
Similar to this post (which wants the LAST comment where status was updated) - For that issue, open /YOUR_ADMIN/invoice.php and go to line 216-219 - find the SQL query code
$orders_history = $db->Execute("select orders_status_id,date_added,................ order by date_added");
and change the order by date_added to order by date_added DESC , and set invoice comments to 1, you will get the last status update printed to the invoice
My issue was different- I wanted JUST comments where customer had been notified (For customer's benefit, since copy of invoice is sent with package) - and for those that are looking for a quick fix to do that, it's simple
Same file as above, but go to line 223-224, and change this code and the lines after it:
while(!$orders_history->EOF) {
$count_comments++;
~snip~ (don't touch the echo calls - leave them in place while adding the next code)
$orders_history ->MoveNext();
change it to look like this:
while(!$orders_history->EOF) {
$count_comments++;
[b]if($orders_history->fields['customer_notified'] > 0) {[/b]
~snip~ (the echo calls are all here - don't touch em)
[b]}[/b]
$orders_history ->MoveNext();
And then go to admin, shipping/packing and set the invoice comments to "2" (all) - when you go to the invoice, it only shows the ones the customer knows about by e-mail.. makes for a neater looking invoice.