Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#23 Mantis ID:6651 - Patch to characteristicstostring() function

open
nobody
None
3
2008-04-10
2008-04-10
omfgppc
No

Reporter: xikar
Severity: Patch
Category: Reports
Project: xTupleApps

Version: 2.3.2

Description:
The current function returns all characteristics that are available for that item. It is useful to only return a particular characteristic. For example, Tariff Code and Country of Origin need to be on Invoices for international shipments when they go through customs. However, domestic shipments do not need this information.

To fix this problem, I have copied this function and called it, "singlecharacteristicstostring" and gave it an additional integer parameter to pass in. This parameter is the "char_id" for the particular characteristic you would like to print on your invoice.

You might be able to add this parameter to "characteristicstostring" without causing any problems. I'll leave that up to xTuple to decide. One option would be if the "char_id" is not passed to the function, it could return all characteristics for that item. It might also work if this additional parameter is an array of all of the "char_id" numbers you would like to print. The function would then go through all of the elements of that array and return those characteristics, but the attached is just a basic single characteristic version.

Steps to reproduce:

Additional information:

Read more at http://www.xtuple.org/mantis/view.php?id=6651

Discussion