Hola
@fastpho,
Cuando hacés una nota de crédito o débito, tenés que enviarle a qué factura, por ejemplo, afecta esa nc o nd. o también permite ponerle un desde/hasta fecha.
Código COBOL:
*> Working
01 variables-fe.
02 fe-maecuit pic x(11).
02 redefines fe-maecuit.
03 fe-maecuit-n pic 9(11).
02 fe-valor-n pic s9(9) comp-5.
02 fe-nctipmov pic s9(4) comp-5.
02 fe-ncpv pic s9(4) comp-5.
02 fe-ncfor pic s9(9) comp-5.
02 fe-fecnc pic x(8).
02 fe-indice pic s9(4) comp-5.
*> Procedure
if ffancforma = 2 *> este campo lo uso para saber si quiere informar un comprobante puntual o por fechas
move zeros to fe-valor-n
invoke FE "SET-F1DetalleCbtesAsocItemCantidad" using fe-valor-n
invoke FE "SET-F1DetalleOpcionalItemCantidad" using fe-valor-n
move ffancfacfecdes to fe-fecnc
invoke FE "SET-F1DetallePeriodoAsocFchDesde" using fe-fecnc
move ffancfacfechas to fe-fecnc
invoke FE "SET-F1DetallePeriodoAsocFchHasta" using fe-fecnc
else
if ffancfactipo = 7 *> Esto lo puse para a época de los monotributos con factura A, porque si hacés un NC A y tenés que asociar una factura vieja tipo B no te deja
move zeros to fe-valor-n
invoke FE "SET-F1DetalleCbtesAsocItemCantidad" using fe-valor-n
invoke FE "SET-F1DetalleOpcionalItemCantidad" using fe-valor-n
move ffancfacfec to fe-fecnc
invoke FE "SET-F1DetallePeriodoAsocFchDesde" using fe-fecnc
invoke FE "SET-F1DetallePeriodoAsocFchHasta" using fe-fecnc
else
move 1 to fe-valor-n
invoke FE "SET-F1DetalleCbtesAsocItemCantidad" using fe-valor-n
move zeros to fe-indice
invoke FE "SET-f1IndiceItem" using fe-indice
move ffancfactipmov to tpmcod
read tipomov invalid move zeros to tpmf532-comp
end-read
move tpmf532-comp to fe-nctipmov
invoke FE "SET-F1DetalleCbtesAsocTipo" using fe-nctipmov
move ffancfacsuc to fe-ncpv
invoke FE "SET-F1DetalleCbtesAsocPtoVta" using fe-ncpv
move ffancfacfor to fe-ncfor
invoke FE "SET-F1DetalleCbtesAsocNroS" using fe-ncfor
invoke FE "SET-F1DetalleCbtesAsocCUIT" using fe-maecuit-n
move ffancfacfec to fe-fecnc
invoke FE "SET-f1DetalleCbtesAsocFecha" using fe-fecnc
end-if
end-if
end-if
Cualquier duda, me decís.
Saludos
Fito...