I have created a new shipping module that allows free shipping.
We offer a flat shipping fee with all orders. Often it will happen that a customer wants to add an item to their order if it hasn't been shipped yet, instead of creating a new order and incurring an additional shipping fee.
When this happens, our admin users will edit the order (choosing to keep the existing invoice - 1. example of newly invoiced order), and add a product to the order.
2. The idea is that they select the "Free Shipping" method and then submit that info, after which they will invoice the order again after the customer has paid.
This is where we run into a problem - 3. before re-invoicing the order, you can already see that the shipping fee is not calculated into the order's totals anymore. After invoicing, 4. the grand total paid for the order also does not include our flat shipping fee.
This is also an issue on the front end, because the users no longer see that they have also paid a shipping fee, 5. instead only seeing the amounts paid for the ordered items.
Can anyone help me understand why the shipping fee (that was paid with the original invoice) is vanishing, leaving us with misleading totals?
***** EDIT *****
The reason we are doing this (trying to add a free shipping method and removing the fee from the second invoice) is as follows (example):
1. Here is a new order before being invoiced.. When invoicing the order, you can see that 2. the original item cost 359, with an additional shipping fee of 45 being added on, as expected.
We only invoice an order after recieving payment, which means that 3. we invoiced this order after recieving 404 (359 + 45) from the customer.
Now, lets say the customer asked us to add another of the same item to the order, instead of creating a new order and incurring another shipping fee. We edit the order, choosing to keep the existing invoice (because we have already received the initial payment + the shipping fee), and add the new item. Before we had the free shipping module, 4. it would look like this right before submitting the edited info, with our standard shipping fee..
As you can see, the second item's price also has a shipping fee added to it, which is not what we want since we have already received a shipping fee from the customer, 5. but now it shows that the customer owes 404 (359 + 45) again.
When we invoice this order after the customer pays for the additional item (we do not charge an additional shipping fee even though magento shows that it is due) however, 6. the shipping fee does not get invoiced. We don't do anything to make it not get added, magento automatically only invoices JUST the new item's price.
Once invoiced for the second item, however, 7. the order still has a 45 shipping fee due on it, and shows only 718 (the 2 items' prices added together) as paid, for some reason. If we can just have that shipping fee not be DUE, but be PAID, that'd solve all our issues.