I am using xTuple integrated openRPT to customize a report to meet our check printing needs. We have existing check stock for printing of checks. I started with the CheckMultiPage report and have aligned existing fields with our check stock and removed other unnecessary fields, static text and lines.
One of the remaining fields I am using is checkdata_docnumber:CheckDetail which displays the text "invoice#:" followed by an invoice number. I would like to remove the "invoice#:" text since our check stock already titles the column of data with "INVOICE NO". Using psql (I prefer command line) I see that checkdata is a composite type. However, I don't know how to manipulate the content of checkdata to remove the "invoice#:" text from checkdata_docnumber. Looking in Document/Query Sources at the CheckDetail query I see reference to:
SELECT snipped long list of column names
FROM checkDetailFormatted (<? value("checkhead_id") ?>, 12);
Is checkDetailFormatted a function of some sort and if so how do I examine this function?
Is this where I would look to remove the "Invoice#:" text content of checkdata_docnumber?
Update: I now know to use \df+ checkDetailFormatted in psql to examine this function and I see the "Invoice#:" text on this line in the function:
'Invoice#: ' || vohead_invcnumber AS docnumber,
Now I have to figure out how to alter this function definition. It also appears that modifying this function might solve issue 2 below since the function already references the vohead table. I'm not a SQL expert so suggestions welcome.
Our check stock also contains a column that is supposed to list the voucher number matching each invoice number being paid by the check. I see the vohead table contains the voucher number in column vohead_number. What I don't understand is how to connect the the vohead table entries with the checkdata_docnumber already present in the report. I believe I need to create a new query in the report that extracts the voucher number based on an index value.
Any advice or assistance is much appreciated.