1 (edited by kidzstang 11/12/2015 01:17:41 am)

Topic: Print Item Description on Invoices

I have an item with the following information (not the real information but close to it) attributed to it in the "items" tab:

Item Code: 0277654
Name: 0277654 - Very Large Thing For Very Little Money
Description: This thing is too large to be used by a human.

The invoices that I create using "Direct Invoice" show the following information:

Printed Under "Item Code" is 0277654
Printed under "Item Description" is 0277654

I'd like either the contents of the "Name" field or the contents of the "Description" field or both fieds to to be displayed under "Item Description" on the invoice.

Is there an easy way to do this?

Thanks in advance,
Jack

2 (edited by apmuthu 11/12/2015 11:27:42 am)

Re: Print Item Description on Invoices

All these fields you stated are in the stock_master table:
Item Code => stock_id
Name => description
Description => long_description

On invoice creation, the last field above does not find a place in the debtor_trans_details.

The report rep107.php prints the invoices and uses the function get_customer_trans_details() to fetch the transaction details and is defined in sales/includes/db/cust_trans_details_db.inc. The said function returns all fields of the debtor_trans_details table for the chosen transactions, along with an aliased field debtor_trans_details.description As StockDescription among others. In rep107.php, the variable $myrow2 has the details of the current transaction being sent to the print output stream.

It is possible that this was a mistake and the real intention was to obtain the stock_master.long_description AS StockDescription which would sate your need. This will however need an extra join of the requisite table - stock_master - in the sql.