Skip to content

Instantly share code, notes, and snippets.

View LucasAlves011's full-sized avatar
💭
xD

Lucas Alves LucasAlves011

💭
xD
  • MV
  • Brazil
  • 10:53 (UTC -03:00)
View GitHub Profile
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