Hello developer friends! This week I want to talk about the ACCUM function in Progress 4GL . This function works similarly to the SQL SUM function. Both functions are used to consolidate or calculate the total value of a field based on specific conditions. For example, if you want to calculate the total invoiced sales amount by customer, the SQL statement would look like this: SELECT SUM(ih_invoicetotal), ih_bill FROM ih_hist WHERE ih_domain = 'domain' AND YEAR(ih_inv_date) = 2019 GROUP BY ih_bill Now, the same example written in Progress 4GL: FOR EACH ih_hist WHERE ih_domain = 'domain' AND YEAR(ih_inv_date) = 2019 NO-LOCK BREAK BY ih_bill: ACCUMULATE ih_invoicetotal (TOTAL BY ih_bill). IF LAST-OF(ih_hist.ih_bill) THEN DISPLAY ACCUM TOTAL BY ih_bill ih_invoicetotal ih_bill. END. As shown in the images, both approaches generate the same result. The Progress functions used in this example were: ...
Gestionar los impuestos puede ser un proceso complejo, especialmente cuando se trata de cumplir con las normativas internacionales. Cada país tiene sus propias reglas fiscales, oficinas tributarias y formas de identificación fiscal, conocidas comúnmente como Tax ID o NIF (Número de Identificación Fiscal). Esta guía está diseñada para simplificar esa tarea, proporcionando una lista de oficinas tributarias y los tipos de Tax ID que utilizan en distintos países. Con esta herramienta, podrás mantenerte al día con las obligaciones tributarias internacionales y asegurarte de cumplir con las normativas específicas de cada país de manera eficiente. Les comparto el listado también en una hoja de cálculo Listado países Si les interesa que agreguemos alguno más dejen sus comentarios.