Guest User

Untitled

a guest
Jul 15th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.25 KB | None | 0 0
  1.   strQuery = "select D.[Ruc_enti]," & _
  2.     "(select [NOMBRE] from [dbProveedores$] where [RUC]=D.[Ruc_enti]) as RazonSocial," & _
  3.     "D.[Nro_dcto],D.[Fch_dcto],D.[Nro_refe],D.[Tip_mone],D.[Tot_dcto],D.[Tip_camb]," & _
  4.     "(select [DIAS DE CREDITO] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti]) as [DiasCredito]," & _
  5.     "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," & _
  6.     "(select [Tipo de Documento] from [Tabla$] where LEFT(D.[Nro_dcto],1)=[CodTDoc]) as [TipoDoc]," & _
  7.     "(select [DETRACION] from [ProveedoresCredito$] where [RUC]=D.[Ruc_enti]) as [Detraccion]," & _
  8.     "D.[Tot_dcto]*0.18 as [IGV],D.[Tot_dcto]+[IGV] as [TOTAL] , " & _
  9.     "(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 " & _
  10.     " from [DocPendientesFil.$] D " & _
  11.     " 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