This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cursor c_itens_nota_fiscal(nCdNotaFiscal NUMBER, vTpAgrupamento VARCHAR2, vTpNotaFiscal VARCHAR2, vTextoDescricao VARCHAR2) IS | |
/* agrupamento por texto livre */ | |
SELECT '1' codigo | |
, dbamv.fnc_retorna_ds_servico_rps_imv(nCdNotaFiscal) descricao | |
, Sum(itnota_fiscal.vl_gru_fat) valor | |
, 1 quantidade | |
FROM dbamv.itnota_fiscal | |
, dbamv.gru_fat | |
WHERE gru_fat.cd_gru_fat = itnota_fiscal.cd_gru_fat | |
AND itnota_fiscal.cd_nota_fiscal = nCdNotaFiscal |