AndyWays / tracmor

Automatically exported from code.google.com/p/tracmor
GNU General Public License v2.0
0 stars 0 forks source link

Asset transaction report fails if no custom fields exist #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Do not create any asset custom fields
2. Attempt to generate an asset transaction report

What is the expected output? What do you see instead?
The report should be output.  Instead you get the following error:

Invalid argument supplied for foreach()
Error Type:   E_WARNING   
Rendered Page:   Click here to view contents able to be rendered
Source File:   C:\wamp\www\tracmor\reports\asset_transaction_report.php   
     Line:   337   

Line 332:              //some data to show in the report
Line 333:              $sSql = AssetTransaction::LoadArrayBySearch(true,
$this->.....snipped..
Line 334:              $strXmlColNameByCustomField = "";
Line 335:              $strXmlFieldByCustomField = "";
Line 336:              $intCustomFieldCount = 0;
Line 337:              foreach ($this->chkCustomFieldArray as
$chkCustomField) {
Line 338:                if ($chkCustomField->Checked) {
Line 339:                  $strXmlColNameByCustomField .= "<COL
CELLCLASS='report_column_header'>".$chkCustomField->Text."</COL>";
Line 340:                  $strXmlFieldByCustomField .= "<COL TYPE='FIELD'
CELLCLASS='report_cell'>__".$chkCustomField->ActionParameter."</COL>";
Line 341:                  $intCustomFieldCount++;
Line 342:                }

Original issue reported on code.google.com by jsincl...@gmail.com on 18 Jun 2009 at 7:49

GoogleCodeExporter commented 9 years ago
Ugghh. Sloppy. That's fixed and committed.

Original comment by hunterje...@gmail.com on 19 Jun 2009 at 1:27

GoogleCodeExporter commented 9 years ago
has this issue been fixed?

Original comment by fish3...@gmail.com on 12 Feb 2010 at 6:53

GoogleCodeExporter commented 9 years ago

Original comment by kovserg@gmail.com on 23 Aug 2011 at 8:11

GoogleCodeExporter commented 9 years ago
Hi good it has been fixed but where is the fix please

Original comment by techsupp...@oncallit.co.nz on 25 Jul 2012 at 3:15