Pergunta

what I have done? and what I need?

I have created two module 1.invoice 2. payment there is one to many relationship between invoice and payment it means one invoice have many payment.

for calculating payment I have used a logic hook in payment module.

now I want invoice_id in payment module to retrive data.

for that I use

$invoice = new invoi_invoice();
$invi = $invoice->get_linked_beans('invoi_invoice_t_hotel_payment_1','invoi_invoice');
var_dump($invi);

it return

array(0){
}

and also I used

$invoice = new invoi_invoice();
$id=$invoice->retrieve($bean->invoi_invoice_t_hotel_payment_1invoi_invoice_ida);

but this also does not give me id of invoice.

i have read lots of blog and tutorial all are grabing parent record same like me. but I don1t get id till now.

any help please..

Foi útil?

Solução

I got the solution

for simply getting the parent id use

var_dump($_REQUEST);

then you got parent id like this:-

$parent_id=$_REQUEST["return_id"];
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top