Since adding 6.x.1.26 the prices are not showing up on individual line items on the invoice pages (not the reports).

This is due to the foreach loop on 336 of storminvoice.theme.inc be written incorrectly. The statements in the loop are referring to $inv_item as an object when it is an array.

This at the last patch I submitted earlier today (#639234)both concern me as they seem fairly basic in nature and things that worked in past versions. Given that my company is moving to Storm as a primary system I would be willing to start writing unit tests to ensure this kind of thing doesn't happen in the future. Would that be helpful? I have to admit I'm not sure the best way to submit those to the project.

This is how is should look, staring at line 336. Patch attached here

  foreach ($invoice_items as $key => $inv_item) {
    // PHP4 compatibility - for D7 change this to use the original array by reference
    $invoice_items[$key]['amount'] = sprintf("%.2f", $inv_item['amount']);
    $invoice_items[$key]['tax1'] = sprintf("%.2f", $inv_item['tax1']);
    $invoice_items[$key]['tax2'] = sprintf("%.2f", $inv_item['tax2']);
    $invoice_items[$key]['total'] = sprintf("%.2f", $inv_item['total']);
  }
CommentFileSizeAuthor
storminvoice.theme_.inc_.patch1010 bytesbigjim

Comments

Magnity’s picture

Status: Needs review » Closed (duplicate)

Duplicate of #617624: Problem with Storm Invoices Nodes After Upgrade to 6.x-1.25.

I've suggested unit tests in #544968: Tests for Storm - but with no responses as of yet. It would be great to have some. Best to discuss in that issue the overall types of tests that are required, then to create a new issue with each individual test itself.