Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
4.15 - PDFWOPrint.php Undefined Variable
11-08-2018, 05:44 AM,
#1
4.15 - PDFWOPrint.php Undefined Variable
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

Thanks!


Reply
11-08-2018, 11:31 AM,
#2
RE: 4.15 - PDFWOPrint.php Undefined Variable
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'); 

...to 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.
Reply
11-09-2018, 12:00 AM,
#3
RE: 4.15 - PDFWOPrint.php Undefined Variable
This fixed the problem and you are correct, nothing had been issued yet. My vote is to commit the change. Thanks again!

Reply
11-09-2018, 11:23 AM,
#4
RE: 4.15 - PDFWOPrint.php Undefined Variable
Change committed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)