I want to pre-filter* data in the invoice grid visible in Magento\'s admin panel.
Here is a question that I asked earlier, and this one is related to the solution prese
The error "A joint field with this alias (0) is already declared." occurs because it uses array keys as aliases. Since you have two joinTable()
calls, each with an array, it is trying to use the zero-based index of both and obviously having a conflict.
So instead of
array('entity_id as order_entity_id')
try
array('entity_id' => 'order_entity_id')
to avoid the conflict.