I just discovered something weird.
If I generate a sales invoice and I give the customer 100% discount, meaning the invoice total is zero, the cost of goods sold entry will not be posted.
In this scenario you expect the sales to be zero, while the cost of goods sold is whatever the inventory valuation is. Unfortunately this is not so, I have to make the invoice total be at least $1 before ERPNext will post the COGS accounting leg.
Is this a bug or am I missing something ?
This instance is on V10.1.22
Regards