mageplus/mageplus — pull request #118 by tim-reynolds-briteskies (2012-08-30 19:35:50+00:00)
Title: Bug - In Mage_Sales_Model_Order_Invoice_Total_Shipping:49

The test on $previusInvoice->getShippingAmount() results in TRUE even if the amount is 0, as the value is pulled in as a string "0.0000". Simple fix is to add a comparison that causes the value to be cast.

Without the fix, if you create a partial invoice but don't include the shipping (not possible through UI currently, but possible programmatically) when you create a subsequent invoice the shipping will not be added in.

Example-
Action:
Create order with 2 items, 1 virtual, 1 simple. Invoice just the virtual product and programmatically force it to not include the shipping. Later, invoice the simple product.

Expected: The second invoice includes the shipping that the first did not.
Actual: It does not include the shipping.
After fix : It includes the shipping.