result of an addition to another grid

I need help
I have two grids

  • Overtime
  • id_hora
  • rut_trabajador
  • month
  • year
  • Total hours
  • Details of overtime
    • id_detalle
    • rut_trabajador
    • day
    • month
    • year
    • hora_extra

the detail table are added all working overtime every day
but I need the table in the field horas_extra total_horas I leave the sum of hours the worker is attached to the table details by month and year
is very important

Re: result of an addition to another grid

please someone help me is very important

Re: result of an addition to another grid

It isn’t clear what you are needing help with… what exactly are you looking for and do you have examples of what the end results should look like?

Re: result of an addition to another grid

Hola.
Escribelo en espa?ol tambi?n para tener clara tu necesidad y en lo posible ayudarte.
( Write in Spanish too please, maybe we can to understand your request and we help you. )

JG

Re: result of an addition to another grid

Tengo 2 grillas relacionadas, una con los datos personales del trabajador y la otra con las horas trabajadas.

La primera grilla, la de datos personales es la tabla ?Maestra? que tiene los siguientes campos:

ID, Mes, a?o, trabajador, total_horas

y la segunda de ?Detalle? tiene los siguientes campos:

ID, Dia, Mes, A?o, trabajador, horas.

Esta la de ?Detalle? se relaciona con la Maestra a traves de los campos ?Mes, A?o y Trabajador? para obtener mensualmente todos los dias trabajados por cada trabajador.

Necesito Sumar todas las ?horas? de la tabla ?detalle? y grabarlas en la ?Maestra? en el campo ?total_horas? manteniendo la relacion ?Maestra → Detalle?.

I have two related grids, with each worker’s personal data and the other with the hours worked.

The first grid, the personal data table is the “Master” that has the following fields:

ID, month, year, worker, total_horas

and the second of “Detail” has the following fields:

ID, Day, Month, Year, worker hours.

This to “Detail” is related to the Master through the fields “Month, Year and Worker” monthly for all days worked by each worker.

I need to add all the “hours” of table “item” and burn the “Master” in the “total_horas” keeping the relationship “Master → Detail”.

Re: result of an addition to another grid

En este link puedes ver un ejemplo del uso de maestro/detalle, en el incluyen una parte de c?digo que actualiza un campo de la maestra de Precio del pedido ( Price Order) con la suma de los diferentes precios sumados de los detalles.

http://www.scriptcase.net/phpgenerator/samples/tutoriais/form/form38.php

Ajustalo entonces para tu necesidad.
JG