<?php
 namespace App\EntityList; class SupplierInvoiceRows extends SupplierInvoices { public function __construct() { global $DBTSupplierInvoices, $DBTSupplierInvoiceRows; $this->tableName = $DBTSupplierInvoiceRows; $this->tableAlias = 'invRow'; $this->allowedTables['invRow']=['table'=>$DBTSupplierInvoiceRows, 'type'=>'month']; $this->allowedTables['inv']=['table'=>$DBTSupplierInvoices, 'type'=>'month', 'foreignKeyRef'=>'inv.id=invRow.idInvoice', 'joinType'=>'INNER']; GeneralMtAbstract::__construct(); $this->setColumn('invRow.id', 'id'); } public function setDefaultFilters(): void { $this->setFilter('inv.deleted', '=', '0'); } public function getMonthTablesList(): array { $tableMonths_idInv1=$this->getMonthTablesList_id(['inv.id']); $tableMonths_idInv2=$this->getMonthTablesList_id(['invRow.idInvoice']); $tableMonths_idInv3=$this->getMonthTablesList_id(['idInvoice']); $tableMonths_invDate=$this->getMonthTablesList_invoiceDate(); $tableMonths=array_intersect($tableMonths_idInv1, $tableMonths_idInv2, $tableMonths_idInv3, $tableMonths_invDate); return $tableMonths; } protected function addUserRestrictionFilter() { } } 