snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Asset report fatal exception

Open stephenspence86 opened this issue 10 years ago • 4 comments

Expected Behavior (or desired behavior if a feature request)

When I attempt to download a CSV asset report I should get an asset report downloaded, as in the demo,


Actual Behavior

The system throws the following error:

FatalErrorException in ReportsController.php line 170: Call to undefined method App\Helpers\Helper::parsePurchasedCost() in ReportsController.php line 170

Initally when trying to reproduce in the demo I wondered if it was becuase purchase cost was blank, so I have gone in an changed the assets to £0 cost, but it throws the same error.

The local is set to EN-GB and the currency is set to £ (with this sign)


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running: v3.3.0-16-ge52a0f6
  • What OS and web server you're running Snipe-IT on: Ubuntu 15.04 & Apache 2.4
  • What method you used to install Snipe-IT: Manual installation
  • Confirm whether the error is reproduceable on the demo: No
  • Include any additional information you can find in app/storage/logs and your webserver's logs.
  • Include what you've done so far in the installation, and if you got any error messages along the way. I had some trouble getting my server configured correctly, but no problems since then
  • Indicate whether or not you've manually edited any data directly in the database no

stephenspence86 avatar Aug 26 '16 11:08 stephenspence86

That is indeed a bug. I renamed the method but must have missed this occurance in reportcontroller...

mnemonicly avatar Aug 26 '16 12:08 mnemonicly

Great, thanks! If I run git pull will I get this fix?

stephenspence86 avatar Aug 26 '16 12:08 stephenspence86

Not yet, it will need to be merged by snipe first. You can just edit Line 170 of reportscontroller to say Helper::formatCurrencyOutput instead of Helper::parsePurchaseCost temporarily, and then overwrite it when pulling later.

mnemonicly avatar Aug 26 '16 12:08 mnemonicly

Fantastic, That works a treat. Thanks for the great support!

stephenspence86 avatar Aug 26 '16 13:08 stephenspence86