webERP Forum

Full Version: 4.15 - PDFWOPrint.php Undefined Variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I created a new work order for the same item and get this when I try to print:

Notice: Undefined variable: IssuedAlreadyRow in /share/MD0_DATA/Web/webERP/PDFWOPrint.php on line 333

Warning: Cannot modify header information - headers already sent by (output started at /share/MD0_DATA/Web/webERP/PDFWOPrint.php:333) in /share/MD0_DATA/Web/webERP/includes/tcpdf/tcpdf.php on line 7693
TCPDF ERROR: Some data has already been output to browser, can't send PDF file


Hmmm, sounds like there is nothing "Issued Already" (based on the handling between lines 301 to 309), so the array was never populated?

Anyway, try changing this: (line 289)
PHP Code:
if ($SelectedWO != 'Preview') { // It is a real order
$ErrMsg _('There was a problem retrieving the line details for order number') . ' ' $SelectedWO ' ' _('from the database'); this:
PHP Code:
if ($SelectedWO != 'Preview') { // It is a real order
$IssuedAlreadyRow = array(); // add this 
$ErrMsg _('There was a problem retrieving the line details for order number') . ' ' $SelectedWO ' ' _('from the database'); 

That will at least quell the error.
This fixed the problem and you are correct, nothing had been issued yet. My vote is to commit the change. Thanks again!

Change committed.