Differenciating Invoices and Bills

Nestor Stura nestor.stura at gmail.com
Thu Mar 6 13:41:02 EST 2014


Thanks John, I have made a simple query with one Invoice and one Bill,
both have Owner_type = 3 (neither 2 nor 4). Is there something wrong?

2014-03-06 19:03 GMT+01:00 John Ralls <jralls at ceridwen.us>:
>
> On Mar 6, 2014, at 8:23 AM, Nestor Stura <nestor.stura at gmail.com> wrote:
>
>> Hi all,
>> I am building some reports based on business tables, with MSAccess and SQlite3.
>> I have the following doubt, Client's invoices and Vendor's bills are
>> kept on the same table, I could  not find any field that differentiate
>> both.
>> Is there any way in this table to split them or should I access via
>> Customers and Vendors tables?
>> Thanks for any help.
>
> You can use the owner_type field to distinguish them: 2 means the invoice is to a customer and 4 means that it's from a vendor.
> If you want to report on a particular customer or vendor, you'll need to join owner and invoices on owner.GUID = invoices.owner_guid specifying customer_guid or vendor_guid in your WHERE clause.
>
> Regards,
> John Ralls
>


More information about the gnucash-user mailing list