Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- strQuery = "select D.[Ruc_enti]," & _
- "(select [NOMBRE] from [dbProveedores$] where [RUC]=D.[Ruc_enti]) as RazonSocial," & _
- "D.[Nro_dcto],D.[Fch_dcto],D.[Nro_refe],D.[Tip_mone],D.[Tot_dcto],D.[Tip_camb]," & _
- "(select [DIAS DE CREDITO] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti]) as [DiasCredito]," & _
- "D.[Fch_dcto]+IIF(ISNULL((select [DIAS DE CREDITO] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti])),0,(select [DIAS DE CREDITO] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti])) AS FVCMTO," & _
- "(select [Tipo de Documento] from [Tabla$] where LEFT(D.[Nro_dcto],1)=[CodTDoc]) as [TipoDoc]," & _
- "(select [DETRACION] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti]) as [Detraccion]," & _
- "D.[Tot_dcto]*0.18 as [IGV],D.[Tot_dcto]+[IGV] as [TOTAL] , " & _
- "(IIF(ISNULL((select [DETRACION] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti])),0,(select [DETRACION] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti]))* D.[Tot_dcto]) AS IMP_DETRAC " & _
- " from [DocPendientesFil.$] D " & _
- " where (D.[Fch_dcto]+IIF(ISNULL((select [DIAS DE CREDITO] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti])),0,(select [DIAS DE CREDITO] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti])))>=#" & fvto & "#"
Add Comment
Please, Sign In to add comment