r21407 - gnucash/trunk/src/engine - Prepare internal post-to code to handle credit notes
Geert Janssens
janssens-geert at telenet.be
Mon Oct 10 11:32:26 EDT 2011
On maandag 10 oktober 2011, Derek Atkins wrote:
> Geert Janssens <gjanssens at code.gnucash.org> writes:
> > +gboolean gncInvoiceAmountPositive (GncInvoice *invoice)
> > +{
> > + switch (gncInvoiceGetType (invoice))
> > + {
> > + case GNC_INVOICE_CUST_INVOICE:
> > + case GNC_INVOICE_VEND_CREDIT_NOTE:
> > + case GNC_INVOICE_EMPL_CREDIT_NOTE:
> > + return TRUE;
> > + case GNC_INVOICE_CUST_CREDIT_NOTE:
> > + case GNC_INVOICE_VEND_INVOICE:
>
> > + case GNC_INVOICE_EMPL_INVOICE:
> I think that GNC_INVOICE_UNDEFINED below here should be part of the
> default case, and I think there should be a g_assert() as well to signal
> that there's a bug that this switch statement doesn't contain everything
> or there was invalid input.
>
Thanks for the feedback. I have changed this as per your suggestions.
Geert
More information about the gnucash-devel
mailing list