parent/children register

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
tuxor
Veteran Member
Posts: 48
Joined: 2014-06-15 00:09

parent/children register

Post by tuxor » 2015-09-06 01:30

Hi, I have 2 tables with parent/children option enabled:

ventas (parent): id,fecha,vendedor,importe
detalle_venta (children): id,id_venta,codigo_producto,precio,cantidad,importe

When insert a new register in detalle_venta, don't show nothing in the table, and when check in the phpmyadmin, the id_venta is null. For example

ventas:
id=5
fecha= 2015-09-05 18:59:25
vendedor=2
importe=0

detalle_venta:
id=4
id_venta=null
codigo_producto=3
precio=null
cantidad=20

why this happens?

Another thing. I have the field codigo_producto like lookup field and precio like autofill, both from the another table. If I choose one item from the select list of the field codigo_producto, the field precio appears the content of the field from another table, but don't save the price.

I need to save the value of precio in the detalle_venta table too.
Can you tell me how to fix that?

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: parent/children register

Post by a.gneady » 2015-09-10 19:12

When insert a new register in detalle_venta, don't show nothing in the table, and when check in the phpmyadmin, the id_venta is null.
Could you post the AXP project file or send it via a support request to check this issue please?
I have the field codigo_producto like lookup field and precio like autofill, both from the another table. If I choose one item from the select list of the field codigo_producto, the field precio appears the content of the field from another table, but don't save the price.
Lookup fields save only the primary key of the parent record rather than the actual value displayed to users. That's why you see the price displayed, but a seemingly unrelated number stored in the field -- that number is the primary key value.
:idea: AppGini plugins to add more power to your apps:

tuxor
Veteran Member
Posts: 48
Joined: 2014-06-15 00:09

Re: parent/children register

Post by tuxor » 2015-09-14 21:48

I sent you the axp project in a support request.

Thank you

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: parent/children register

Post by a.gneady » 2015-09-22 11:40

I'm so sorry for the long delay. We needed some deep investigation of this issue. It turned out to be a bug that caused the lookup field to be left empty if it's a read-only field. We'll work on fixing this in the next release. A temporary fix for now is to uncheck the read-only option for the ID_VENTA field. Please accept my deep apologies for any inconvenience caused by this issue.
:idea: AppGini plugins to add more power to your apps:

Post Reply