I want to provide an interface to views-module.

it works with one table, but i need to collect data from two tables.

$data['invoice']['table']['join'] = array(
'node' => array(
'left_field' => 'nid',
'field' => 'nid',
'type' => 'INNER', // all nodes have an author.
),
'company' => array(
'left_table' => 'invoice',
'left_field' => 'cid',
'table' => 'company',
'field' => 'nid',
'type' => 'INNER', // all nodes have an author.
),
);

but that doesn't work :-(

i didn't find an example for that. and the documentation is not very detailed.