Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1875,5 +1875,24 @@ Public Class ClsMovimientos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetRemisionesCobranza(CveEmpresa As Integer, CveSubProyecto As Integer, FechaInicio As Date, FechaFin As Date) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RemisionesCobranza")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error al consultar las Compras Pagadas de Caja Chica.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
@@ -9306,6 +9306,7 @@ Public Class ClsPaginas
|
||||
'PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353)
|
||||
PaginaDict.Add("/Ventas/CatPromociones.aspx".ToUpper(), 123)
|
||||
PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 123)
|
||||
PaginaDict.Add("/Ventas/RepEntregasEcommerce.aspx".ToUpper(), 371)
|
||||
PaginaDict.Add("/Ventas/CatFamiliaSubFamilia.aspx".ToUpper(), 372)
|
||||
PaginaDict.Add("/Ventas/RepComisiones.aspx".ToUpper(), 382)
|
||||
PaginaDict.Add("/Ventas/RepComisionesDetalle.aspx".ToUpper(), 382)
|
||||
|
||||
@@ -1721,7 +1721,7 @@ Public Class ClsVentas
|
||||
Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1,
|
||||
Optional ServicioDomicilio As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_GetRepPS")
|
||||
DataAdapter("PA_Vta_GetRepPS33")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||
@@ -6080,6 +6080,7 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "PRODEDIMIENTOS"
|
||||
|
||||
Public Function GetProcedimientos(CveProcedimiento As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
|
||||
|
||||
@@ -124,6 +124,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
cancelarRemision(context)
|
||||
Case "RemoveMovimiento"
|
||||
RemoveMovimiento(context)
|
||||
Case "GetContaCuentas"
|
||||
GetContaCuentas(context)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ex.GuardaLog(ex.Message)
|
||||
@@ -872,7 +874,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
If objInv.GetExistenciasProducto(CvePS, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then
|
||||
|
||||
' limpio los almacenes donde no tiene ningun producto existencia
|
||||
For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
|
||||
For i As Integer = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
|
||||
|
||||
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CveAlmacen", "Almacen", "Existencia") Then
|
||||
objInv.DtResultados.Columns.RemoveAt(i)
|
||||
@@ -996,7 +998,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
'If FuePorXml >= 0 Then
|
||||
' DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!FuePorXML) = FuePorXml))
|
||||
'End If
|
||||
|
||||
Name = Name.REPLACE(" ", "*")
|
||||
If Name <> "-1" Then
|
||||
If PSCodigoDescripcion = "PSCodigo" Then
|
||||
DTPS = DTPS.Where((Function(a) a!PSCodigo.ToString.ToLower Like ("*" + Name.ToLower + "*")))
|
||||
@@ -1434,6 +1436,59 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Private Function GetContaCuentas(ByVal context As HttpContext, Optional PSCodigoDescripcion As String = "PSCodigo") As String
|
||||
Dim retorno As String = ""
|
||||
Dim DtPSRetorno As DataTable = Nothing
|
||||
|
||||
'NOTA:
|
||||
' EN EL WHERE DE LINQ NO SE DEBE USAS EL OPERADOR 'AND' SABE PORQUE FUNCIONA DIFERENTE SE DEBE USAR 'ANDALSO',
|
||||
' EJEMPLO UNA CONDICION AND DE DOS CAMPOS ARROJA CERO RESULTADOS PERO SI SE PONE ESTAS DOS CONDICIONES POR SEPARADO ARROJA DATOS
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As Integer
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
CveEmpresa = usuario.CveEmpresa
|
||||
Dim Afectable = IfNull(context.Request("Afectable"), "-1").ToString.ToEntero
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString.Replace(" ", "%")
|
||||
'Dim CveClasificacion = IfNull(context.Request("CveClasificacion"), "-1").ToString.ToEntero
|
||||
'Dim CveSubFamilia = IfNull(context.Request("CveSubFamilia"), "-1").ToString.ToEntero
|
||||
'Dim CveClasificacionPresupuesto = IfNull(context.Request("CveClasificacionPresupuesto"), "-1").ToString.ToEntero
|
||||
'Dim Pagina = IfNull(context.Request("Pagina"), "-1").ToString
|
||||
'Dim Estatus = IfNull(context.Request("Estatus"), "1").ToString
|
||||
'Dim CveSucursal = IfNull(context.Request("cvesucursal"), "-1").ToString.ToEntero
|
||||
'Dim CveSubProyecto = IfNull(context.Request("cvesubproyecto"), "-1").ToString.ToEntero
|
||||
'Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
|
||||
'Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "1").ToString.ToEntero
|
||||
'Dim CveMarca = IfNull(context.Request("cvemarca"), "-1").ToString.ToEntero
|
||||
|
||||
DtPSRetorno = ClsPaginas.GlobalDTContaCuentasContables(CveEmpresa, "-1", Afectable).FiltraParametros($"CuentaFormatoNombre like '%{Name}%'")
|
||||
|
||||
|
||||
|
||||
|
||||
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
|
||||
|
||||
DtPSRetorno.Columns("CvePS").ColumnName = "id"
|
||||
DtPSRetorno.Columns(PSCodigoDescripcion).ColumnName = "text"
|
||||
If PSCodigoDescripcion = "PSCodigo" Then
|
||||
DtPSRetorno.Columns().Remove("PSCodigoClasificacion")
|
||||
Else
|
||||
DtPSRetorno.Columns().Remove("PSCodigo")
|
||||
End If
|
||||
|
||||
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
||||
context.Response.Write(retorno)
|
||||
DtPSRetorno.Dispose()
|
||||
DtPSRetorno = Nothing
|
||||
Else
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Private Function GetFilesDirectory(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -1443,7 +1498,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Dim xmlarchivos As System.Xml.Linq.XDocument = New System.Xml.Linq.XDocument()
|
||||
Dim xfolder As XElement = New XElement("folder")
|
||||
For Each urfile In System.IO.Directory.GetFiles(directorio)
|
||||
For Each urfile As String In System.IO.Directory.GetFiles(directorio)
|
||||
Dim xfile As New XElement("archivo", "")
|
||||
xfile.SetAttributeValue("EXT", Path.GetExtension(urfile))
|
||||
xfile.SetAttributeValue("urlfile", urfile)
|
||||
|
||||
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
@@ -19745,7 +19745,7 @@ Partial Class Compras_Compras
|
||||
Dim DTInventarios As DataTable = ObjInventarios.DtResultados
|
||||
If DTInventarios.Rows.Count > 0 Then
|
||||
|
||||
Dim DTMovimientos As DataTable = DTInventarios.FiltraParametros("", "", {"CVeMovimiento"})
|
||||
Dim DTMovimientos As DataTable = DTInventarios.FiltraParametros("", "", {"CveMovimiento"})
|
||||
|
||||
For Each diRow As DataRow In DTMovimientos.Rows
|
||||
|
||||
@@ -19789,7 +19789,7 @@ Partial Class Compras_Compras
|
||||
SBEliminacionCompra.Append($"-Cantidad: {dRow("Cantidad").ToString.ToDecimal().ToString("###,###,###.00") }, PS: {dRow("PS")}, Obs: {dRow("Obs")}, Sub Proyecto: {dRow("SubProyecto")}, Tipo Gasto: {dRow("TipoGasto")}, IVA: {dRow("IVA").ToString.ToDecimal.ToString("###,###,###.00")}, IEPSPS: {dRow("IEPSPS").ToString.ToDecimal.ToString("###,###,###.00") }<br/>")
|
||||
Next
|
||||
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveCompra, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1,
|
||||
If Not ErrorCompra AndAlso Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveCompra, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1,
|
||||
TxtModalEliminarCompraDescripcion.Text, "Compras", SBEliminacionCompra.ToString) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
|
||||
@@ -60,19 +60,19 @@ Partial Class Compras_RepComprasAF
|
||||
|
||||
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedores.DataBind()
|
||||
DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlProveedores.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlMonedas.DataSource = GlobalDTMonedas()
|
||||
DdlMonedas.DataBind()
|
||||
DdlMonedas.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlMonedas.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlTipoActivoFijo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo")
|
||||
DdlTipoActivoFijo.DataBind()
|
||||
DdlTipoActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlTipoActivoFijo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
Dim ObjClasificacion As New ClsClasificaciones
|
||||
@@ -85,11 +85,11 @@ Partial Class Compras_RepComprasAF
|
||||
|
||||
ObjClasificacion.Dispose()
|
||||
DdlClasificacion2.DataBind()
|
||||
DdlClasificacion2.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClasificacion2.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlActivoFijo.DataBind()
|
||||
DdlActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlActivoFijo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
|
||||
@@ -271,10 +271,18 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Beneficiario = "-1"
|
||||
Actualizar = False
|
||||
IdPoliza = -1
|
||||
TipoPlantilla = -1
|
||||
If IfNull(Request("Tipo"), "").ToString = "Ing" Then
|
||||
TipoPlantilla = 1
|
||||
LblEncabezado.Text = "Otros Ingresos"
|
||||
End If
|
||||
|
||||
CargaPlantillas(TipoPlantilla)
|
||||
CargaConceptosContablesE()
|
||||
CargaModalConceptoCuentas()
|
||||
CargaConceptos()
|
||||
CargaSubProyectos()
|
||||
CargaCuentasBancos()
|
||||
|
||||
If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then
|
||||
DivTipoGasto.Visible = True
|
||||
@@ -346,20 +354,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
End If
|
||||
|
||||
TipoPlantilla = -1
|
||||
If IfNull(Request("Tipo"), "").ToString = "Ing" Then
|
||||
TipoPlantilla = 1
|
||||
LblEncabezado.Text = "Otros Ingresos"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'If UsuarioActual.CveRol = 1 Then trNotificar.Visible = True
|
||||
|
||||
CargaConceptos()
|
||||
CargaSubProyectos()
|
||||
CargaCuentasBancos()
|
||||
|
||||
'crea tabla temporal
|
||||
ArregloMovs = New ArrayList
|
||||
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
|
||||
@@ -459,7 +453,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
TxtFechaelaboracion.ToolTip = dr("FechaIng").ToString.ToDate.ToShortTimeString
|
||||
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString.ToEntero
|
||||
DdlPlantilla.SelectedValue = CvePlantillaPoliza.ToString
|
||||
DdlPlantilla.SelectedValueExist(CvePlantillaPoliza)
|
||||
HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}"
|
||||
HplImprimirPDF.Visible = True
|
||||
If UsuarioActual.CveRol = 1 Then TxtUsuarioElaboro.ToolTip = dr("Modulo").ToString
|
||||
@@ -559,17 +553,17 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
|
||||
|
||||
If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
||||
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 323, 324, 341, 342, 343, 344, 304, 272, 259, 287, 288) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||
If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
||||
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 323, 324, 341, 342, 343, 344, 304, 272, 259, 287, 288) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||
If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
|
||||
If e.Row.DBCampo("Modificado") = "True" Then
|
||||
e.Row.FCCheckBox("chkModificado").Checked = True
|
||||
End If
|
||||
End If
|
||||
If e.Row.DBCampo("Modificado") = "True" Then
|
||||
e.Row.FCCheckBox("chkModificado").Checked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
'e.Row.FCDropDownList("DdlSubProyectoFiltro").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
'e.Row.FCDropDownList("DdlSubProyectoFiltro").DataBind()
|
||||
'e.Row.FCDropDownList("DdlSubProyectoFiltro").Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
@@ -579,20 +573,16 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
Private Sub CargaPlantillas(TipoPlantilla As Integer)
|
||||
|
||||
'GvPlantillas.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
||||
'GvPlantillas.DataBind()
|
||||
Dim dtt As DataTable = Nothing
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(120) Then
|
||||
DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1)
|
||||
DdlPlantilla2.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1)
|
||||
|
||||
dtt = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1)
|
||||
Else
|
||||
DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
||||
DdlPlantilla2.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
||||
|
||||
dtt = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
|
||||
End If
|
||||
|
||||
|
||||
DdlPlantilla.DataSource = dtt
|
||||
DdlPlantilla2.DataSource = dtt
|
||||
DdlPlantilla.DataBind()
|
||||
DdlPlantilla.Items.Insert(0, New ListItem("Plantilla Personalizada", "53"))
|
||||
|
||||
@@ -886,7 +876,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
e.Row.FCLinkButton("ImgBancos").Visible = True
|
||||
|
||||
If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
|
||||
e.Row.DataKey("ContadoImporte").ToDecimal > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
|
||||
e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
|
||||
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
|
||||
End If
|
||||
End If
|
||||
@@ -909,10 +899,17 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TotalCargos = TxtTotalCargos.Text.ToDecimal
|
||||
TotalAbonos = TxtTotalAbonos.Text.ToDecimal
|
||||
Else
|
||||
For Each Gvr As GridViewRow In GvMov.Rows
|
||||
TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
|
||||
TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
|
||||
Next
|
||||
If GvPrePoliza.Visible Then
|
||||
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
||||
TotalCargos += Gvr.DataKey("Cargo").ToDecimal
|
||||
TotalAbonos += Gvr.DataKey("Abono").ToDecimal
|
||||
Next
|
||||
Else
|
||||
For Each Gvr As GridViewRow In GvMov.Rows
|
||||
TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
|
||||
TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
'validaciones
|
||||
@@ -978,34 +975,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
'inserto las compras que voy a pagarDdlSaldos
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
|
||||
'Registra movimieno bancario
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso (gvr.DataKey("ContadoImporte").ToDecimal <> 0 OrElse TipoGrid = 1) Then
|
||||
Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
|
||||
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
|
||||
|
||||
Dim ImporteIE As Decimal = gvr.DataKey("ContadoImporte").ToDecimal
|
||||
|
||||
If TipoGrid = 1 Then
|
||||
ImporteIE = gvr.DataKey("ImporteMN").ToDecimal
|
||||
End If
|
||||
|
||||
Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, tFolio,
|
||||
gvr.DataKey("ContadoBeneficiario"), ImporteIE, tCveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
|
||||
False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveIE < 0 Then
|
||||
MsgError = "No se pudo registrar movimiento bancario"
|
||||
Exit For
|
||||
Else
|
||||
If tFolio <> "0" Or tFolio <> "" Then
|
||||
FolioIE = tFolio
|
||||
Else
|
||||
FolioIE = ObjIE.Folio
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
ImporteME = 0
|
||||
TipoCambio = 1
|
||||
|
||||
@@ -1045,6 +1014,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not gvr.DataKey("CveConceptoContable").Contiene("30", "10", "204") Then ' 30-bancos, 10-anticipos proveedores, 204- blancos complementaria
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 41 Then
|
||||
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
|
||||
@@ -1053,6 +1023,29 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
End If
|
||||
|
||||
'Registra movimieno bancario
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
|
||||
Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
|
||||
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
|
||||
|
||||
Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, tFolio,
|
||||
gvr.DataKey("ContadoBeneficiario"), Importe, tCveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
|
||||
False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveIE < 0 Then
|
||||
MsgError = "No se pudo registrar movimiento bancario"
|
||||
Exit For
|
||||
Else
|
||||
If tFolio <> "0" Or tFolio <> "" Then
|
||||
FolioIE = tFolio
|
||||
Else
|
||||
FolioIE = ObjIE.Folio
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Importe <> 0 OrElse TipoGrid = 1 Then 'si es diferente de cero o si viene de grid prepolizas, que registre todo
|
||||
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
|
||||
Dim tReferencia, tConcepto As String
|
||||
@@ -1698,8 +1691,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
||||
dr("Concepto") = TxtConceptoE.Text
|
||||
dr("Referencia") = TxtReferenciaE.Text
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, False, True)
|
||||
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDecimal) <> 0, False, True)
|
||||
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDecimal) <> 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
|
||||
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
|
||||
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
|
||||
dr("CveClasificacion") = DdlClasificacionesE.SelectedValue.ToEntero
|
||||
@@ -1717,7 +1710,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
|
||||
dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
|
||||
dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
|
||||
dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
|
||||
'dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
|
||||
|
||||
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
|
||||
If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
|
||||
@@ -1728,11 +1721,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If dr("EsMonedaExtranjera").ToString = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If DdlPorcentajeIVAE.Visible Then
|
||||
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
|
||||
End If
|
||||
If DdlPorcentajeIVAE.Visible Then dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
|
||||
|
||||
If TxtCargoE.Text <> "" Then
|
||||
If TxtCargoE.Text <> "" AndAlso TxtCargoE.Text.ToDecimal <> 0 Then
|
||||
dr("Cargo") = TxtCargoE.Text.ToDecimal : dr("Abono") = 0
|
||||
Else
|
||||
dr("Abono") = TxtAbonoE.Text.ToDecimal : dr("Cargo") = 0
|
||||
@@ -1749,7 +1740,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvPrePoliza.DataBind()
|
||||
UpPrePoliza.Update()
|
||||
GvPrePoliza.Visible = True
|
||||
If IndiceGrid > 0 Then GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
|
||||
If IndiceGrid >= 0 Then GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
|
||||
|
||||
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo" Style="width: 50%">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CuentaFormatoNombre" Style="width: 50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlCuentas.ClientID.ToString()%>">Cuenta:</label>
|
||||
</div>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<div class="catcuentas left">Subcuenta de</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tsubcuenta" runat="server" Enabled="False" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" style="max-width:160px"
|
||||
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" style="max-width:160px"
|
||||
DataValueField="Id" Width="160px" Visible="false">
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
|
||||
@@ -168,7 +168,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
ArbolCuentas.nivel = "CtaInicial"
|
||||
ArbolCuentas.nodoid = "CveCuenta"
|
||||
ArbolCuentas.padre = "CvePadre"
|
||||
ArbolCuentas.titulo = "CtaCodigo"
|
||||
ArbolCuentas.titulo = "CuentaFormatoNombre"
|
||||
ArbolCuentas.DataBind()
|
||||
|
||||
|
||||
@@ -563,8 +563,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
dr("CuentaFormato") = TxtCuenta.Text
|
||||
'dr("CuentaFormato") = Tcuenta.Text
|
||||
dr("Nombre") = Tnombre.Text
|
||||
dr("CtaCodigo") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)
|
||||
'dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text)
|
||||
dr("CuentaFormatoNombre") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)
|
||||
dr("Tipo") = DTcuenta.SelectedValue.ToString
|
||||
dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString
|
||||
dr("CvePadre") = IDSelected
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<label for="<%= DdlCconceptosContables.ClientID.ToString()%>">Concepto Contable: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
|
||||
<label for="<%= DdlCuenta.ClientID.ToString()%>">Cuenta Contable: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divProveedor" runat="server" visible="false">
|
||||
@@ -253,7 +253,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="width:50%;text-align:left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCuentaGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo2"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlCuentaGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo2"></asp:DropDownList>
|
||||
<label for="<%= DdlCuentaGlobal.ClientID.ToString()%>">Cuenta Contable: </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
|
||||
@@ -159,23 +159,7 @@ Partial Class AC2_RepAnexoCatalogo
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
'Public Function WSCuentas() As String
|
||||
' Dim Str As New StringBuilder
|
||||
' Dim i As Integer = 0
|
||||
' Dim dt As DataTable = DTCuentas '.FiltraParametros("Afectable = 1")
|
||||
|
||||
' If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
' For Each dr As DataRow In dt.Rows
|
||||
' i += 1
|
||||
' Str.AppendFormat("{{value:""{0}"",label:""{1}{3}""}}{2}", dr("CveCuenta"), dr("CtaCodigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""), If(dr("Afectable").ToString = "1", " *", ""))
|
||||
' Next
|
||||
|
||||
' End If
|
||||
|
||||
|
||||
' Return Str.ToString
|
||||
'End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" >
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
|
||||
@@ -145,23 +145,7 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
'Public Function WSCuentas() As String
|
||||
' Dim Str As New StringBuilder
|
||||
' Dim i As Integer = 0
|
||||
' Dim dt As DataTable = DTCuentas '.FiltraParametros("Afectable = 1")
|
||||
|
||||
' If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
' For Each dr As DataRow In dt.Rows
|
||||
' i += 1
|
||||
' Str.AppendFormat("{{value:""{0}"",label:""{1}{3}""}}{2}", dr("CveCuenta"), dr("CtaCodigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""), If(dr("Afectable").ToString = "1", " *", ""))
|
||||
' Next
|
||||
|
||||
' End If
|
||||
|
||||
|
||||
' Return Str.ToString
|
||||
'End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
|
||||
@@ -609,7 +609,7 @@
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Cuentas:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100%">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
@@ -182,21 +182,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Image Name="Logo">
|
||||
<Source>Embedded</Source>
|
||||
<Value>Logo</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>1.5468cm</Top>
|
||||
<Left>8.2016cm</Left>
|
||||
<Height>0.74287cm</Height>
|
||||
<Width>1.52823cm</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Image>
|
||||
</ReportItems>
|
||||
<Height>0.92351in</Height>
|
||||
<Style>
|
||||
@@ -235,7 +220,6 @@
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="Logo">
|
||||
<MIMEType>image/jpeg</MIMEType>
|
||||
|
||||
@@ -1105,8 +1105,6 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ErrorProv Then
|
||||
Alert($"Errores detectados <br>{sbErrores.ToString()}", TipoMensaje.MsgAdvertencia)
|
||||
Exit For
|
||||
@@ -1241,7 +1239,6 @@ Partial Class General_SaldosIniciales
|
||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||
NumRow = NumRow + 1
|
||||
|
||||
|
||||
Dim Codigo As String = Row("Codigo").ToString()
|
||||
Dim RazonSocial As String = Row("RazonSocial").ToString()
|
||||
Dim RFC As String = Row("RFC").ToString().Trim
|
||||
@@ -1252,13 +1249,12 @@ Partial Class General_SaldosIniciales
|
||||
Dim CodigoPostal As String = Row("Código Postal").ToString()
|
||||
Dim Poblacion As String = Row("Población").ToString()
|
||||
Dim Estado As String = Row("Estado").ToString().Trim
|
||||
Dim Pais As String = Row("Pais").ToString()
|
||||
Dim Pais As String = If(dt.Columns.Contains("Pais"), Row("Pais").ToString(), "")
|
||||
Dim Telefono As String = Row("Teléfono").ToString().Replace("-", "").Replace(" ", "").Replace("(", "").Replace(")", "")
|
||||
Dim Contacto As String = Row("Contacto").ToString()
|
||||
Dim Contacto As String = If(dt.Columns.Contains("Contacto"), Row("Contacto").ToString(), "")
|
||||
|
||||
|
||||
Dim Vendedor As String = Row("Vendedor").ToString()
|
||||
Dim Clasificacion As String = Row("ClasificacionCliente").ToString()
|
||||
Dim Vendedor As String = If(dt.Columns.Contains("Vendedor"), Row("Vendedor").ToString(), "")
|
||||
Dim Clasificacion As String = If(dt.Columns.Contains("ClasificacionCliente"), Row("ClasificacionCliente").ToString(), "")
|
||||
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
|
||||
|
||||
Dim CveVendedor As Integer = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"Vendedor = '{Vendedor}'").ToString().ToEntero()
|
||||
@@ -1267,16 +1263,27 @@ Partial Class General_SaldosIniciales
|
||||
Dim CargoUsado As Boolean = If(dt.Columns.Contains("Cargo Usados"), If(Row("Cargo Usados").ToString().ToUpper = "SI", True, False), False)
|
||||
Dim BonificacionUsado As Boolean = If(dt.Columns.Contains("EmitirBon Usado"), If(Row("EmitirBon Usado").ToString().ToUpper = "SI", True, False), False)
|
||||
|
||||
Dim LimiteCredito As Decimal = Row("Limite Credito").ToString().ToDecimal
|
||||
Dim CobranzaCorreo As String = Row("CorreoPagos").ToString()
|
||||
Dim PlazoCobranza As Integer = Row("Plazo Cobranza").ToString().ToEntero()
|
||||
Dim LimiteCredito As Decimal = If(dt.Columns.Contains("Limite Credito"), Row("Limite Credito").ToString(), "").ToDecimal
|
||||
Dim CobranzaCorreo As String = If(dt.Columns.Contains("CorreoPagos"), Row("CorreoPagos").ToString(), "")
|
||||
Dim PlazoCobranza As Integer = If(dt.Columns.Contains("Plazo Cobranza"), Row("Plazo Cobranza").ToString(), "").ToEntero
|
||||
|
||||
Dim DìaVisita As String = If(dt.Columns.Contains("Dia Pago"), Row("Dia Pago").ToString(), "")
|
||||
Dim DiasPagoEspecifico As String = If(dt.Columns.Contains("Dìa Visita"), Row("Dìa Visita").ToString(), "")
|
||||
Dim CobranzaContacto As String = If(dt.Columns.Contains("Encargado Pagoa"), Row("Encargado Pago").ToString(), "")
|
||||
Dim CobranzaTelefono As String = Row("Celular Contacto").ToString().Replace("-", "").Replace(" ", "").Replace("(", "").Replace(")", "")
|
||||
Dim CveUsoCFDI As Integer = If(Row("UsoCFDI").ToString() = "", -1, GlobalDTSATUsosCFDI().FiltroPrimeroValor("CveUsoCFDI", String.Format("UsoCFDI = '{0}'", Row("UsoCFDI").ToString())).ToEntero())
|
||||
Dim CobranzaContacto As String = If(dt.Columns.Contains("Encargado Pago"), Row("Encargado Pago").ToString(), "")
|
||||
Dim CobranzaTelefono As String = If(dt.Columns.Contains("Celular Contacto"), Row("Celular Contacto").ToString(), "").Replace("-", "").Replace(" ", "").Replace("(", "").Replace(")", "")
|
||||
Dim CveUsoCFDI As Integer = If(Row("UsoCFDI").ToString() = "", -1, GlobalDTSATUsosCFDI().FiltroPrimeroValor("CveUsoCFDI", String.Format("UsoCFDI = '{0}' OR UsoCFDIDescripcion = '{0}'", Row("UsoCFDI").ToString())).ToEntero())
|
||||
Dim CuentaContable As String = If(dt.Columns.Contains("CuentaContable"), Row("CuentaContable").ToString(), "")
|
||||
Dim RegimenSociedad As String = If(dt.Columns.Contains("RegimenSociedad"), Row("RegimenSociedad").ToString(), "")
|
||||
Dim Pagina As String = If(dt.Columns.Contains("Pagina"), Row("Pagina").ToString(), "")
|
||||
Dim CodigoRegimenFiscal As String = Row("RegimenFiscal").ToString()
|
||||
Dim CveRegimenFiscal As Integer = 0
|
||||
|
||||
If CodigoRegimenFiscal.Trim.Length > 0 Then
|
||||
CveRegimenFiscal = GlobalDTRegimenesFiscales.FiltroPrimeroValor("CveRegimenFiscal", $"CodigoRegimenFiscal= '{CodigoRegimenFiscal}' ").ToEntero()
|
||||
If Not CveRegimenFiscal > 0 Then
|
||||
sbErrores.AppendLine($"Proveedor {RazonSocial} Codigo RegimenFiscal {CodigoRegimenFiscal} invalido.<br>")
|
||||
End If
|
||||
End If
|
||||
CuentaContable = CuentaContable.Trim.Replace("-", "").Replace(" ", "")
|
||||
|
||||
If CuentaContable.Length > 0 Then
|
||||
@@ -1289,15 +1296,9 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
|
||||
'Telefono
|
||||
If Telefono.Trim.Length > 10 Then Telefono = ""
|
||||
|
||||
If Telefono.Trim.Length > 10 Then
|
||||
Telefono = ""
|
||||
End If
|
||||
|
||||
If CobranzaTelefono.Trim.Length > 10 Then
|
||||
|
||||
CobranzaTelefono = ""
|
||||
End If
|
||||
If CobranzaTelefono.Trim.Length > 10 Then CobranzaTelefono = ""
|
||||
|
||||
Dim FormaPago As String = If(dt.Columns.Contains("Forma Pago"), Row("Forma Pago").ToString(), "")
|
||||
Dim CveFormaPago33 As Integer = 99
|
||||
@@ -1380,11 +1381,12 @@ Partial Class General_SaldosIniciales
|
||||
ExisteCliente = True
|
||||
Contador = Contador + 1
|
||||
Else
|
||||
Dim CveSATEstado As Integer = GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveSATEstado", String.Format(" NombreEstado ='{0}'", Estado.ToUpper)).ToEntero()
|
||||
Dim CveSATEstado As Integer = GlobalDTGralEstados("-1").FiltroPrimeroValor("CveSATEstado", String.Format(" NombreEstado ='{0}'", Estado.ToUpper)).ToEntero()
|
||||
|
||||
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), NumInt, Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, "", "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1,
|
||||
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), NumInt, Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, "", "", "", Pagina, "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1,
|
||||
"-1", "-1", "-1", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado,
|
||||
BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado, CveAdminTrayecto:=0) Then
|
||||
BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado, CveAdminTrayecto:=0,
|
||||
RegimenSociedad:=RegimenSociedad, CveRegimenFiscal:=CveRegimenFiscal) Then
|
||||
|
||||
ErrorClientes = True
|
||||
RFC.GuardaLog
|
||||
|
||||
@@ -267,12 +267,12 @@
|
||||
<div class="col-md-6">
|
||||
<asp:Panel CssClass="" ID="divddlcc" runat="server">
|
||||
<asp:Panel CssClass="form-group form-md-line-input input-iconright" ID="divCuentasCompac" Visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlCuentasContables" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="100%" ValidationGroup="GrpObligatorio" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlCuentasContables" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="Id" Width="100%" ValidationGroup="GrpObligatorio" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:Label AssociatedControlID="DdlCuentasContables" runat="server" Text="Cuenta Contable:"></asp:Label>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel CssClass="form-group form-md-line-input input-iconright" ID="pnlCuentassig" Visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlCuentasSig" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100%" ValidationGroup="GrpObligatorio" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlCuentasSig" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" Width="100%" ValidationGroup="GrpObligatorio" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:Label AssociatedControlID="DdlCuentasSig" runat="server" Text="Cuenta Contable:"></asp:Label>
|
||||
</asp:Panel>
|
||||
</asp:Panel>
|
||||
|
||||
@@ -1937,9 +1937,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
CveConceptoContable = 181
|
||||
TipoMovtoOtro = False
|
||||
If DdlSubProyecto.Visible = True AndAlso DdlSubProyecto.SelectedValue.ToEntero > 0 Then tCveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||
'If UsuarioActual.Empresa.Funcionalidad(342).ToEntero > 0 Then
|
||||
' IdCtaContableOtro = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
'End If
|
||||
|
||||
Case 34
|
||||
CveConceptoContable = 51
|
||||
EsContabilizable = True
|
||||
@@ -3901,9 +3899,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
' Exit For
|
||||
' End If
|
||||
' Else
|
||||
' If ObjConta.GetRetCuenta(176, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero
|
||||
' End If
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorInventario, Concepto, 176, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveOC:=HdnCveOrdenCompra.Value.ToEntero, CveOCDetalle:=RowOC("CveOrdenCompraDetalle").ToString.ToEntero) Then
|
||||
' ErrorMovInv = True
|
||||
@@ -3947,7 +3942,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24", "32") Then
|
||||
If DdlConcepto.SelectedValue.Contiene("1", "6", "22", "23", "7", "16", "21", "24", "32") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
@@ -5486,7 +5481,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
tCveSubProyecto = drAlmacenVirtual("CveSubProyecto").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display: none;">
|
||||
<tr runat="server" id="trGuia" visible="false">
|
||||
<td>Guía:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtGuia" runat="server" CssClass="form-control input-sm" MaxLength="20" Width="320px"></asp:TextBox>
|
||||
|
||||
@@ -381,11 +381,16 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
DdlFolio.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
TxtFechaPendientes.Text = NowADS().ToShortDateString
|
||||
'TxtFechaCaducidad.Text = NowADS().ToShortDateString
|
||||
TxtFechaPendientes.Text = NowADS().ToShortDateString
|
||||
TxtFecha.Text = NowADS().ToShortDateString
|
||||
RVFecha.MaximumValue = MaxFecha.ToShortDateString
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then RVFecha.MinimumValue = NowADS().ToShortDateString : CEFecha.StartDate = NowADS() Else RVFecha.MinimumValue = MinFecha.ToShortDateString
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
RVFecha.MinimumValue = NowADS().ToShortDateString
|
||||
CEFecha.StartDate = NowADS()
|
||||
trGuia.Visible = True
|
||||
Else
|
||||
RVFecha.MinimumValue = MinFecha.ToShortDateString
|
||||
End If
|
||||
|
||||
If Not UsuarioActual.TienePermisoProceso(190) Then
|
||||
'CARGA SOLO LAS SUCURSALES DE LOS ALMCENES QUE TIENE ASIGNADO EL USUARIO
|
||||
@@ -406,8 +411,6 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CreaDtDetalle()
|
||||
CreaDtDetalleLote()
|
||||
CargaPendientes()
|
||||
|
||||
|
||||
LimpiaCampos()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -3035,7 +3035,7 @@ Partial Class OC_OC
|
||||
ImporteMEComp = (DiferenciaInvOC - ImporteME).RoundSQL()
|
||||
|
||||
'COMPLEMENTARIA
|
||||
'If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteME, SerieFolio, 232, SerieFolio, Fecha, If(ConceptoSalida = 0, 0, IdCtaContableRecepcionOCERME), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteME, ImporteME:=ImporteME, CveCuenta:=CveCuentaAlmacen, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
|
||||
'If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteME, SerieFolio, 232, SerieFolio, Fecha, If(ConceptoSalida = 0, 0, 0), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteME, ImporteME:=ImporteME, CveCuenta:=CveCuentaAlmacen, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMEComp, SerieFolio, 233, SerieFolio, Fecha, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteMEComp, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
|
||||
@@ -60,7 +60,7 @@ Partial Class Ventas_CatImpuestosLocales
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
If UsuarioActual.Empresa.UsaContabilidad OrElse UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 OrElse UsuarioActual.Empresa.UsaAC Then
|
||||
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
||||
If ObjContabilidad.GetCuentasRecursiva(1, 1) Then
|
||||
@@ -82,7 +82,7 @@ Partial Class Ventas_CatImpuestosLocales
|
||||
|
||||
Protected Sub GvImpuestos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvImpuestos.RowDeleting
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim CveImpuesto As Integer = GvImpuestos.Rows(e.RowIndex).DataKey("CveImpuestoLocal").ToEntero
|
||||
|
||||
@@ -155,7 +155,7 @@ Partial Class Ventas_CatImpuestosLocales
|
||||
|
||||
Private Sub BtnAgregarImpuesto_Click(sender As Object, e As EventArgs) Handles BtnAgregarImpuesto.Click
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim Estatus = 0
|
||||
Dim Estatus As Integer = 0
|
||||
|
||||
If CveImpuestoLocal = -1 Then
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
@@ -169,11 +169,11 @@ Partial Class Ventas_CatImpuestosLocales
|
||||
TxtImpuesto.Focus()
|
||||
Else
|
||||
If CveImpuestoLocal <> -1 Then
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
Dim Impuesto As String = TxtImpuesto.Text.Trim
|
||||
Dim Porcentaje As Decimal = TxtPorcentaje.Text.ToDecimal
|
||||
Dim Orden = TxtOrden.Text.ToEntero
|
||||
Dim TipoImpuesto = DdlTipoImpuesto.SelectedValue.ToEntero
|
||||
Dim Orden As Integer = TxtOrden.Text.ToEntero
|
||||
Dim TipoImpuesto As Integer = DdlTipoImpuesto.SelectedValue.ToEntero
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
|
||||
If Not ObjVentas.UpdateImpuestosLocales(CveImpuestoLocal, Impuesto, Porcentaje, Orden, TipoImpuesto, Estatus, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
|
||||
@@ -101,6 +101,14 @@
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="FechaVenta" HeaderText="Ultima Venta" ItemStyle-Width="80px" DataFormatString="{0:dd/MM/yyyy}">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="SerieFolioVenta" HeaderText="Serie Folio">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="EstatusStr" HeaderText="Estatus">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
@@ -117,13 +125,9 @@
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="SerieFolioVenta" HeaderText="Serie Folio">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
|
||||
<asp:BoundField DataField="FechaVenta" HeaderText="Fecha Venta" ItemStyle-Width="80px" DataFormatString="{0:dd/MM/yyyy}">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px" >
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -9113,8 +9113,7 @@ Partial Class Clientes
|
||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||
'Para uso del módulo contable
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
||||
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
||||
TmpDT.Columns.Add("Proyecto", GetType(String))
|
||||
|
||||
@@ -38,47 +38,48 @@
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Fecha Inicio Documento" data-toggle="tooltip" data-placement="top">
|
||||
Fecha Inicio Docto:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Fecha Fin Documento" data-toggle="tooltip" data-placement="top">
|
||||
Fecha Fin Docto:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate" title="Fecha Inicio Documento" data-toggle="tooltip" data-placement="top">
|
||||
Fecha Inicio Docto:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Fecha Fin Documento" data-toggle="tooltip" data-placement="top">
|
||||
Fecha Fin Docto:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,7 +258,7 @@
|
||||
<label class="col-md-2">Total:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
|
||||
</div>
|
||||
@@ -271,7 +272,8 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:center;">
|
||||
<asp:HiddenField ID="HdnCveVenta" runat="server" />
|
||||
<asp:HiddenField ID="HdnCveVenta" runat="server" />
|
||||
<asp:HiddenField ID="HdnTotal" runat="server" ClientIDMode="Static" />
|
||||
<asp:Button ID="BtnPagar" CssClass="btn btn-large btn-success e-big-btn" runat="server" Text="Pagar" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -287,5 +289,31 @@
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function CalculaTotalPagoContado() {
|
||||
debugger;
|
||||
var totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
|
||||
var totalCredito = ToDouble($get("TxtImporteCredito").value);
|
||||
var totalDebito = ToDouble($get("TxtImporteDebito").value);
|
||||
var totalCheque = ToDouble($get("TxtImporteCheque").value);
|
||||
var totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
|
||||
var TotalOtrosContado = 0;
|
||||
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado ;
|
||||
var totalVenta = ToDouble($get('HdnTotal').value);// - ToDouble($get('HdnTotal').value);
|
||||
|
||||
if (total > totalVenta) {
|
||||
lblCambio.innerHTML = "Cambio:";
|
||||
//HdnCambioFaltante.value = "1";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
||||
} else
|
||||
{
|
||||
lblCambio.innerHTML = "Faltante:";
|
||||
HdnCambioFaltante.value = "0";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
||||
}
|
||||
|
||||
$get("TxtImporteContado").value = FormatoNumero(total, 2);
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -7,9 +7,20 @@ Imports Extensiones
|
||||
Partial Class Ventas_PVCobranza
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveCorte As Integer
|
||||
Get
|
||||
Return ViewState("CveCorte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCorte") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CveCorte = 0
|
||||
CargaFiltros()
|
||||
CargaCorteCaja()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -18,7 +29,7 @@ Partial Class Ventas_PVCobranza
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
txtFechaI.Text = Now.AddDays(-7).ToShortDateString
|
||||
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
|
||||
'DdlCuentaEfectivo.Items.Clear()
|
||||
@@ -34,19 +45,11 @@ Partial Class Ventas_PVCobranza
|
||||
'If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon))
|
||||
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon))
|
||||
'Else
|
||||
' DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
|
||||
' DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
|
||||
'End If
|
||||
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
|
||||
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
|
||||
'Else
|
||||
' DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", CveMon))
|
||||
'DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", CveMon))
|
||||
'End If
|
||||
|
||||
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", CveMon))
|
||||
|
||||
DtCC.Dispose()
|
||||
@@ -56,6 +59,28 @@ Partial Class Ventas_PVCobranza
|
||||
DdlCuentaTarjetaDebito.DataBind()
|
||||
DdlCuentaCheque.DataBind()
|
||||
DdlCuentaTransferencia.DataBind()
|
||||
TxtImporteEfectivo.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteCredito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCorteCaja()
|
||||
Dim DebeCerrarCorte As Boolean = False
|
||||
'Checar si hay un Turno Abierto
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
|
||||
If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
|
||||
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
End If
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -65,21 +90,27 @@ Partial Class Ventas_PVCobranza
|
||||
Dim FechaI, FechaF As Date
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
|
||||
If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, FechaI, FechaF) Then
|
||||
|
||||
If ObjMovtos.GetCxCDetalle(FechaI, FechaF, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, "-1", "-1", -1, "-1", -1,
|
||||
"-1", 1, UsuarioActual.CveEmpresa, -1, 1,
|
||||
TipoDocto:="Rem", FechaCorte:=NowADS.AddDays(1), CveUsuarioConsulta:=UsuarioActual.CveUsuario, AplicaAnticiposPagados:=0) Then
|
||||
|
||||
Dim dtt As DataTable = ObjMovtos.DSResultados.Tables(0).FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario})")
|
||||
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario})")
|
||||
'si hay ya asignado, solo la mostrará
|
||||
Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario}")
|
||||
If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||
GvDatos.DataSource = dtt
|
||||
End If
|
||||
|
||||
ObjMovtos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpL.Update()
|
||||
|
||||
TxtImporteEfectivo.Text = ""
|
||||
TxtImporteCredito.Text = ""
|
||||
TxtImporteDebito.Text = ""
|
||||
TxtImporteCheque.Text = ""
|
||||
TxtImporteTransferencia.Text = ""
|
||||
TxtImporteOtrosContado.Text = ""
|
||||
TxtCambio.Text = ""
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
@@ -109,7 +140,9 @@ Partial Class Ventas_PVCobranza
|
||||
TieneError = True
|
||||
End If
|
||||
HdnCveVenta.Value = CveVenta.ToString
|
||||
TxtImporteEfectivo.Text = GvRow.DataKey("Saldo")
|
||||
TxtImporteEfectivo.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||
TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||
HdnTotal.Value = GvRow.DataKey("Saldo")
|
||||
TxtImporteEfectivo.Focus()
|
||||
LtlNombre.Text = GvRow.DataKey("DescripcionVenta")
|
||||
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
|
||||
@@ -164,26 +197,38 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL())
|
||||
Dim ObjVentas2 As New ClsVentas(ObjConta.IniciaTransacSQL())
|
||||
|
||||
Dim CvePrePoliza As Integer
|
||||
Dim Fecha As Date = NowADS()
|
||||
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
|
||||
Dim Mensaje As String = ""
|
||||
Dim SaldoPendiente As Decimal = VentaActual.Total
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 5, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
||||
Mensaje = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, TxtImporteEfectivo.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
|
||||
If PagoEfectivo > 0 Then
|
||||
If PagoEfectivo > VentaActual.Total Then
|
||||
TxtCambio.Text = (VentaActual.Total - PagoEfectivo).FormatoNumero
|
||||
PagoEfectivo = VentaActual.Total
|
||||
End If
|
||||
Mensaje = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
|
||||
End If
|
||||
If TxtImporteCredito.Text.ToDecimal > 0 Then
|
||||
Mensaje = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
|
||||
SaldoPendiente -= PagoEfectivo
|
||||
If SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then
|
||||
Mensaje = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
|
||||
PagoEfectivo = TxtImporteCredito.Text.ToDecimal
|
||||
End If
|
||||
If TxtImporteDebito.Text.ToDecimal > 0 Then
|
||||
Mensaje = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
|
||||
SaldoPendiente -= PagoEfectivo
|
||||
If SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then
|
||||
Mensaje = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
|
||||
PagoEfectivo = TxtImporteDebito.Text.ToDecimal
|
||||
End If
|
||||
If TxtImporteCheque.Text.ToDecimal > 0 Then
|
||||
Mensaje = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
|
||||
If SaldoPendiente > 0 AndAlso TxtImporteCheque.Text.ToDecimal > 0 Then
|
||||
Mensaje = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
|
||||
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -194,7 +239,7 @@ Partial Class Ventas_PVCobranza
|
||||
PnlContado.Visible = False
|
||||
ObjConta.Commit()
|
||||
CargaDatos()
|
||||
Alert("Pago Registrado correctamente.", TipoMensaje.MsgInformacion)
|
||||
Alert("Pago Registrado correctamente.<br/><br/> <a href='#' class='Texto'>Imprimir ticket</a>", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
End If
|
||||
@@ -202,11 +247,11 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad) As String
|
||||
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas) As String
|
||||
Dim Retorno As String = ""
|
||||
Dim CveIEPago As Integer = 0
|
||||
Dim ErrorConta As Boolean
|
||||
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte)
|
||||
If CveIEPago > 0 Then
|
||||
Dim Pago As New VentaPago
|
||||
Pago.ImportePagoVenta = ImportePago
|
||||
@@ -220,6 +265,11 @@ Partial Class Ventas_PVCobranza
|
||||
If ErrorConta Then
|
||||
Retorno = "Error en aplicación de pago"
|
||||
End If
|
||||
Dim MetodoPago As Integer = If(Metodo = 13, 1, If(Metodo = 12, 4, If(Metodo = 11, 5, If(Metodo = 3, 2, 3))))
|
||||
If Not ErrorConta AndAlso Not ObjVentas.AddVta_VentaPago(VentaActual.CveVenta, MetodoPago, ImportePago) Then
|
||||
Retorno = "Error en aplicación de pago.."
|
||||
ErrorConta = True
|
||||
End If
|
||||
Else
|
||||
Retorno = "Pago en Bancos no registrado"
|
||||
ErrorConta = True
|
||||
|
||||
@@ -1404,7 +1404,7 @@
|
||||
<tr>
|
||||
<th style="width: 50px;">Cantidad </th>
|
||||
<th>Producto</th>
|
||||
<th>U.M. </th>
|
||||
<th style="width:150px">U.M. </th>
|
||||
<th>Tipo</th>
|
||||
<th colspan="2">Comandos</th>
|
||||
</tr>
|
||||
@@ -1423,7 +1423,7 @@
|
||||
<td>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProductows" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</td>
|
||||
<td align="center">
|
||||
<td align="center" style="width:150px">
|
||||
<asp:DropDownList ID="ddlUnidad" CssClass="form-control input-sm select2me" runat="server" DataTextField="UnidadMedida" ToolTip="Unidad de Medida" DataValueField="CveUnidadMedida"></asp:DropDownList></td>
|
||||
|
||||
<td align="center">
|
||||
@@ -1440,7 +1440,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<asp:GridView ID="gvPaqueteDetalle" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="gvPaqueteDetalle" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="20px">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -1321,7 +1321,7 @@ Partial Class ProductosyServicios
|
||||
End If
|
||||
|
||||
txtCantidad.Text = ""
|
||||
DdlProductows.ddl.SelectedIndex = 0
|
||||
DdlProductows.ddl.SelectedIndex = -1
|
||||
ddlUnidad.SelectedIndex = 0
|
||||
ddlTipo.SelectedIndex = 0
|
||||
End If
|
||||
|
||||
119
Ventas/RepEntregasEcommerce.aspx
Normal file
119
Ventas/RepEntregasEcommerce.aspx
Normal file
@@ -0,0 +1,119 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEntregasEcommerce.aspx.vb" Inherits="Ventas_RepEntregasEcommerce" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dashboard-stat2 {
|
||||
padding: 1px 2px 15px 10px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPDF" ToolTip="Descarga PDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" ToolTip="Descarga Excel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Entregas de ecommerce
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="">
|
||||
<div class="titlefiltros caption magindate ">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1">Fecha Inicial</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="margin-top: -8px; padding: 5px 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 80px;"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">Fecha Final</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="margin-top: -8px; padding: 5px 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 80px;"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:RadioButtonList ID="RBL" runat="server" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Text="Pendiente" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Entregado" Value="2" ></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="text-right">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvD.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:HyperLinkField DataTextfield="SerieFolio" HeaderText="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField Datafield="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||
<asp:BoundField Datafield="PS" HeaderText="Ps" />
|
||||
<asp:BoundField Datafield="Cantidad" HeaderText="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField Datafield="Hmo" HeaderText="Hmo" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
|
||||
<asp:BoundField Datafield="Cul" HeaderText="Cul" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
|
||||
<asp:BoundField Datafield="Mex" HeaderText="Mex" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
|
||||
<asp:BoundField Datafield="LP" HeaderText="LP" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
139
Ventas/RepEntregasEcommerce.aspx.vb
Normal file
139
Ventas/RepEntregasEcommerce.aspx.vb
Normal file
@@ -0,0 +1,139 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports iText.Barcodes.Dmcode
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Ventas_RepEntregasEcommerce
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
txtFechaI.Text = NowADS.AddDays(-3).ToShortDateString
|
||||
txtFechaF.Text = NowADS.ToShortDateString
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim FechaI, FechaF As Date
|
||||
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text.Trim.ToDate Else FechaI = MinFecha
|
||||
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text.Trim.ToDate Else FechaF = MaxFecha
|
||||
Dim Obj As New ClsVentas
|
||||
If Obj.GetEntregasEcommerce(FechaI, FechaF, UsuarioActual.CveEmpresa) Then
|
||||
GvD.DataSource = Obj.DtResultados
|
||||
End If
|
||||
Obj.Dispose()
|
||||
GvD.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " I M P R I M I R P D F"
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
Dim EsVisibleColPagoProveedor As Boolean = False
|
||||
|
||||
If GvD.Columns(10).Visible Then
|
||||
EsVisibleColPagoProveedor = True
|
||||
GvD.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
GenerarPDFpp("Excel")
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click
|
||||
GenerarPDFpp()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPDFSubProyecto_Click(sender As Object, e As EventArgs)
|
||||
GenerarPDFpp(AgrupadoPorSubProyecto:=True)
|
||||
End Sub
|
||||
Protected Sub LnkExcelSubProyecto_Click(sender As Object, e As EventArgs)
|
||||
Dim EsVisibleColPagoProveedor As Boolean = False
|
||||
|
||||
If GvD.Columns(10).Visible Then
|
||||
EsVisibleColPagoProveedor = True
|
||||
GvD.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
GenerarPDFpp("Excel", True)
|
||||
|
||||
If EsVisibleColPagoProveedor Then
|
||||
GvD.Columns(10).Visible = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GenerarPDFpp(Optional Formato As String = "PDF", Optional AgrupadoPorSubProyecto As Boolean = False)
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
|
||||
'OBTENEMOS LOS DATOS
|
||||
|
||||
Dim DTpp As DataTable = Nothing
|
||||
|
||||
|
||||
If DTpp.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = DTpp.Rows(0)
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Filtros As New StringBuilder
|
||||
Filtros.Append("<b>Filtros </b>")
|
||||
Dim ExistenFechas As Boolean = False
|
||||
|
||||
If txtFechaI.Text.Trim.Length > 0 Then
|
||||
Filtros.Append($" Fecha Inicio: {txtFechaI.Text.Trim}")
|
||||
ExistenFechas = True
|
||||
End If
|
||||
|
||||
|
||||
If txtFechaF.Text.Trim.Length > 0 Then
|
||||
Filtros.Append($" Fecha Fin: {txtFechaF.Text.Trim}")
|
||||
ExistenFechas = True
|
||||
End If
|
||||
|
||||
|
||||
If ExistenFechas Then
|
||||
params.Add(New ReportParameter("AgrupadoPor", Filtros.ToString))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("FechaInicio", FI))
|
||||
' params.Add(New ReportParameter("FechaFin", FF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString))
|
||||
' params.Add(New ReportParameter("AgrupadoPor", $"{Programo} {Proveedor} {Registro} {Responsable} {Clasificacion} {Moneda} {Estatus} {SubProyecto} {FechaIn} {FechaFn}{FVI}{FVF}"))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepPagoProveedores.rdlc", DTpp, params, "ReportePagoProveedores", Formato)
|
||||
Else
|
||||
Alert("No se tienen registrados movimientos", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CvePS") = "" Then e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -9,7 +9,7 @@
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
.nolineheight {ChkRequiereTecnico
|
||||
.nolineheight {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -4754,6 +4754,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||
Me.CveLineaAdicionalVenta = DbRowVenta("CveLineaAdicional").ToString().ToEntero()
|
||||
End If
|
||||
TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString()
|
||||
|
||||
'CargaEncabezado
|
||||
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
|
||||
@@ -4859,10 +4860,8 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(163) = "1" Then
|
||||
TrDescripcionVenta.Visible = True
|
||||
TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString()
|
||||
End If
|
||||
|
||||
|
||||
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
Case "Egs"
|
||||
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
@@ -9475,7 +9474,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If DivAlmacen.Visible AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Dev") AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 AndAlso ddlAlmacen.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Tiene que seleccionar un almacén para la salida de almacén", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Seleccione el almacén del cual saldrán los productos.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -19453,8 +19452,6 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub TxtCodigo_TextChanged(sender As Object, e As System.EventArgs) Handles TxtCodigo.TextChanged
|
||||
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
|
||||
Dim Nombre As String = "-1"
|
||||
Dim Codigo As String = "-1"
|
||||
Dim NombreCorto As String = "-1"
|
||||
@@ -19465,6 +19462,7 @@ Partial Class Ventas
|
||||
If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim
|
||||
|
||||
If Codigo <> "-1" Then
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, -1, UsuarioActual.CveEmpresa, TipoCliente:=-1) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not ObjClientes.CveCliente.Contiene(10450, 10460, 10458) Then
|
||||
@@ -21564,8 +21562,6 @@ Partial Class Ventas
|
||||
|
||||
Dim DrProducto As DataRow = Nothing
|
||||
If TxtCantidad.Text.Trim.ToDouble <= 0 Then TxtCantidad.Text = "1"
|
||||
Dim SerieL As String = ""
|
||||
Dim CodigoBarras As String = ""
|
||||
Dim CvePS As Integer
|
||||
|
||||
'LIMPIA "PROPIEDAD"
|
||||
@@ -21582,7 +21578,7 @@ Partial Class Ventas
|
||||
|
||||
If Existencia - ExistenciaActual > 0 Then
|
||||
If CvePS > 0 Then
|
||||
DrProducto = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
DrProducto = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If DrProducto IsNot Nothing Then
|
||||
HdnCvePS.Value = CvePS.ToString()
|
||||
TxtCantidad.Text = "1"
|
||||
@@ -21598,17 +21594,16 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'BUSCA POR CODIGO DE BARRAS
|
||||
If Not CvePS > 0 Then
|
||||
CodigoBarras = TxtCodigoBarras.Text.Trim()
|
||||
DrProducto = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}'")
|
||||
If Not CvePS > 0 AndAlso TxtCodigoBarras.Text.Trim() <> "" Then
|
||||
|
||||
DrProducto = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoBarras.Text.Trim()}'")
|
||||
If DrProducto IsNot Nothing Then
|
||||
If DrProducto("Inv_CveMetodoInventario").ToString() = "5" Then 'si es serie
|
||||
If DrProducto("Inv_CveMetodoInventario").ToString() = "5" OrElse DrProducto("AplicaSerie").ToString = "True" Then 'si es serie
|
||||
TxtCodigoSerie.Focus()
|
||||
Exit Sub
|
||||
Else
|
||||
CvePS = DrProducto("CvePS").ToString().ToEntero()
|
||||
CvePS = DrProducto("CvePS").ToString.ToEntero()
|
||||
HdnCvePS.Value = CvePS.ToString()
|
||||
End If
|
||||
Else
|
||||
@@ -21627,8 +21622,9 @@ Partial Class Ventas
|
||||
DdlPSIndexChange(CvePS, DdlPS)
|
||||
If Not TxtCantidad.Text.ToDouble > 0 Then TxtCantidad.Text = "1"
|
||||
TxtPrecio.Focus()
|
||||
TxtPrecio.Text = "11"
|
||||
RegistraScript($"$('#{TxtPrecio.ClientID}').select();")
|
||||
|
||||
UpPS.Update()
|
||||
'LO DE ABAJO YA NO SE USA - ES VIEJO
|
||||
Exit Sub
|
||||
|
||||
@@ -21843,6 +21839,10 @@ Partial Class Ventas
|
||||
DivTransferencia.Visible = False
|
||||
End If
|
||||
TxtImporteContado.Text = TxtTotal.Text
|
||||
'SI ES MODALIDAD COBRANZA, NO MOSTRAR
|
||||
If (UsuarioActual.Empresa.Funcionalidad(109) = "1") Then
|
||||
DivContado.Visible = False
|
||||
End If
|
||||
End If
|
||||
TxtFechaPago.Text = NowADS().ToShortDateString
|
||||
'SI ES CONTADO EL METODO DE PAGO DEBE SER PUE
|
||||
@@ -35788,11 +35788,11 @@ Partial Class Ventas
|
||||
|
||||
If CveOsDetalle > 0 Then
|
||||
'MENSAJE PRINCIPAL
|
||||
Dim MensajeAlertOS As New StringBuilder
|
||||
MensajeAlertOS.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/><br/>", ObjOrdenServicio.Folio))
|
||||
'Dim MensajeAlertOS As New StringBuilder
|
||||
MensajeAlert.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/>", ObjOrdenServicio.Folio))
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
|
||||
Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
|
||||
Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga)
|
||||
'Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
|
||||
'Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga)
|
||||
Else
|
||||
errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
|
||||
Errores = True
|
||||
|
||||
Reference in New Issue
Block a user