Añadir modulo COMPRAS (coprmt001, coprmt009, coprmt016)
- coprmt001 (Suplidores): agregar campos faltantes (tipo_doc,rnc,cuenta_no) al RECORD interno de ApiMaintainC() en api_test.4gl, y unificar la aridad de RETURNING en las 3 llamadas (POST/PATCH/DELETE) - el enlazador exige el mismo numero de valores de retorno en todo el modulo. - coprmt009 (Ordenes de Compra): reemplazar fgl_report_loadCurrentSettings/ selectDevice/selectPreview/commitCurrentSettings (no disponibles en este FGL) por om.XmlWriter.createFileWriter en coprorden.4gl; agregar verificacion defensiva en lugarentrega.4gl (ui.combobox.forname puede devolver NULL si el formulario actual no tiene el combo "bodega"); quitar "ordenes.bodega" de los INPUT BY NAME (campo oculto, no se puede enlazar). Pendiente: probar el flujo completo de creacion de orden (se corto por una caida de conexion transitoria durante la prueba). - coprmt016 (Terminos de Pago): CRUD simple, sin cambios de codigo. - mbsERP.4pw: crear modulo COMPRAS (estaba vacio) con librerias FUNCIONES_CO y FORMULARIOS_CO, y registrar los 3 programas. - otrodir/smarmotech.sch: diccionario de esquema completo (antes faltaba en este directorio, causaba fallos de link en api_test.4gl). - .gitignore: excluir logs de STARTLOG() (bin/*.TXT) y archivos .err de compilacion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
347e8139fc
commit
acacf34eea
@@ -28,10 +28,11 @@ FUNCTION orden(xflete1,xarr_ordenes,xordenes,x,x1,xship_to,xmoneda,r_output,knot
|
||||
total_1 DECIMAL(12,2),
|
||||
descu_valor DECIMAL(12,2)
|
||||
END RECORD
|
||||
DEFINE handler om.SaxDocumentHandler, -- return value from fgl_report_commitCurrentSettings()
|
||||
DEFINE handler om.SaxDocumentHandler,
|
||||
r_filename STRING, -- filename of Report Design Document including .4rp extension
|
||||
r_output VARCHAR(10), -- output format option
|
||||
preview INTEGER,
|
||||
p_reportfile STRING,
|
||||
xvalor DEC(12,2),
|
||||
x RECORD
|
||||
nom_sp LIKE cotb00001.nom_sp,
|
||||
@@ -78,20 +79,11 @@ FUNCTION orden(xflete1,xarr_ordenes,xordenes,x,x1,xship_to,xmoneda,r_output,knot
|
||||
END RECORD, uso STRING
|
||||
|
||||
IF xarr_ordenes.getLength() > 0 THEN
|
||||
LET r_filename ='coprmt009.4rp'
|
||||
#LET r_output='SVG'
|
||||
LET preview = 1
|
||||
|
||||
IF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file
|
||||
|
||||
CALL fgl_report_selectDevice(r_output) -- changing default
|
||||
CALL fgl_report_selectPreview(preview) -- changing default
|
||||
# CALL fgl_winmessage("veprrp049",r_output,"stop")
|
||||
# CALL fgl_winmessage("veprrp049",preview,"stop")
|
||||
|
||||
|
||||
LET handler = fgl_report_commitCurrentSettings() -- commit changes
|
||||
END IF
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; se escribe el XML directo a un archivo
|
||||
-- en FGLSPOOL en lugar de usar la plantilla .4rp con vista previa.
|
||||
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/coprmt009_orden.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
|
||||
--run the report
|
||||
IF handler IS NOT NULL THEN -- report engine was configured ok
|
||||
|
||||
|
||||
Reference in New Issue
Block a user