销售发票网格某些列过滤器在添加新税/增值税号列时不起作用

问题描述

我在销售发票网格中添加了新的税/增值税号列。 对于这个列过滤器,我在自定义模块插件文件添加了以下代码

public function aroundGetReport(CollectionFactory $subject,\Closure $proceed,$requestName)
{
    $result = $proceed($requestName);

    if (self::SALES_ORDER_INVOICE_GRID_DATA_SOURCE == $requestName) {
        if ($result instanceof $this->collection) {
            $select = $this->collection->getSelect();
            $select->joinLeft(
                ['sales_order' => $this->collection->getTable('sales_order')],'main_table.order_increment_id = sales_order.increment_id',['customer_taxvat']
            );

            return $this->collection;
        }
    }

    return $result;
}

此税/增值税列及其过滤器工作正常。但是添加这个新过滤器后,其余过滤器不起作用。

例如: 当我们尝试使用发票 ID 进行过滤时,出现以下错误

Integrity constraint violation: 1052 Column 'increment_id' in where clause is ambiguous.

仅在添加此新列和过滤器后尝试使用其他一些列进行过滤时也会出现类似错误

请帮忙...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)