hello
I'm trying tofetch an entity to show in another entity is that possible with logic hook
I have tried to use AfterSave but i m not sure if i did it right
<?php
namespace Espo\Custom\Hooks\Comission;
use Application\Espo\Modules\Sales\Entities\InvoiceIte m;
use Application\Espo\Modules\Sales\Entities\invoice;
class product extends Espo\Core\ORM\Repositories\RDB
{
public function afterSave( Invoice $Invoice , array $InvoiceItem)
{
if ($invoice->isNew() && !$InvoiceItem->get('InvoiceItemId')) {
$Comission->set('InvoiceItemId');
}
}
}
?>
I'm trying tofetch an entity to show in another entity is that possible with logic hook
I have tried to use AfterSave but i m not sure if i did it right
<?php
namespace Espo\Custom\Hooks\Comission;
use Application\Espo\Modules\Sales\Entities\InvoiceIte m;
use Application\Espo\Modules\Sales\Entities\invoice;
class product extends Espo\Core\ORM\Repositories\RDB
{
public function afterSave( Invoice $Invoice , array $InvoiceItem)
{
if ($invoice->isNew() && !$InvoiceItem->get('InvoiceItemId')) {
$Comission->set('InvoiceItemId');
}
}
}
?>
Comment