Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -928,7 +928,7 @@ Public Class ClsAcumuladores
|
||||
#End Region
|
||||
|
||||
Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Decimal, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, Optional CveMovimiento As Integer = -1) As Boolean
|
||||
CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, FechaIng As DateTime, Optional CveMovimiento As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
|
||||
@@ -945,6 +945,7 @@ Public Class ClsAcumuladores
|
||||
.Add("@ImporteCompras", SqlDbType.Money).Value = ImporteCompras
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
|
||||
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -155,7 +155,7 @@ Public Class ClsMovimientos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCxCCliente(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveUsuarioRegistro As Integer, CveEmpresa As Integer, Optional TipoAgrupador As Integer = 1, Optional CveUsuarioConsulta As Integer = -1, Optional Cuenta As String = "-1") As Boolean
|
||||
Public Function GetCxCCliente(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveUsuarioRegistro As Integer, CveEmpresa As Integer, Optional TipoAgrupador As Integer = 1, Optional CveUsuarioConsulta As Integer = -1, Optional Cuenta As String = "-1", Optional EstatusFactura As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_Clientes")
|
||||
|
||||
@@ -169,8 +169,8 @@ Public Class ClsMovimientos
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@TipoAgrupador", SqlDbType.Int).Value = TipoAgrupador
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@Cuenta", SqlDbType.NVarChar).Value = Cuenta
|
||||
|
||||
.Add("@Cuenta", SqlDbType.NVarChar).Value = Cuenta
|
||||
.Add("@EstatusFactura", SqlDbType.Int).Value = EstatusFactura
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -5733,7 +5733,7 @@ Public Class ClsPaginas
|
||||
Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object)
|
||||
'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente
|
||||
Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks)
|
||||
Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(30), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
|
||||
Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(40), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
|
||||
'Session.Add(VSKey, pviewState) 'Store the ViewState on Cache
|
||||
ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey)
|
||||
|
||||
|
||||
@@ -361,7 +361,8 @@ Public Class ClsVentas
|
||||
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
|
||||
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1", Optional DevolucionImportePagado As Decimal = 0) As Boolean
|
||||
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
|
||||
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasAdd")
|
||||
@@ -459,6 +460,7 @@ Public Class ClsVentas
|
||||
.Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto
|
||||
|
||||
.Add("@DevolucionImportePagado", SqlDbType.Money).Value = DevolucionImportePagado
|
||||
.Add("@EsGarantia", SqlDbType.Bit).Value = EsGarantia
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
@@ -1601,7 +1603,7 @@ Public Class ClsVentas
|
||||
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer,
|
||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1,
|
||||
Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
|
||||
Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, Optional EsGarantia As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_GetRepPS")
|
||||
|
||||
@@ -1632,7 +1634,7 @@ Public Class ClsVentas
|
||||
.Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
|
||||
End With
|
||||
|
||||
@@ -1651,7 +1653,7 @@ Public Class ClsVentas
|
||||
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1,
|
||||
Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1,
|
||||
Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
|
||||
Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, Optional EsGarantia As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_GetRepPSDetalle")
|
||||
|
||||
@@ -1685,7 +1687,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClasificacionDetalle", SqlDbType.Int).Value = CveClasificacionDetalle
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2870,7 +2872,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUtilidadGet")
|
||||
|
||||
@@ -2885,6 +2887,7 @@ Public Class ClsVentas
|
||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2899,7 +2902,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUtilidadDetalleGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -2914,6 +2917,7 @@ Public Class ClsVentas
|
||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2931,7 +2935,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepVentasUtilidadGet")
|
||||
|
||||
@@ -2947,6 +2951,7 @@ Public Class ClsVentas
|
||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1488,7 +1488,7 @@ Namespace Modelos
|
||||
PedidoContrato:=factura.PedidoContrato, ObservacionesAlmacen:=factura.ObservacionesAlmacen, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33,
|
||||
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor) Then
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia) Then
|
||||
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
@@ -2078,7 +2078,7 @@ Namespace Modelos
|
||||
For Each RowSalida As DataRow In DtMovimientos.Rows
|
||||
Dim Cantidad As Decimal = RowSalida("Cantidad").ToString().ToDecimal() * -1
|
||||
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, RowSalida("CveTamaño").ToString.ToEntero, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "") Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, RowSalida("CveTamaño").ToString.ToEntero, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", factura.Fecha) Then
|
||||
Retorno = False
|
||||
Exit For
|
||||
End If
|
||||
@@ -2100,7 +2100,7 @@ Namespace Modelos
|
||||
For Each drow As DataRow In factura.DtDetalle.Rows
|
||||
If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, 2, factura.CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0D, "") Then
|
||||
UsuarioActual.CveEmpresa, 0D, "", factura.Fecha) Then
|
||||
Resultado = False
|
||||
Exit For
|
||||
End If
|
||||
@@ -2159,7 +2159,7 @@ Namespace Modelos
|
||||
If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then
|
||||
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Dr("Cantidad").ToString.ToDecimal(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, factura.Fecha, CveMovimiento:=CveMovimiento) Then
|
||||
' Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
Resultado = False
|
||||
Exit For
|
||||
@@ -6458,6 +6458,7 @@ Namespace Modelos
|
||||
End Property
|
||||
|
||||
Public Property MotivoDescuento As String = ""
|
||||
Public Property EsGarantia As Boolean
|
||||
|
||||
|
||||
#Region "Totales"
|
||||
|
||||
@@ -434,7 +434,7 @@ Public Class Timbrado
|
||||
End If
|
||||
#End Region
|
||||
|
||||
Dim conector As New Profact.TimbraCFDI33.Conector(AmbienteProductivo)
|
||||
Dim conector As New Profact.TimbraCFDI40.Conector(AmbienteProductivo)
|
||||
|
||||
If Not AmbienteProductivo Then
|
||||
conector.EstableceCredenciales("mvpNUXmQfK8=")
|
||||
@@ -442,8 +442,8 @@ Public Class Timbrado
|
||||
conector.EstableceCredenciales("vSGxMFWnNRy/nDoowxqrqw==|Sia123654")
|
||||
End If
|
||||
MsgCancelacion.AppendFormat("-3.2")
|
||||
Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacionAck
|
||||
resultadoCancelacion = conector.CancelaCFDIAck(RFCEmisor, FolioFiscal)
|
||||
Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacion
|
||||
resultadoCancelacion = conector.CancelaCFDI40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion)
|
||||
CancelacionFecha = Now
|
||||
Dim resp As Profact.TimbraCFDI.ResultadoConsulta
|
||||
resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal)
|
||||
@@ -474,7 +474,7 @@ Public Class Timbrado
|
||||
Else
|
||||
MsgCancelacion.AppendFormat("-3.5")
|
||||
CancelacionAcuse = resp.NumeroError
|
||||
CancelacionMensaje = resultadoCancelacion.Xml
|
||||
CancelacionMensaje = resultadoCancelacion.Descripcion
|
||||
Retorno = False
|
||||
End If
|
||||
|
||||
@@ -704,14 +704,14 @@ Public Class Timbrado
|
||||
Dim XMLString As String = $"<Envelope xmlns=""http://schemas.xmlsoap.org/soap/envelope/"">
|
||||
<Body>
|
||||
<cancelarConOpciones xmlns=""timbrado.ws.pade.mx"">
|
||||
<contrato xmlns="""">{contrato}</contrato>
|
||||
<usuario xmlns="""">{UsuarioServicio}</usuario>
|
||||
<passwd xmlns="""">{PassServicio}</passwd>
|
||||
<rfcEmisor xmlns="""">{rfcEmisor}</rfcEmisor>
|
||||
<arregloUUID xmlns="""">{arregloUUID}|{rfcReceptor}|{rfcEmisor}|{Total}</arregloUUID>
|
||||
<cert xmlns="""">{certBase64}</cert>
|
||||
<key xmlns="""">{keyBase64}</key>
|
||||
<keyPass xmlns="""">{keyPass}</keyPass>
|
||||
<contrato xmlns="""">{contrato}</contrato>
|
||||
<usuario xmlns="""">{UsuarioServicio}</usuario>
|
||||
<passwd xmlns="""">{PassServicio}</passwd>
|
||||
<rfcEmisor xmlns="""">{rfcEmisor}</rfcEmisor>
|
||||
<arregloUUID xmlns="""">{arregloUUID}|{rfcReceptor}|{rfcEmisor}|{Total}</arregloUUID>
|
||||
<cert xmlns="""">{certBase64}</cert>
|
||||
<key xmlns="""">{keyBase64}</key>
|
||||
<keyPass xmlns="""">{keyPass}</keyPass>
|
||||
<opciones xmlns="""">{If(TimbraProduccion, "", "MODO_PRUEBA:3")}</opciones>
|
||||
</cancelarConOpciones>
|
||||
</Body>
|
||||
|
||||
@@ -120,7 +120,7 @@ Public Class Timbres
|
||||
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
|
||||
If ObjGrales.GetGralTimbre(CveTimbre, Obj.TipoDocto, FI, FF, 0, UsuarioActual.CveEmpresa, -1) Then
|
||||
If ObjGrales.GetGralTimbre(CveTimbre, Obj.TipoDocto, FI, FF, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
|
||||
If ObjGrales.DtResultados.Rows.Count = 1 Then
|
||||
Dim DtMovimientos As DataTable = Nothing
|
||||
@@ -263,7 +263,7 @@ Public Class Timbres
|
||||
.Descripción = tPS,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.Dimensiones = "",
|
||||
.Dimensiones = drr("Dimensiones").ToString,
|
||||
.PesoenKg = drr("PesoKg").ToString.ToDecimal,
|
||||
.MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", ""),
|
||||
.ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
|
||||
|
||||
@@ -667,7 +667,13 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Conciliacion.rdlc", lrds, params, $"Conciliacion Bancaria {NombreMes} {txtFechaI.Text.ToDate.Year}", Formato)
|
||||
Dim Archivo As String = $"Empresas/{UsuarioActual.CveEmpresa}/Formatos/Conciliacion.rdlc"
|
||||
|
||||
If Not IO.File.Exists($"{Server.MapPath("~")}/{Archivo}") Then
|
||||
Archivo = "Empresas/Grales/Formatos/Conciliacion.rdlc"
|
||||
End If
|
||||
|
||||
ImprimirPDF(Archivo, lrds, params, $"Conciliacion Bancaria {NombreMes} {txtFechaI.Text.ToDate.Year}", Formato)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -44,7 +44,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
'Año actual
|
||||
DdlAnio.Items.Add(New ListItem(Now.Year.ToString(), Now.Year.ToString()))
|
||||
'Año Anterior
|
||||
DdlAnio.Items.Add(New ListItem(Now.AddYears(-1).Year.ToString(), Now.AddYears(1).Year.ToString()))
|
||||
DdlAnio.Items.Add(New ListItem(Now.AddYears(-1).Year.ToString(), Now.AddYears(-1).Year.ToString()))
|
||||
|
||||
For i = 1 To 12
|
||||
Dim fecha = New DateTime(DdlAnio.SelectedValue.ToEntero(), i, 1)
|
||||
|
||||
@@ -302,8 +302,8 @@ Partial Class Bancos_PopIEVentas
|
||||
Set(value As String)
|
||||
ViewState("SerieFolio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Private Property CveMonedaVenta As Integer
|
||||
Get
|
||||
Return ViewState("CveMonedaVenta").ToString.ToEntero
|
||||
@@ -728,6 +728,10 @@ Partial Class Bancos_PopIEVentas
|
||||
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
|
||||
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then 'codigo temporal. RMF permite cargar el corte
|
||||
CveCorte = dr("CveCorte").ToString.ToEntero
|
||||
End If
|
||||
|
||||
LblMetodoPAgo.Text = $"{dr("ClaveMetodoPagoSATStr").ToString() }"
|
||||
|
||||
'Configuración de Modalidad Update
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<div class="row">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Sucursal:
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="120px">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
@@ -105,27 +106,40 @@
|
||||
<li>Cliente:
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="min-width: 100px;"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList ID="DdlClientes" runat="server" CssClass="form-control select2me input-sm" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="120px"></asp:DropDownList>--%>
|
||||
</li>
|
||||
<li>Moneda:
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Width="80px">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Ver Por:
|
||||
<asp:DropDownList ID="DdlAgrupador" CssClass="select2me" runat="server" AppendDataBoundItems="true" Width="120px">
|
||||
<asp:ListItem Selected="True" Text="Sucursal" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Moneda" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Cuenta:
|
||||
<asp:Textbox runat="server" ID="TxtCuenta" Width="120px"/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Ver Por:
|
||||
<asp:DropDownList ID="DdlAgrupador" CssClass="select2me" runat="server" AppendDataBoundItems="true" Width="120px">
|
||||
<asp:ListItem Selected="True" Text="Sucursal" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Moneda" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Cuenta:
|
||||
<asp:Textbox runat="server" ID="TxtCuenta" Width="120px"/>
|
||||
</li>
|
||||
<li>Moneda:
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Width="80px">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Opción:
|
||||
<asp:DropDownList ID="DdlEstatusFactura" CssClass="select2me" runat="server" AppendDataBoundItems="true" Width="120px">
|
||||
<asp:ListItem Selected="True" Text="Solo vigentes" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Incluir en proceso cancelación" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -19,15 +19,17 @@ Partial Class Bancos_RepCxCCliente
|
||||
DdlMoneda.DataSource = GlobalDTMonedas()
|
||||
DdlMoneda.DataBind()
|
||||
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
Else
|
||||
DdlClientesWS.setEsWebService(False)
|
||||
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientesWS.DataBind()
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
|
||||
'Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
'If EsWS Then
|
||||
' DdlClientesWS.setEsWebService(True)
|
||||
'Else
|
||||
' DdlClientesWS.setEsWebService(False)
|
||||
' DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
' DdlClientesWS.DataBind()
|
||||
' DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'End If
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.DataBind()
|
||||
@@ -58,7 +60,8 @@ Partial Class Bancos_RepCxCCliente
|
||||
|
||||
Dim Cuenta As String = If(TxtCuenta.Text = "", "-1", TxtCuenta.Text)
|
||||
|
||||
If Mov.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue.ToEntero, UsuarioActual.CveUsuario, Cuenta:=Cuenta) Then
|
||||
If Mov.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1,
|
||||
UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue.ToEntero, UsuarioActual.CveUsuario, Cuenta:=Cuenta, EstatusFactura:=DdlEstatusFactura.SelectedValue.ToEntero) Then
|
||||
GvCxC.DataSource = Mov.DtResultados
|
||||
End If
|
||||
UsuarioActual.Sesion("CobroCliente-Sucursal") = DdlSubProyecto.SelectedValue
|
||||
|
||||
@@ -297,7 +297,7 @@ Partial Class PopUpVerFactura
|
||||
lrds.Add(rds)
|
||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Equipo GPS")
|
||||
ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Manifesto")
|
||||
End Sub
|
||||
Private Sub imprimirpallet2(cvePallet As Integer)
|
||||
Dim Envase As String = ""
|
||||
@@ -332,13 +332,14 @@ Partial Class PopUpVerFactura
|
||||
Dim tablaReporte As New DataTable
|
||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
ImprimirPDF("GPS/PalletEtiqueta2.rdlc", (New List(Of ReportDataSource)), params, "Equipo GPS")
|
||||
ImprimirPDF("GPS/PalletEtiqueta2.rdlc", (New List(Of ReportDataSource)), params, "Pallet")
|
||||
End Sub
|
||||
Private Sub imprimirpallet(cvePallet As Integer)
|
||||
Dim Envase As String = ""
|
||||
Dim Tamano As String = ""
|
||||
Dim Cultivo As String = ""
|
||||
Dim noPallet As String = ""
|
||||
Dim FormatoImpresion As String = ""
|
||||
|
||||
'Envase = "1 1/9"
|
||||
'Tamano = "Small"
|
||||
@@ -351,6 +352,7 @@ Partial Class PopUpVerFactura
|
||||
Tamano = row("Tamaño").ToString()
|
||||
Cultivo = row("Cultivo").ToString()
|
||||
noPallet = row("Codigo").ToString()
|
||||
FormatoImpresion = row("FormatoImpresion").ToString()
|
||||
|
||||
End If
|
||||
|
||||
@@ -360,10 +362,11 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Tamano", Tamano))
|
||||
params.Add(New ReportParameter("Cultivo", Cultivo))
|
||||
params.Add(New ReportParameter("noPallet", noPallet))
|
||||
params.Add(New ReportParameter("FormatoImpresion", FormatoImpresion))
|
||||
Dim tablaReporte As New DataTable
|
||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
ImprimirPDF("GPS/PalletEtiqueta.rdlc", (New List(Of ReportDataSource)), params, "Equipo GPS")
|
||||
ImprimirPDF("GPS/PalletEtiqueta.rdlc", (New List(Of ReportDataSource)), params, "Pallet Caja")
|
||||
End Sub
|
||||
#Region "U S U A R I O - T O K E N"
|
||||
|
||||
|
||||
@@ -524,7 +524,7 @@
|
||||
<BreakLocation>Start</BreakLocation>
|
||||
</PageBreak>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>7.61812in</Top>
|
||||
<Top>7.49312in</Top>
|
||||
<Left>0.20879in</Left>
|
||||
<Height>3.59384in</Height>
|
||||
<Width>7.78795in</Width>
|
||||
@@ -1058,7 +1058,7 @@
|
||||
</Image>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>3.95038in</Top>
|
||||
<Top>3.82538in</Top>
|
||||
<Left>0.05395in</Left>
|
||||
<Height>1.21305in</Height>
|
||||
<Width>8.22763in</Width>
|
||||
@@ -1086,32 +1086,6 @@
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>BDH Baterias Distribuciones de Hermosillo SA de CV</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>6.7pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>BBD021220APA</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>6.7pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
@@ -1153,10 +1127,10 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox32</rd:DefaultName>
|
||||
<Top>2.84726cm</Top>
|
||||
<Top>3.48226cm</Top>
|
||||
<Left>0.13011cm</Left>
|
||||
<Height>2.40928cm</Height>
|
||||
<Width>4.15958cm</Width>
|
||||
<Height>2.1447cm</Height>
|
||||
<Width>4.08234cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1178,7 +1152,7 @@
|
||||
<Value>= IIF(Parameters!Tipo.Value = "INGRESO","FACTURA","NOTA DE CRÉDITO")</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>14pt</FontSize>
|
||||
<FontSize>11pt</FontSize>
|
||||
<FontWeight>SemiBold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1198,7 +1172,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>Serie: </Value>
|
||||
<Value>Serie: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.16pt</FontSize>
|
||||
@@ -1213,6 +1187,14 @@
|
||||
<Color>Red</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>Red</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value> Folio: </Value>
|
||||
<Style>
|
||||
@@ -1446,9 +1428,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>0.05159in</Top>
|
||||
<Top>0.05022in</Top>
|
||||
<Left>5.03983in</Left>
|
||||
<Height>1.74708in</Height>
|
||||
<Height>1.62345in</Height>
|
||||
<Width>3.24175in</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
@@ -1558,7 +1540,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox40</rd:DefaultName>
|
||||
<Top>4.5675cm</Top>
|
||||
<Top>4.25cm</Top>
|
||||
<Left>13.31398cm</Left>
|
||||
<Height>1.42163cm</Height>
|
||||
<Width>7.72123cm</Width>
|
||||
@@ -2217,7 +2199,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DsOC</DataSetName>
|
||||
<Top>2.38003in</Top>
|
||||
<Top>2.25503in</Top>
|
||||
<Left>0.05854in</Left>
|
||||
<Height>0.34081in</Height>
|
||||
<Width>8.22304in</Width>
|
||||
@@ -2243,7 +2225,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>7.09581cm</Top>
|
||||
<Top>6.77831cm</Top>
|
||||
<Left>0.14868cm</Left>
|
||||
<Height>0.14316cm</Height>
|
||||
<Width>20.88652cm</Width>
|
||||
@@ -2274,7 +2256,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>7.86718cm</Top>
|
||||
<Top>7.54968cm</Top>
|
||||
<Left>15.09838cm</Left>
|
||||
<Height>0.14316cm</Height>
|
||||
<Width>5.93682cm</Width>
|
||||
@@ -2311,7 +2293,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>ImporteLetra</rd:DefaultName>
|
||||
<Top>3.18176in</Top>
|
||||
<Top>3.05676in</Top>
|
||||
<Left>2.30237in</Left>
|
||||
<Height>0.18861in</Height>
|
||||
<Width>5.97921in</Width>
|
||||
@@ -2341,7 +2323,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>9.82898cm</Top>
|
||||
<Top>9.51148cm</Top>
|
||||
<Left>0.13011cm</Left>
|
||||
<Height>0.1cm</Height>
|
||||
<Width>20.88652cm</Width>
|
||||
@@ -2372,7 +2354,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>13.2915cm</Top>
|
||||
<Top>12.974cm</Top>
|
||||
<Left>0.18043cm</Left>
|
||||
<Height>0.14316cm</Height>
|
||||
<Width>20.85477cm</Width>
|
||||
@@ -2406,7 +2388,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>7.3448cm</Top>
|
||||
<Top>7.0273cm</Top>
|
||||
<Left>5.62203cm</Left>
|
||||
<Height>0.34219cm</Height>
|
||||
<Width>9.30316cm</Width>
|
||||
@@ -2524,7 +2506,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>7.30953cm</Top>
|
||||
<Top>6.99203cm</Top>
|
||||
<Left>15.09838cm</Left>
|
||||
<Height>0.48004cm</Height>
|
||||
<Width>5.93682cm</Width>
|
||||
@@ -3022,7 +3004,7 @@
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>15.84926cm</Top>
|
||||
<Top>15.53176cm</Top>
|
||||
<Left>0.13702cm</Left>
|
||||
<Height>2.97096cm</Height>
|
||||
<Width>20.89818cm</Width>
|
||||
@@ -3297,7 +3279,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet3</DataSetName>
|
||||
<Top>2.88204in</Top>
|
||||
<Top>2.75704in</Top>
|
||||
<Left>0.05854in</Left>
|
||||
<Height>0.34081in</Height>
|
||||
<Width>2.08542in</Width>
|
||||
@@ -3315,7 +3297,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>"REVISAR SU FACTURA Y SUS PRODUCTOS AL MOMENTO DE RECIBIRLAS, YA QUE NO SE REALIZARAN CAMBIOS EN FACTURA </Value>
|
||||
<Value>"REVISAR SU FACTURA Y SUS PRODUCTOS AL MOMENTO DE RECIBIRLAS, YA QUE NO SE REALIZARAN CAMBIOS EN FACTURA.</Value>
|
||||
<Style>
|
||||
<FontFamily>myriad pro</FontFamily>
|
||||
<FontSize>6.5pt</FontSize>
|
||||
@@ -3344,7 +3326,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>8.71223cm</Top>
|
||||
<Top>8.39473cm</Top>
|
||||
<Height>1.07794cm</Height>
|
||||
<Width>20.85477cm</Width>
|
||||
<ZIndex>16</ZIndex>
|
||||
@@ -3467,7 +3449,7 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Line Name="Line4">
|
||||
<Top>15.01864cm</Top>
|
||||
<Top>14.70114cm</Top>
|
||||
<Left>14.38124cm</Left>
|
||||
<Height>0cm</Height>
|
||||
<Width>6.65396cm</Width>
|
||||
@@ -3498,7 +3480,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox39</rd:DefaultName>
|
||||
<Top>15.19503cm</Top>
|
||||
<Top>14.87753cm</Top>
|
||||
<Left>14.38124cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>6.65396cm</Width>
|
||||
@@ -3537,7 +3519,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox38</rd:DefaultName>
|
||||
<Top>13.57236cm</Top>
|
||||
<Top>13.25486cm</Top>
|
||||
<Left>14.38124cm</Left>
|
||||
<Height>0.67938cm</Height>
|
||||
<Width>6.65396cm</Width>
|
||||
@@ -3552,8 +3534,57 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox16">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>BDH</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
<Color>#000000</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value> Baterias Distribuciones de Hermosillo SA de CV</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
<Color>#000000</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox16</rd:DefaultName>
|
||||
<Top>2.16641cm</Top>
|
||||
<Left>0.13011cm</Left>
|
||||
<Height>1.21002cm</Height>
|
||||
<Width>4.23014cm</Width>
|
||||
<ZIndex>22</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>28.47838cm</Height>
|
||||
<Height>28.16088cm</Height>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -386,7 +386,8 @@ KM12 HERMOSILLO, SONORA</Value>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>0.36724cm</Top>
|
||||
<Top>0.1097cm</Top>
|
||||
<Left>0.17195cm</Left>
|
||||
<Height>7.13021cm</Height>
|
||||
<Width>6.00674cm</Width>
|
||||
<Style>
|
||||
@@ -776,11 +777,14 @@ KM12 HERMOSILLO, SONORA</Value>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>0.36724cm</Top>
|
||||
<Left>6.18313cm</Left>
|
||||
<Top>0.1097cm</Top>
|
||||
<Left>6.31984cm</Left>
|
||||
<Height>7.13021cm</Height>
|
||||
<Width>6.00674cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Parameters!FormatoImpresion.Value ="Sencillas"</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1168,8 +1172,8 @@ KM12 HERMOSILLO, SONORA</Value>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>7.5274cm</Top>
|
||||
<Left>0.13668cm</Left>
|
||||
<Top>7.4163cm</Top>
|
||||
<Left>0.17199cm</Left>
|
||||
<Height>7.13021cm</Height>
|
||||
<Width>6.00674cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
@@ -1560,11 +1564,14 @@ KM12 HERMOSILLO, SONORA</Value>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>7.5274cm</Top>
|
||||
<Top>7.4163cm</Top>
|
||||
<Left>6.31981cm</Left>
|
||||
<Height>7.13021cm</Height>
|
||||
<Width>6.00674cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Parameters!FormatoImpresion.Value ="Sencillas"</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1572,10 +1579,10 @@ KM12 HERMOSILLO, SONORA</Value>
|
||||
</Style>
|
||||
</Rectangle>
|
||||
</ReportItems>
|
||||
<Height>6.24016in</Height>
|
||||
<Height>5.84433in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>4.93458in</Width>
|
||||
<Width>5.09083in</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
@@ -1613,6 +1620,12 @@ KM12 HERMOSILLO, SONORA</Value>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="FormatoImpresion">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="logojam">
|
||||
|
||||
@@ -1790,7 +1790,6 @@ Partial Class General_SaldosIniciales
|
||||
Try
|
||||
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("Almacen <> ''", DistinctColumns:={"Almacen"}).Rows
|
||||
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString.Trim
|
||||
'Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
||||
Dim CveAlmacen As Integer = AlmacenRef.FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
||||
|
||||
If CveAlmacen > 0 Then
|
||||
@@ -1798,9 +1797,8 @@ Partial Class General_SaldosIniciales
|
||||
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
|
||||
If movimientoCabecera > 0 Then
|
||||
|
||||
|
||||
contadorMovimientos += 1
|
||||
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = '{almacenActual}'").Rows
|
||||
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"TRIM(Almacen) = '{almacenActual}'").Rows
|
||||
contadorMovimientos += 1
|
||||
Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
If RowPS IsNot Nothing Then
|
||||
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero
|
||||
@@ -1823,6 +1821,11 @@ Partial Class General_SaldosIniciales
|
||||
Throw New Exception()
|
||||
End If
|
||||
Next
|
||||
If contadorMovimientos = 0 Then
|
||||
mensajeError = $"No se encontraros registros del almacen: ""{almacenActual}"""
|
||||
Throw New Exception()
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
mensajeError = $"No se registró el encabezado ""{almacenActual}"""
|
||||
Throw New Exception()
|
||||
|
||||
@@ -783,7 +783,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}&CVETIMBRE={1}", CveMovimiento, drM("CveTimbre"))))
|
||||
Else
|
||||
HplDescargaPdf.Visible = True
|
||||
HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), "Tra")))
|
||||
HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}&CVETIMBRE={4}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), "Tra", drM("CveTimbre"))))
|
||||
|
||||
HplCartaPorte.Visible = True
|
||||
HplCartaPorte.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimiento)))
|
||||
@@ -3610,7 +3610,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
ObjInventario.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
||||
Dim CveVenta As Integer = ObjInventario.CveVenta
|
||||
Dim MovAlmacen As Boolean = True
|
||||
Dim MovAlmacen As Boolean = False
|
||||
|
||||
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & DdlConcepto.SelectedValue).ToEntero
|
||||
If OrigenMov = 1 Then MovAlmacen = False Else MovAlmacen = True
|
||||
|
||||
@@ -321,12 +321,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
DdlClientes.ddl.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlClientes.ddl.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveSubProyecto = 8804 Then
|
||||
StrAlmacenes = "CveTipoAlmacen IN (1,2,12)"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
||||
DdlAlmacen.SelectedValue = "-1"
|
||||
@@ -744,12 +741,13 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If TipoDocto.Contiene("Ing") AndAlso TipoMovimiento = 2 Then
|
||||
Dim DtMov As DataTable = DtExistencias.FiltraParametros("CveConcepto = 40", "", {"CveAlmacen"})
|
||||
If DtMov.Rows.Count > 0 AndAlso CveAlmacen <= 0 Then
|
||||
Dim CveAlmacenDev As Integer = DtMov.Rows(0)("CveAlmacen").ToString().ToEntero()
|
||||
DdlAlmacen.Items.Clear()
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveAlmacen = {CveAlmacenDev}")
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacenDev)
|
||||
Dim CveAlmacenDev As Integer = DtMov.Rows(0)("CveAlmacen").ToString().ToEntero()
|
||||
|
||||
'DdlAlmacen.Items.Clear()
|
||||
'DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveAlmacen = {CveAlmacenDev}")
|
||||
'DdlAlmacen.DataBind()
|
||||
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacenDev) ' se va a poder regresar en algun almacen diferente
|
||||
EsDevolucionDirecta = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -811,7 +811,7 @@
|
||||
<asp:Label Text="" ID="LbProducto" runat="server" />
|
||||
</td>
|
||||
<td width="120px"><b>Cantidad:</b></td>
|
||||
<td colspan="">
|
||||
<td >
|
||||
<asp:Label Text="" ID="LbCantidad" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
@@ -827,15 +827,11 @@
|
||||
<asp:RequiredFieldValidator ID="RFVSerie" runat="server" ControlToValidate="TxtSerie" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSerie"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerie" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="right">
|
||||
<asp:Button Text="Agregar" CssClass="btn btn-primary" ID="BtnAgregarPS" OnClick="BtnAgregarPS_Click" ValidationGroup="GrpAgregaSerie" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<td><asp:Button Text="Agregar" CssClass="btn btn-primary" ID="BtnAgregarPS" OnClick="BtnAgregarPS_Click" ValidationGroup="GrpAgregaSerie" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<asp:GridView ID="GvSerie" runat="server" EmptyDataText="Aun no hay registros." DataKeyNames="Serie" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="100" data-freezerows="1" GridLines="None">
|
||||
<asp:GridView ID="GvSerie" runat="server" EmptyDataText="Aun no hay registros." DataKeyNames="Serie" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="250" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Serie-Folio" DataField="Serie" ItemStyle-Width="40%" />
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
||||
|
||||
@@ -1869,7 +1869,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If MensajeSinExistencias.ToString <> "" Then
|
||||
Alert($"Las siguientes Series no cuentan con la existencia suficiente por lo cual se omitieron. <br?><br/> {MensajeSinExistencias.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
RegistraScript("playsonidito('beep-07.wav')", "SoniditoSerie")
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -3226,7 +3227,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
''VALIDACIÓN DE IMPORTES INGRESADOS VS LA COMPRA U OC
|
||||
'If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If Not ErrorMovInv AndAlso RecibidaCompleta Then
|
||||
If Not ErrorMovInv AndAlso RecibidaCompleta AndAlso UsuarioActual.CveEmpresa <> 140 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoOriginal, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtt As DataTable = ObjInventario.DtResultados
|
||||
Dim tTotalInsertado As Decimal = dtt.SUMD("TotalOriginal") + ImporteIngresoAdicional
|
||||
|
||||
@@ -15,6 +15,15 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
Private _dtDatos As DataTable
|
||||
|
||||
Public Property DtClientes() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtClientes"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtClientes") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DtMovimientos() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtMovimientos"), DataTable)
|
||||
@@ -331,6 +340,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaInicial()
|
||||
GeneraRNCFromURL()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -405,7 +415,76 @@ Partial Class Inventarios_RecepcionUsados
|
||||
'DdlProducto2.setEsWebService(True)
|
||||
'DdlProducto2.Attributes.Add("data-metodo", "getpsusados")
|
||||
End Sub
|
||||
Private Sub GeneraRNCFromURL()
|
||||
Dim RFC As String = IfNull(Request("RFC"), "").ToString()
|
||||
Dim CveAlmacen As Integer = IfNull(Request("CveAlmacen"), "-1").ToString().ToEntero()
|
||||
Dim Cantidad As Decimal = IfNull(Request("Cantidad"), "0").ToString().ToDecimal()
|
||||
Dim Fecha As DateTime = IfNull(Request("Fecha"), Now.ToString("dd/MM/yyyy")).ToString().ToDateTime()
|
||||
|
||||
If Not String.IsNullOrEmpty(RFC) Then
|
||||
If DtClientes Is Nothing Then
|
||||
Alert("No se encontraron clientes para filtrar", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim RowCliente = DtClientes.FiltroPrimero(String.Format("RFC='{0}'", RFC))
|
||||
If RowCliente Is Nothing Then
|
||||
Alert("No se encontro el cliente", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If CveAlmacen <= 0 Then
|
||||
Alert("Es necesario especificar el almacen", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Cantidad <= 0 Then
|
||||
Alert("Es necesario especificar la cantidad", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveCliente As Integer = RowCliente("CveCliente").ToString().ToEntero()
|
||||
|
||||
DdlClientes.SelectedValueExist(CveCliente)
|
||||
DdlClientes_SelectedIndexChanged(DdlClientes, EventArgs.Empty)
|
||||
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacen)
|
||||
TxtFecha.Text = Fecha.ToString("dd/MM/yyyy")
|
||||
|
||||
|
||||
Dim CvePS As Integer = 403591 'EXTRA CHICO
|
||||
Dim CveTamanio As Integer = 1
|
||||
Dim CveUM As Integer = -1
|
||||
Dim PU As Decimal = 0
|
||||
Dim RowTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={CvePS}")
|
||||
Dim CodigoPS As String = ""
|
||||
Dim UnidaMedida As String = ""
|
||||
|
||||
If RowTamanio IsNot Nothing Then
|
||||
PU = RowTamanio("Cargo").ToString.ToDecimal()
|
||||
CodigoPS = RowTamanio("CodigoPS").ToString()
|
||||
CveTamanio = RowTamanio("CveTamaño").ToString().ToEntero()
|
||||
CveUM = RowTamanio("CveUM").ToString().ToEntero()
|
||||
UnidaMedida = "" 'RowTamanio("UnidadMedida").ToString()
|
||||
|
||||
AddNew(CvePS, CodigoPS, CveUM, UnidaMedida, Cantidad, PU, "", "-1", "-1", "-1", "", "", -1, "", "", CveTamanio)
|
||||
|
||||
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
|
||||
CreaRemisionNC(CveCliente, CveSubProyecto, 1)
|
||||
|
||||
If Me.ObjRemisionNC IsNot Nothing Then
|
||||
Guardar(True)
|
||||
Else
|
||||
Alert("No se pudo generar la RNC", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
Alert("No se encontro el tamaño", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " PERMISOS PAGINAS "
|
||||
@@ -1165,7 +1244,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then
|
||||
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, Now, CveMovimiento:=CveMovimiento) Then
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -1850,9 +1929,11 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
#Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED"
|
||||
Private Sub InicializaClientes(Todos As Boolean)
|
||||
DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros(If(Todos, "", "EsDistribuidor = 1"))
|
||||
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros(If(Todos, "", "EsDistribuidor = 1"))
|
||||
DdlClientes.DataSource = DtClientes
|
||||
DdlClientes.DataBind()
|
||||
|
||||
DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClientes.SelectedValue = "-1"
|
||||
|
||||
@@ -2219,11 +2300,12 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Me.ObjRemisionNC.TipoDocto = "RNC"
|
||||
Me.ObjRemisionNC.RefDocto = ""
|
||||
Me.ObjRemisionNC.CveMesa = -1
|
||||
Me.ObjRemisionNC.Fecha = Now
|
||||
Dim Fecha As DateTime = TxtFecha.Text.ToDateTime()
|
||||
Me.ObjRemisionNC.Fecha = Fecha
|
||||
Me.ObjRemisionNC.CvePrePoliza = -1
|
||||
Me.ObjRemisionNC.FechaPago = Now
|
||||
Me.ObjRemisionNC.FechaPago = Fecha
|
||||
Me.ObjRemisionNC.MotivoDescuento = ""
|
||||
Me.ObjRemisionNC.FechaEjecucion = Now
|
||||
Me.ObjRemisionNC.FechaEjecucion = Fecha
|
||||
Me.ObjRemisionNC.UsuarioCreo = UsuarioActual.Usuario
|
||||
Me.ObjRemisionNC.CveCondicionEntrega = -1
|
||||
Me.ObjRemisionNC.CondicionEntrega = ""
|
||||
|
||||
@@ -186,10 +186,20 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveCategoria:=DdlCategoria.SelectedValue.ToEntero)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
CargaClasificaciones()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClasificaciones(CveCategoria As Integer)
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="LnkCargarExcel" runat="server" NavigateUrl="#" data-toggle="modal" data-target="#DivCargaExcelConceptos" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color: #686868;"></i> Cargar Conceptos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:Linkbutton ID="HplCargaBitacora" runat="server" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-file-load-o" style="color: #686868;"></i> Cargar Bitácora</asp:Linkbutton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
@@ -159,6 +159,15 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ViewState("FolioBusqueda") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ArchivoBitacora As String
|
||||
Get
|
||||
Return CType(ViewState("ArchivoBitacora"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ArchivoBitacora") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -173,6 +182,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
RVFechaRecepcion.MaximumValue = Now.ToShortDateString
|
||||
Folio = 0
|
||||
CveMovimientoTimbrado = -1
|
||||
ArchivoBitacora = UsuarioActual.Empresa.Ruta & "Temp\Traspaso_" & UsuarioActual.CveUsuario & ".xml"
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
divGastoIndirecto.Visible = False
|
||||
@@ -287,6 +297,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
dt.Columns.Add("Embalaje")
|
||||
dt.Columns.Add("PesoKg", Type.GetType("System.Decimal"))
|
||||
|
||||
dt.TableName = "TablaTraspaso"
|
||||
|
||||
DtMovimientos = dt
|
||||
|
||||
@@ -701,10 +712,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
DtMovimientos.Rows.Add(registro)
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
|
||||
IO.Path.GetDirectoryName(ArchivoBitacora).DirectoryExistsCreate 'verifica que exista la ruta
|
||||
ActualizaBitacora()
|
||||
End If
|
||||
|
||||
|
||||
CargaGvDatos()
|
||||
|
||||
If Limpia Then
|
||||
@@ -715,6 +726,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
TxtnSerie.Focus()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ActualizaBitacora(Optional Eliminar As Boolean = False)
|
||||
If Not Eliminar Then
|
||||
DtMovimientos.WriteXml(ArchivoBitacora, XmlWriteMode.WriteSchema)
|
||||
Else
|
||||
File.Delete(ArchivoBitacora)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiaAgregar()
|
||||
'DdlClasificacion.SelectedValue = "-1"
|
||||
@@ -857,7 +876,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim FechaCaducidad As Date
|
||||
|
||||
Dim TextoExistencia As StringBuilder = New StringBuilder
|
||||
Dim Existencia As Double
|
||||
Dim Existencia As Decimal
|
||||
Dim CantidadenGrid As Decimal
|
||||
TextoExistencia.Append("Los siguiente productos se ajustaron por falta de existencia:<br/>")
|
||||
If Not CargadoDeMov Then
|
||||
@@ -884,7 +903,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
CantidadenGrid = DtMovimientos.SUMD("Cantidad", String.Format("CvePS = {0} AND CveUM = {1} {2} {3} {4} ", dr("CvePS"), dr("CveUM"), If(Not dr("Serie").ToString.Contiene("-1", ""), $" AND Serie = '{dr("Serie")}'", ""), tLote, tFechaCaducidad))
|
||||
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
|
||||
'Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
||||
@@ -892,12 +911,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero))
|
||||
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||
If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") Then
|
||||
If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") OrElse (Serie <> "-1" AndAlso Serie <> "") Then
|
||||
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
ExistenciaEspecificada = ObjInventario.DtResultados.FiltroPrimeroValor("Existencia", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
|
||||
'ExistenciaEspecificada = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
||||
Existencia = ExistenciaEspecificada - CantidadenGrid
|
||||
End If
|
||||
|
||||
@@ -1357,8 +1374,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ChkTransitorio.Enabled = True
|
||||
TxtGastoIndirecto.Text = ""
|
||||
|
||||
|
||||
|
||||
DivMov.Visible = False
|
||||
CargadoDeMov = False
|
||||
|
||||
@@ -1366,6 +1381,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
UpMov.Update()
|
||||
|
||||
DtMovimientos.Rows.Clear()
|
||||
ActualizaBitacora()
|
||||
CargaGvDatos()
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -1479,9 +1495,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||
|
||||
GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||
TdSerie.Visible = GvDatos.Columns(5).Visible : ThSerie.Visible = GvDatos.Columns(5).Visible
|
||||
GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||
TdLote.Visible = GvDatos.Columns(6).Visible : ThLote.Visible = GvDatos.Columns(6).Visible
|
||||
GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
TdFechaCaducidad.Visible = GvDatos.Columns(7).Visible : ThFechaCaducidad.Visible = GvDatos.Columns(7).Visible
|
||||
GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
|
||||
''TxtnSerie.Visible = False
|
||||
@@ -1583,6 +1602,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
DbRow = DtMovimientos.Rows(e.RowIndex)
|
||||
|
||||
DtMovimientos.Rows.Remove(DbRow)
|
||||
ActualizaBitacora()
|
||||
CargaGvDatos()
|
||||
End Sub
|
||||
|
||||
@@ -3059,6 +3079,17 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub HplCargaBitacora_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If IO.File.Exists(ArchivoBitacora) Then
|
||||
DtMovimientos.ReadXml(ArchivoBitacora)
|
||||
CargaGvDatos()
|
||||
Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion)
|
||||
Else
|
||||
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
|
||||
<asp:GridView ID="GVCalculoISRAnual" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD GVCalculoISRAnual Widthall" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePersonal,Codigo,NombreCompleto,TipoIngreso,FechaInicio,IngresosTotales,BaseGravada,Deducciones,ISRRetenido,Art152,SubsCorrespondiente,LimiteInferior,LimiteSuperior,CuotaFija,Porcentaje,ImpuestoAnual,Acargo,Acompensar">
|
||||
DataKeyNames="CvePersonal,Codigo,NombreCompleto,TipoIngreso,FechaInicio,FechaFin,IngresosTotales,BaseGravada,Deducciones,ISRRetenido,Art152,SubsCorrespondiente,LimiteInferior,LimiteSuperior,CuotaFija,Porcentaje,ImpuestoAnual,Acargo,Acompensar">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Aplica">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -72,15 +72,30 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
||||
|
||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||
var libro = wb.AddWorksheet("Asistencia");
|
||||
int column = 1;
|
||||
|
||||
int row = 1;
|
||||
string imagePath = string.Format("{0}{1}\\Logo.png", ModExtensiones.DirectorioEmpresas, UsuarioActual.CveEmpresa);
|
||||
if (System.IO.File.Exists(imagePath))
|
||||
{
|
||||
var image = libro.AddPicture(imagePath)
|
||||
.MoveTo(libro.Cell(row, 2))//, libro.Cell(row, 5));
|
||||
.Scale(.8);
|
||||
}
|
||||
row++;
|
||||
libro.Range(row, 3, row, 5).Merge().Value = UsuarioActual.Empresa.Empresa;
|
||||
row++;
|
||||
libro.Range(row, 3, row, 5).Merge().Value = string.Format("Calculo I.S.R anual del ejercicio {0}", DdlEjercicios.SelectedValue);
|
||||
|
||||
row++;
|
||||
row++;
|
||||
int column = 1;
|
||||
libro.Cell(row, column++).Value = "Aplica";
|
||||
libro.Cell(row, column++).Value = "Causa";
|
||||
libro.Cell(row, column++).Value = "Código";
|
||||
libro.Cell(row, column++).Value = "Nombre";
|
||||
libro.Cell(row, column++).Value = "Tipo ingreso";
|
||||
libro.Cell(row, column++).Value = "Fecha ingreso";
|
||||
libro.Cell(row, column++).Value = "Fecha baja";
|
||||
libro.Cell(row, column++).Value = "Ingresos totales";
|
||||
libro.Cell(row, column++).Value = "Base gravada";
|
||||
libro.Cell(row, column++).Value = "Base exenta";
|
||||
@@ -93,6 +108,7 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
||||
libro.Range(row, 1, row, column - 1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Range(row, 1, row, column - 1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
row++;
|
||||
int initrowdata = row;
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.CalculoISRAnual(DdlEjercicios.SelectedValue.ToEntero(), UsuarioActual.Empresa.CveEmpresa) && onom.DtResultados.Rows.Count > 0)
|
||||
@@ -105,7 +121,9 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
||||
libro.Cell(row, column++).Value = drow["causa"];
|
||||
libro.Cell(row, column++).Value = drow["Codigo"];
|
||||
libro.Cell(row, column++).Value = drow["NombreCompleto"];
|
||||
libro.Cell(row, column++).Value = string.Format("{0} - {1:dd/MM/yyyy}", drow["TipoIngreso"], drow["FechaInicio"]);
|
||||
libro.Cell(row, column++).Value = string.Format("{0}", drow["TipoIngreso"], drow["FechaInicio"]);
|
||||
libro.Cell(row, column++).Value = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
|
||||
libro.Cell(row, column++).Value = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
|
||||
libro.Cell(row, column++).Value = drow["IngresosTotales"];
|
||||
libro.Cell(row, column++).Value = drow["BaseGravada"];
|
||||
libro.Cell(row, column++).Value = drow["BaseExcenta"];
|
||||
@@ -120,12 +138,12 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
libro.SheetView.Freeze(1, 4);
|
||||
libro.SheetView.Freeze(initrowdata-1, 5);
|
||||
libro.ColumnsUsed().AdjustToContents();
|
||||
libro.Range(1, 6, 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
libro.Range(2, 6, row, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;
|
||||
libro.Range(2, 6, row, column).SetDataType(ClosedXML.Excel.XLDataType.Number);
|
||||
libro.Range(2, 6, row, column).Style.NumberFormat.Format = "$#,###,###,###,###,###,0.00";
|
||||
libro.Range(initrowdata-1, 6, initrowdata-1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
libro.Range(initrowdata, 8, row, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;
|
||||
libro.Range(initrowdata, 8, row, column).SetDataType(ClosedXML.Excel.XLDataType.Number);
|
||||
libro.Range(initrowdata, 8, row, column).Style.NumberFormat.Format = "$#,###,###,###,###,###,0.00";
|
||||
|
||||
|
||||
System.IO.Stream fs = new System.IO.MemoryStream();
|
||||
@@ -146,6 +164,7 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
||||
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "Calculo Anual"));
|
||||
Response.BinaryWrite(memoryStream.ToArray());
|
||||
Response.End();
|
||||
//Alert(string.Format("<pre> {0} {1}</pre>",imagePath, System.IO.File.Exists(imagePath)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ Partial Class Site
|
||||
MenuHTML.AppendFormat("<li id='m{3}'><a href='{0}'>{2}{1}<span class='arrow '></span> </a><ul class='sub-menu'>", LinkHijo, drH("Modulo"), If(drP("Estilo").ToString() <> "", String.Format("<i class='{0}'></i>", drH("Estilo")), ""), drH("CveModulo"))
|
||||
For Each drN As DataRow In Nietos
|
||||
LinkNieto = drN("LIGA").ToString()
|
||||
If (drH("IsAngular").ToString() = "1") Then
|
||||
If (drN("IsAngular").ToString() = "1") Then
|
||||
LinkNieto = String.Format("{1}:84{0}", drN("LIGA"), strdomain)
|
||||
End If
|
||||
If CveModulo = drN("CveModulo").ToString().ToEntero Then
|
||||
|
||||
@@ -64,20 +64,20 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAutorizacion,CveCliente,CveVendedor,Importe"
|
||||
EmptyDataText="No se encontraron autorizaciones" ToolTip="Listado de autorizaciones"
|
||||
EmptyDataText="No se encontraron autorizaciones" ToolTip=""
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
<asp:BoundField DataField="Importe" ItemStyle-Width="15%" HeaderText="Importe" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="15%" HeaderText="Limite Credito" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Saldo" ItemStyle-Width="15%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="15%" />
|
||||
<asp:BoundField DataField="Importe" ItemStyle-Width="15%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="10%" HeaderText="Limite Credito" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Saldo" ItemStyle-Width="10%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="TipoAutorizacionTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="15%" HeaderText="Dias Vencidos" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo Documento" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="Dias Vencidos" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" Text='<%# Eval("Estatus") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -24,21 +24,25 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
#End Region
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
Private Sub CargaCombos()
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
Private Sub CargaCombos()
|
||||
|
||||
DdlCliente.setEsWebService(True)
|
||||
DdlClienteFiltro.setEsWebService(True)
|
||||
|
||||
'Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
'If EsWS Then
|
||||
DdlCliente.setEsWebService(True)
|
||||
DdlClienteFiltro.setEsWebService(True)
|
||||
Else
|
||||
DdlCliente.setEsWebService(False)
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
' DdlCliente.setEsWebService(True)
|
||||
' DdlClienteFiltro.setEsWebService(True)
|
||||
'Else
|
||||
' DdlCliente.setEsWebService(False)
|
||||
' DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
' DdlCliente.DataBind()
|
||||
' DdlCliente.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -494,7 +494,7 @@
|
||||
<tr align="left" id="TrServicioDomicilio" runat="server" visible="false">
|
||||
<td><b>Servicio a Domicilio:</b> </td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkServicioDomicilio" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" />
|
||||
<asp:CheckBox ID="ChkServicioDomicilio" runat="server" AutoPostBack="true" OnCheckedChanged="ChkServicioDomicilio_CheckedChanged" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -928,7 +928,7 @@
|
||||
</div>
|
||||
<div class=" col-sm-8">
|
||||
<div class="Widthall" style="overflow-x: auto;">
|
||||
<asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="false" DataKeyNames="Origen,CvePS" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover" Style="text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="false" DataKeyNames="Consec,Origen,CodigoPS,CvePS,Serie,AplicaSerie" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -2790,21 +2790,22 @@
|
||||
<div class="col-md-4">
|
||||
<label>Año:</label>
|
||||
<br />
|
||||
<asp:TextBox ID="TxtAnioVehiculo" type="number" runat="server" Height="100%" Width="100%" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtAnioVehiculo" type="number" runat="server" Height="100%" Width="100%" CssClass="form-control" ></asp:TextBox>
|
||||
<asp:CustomValidator ID="CVAnio" runat="server" ClientValidationFunction="ValidaAnioVehiculo" ValidateEmptyText="true" ControlToValidate="TxtAnioVehiculo" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label>Usado:</label>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlRecepcionUsados" CssClass="form-control input-sm select2me" runat="server" CausesValidation="true" DataTextField="CodigoPS" DataValueField="CvePSCargo" Width="100%" OnSelectedIndexChanged="DdlRecepcionUsados_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:DropDownList ID="DdlRecepcionUsados" CssClass="form-control input-sm select2me" runat="server" DataTextField="CodigoPS" DataValueField="CvePSCargo" Width="100%" OnSelectedIndexChanged="DdlRecepcionUsados_SelectedIndexChanged" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>BCI:</label>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlBCIUsado" CssClass="form-control input-sm select2me" runat="server" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -2813,6 +2814,7 @@
|
||||
<asp:DropDownList ID="DdlMarcaUsado" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarcaUsado" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Marca" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:CustomValidator ID="RFVMarcaUsado" runat="server" ClientValidationFunction="ValidaMarcaUsado" ControlToValidate="DdlMarcaUsado" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
|
||||
<label for="<%= DdlMarcaUsado.ClientID.ToString()%>">Marca:</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2969,6 +2971,8 @@
|
||||
<asp:DropDownList ID="DdlBCIAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlBCIAjuste.ClientID.ToString()%>">BCI:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVBCIAjuste" runat="server" ControlToValidate="DdlBCIAjuste" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''BCI''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEBCIAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVBCIAjuste" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -3135,8 +3139,7 @@
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpAgregar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%-- <asp:Button ID="BtnCalculaMesesUso" Text="" OnClick="BtnCalculaMesesUso_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%>
|
||||
<asp:Button ClientIDMode="Static" ID="LnkAgregarPS" OnClick="LnkAgregarPS_Click" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpAddVenta" UseSubmitBehavior="false" />
|
||||
<asp:Button ID="LnkAgregarPS" OnClick="LnkAgregarPS_Click" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpAddVenta" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -3176,6 +3179,26 @@
|
||||
}
|
||||
});
|
||||
|
||||
function ValidaMarcaUsado(val, args) {
|
||||
//VALIDA SOLO SI SE SELECCIONO UN USADO
|
||||
var cveUsado = ToDouble($get("C_DdlRecepcionUsados").value);
|
||||
if (cveUsado > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
} else {
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaAnioVehiculo(val, args) {
|
||||
//VALIDA SOLO SI SE SELECCIONO UN USADO
|
||||
var cveUsado = ToDouble($get("C_DdlRecepcionUsados").value);
|
||||
if (cveUsado > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
} else {
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidarCodigoEnsamble(source, arguments) {
|
||||
let CveMarca = HdnPSAjusteMarca.value;
|
||||
let CveClasificacion = HdnPSAjusteClasificacion.value;
|
||||
|
||||
@@ -3067,7 +3067,7 @@ Partial Class PV
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'SERIE ALMACEN
|
||||
If e.Row.DBCampo("CveTipoInvPS").ToEntero = 5 Then
|
||||
If e.Row.DBCampo("CveTipoInvPS").ToEntero = 5 OrElse CBool(e.Row.DBCampo("AplicaSerie")) Then
|
||||
If CveVenta > 0 Then
|
||||
e.Row.FCLiteral("LtlSerie").Visible = True
|
||||
Else
|
||||
@@ -3198,6 +3198,27 @@ Partial Class PV
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso ddlAlmacen.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe seleccionar un almacen de servicio a domicilio.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) <= 0 Then
|
||||
Alert("Debe tener producto seleccionados para servicio a domicilio.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
|
||||
For Each GvRow As GridViewRow In GvInv.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If String.IsNullOrEmpty(GvRow.FCTextBox("TxtSerie").Text.Trim) AndAlso CBool(GvRow.DataKey("AplicaSerie")) Then
|
||||
Alert(String.Format("El producto {0} requiere serie.", GvRow.DataKey("CodigoPS")), TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'VALIDA PRECIO AL AGREGAR A ALMACEN
|
||||
If Not UsuarioActual.TienePermisoProceso(169) Then
|
||||
If Not CveContrato > 0 Then
|
||||
@@ -3463,255 +3484,274 @@ Partial Class PV
|
||||
#Region "OBJETO VENTA"
|
||||
|
||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False)
|
||||
|
||||
If Me.CveVenta > 0 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
|
||||
Else
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual)
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
End If
|
||||
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
ObjFactura.TipoCambio = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
ObjFactura.TipoCambioDolares = TxtTipoCambioDlls.Text.Trim.ToDecimal
|
||||
ObjFactura.ConvertirPesos = ChkConvertirDoctoPesos.Checked
|
||||
ObjFactura.ConvertirDolares = ChkConvertirDolares.Checked
|
||||
ObjFactura.CveMoneda = DdlMoneda.SelectedValue.ToEntero
|
||||
ObjFactura.Moneda = DdlMoneda.SelectedItem.Text
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
|
||||
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString.ToEntero > 0, "Ing", DdlTipoComprobante.SelectedValue)
|
||||
'ObjFactura.RefDocto = TxtDocto.Text.Trim
|
||||
ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero, -1)
|
||||
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero, -1)
|
||||
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
|
||||
ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
|
||||
ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero
|
||||
ObjFactura.MetodoPago = DdlMetodoPago.SelectedItem.Text
|
||||
ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {DdlMetodoPago.SelectedValue}")
|
||||
ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFactura.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero
|
||||
ObjFactura.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero > 0, DdlMetodoPago33.SelectedItem.Text, "")
|
||||
ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}")
|
||||
|
||||
ObjFactura.CveFormaPago33 = DdlFormaPago33.SelectedValue.ToEntero
|
||||
ObjFactura.FormaPago33 = If(DdlFormaPago33.SelectedValue.ToEntero > 0, DdlFormaPago33.SelectedItem.Text, "")
|
||||
ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {DdlFormaPago33.SelectedValue}")
|
||||
|
||||
ObjFactura.CveUsoCFDI = DdlUsoCFDI.SelectedValue.ToEntero
|
||||
ObjFactura.UsoCFDI = If(DdlUsoCFDI.SelectedValue.ToEntero > 0, DdlUsoCFDI.SelectedItem.Text, "")
|
||||
ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}")
|
||||
|
||||
ObjFactura.UsuarioCreo = LblUsuario.Text.Trim
|
||||
|
||||
ObjFactura.CveCondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedValue.ToEntero, -1)
|
||||
ObjFactura.CondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedItem.Text, "")
|
||||
ObjFactura.CondicionesPago = If(RBLPago.SelectedValue = "2", 0, If(RBLPago.SelectedValue = "1", 1, 2)) ' 0 - Contado, 1 - Credito, 2 - termianl
|
||||
ObjFactura.FormaPago = DdlFormaPago.SelectedValue.ToEntero
|
||||
|
||||
Select Case ObjFactura.TipoDocto
|
||||
Case "Ing"
|
||||
ObjFactura.TipoDocumento = "Factura"
|
||||
Case "Rem"
|
||||
ObjFactura.TipoDocumento = "Remision"
|
||||
Case "Cot"
|
||||
ObjFactura.TipoDocumento = "Cotizacion"
|
||||
Case "Egs"
|
||||
ObjFactura.TipoDocumento = "Nota de Crédito"
|
||||
Case "Dev"
|
||||
ObjFactura.TipoDocumento = "Nota de Devolución"
|
||||
Case Else
|
||||
ObjFactura.TipoDocumento = ""
|
||||
End Select
|
||||
|
||||
|
||||
ObjFactura.Fech1 = Now
|
||||
ObjFactura.Fech2 = Now
|
||||
ObjFactura.Fech3 = Now
|
||||
ObjFactura.Alfa1 = ""
|
||||
ObjFactura.Alfa2 = ""
|
||||
ObjFactura.Alfa3 = ""
|
||||
ObjFactura.Num1 = 0
|
||||
ObjFactura.Num2 = 0
|
||||
ObjFactura.Num3 = DdlOrdenPago.SelectedValue.ToDouble
|
||||
ObjFactura.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFactura.CveCorte = CveCorte
|
||||
ObjFactura.CveMesa = -1
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
||||
ObjFactura.Entrega = Entrega
|
||||
ObjFactura.Vigencia = Now
|
||||
|
||||
ObjFactura.CveVentaPadre = If(CveDevolucion > 0, CveDevolucion, CvePedido)
|
||||
ObjFactura.CveVendedor = DdlVendedor.SelectedValue.ToEntero
|
||||
If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
ObjFactura.FechaEjecucion = Now
|
||||
|
||||
ObjFactura.CveSucursalEjecucion = DdlSubProyectoDatos.SelectedValue.ToEntero
|
||||
ObjFactura.CveSucursalCobranza = -1
|
||||
|
||||
ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero
|
||||
ObjFactura.CveSubProyectoEjecucion = DdlSubProyectoDatos.SelectedValue.ToEntero
|
||||
ObjFactura.CveSubProyectoCobranza = -1
|
||||
|
||||
ObjFactura.AtencionA = If(ObjFactura.TipoDocto = "Cot", TxtAtencionA.Text, "-1")
|
||||
ObjFactura.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
||||
ObjFactura.Observaciones = TxtObsFact.Text.Trim
|
||||
ObjFactura.Det_OrdenCompra = ""
|
||||
ObjFactura.Det_FechaOrdenCompra = MinFecha.ToShortDateString
|
||||
ObjFactura.MonedaAbreviatura = ""
|
||||
|
||||
'Totales, Y se llena TmpDTImpuestos
|
||||
ObjFactura.SubTotal = TxtSubTotal.Text.ToDecimal
|
||||
ObjFactura.Descuento = LblDescuentos.Text.Trim.ToDecimal
|
||||
ObjFactura.Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
|
||||
ObjFactura.IVA = TxtIVA.Text.ToDecimal
|
||||
ObjFactura.RetIVA = TxtRetIVA.Text.ToDecimal
|
||||
ObjFactura.RetISR = TxtRetISR.Text.ToDecimal
|
||||
ObjFactura.IEPS = TxtIEPS.Text.ToDecimal
|
||||
ObjFactura.Total = TxtTotal.Text.ToDecimal
|
||||
|
||||
ObjFactura.DtDeduccion = New DataTable
|
||||
|
||||
'OTROS
|
||||
ObjFactura.Det_FechaOrdenCompra = ""
|
||||
ObjFactura.Det_OrdenCompra = ""
|
||||
|
||||
ObjFactura.CveNCaVincular = DdlNCFactura.SelectedValue.ToEntero
|
||||
|
||||
If ObjFactura.CveMoneda <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
|
||||
ObjFactura.TipoCambio = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
ObjFactura.CveMoneda = 1
|
||||
|
||||
ObjFactura.Moneda = "Pesos"
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
|
||||
End If
|
||||
|
||||
If ObjFactura.CveMoneda <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||
ObjFactura.TipoCambio = TxtTipoCambioDlls.Text.Trim.ToDecimal
|
||||
ObjFactura.CveMoneda = 2
|
||||
|
||||
ObjFactura.Moneda = "Dólares"
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
|
||||
End If
|
||||
|
||||
'Se agrega CveVenta -1
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Row("CveVenta") = ObjFactura.CveVenta
|
||||
Next
|
||||
|
||||
|
||||
'DETALLES
|
||||
ObjFactura.DtDetalle = TmpDT
|
||||
ObjFactura.DtFirmas = DTmpF
|
||||
|
||||
'CLIENTE
|
||||
ObjFactura.CveCliente = CveCliente
|
||||
ObjFactura.SetCliente()
|
||||
|
||||
'SUCURSAL
|
||||
ObjFactura.CveSucursal = DdlSubProyectoDatos.SelectedValue.ToEntero
|
||||
ObjFactura.SetSubProyectoMatriz(Me)
|
||||
ObjFactura.SetSubProyecto(Me)
|
||||
ObjFactura.ClienteSucursal = New Modelos.SucursalModel
|
||||
ObjFactura.ClienteSucursal.NoExt = CliNoExt
|
||||
ObjFactura.ClienteSucursal.NoInt = CliNoInt
|
||||
ObjFactura.ClienteSucursal.Localidad = CliLocalidad
|
||||
ObjFactura.ClienteSucursal.Direccion = LblDireccion.Text
|
||||
ObjFactura.ClienteSucursal.Colonia = LblColonia.Text
|
||||
ObjFactura.ClienteSucursal.Municipio = LblCiudad.Text
|
||||
ObjFactura.ClienteSucursal.Estado = LblEstado.Text
|
||||
ObjFactura.ClienteSucursal.CP = LblCP.Text
|
||||
ObjFactura.ClienteSucursal.Pais = CliPais
|
||||
ObjFactura.ClienteSucursal.CorreoSucursal = CliCorreoCot.ToString
|
||||
ObjFactura.ClienteSucursal.TelefonoSucursal = LblTelefono.Text
|
||||
ObjFactura.ClienteSucursal.Sucursal = DdlSucursalCliente.SelectedItem.Text
|
||||
|
||||
ObjFactura.DtDetalle = TmpDT
|
||||
ObjFactura.DtPagos = DtPagos
|
||||
ObjFactura.DtPromociones = DtPromociones
|
||||
|
||||
Dim FM As New Modelos.FemsaFactura
|
||||
Dim TmpDT7Eleven As New DataTable
|
||||
Dim TmpDTComplementosTimbrado As New DataTable
|
||||
|
||||
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||
|
||||
ObjFactura.FemsaFactura = FM
|
||||
|
||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
|
||||
ObjFactura.DtAjustes = TmpDTAjustes
|
||||
|
||||
ObjFactura.DtRecepcionUsados = TmpDTRecepcionUsados
|
||||
|
||||
ObjFactura.DtPolizasVirtuales = TmpDTPolizaVirtual
|
||||
|
||||
ObjFactura.GenerarPDFFactura = False
|
||||
|
||||
Dim CveTipoAlmacen As Integer = If(TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0, 6, 22)
|
||||
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows.Count > 0 Then
|
||||
ObjFactura.CveAlmacenRecepcionUsados = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows(0)("CveAlmacen").ToString.ToEntero
|
||||
End If
|
||||
|
||||
'If Not ddlAlmacen.SelectedValue.ToEntero > 0 AndAlso ddlAlmacen.Items.Count > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
||||
' ddlAlmacen.SelectedIndex = 1
|
||||
'End If
|
||||
|
||||
If ddlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
ObjFactura.CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
If Not DtInv.Columns.Contains("Seleccionado") Then
|
||||
DtInv.Columns.Add("Seleccionado", GetType(Integer))
|
||||
Try
|
||||
If Me.CveVenta > 0 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
|
||||
Else
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual)
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
End If
|
||||
|
||||
For Each Gvr As GridViewRow In GvInv.Rows
|
||||
Dim Dr As DataRow = DtInv.Select($"CvePS={Gvr.DataKey("CvePS")}")(0)
|
||||
If Gvr.FCCheckBox("cbInv").Checked AndAlso ddlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
Dr("Seleccionado") = 1
|
||||
Else
|
||||
Dr("Seleccionado") = 0
|
||||
End If
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
ObjFactura.TipoCambio = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
ObjFactura.TipoCambioDolares = TxtTipoCambioDlls.Text.Trim.ToDecimal
|
||||
ObjFactura.ConvertirPesos = ChkConvertirDoctoPesos.Checked
|
||||
ObjFactura.ConvertirDolares = ChkConvertirDolares.Checked
|
||||
ObjFactura.CveMoneda = DdlMoneda.SelectedValue.ToEntero
|
||||
ObjFactura.Moneda = DdlMoneda.SelectedItem.Text
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
|
||||
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString.ToEntero > 0, "Ing", DdlTipoComprobante.SelectedValue)
|
||||
'ObjFactura.RefDocto = TxtDocto.Text.Trim
|
||||
ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero, -1)
|
||||
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero, -1)
|
||||
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
|
||||
ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
|
||||
ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero
|
||||
ObjFactura.MetodoPago = DdlMetodoPago.SelectedItem.Text
|
||||
ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {DdlMetodoPago.SelectedValue}")
|
||||
ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFactura.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero
|
||||
ObjFactura.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero > 0, DdlMetodoPago33.SelectedItem.Text, "")
|
||||
ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}")
|
||||
|
||||
ObjFactura.CveFormaPago33 = DdlFormaPago33.SelectedValue.ToEntero
|
||||
ObjFactura.FormaPago33 = If(DdlFormaPago33.SelectedValue.ToEntero > 0, DdlFormaPago33.SelectedItem.Text, "")
|
||||
ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {DdlFormaPago33.SelectedValue}")
|
||||
|
||||
ObjFactura.CveUsoCFDI = DdlUsoCFDI.SelectedValue.ToEntero
|
||||
ObjFactura.UsoCFDI = If(DdlUsoCFDI.SelectedValue.ToEntero > 0, DdlUsoCFDI.SelectedItem.Text, "")
|
||||
ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}")
|
||||
|
||||
ObjFactura.UsuarioCreo = LblUsuario.Text.Trim
|
||||
|
||||
ObjFactura.CveCondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedValue.ToEntero, -1)
|
||||
ObjFactura.CondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedItem.Text, "")
|
||||
ObjFactura.CondicionesPago = If(RBLPago.SelectedValue = "2", 0, If(RBLPago.SelectedValue = "1", 1, 2)) ' 0 - Contado, 1 - Credito, 2 - termianl
|
||||
ObjFactura.FormaPago = DdlFormaPago.SelectedValue.ToEntero
|
||||
|
||||
Select Case ObjFactura.TipoDocto
|
||||
Case "Ing"
|
||||
ObjFactura.TipoDocumento = "Factura"
|
||||
Case "Rem"
|
||||
ObjFactura.TipoDocumento = "Remision"
|
||||
Case "Cot"
|
||||
ObjFactura.TipoDocumento = "Cotizacion"
|
||||
Case "Egs"
|
||||
ObjFactura.TipoDocumento = "Nota de Crédito"
|
||||
Case "Dev"
|
||||
ObjFactura.TipoDocumento = "Nota de Devolución"
|
||||
Case Else
|
||||
ObjFactura.TipoDocumento = ""
|
||||
End Select
|
||||
|
||||
|
||||
ObjFactura.Fech1 = Now
|
||||
ObjFactura.Fech2 = Now
|
||||
ObjFactura.Fech3 = Now
|
||||
ObjFactura.Alfa1 = ""
|
||||
ObjFactura.Alfa2 = ""
|
||||
ObjFactura.Alfa3 = ""
|
||||
ObjFactura.Num1 = 0
|
||||
ObjFactura.Num2 = 0
|
||||
ObjFactura.Num3 = DdlOrdenPago.SelectedValue.ToDouble
|
||||
ObjFactura.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFactura.CveCorte = CveCorte
|
||||
ObjFactura.CveMesa = -1
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
||||
ObjFactura.Entrega = Entrega
|
||||
ObjFactura.Vigencia = Now
|
||||
|
||||
ObjFactura.CveVentaPadre = If(CveDevolucion > 0, CveDevolucion, CvePedido)
|
||||
ObjFactura.CveVendedor = DdlVendedor.SelectedValue.ToEntero
|
||||
If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
ObjFactura.FechaEjecucion = Now
|
||||
|
||||
ObjFactura.CveSucursalEjecucion = DdlSubProyectoDatos.SelectedValue.ToEntero
|
||||
ObjFactura.CveSucursalCobranza = -1
|
||||
|
||||
ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero
|
||||
ObjFactura.CveSubProyectoEjecucion = DdlSubProyectoDatos.SelectedValue.ToEntero
|
||||
ObjFactura.CveSubProyectoCobranza = -1
|
||||
|
||||
ObjFactura.AtencionA = If(ObjFactura.TipoDocto = "Cot", TxtAtencionA.Text, "-1")
|
||||
ObjFactura.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
||||
ObjFactura.Observaciones = TxtObsFact.Text.Trim
|
||||
ObjFactura.Det_OrdenCompra = ""
|
||||
ObjFactura.Det_FechaOrdenCompra = MinFecha.ToShortDateString
|
||||
ObjFactura.MonedaAbreviatura = ""
|
||||
|
||||
'Totales, Y se llena TmpDTImpuestos
|
||||
ObjFactura.SubTotal = TxtSubTotal.Text.ToDecimal
|
||||
ObjFactura.Descuento = LblDescuentos.Text.Trim.ToDecimal
|
||||
ObjFactura.Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
|
||||
ObjFactura.IVA = TxtIVA.Text.ToDecimal
|
||||
ObjFactura.RetIVA = TxtRetIVA.Text.ToDecimal
|
||||
ObjFactura.RetISR = TxtRetISR.Text.ToDecimal
|
||||
ObjFactura.IEPS = TxtIEPS.Text.ToDecimal
|
||||
ObjFactura.Total = TxtTotal.Text.ToDecimal
|
||||
|
||||
ObjFactura.DtDeduccion = New DataTable
|
||||
|
||||
'OTROS
|
||||
ObjFactura.Det_FechaOrdenCompra = ""
|
||||
ObjFactura.Det_OrdenCompra = ""
|
||||
|
||||
ObjFactura.CveNCaVincular = DdlNCFactura.SelectedValue.ToEntero
|
||||
|
||||
If ObjFactura.CveMoneda <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
|
||||
ObjFactura.TipoCambio = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
ObjFactura.CveMoneda = 1
|
||||
|
||||
ObjFactura.Moneda = "Pesos"
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
|
||||
End If
|
||||
|
||||
If ObjFactura.CveMoneda <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||
ObjFactura.TipoCambio = TxtTipoCambioDlls.Text.Trim.ToDecimal
|
||||
ObjFactura.CveMoneda = 2
|
||||
|
||||
ObjFactura.Moneda = "Dólares"
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
|
||||
End If
|
||||
|
||||
'Se agrega CveVenta -1
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Row("CveVenta") = ObjFactura.CveVenta
|
||||
Next
|
||||
|
||||
DtInv.AcceptChanges()
|
||||
|
||||
ObjFactura.DtInventario = DtInv.FiltraParametros("Seleccionado = 1")
|
||||
End If
|
||||
'DETALLES
|
||||
ObjFactura.DtDetalle = TmpDT
|
||||
ObjFactura.DtFirmas = DTmpF
|
||||
|
||||
ObjFactura.ServicioDomicilio = ChkServicioDomicilio.Checked
|
||||
'CLIENTE
|
||||
ObjFactura.CveCliente = CveCliente
|
||||
ObjFactura.SetCliente()
|
||||
|
||||
'VALIDA ENTREGA POR ADELANTADO
|
||||
If UsuarioActual.Empresa.Funcionalidad(145) = "1" Then
|
||||
'INCRUSTAMOS ALMACEN ENTREGA POR ADELANTADO CUANDO SEA REMISION Y NO TRAIGA ASIGNADO POR EL USUARIO
|
||||
If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
If ObjFactura.ServicioDomicilio Then
|
||||
ObjFactura.CveAlmacenServicioDomicilio = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 29 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
|
||||
ObjFactura.DtInventario = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
'SUCURSAL
|
||||
ObjFactura.CveSucursal = DdlSubProyectoDatos.SelectedValue.ToEntero
|
||||
ObjFactura.SetSubProyectoMatriz(Me)
|
||||
ObjFactura.SetSubProyecto(Me)
|
||||
ObjFactura.ClienteSucursal = New Modelos.SucursalModel
|
||||
ObjFactura.ClienteSucursal.NoExt = CliNoExt
|
||||
ObjFactura.ClienteSucursal.NoInt = CliNoInt
|
||||
ObjFactura.ClienteSucursal.Localidad = CliLocalidad
|
||||
ObjFactura.ClienteSucursal.Direccion = LblDireccion.Text
|
||||
ObjFactura.ClienteSucursal.Colonia = LblColonia.Text
|
||||
ObjFactura.ClienteSucursal.Municipio = LblCiudad.Text
|
||||
ObjFactura.ClienteSucursal.Estado = LblEstado.Text
|
||||
ObjFactura.ClienteSucursal.CP = LblCP.Text
|
||||
ObjFactura.ClienteSucursal.Pais = CliPais
|
||||
ObjFactura.ClienteSucursal.CorreoSucursal = CliCorreoCot.ToString
|
||||
ObjFactura.ClienteSucursal.TelefonoSucursal = LblTelefono.Text
|
||||
ObjFactura.ClienteSucursal.Sucursal = DdlSucursalCliente.SelectedItem.Text
|
||||
|
||||
ObjFactura.DtDetalle = TmpDT
|
||||
ObjFactura.DtPagos = DtPagos
|
||||
ObjFactura.DtPromociones = DtPromociones
|
||||
|
||||
Dim FM As New Modelos.FemsaFactura
|
||||
Dim TmpDT7Eleven As New DataTable
|
||||
Dim TmpDTComplementosTimbrado As New DataTable
|
||||
|
||||
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||
|
||||
ObjFactura.FemsaFactura = FM
|
||||
|
||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
|
||||
ObjFactura.DtAjustes = TmpDTAjustes
|
||||
|
||||
ObjFactura.DtRecepcionUsados = TmpDTRecepcionUsados
|
||||
|
||||
ObjFactura.DtPolizasVirtuales = TmpDTPolizaVirtual
|
||||
|
||||
ObjFactura.GenerarPDFFactura = False
|
||||
|
||||
Dim CveTipoAlmacen As Integer = If(TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0, 6, 22)
|
||||
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows.Count > 0 Then
|
||||
ObjFactura.CveAlmacenRecepcionUsados = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows(0)("CveAlmacen").ToString.ToEntero
|
||||
End If
|
||||
|
||||
'If Not ddlAlmacen.SelectedValue.ToEntero > 0 AndAlso ddlAlmacen.Items.Count > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
||||
' ddlAlmacen.SelectedIndex = 1
|
||||
'End If
|
||||
|
||||
If ddlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
ObjFactura.CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
If Not DtInv.Columns.Contains("Seleccionado") Then
|
||||
DtInv.Columns.Add("Seleccionado", GetType(Integer))
|
||||
End If
|
||||
|
||||
ObjFactura.CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
|
||||
For Each Gvr As GridViewRow In GvInv.Rows
|
||||
Dim Dr As DataRow = DtInv.Select($"CvePS={Gvr.DataKey("CvePS")}")(0)
|
||||
If Gvr.FCCheckBox("cbInv").Checked AndAlso ddlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
Dr("Seleccionado") = 1
|
||||
Else
|
||||
Dr("Seleccionado") = 0
|
||||
End If
|
||||
Next
|
||||
|
||||
DtInv.AcceptChanges()
|
||||
|
||||
ObjFactura.DtInventario = DtInv.FiltraParametros("Seleccionado = 1")
|
||||
End If
|
||||
|
||||
'SI LA SUCURSAL NO TIENE ENTREGA POR ADELANTADO
|
||||
If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
ObjFactura.ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.")
|
||||
ObjFactura.ServicioDomicilio = ChkServicioDomicilio.Checked
|
||||
|
||||
'VALIDA ENTREGA POR ADELANTADO
|
||||
If UsuarioActual.Empresa.Funcionalidad(145) = "1" Then
|
||||
'INCRUSTAMOS ALMACEN ENTREGA POR ADELANTADO CUANDO SEA REMISION Y NO TRAIGA ASIGNADO POR EL USUARIO
|
||||
If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
If ObjFactura.ServicioDomicilio Then
|
||||
ObjFactura.CveAlmacenServicioDomicilio = ddlAlmacen.SelectedValue.ToEntero() 'GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 29 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
|
||||
|
||||
'PREPARA DT INVENTARIO
|
||||
Dim DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
For Each GvRow As GridViewRow In GvInv.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
Dim filtro = DtInv.Select(String.Format("CvePS = {0} AND Consec = {1}", GvRow.DataKey("CvePS"), GvRow.DataKey("Consec")))
|
||||
If filtro IsNot Nothing AndAlso filtro.Length > 0 Then
|
||||
Dim Row = filtro(0)
|
||||
Row("Serie") = GvRow.FCTextBox("TxtSerie").Text.Trim
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
ObjFactura.DtInventario = DtInv
|
||||
End If
|
||||
|
||||
ObjFactura.CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
|
||||
|
||||
End If
|
||||
|
||||
'SI LA SUCURSAL NO TIENE ENTREGA POR ADELANTADO
|
||||
If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
ObjFactura.ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.")
|
||||
End If
|
||||
|
||||
'SI LA SUCURSAL NO TIENE SERVICIO A DOMICILIO
|
||||
If ObjFactura.ServicioDomicilio AndAlso ObjFactura.CveAlmacenServicioDomicilio <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
ObjFactura.ErrorList.Add("No existe un almacen configurado como 'Servicio a Domicilio' en esta sucursal.")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'SI LA SUCURSAL NO TIENE SERVICIO A DOMICILIO
|
||||
If ObjFactura.ServicioDomicilio AndAlso ObjFactura.CveAlmacenServicioDomicilio <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
ObjFactura.ErrorList.Add("No existe un almacen configurado como 'Servicio a Domicilio' en esta sucursal.")
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al generar la venta", ex)
|
||||
If ObjFactura IsNot Nothing Then
|
||||
ObjFactura.Dispose()
|
||||
ObjFactura = Nothing
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -4133,6 +4173,8 @@ Partial Class PV
|
||||
CambiaSucursal()
|
||||
End If
|
||||
ObjSubProyectos.Dispose()
|
||||
|
||||
ChkServicioDomicilio_CheckedChanged(ChkServicioDomicilio, EventArgs.Empty)
|
||||
End Sub
|
||||
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoComprobante.SelectedIndexChanged
|
||||
CambiaTipoComprobante()
|
||||
@@ -4310,6 +4352,8 @@ Partial Class PV
|
||||
TmpDT.Columns.Add("EliminarDB", GetType(Boolean))
|
||||
TmpDT.Columns("EliminarDB").DefaultValue = False
|
||||
|
||||
TmpDT.Columns.Add("AplicaSerie", GetType(Boolean))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDTmpC()
|
||||
@@ -4346,6 +4390,8 @@ Partial Class PV
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim AplicaSerie = CBool(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("AplicaSerie"))
|
||||
|
||||
If TmpDT.FiltraParametros("AsientoContableVentas <> '" & AsientoContableVentas.ToString & "'").Rows.Count = 0 Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = TmpDT.NewRow()
|
||||
@@ -4380,6 +4426,7 @@ Partial Class PV
|
||||
Row("SubProyecto") = SubProyecto
|
||||
Row("Serie") = Serie
|
||||
Row("TiempoEntrega") = TiempoEntrega
|
||||
Row("AplicaSerie") = AplicaSerie
|
||||
|
||||
TmpDT.Rows.Add(Row)
|
||||
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
|
||||
@@ -4596,6 +4643,7 @@ Partial Class PV
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
||||
|
||||
If Modalidad = "A" Then
|
||||
@@ -4671,6 +4719,7 @@ Partial Class PV
|
||||
Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
|
||||
Row("CuentaPredial") = CuentaPredial
|
||||
Row("EsCargo") = EsCargo
|
||||
Row("AplicaSerie") = DrPS("AplicaSerie")
|
||||
|
||||
If EsCargo AndAlso ConsecPSPadre >= 0 Then
|
||||
Row("ConsecPSPadre") = ConsecPSPadre
|
||||
@@ -5036,6 +5085,8 @@ Partial Class PV
|
||||
End If
|
||||
End If
|
||||
Me.CveVentaDetalle = -1
|
||||
|
||||
UpAgregar.Update()
|
||||
End Sub
|
||||
Private Function AgregarPS() As Boolean
|
||||
Dim CveVentaDetalle As Integer = Me.CveVentaDetalle
|
||||
@@ -5278,6 +5329,8 @@ Partial Class PV
|
||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
CargaGVInv(DtInv)
|
||||
|
||||
ChkServicioDomicilio_CheckedChanged(ChkServicioDomicilio, EventArgs.Empty)
|
||||
|
||||
UpContado.Update()
|
||||
UpPS.Update()
|
||||
RegistraScript("BorraDescuentos();", "BorraDescuentos")
|
||||
@@ -5864,24 +5917,23 @@ Partial Class PV
|
||||
|
||||
Dim Index = Row.RowIndex
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPSSerie("", ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
Dim ExistenciaActual = DtInv.SUM("Cantidad", String.Format("Serie = '{0}'", Row.FCTextBox("TxtSerie").Text.ToString))
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPSSerie(Row.FCTextBox("TxtSerie").Text.ToString.Trim, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
'Valida Existencia
|
||||
If Existencia - ExistenciaActual <= 0 Then
|
||||
If Existencia <= 0 Then
|
||||
Alert(String.Format("Not hay existencia suficiente del producto con la Serie: <b>{0}</b>. Por favor rectifique y vuelva a intentar", Row.FCTextBox("TxtSerie").Text.ToString), TipoMensaje.MsgAdvertencia)
|
||||
Row.FCTextBox("TxtSerie").Text = ""
|
||||
Row.FCHiddenField("HdnSerie").Value = ""
|
||||
TmpDT.Rows(Index)("Serie") = ""
|
||||
DtInv.Rows(Index)("Serie") = ""
|
||||
Else
|
||||
Row.FCHiddenField("HdnSerie").Value = Row.FCTextBox("TxtSerie").Text
|
||||
TmpDT.Rows(Index)("Serie") = Row.FCTextBox("TxtSerie").Text
|
||||
DtInv.Rows(Index)("Serie") = Row.FCTextBox("TxtSerie").Text
|
||||
End If
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
DtInv.AcceptChanges()
|
||||
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Function ValidaSerieINV() As Boolean
|
||||
@@ -6716,10 +6768,19 @@ Partial Class PV
|
||||
|
||||
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
||||
|
||||
DdlBCIAjuste.Items.Clear()
|
||||
If DTBCIUsados IsNot Nothing AndAlso CveTamanio > 0 Then
|
||||
DdlBCIAjuste.Items.Clear()
|
||||
DdlBCIAjuste.DataSource = DTBCIUsados.FiltraParametros($"CveTamaño={CveTamanio}")
|
||||
DdlBCIAjuste.DataBind()
|
||||
DdlBCIAjuste.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
RFVAnio.Enabled = True
|
||||
If CveTamanio = 16 Then 'motobaterias
|
||||
DdlBCIAjuste.Items.Insert(0, New ListItem(" - ", "0"))
|
||||
RFVAnio.Enabled = False
|
||||
End If
|
||||
UPPDatosUsado.Update() ''refresca el RFV
|
||||
Else
|
||||
DdlBCIAjuste.Items.Insert(0, New ListItem(" - ", "0"))
|
||||
End If
|
||||
|
||||
DdlTipoUso.Items.Clear()
|
||||
@@ -7804,11 +7865,49 @@ Partial Class PV
|
||||
Response.Redirect($"~/Ventas/PV.aspx")
|
||||
End Sub
|
||||
Protected Sub DdlRecepcionUsados_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}")
|
||||
|
||||
DdlBCIUsado.DataSource = DTBCIUsados.FiltraParametros(String.Format("CveTamaño = {0}", DrTamanio("CveTamaño")))
|
||||
If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then
|
||||
Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}")
|
||||
DdlBCIUsado.DataSource = DTBCIUsados.FiltraParametros(String.Format("CveTamaño = {0}", DrTamanio("CveTamaño")))
|
||||
Else
|
||||
DdlBCIUsado.Items.Clear()
|
||||
DdlBCIUsado.DataSource = Nothing
|
||||
End If
|
||||
DdlBCIUsado.DataBind()
|
||||
|
||||
UpModalVenta.Update()
|
||||
UpAddVenta.Update()
|
||||
End Sub
|
||||
Protected Sub ChkServicioDomicilio_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkServicioDomicilio.Checked Then
|
||||
PreparaServicioDomicilio()
|
||||
Else
|
||||
ddlAlmacen.Items.Clear()
|
||||
ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero}")
|
||||
ddlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
||||
ddlAlmacen.DataBind()
|
||||
If GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero}").Rows.Count > 0 Then
|
||||
ddlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||
End If
|
||||
|
||||
For Each GvRow As GridViewRow In GvInv.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
GvRow.FCCheckBox("cbInv").Enabled = True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
UpINV.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub PreparaServicioDomicilio()
|
||||
ddlAlmacen.Items.Clear()
|
||||
ddlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=29).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}")
|
||||
ddlAlmacen.DataBind()
|
||||
|
||||
For Each GvRow As GridViewRow In GvInv.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
GvRow.FCCheckBox("cbInv").Checked = True
|
||||
GvRow.FCCheckBox("cbInv").Enabled = False
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="DivFacturas" style="overflow-y: auto; width: 760px; max-height: 215px;">
|
||||
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
<div id="DivFacturas" style="overflow-y: auto; width: 760px; max-height: 165px;">
|
||||
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Tipo</HeaderTemplate>
|
||||
@@ -210,30 +210,36 @@
|
||||
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Pedido/OC</HeaderTemplate>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Sucursal</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPedidoContrato" runat="server"></asp:Literal>
|
||||
<asp:Literal ID="LtlSucursal" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Total</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotal" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Sucursal</HeaderTemplate>
|
||||
<HeaderTemplate>Mon</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSucursal" runat="server"></asp:Literal>
|
||||
<asp:Literal ID="LtlMon" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Estatus</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Pedido/OC</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPedidoContrato" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>XML</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -151,19 +151,10 @@ Partial Class PopUpBuscarFolio
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'If e.Row.RowIndex = 0 Then
|
||||
' e.Row.Cells(0).Width = Unit.Pixel(38)
|
||||
' e.Row.Cells(1).Width = Unit.Pixel(65)
|
||||
' e.Row.Cells(2).Width = Unit.Pixel(70)
|
||||
' e.Row.Cells(3).Width = Unit.Pixel(250)
|
||||
' 'e.Row.Cells(4).Width = Unit.Pixel(75)
|
||||
' e.Row.Cells(4).Width = Unit.Pixel(75)
|
||||
' e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
' e.Row.Cells(6).Width = Unit.Pixel(100)
|
||||
'End If
|
||||
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
|
||||
'e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
||||
|
||||
Dim Liga As String = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>", e.Row.DBCampo("CveVenta"))
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso e.Row.DBCampo("TipoDocto").Contiene("Rem") Then
|
||||
@@ -171,11 +162,12 @@ Partial Class PopUpBuscarFolio
|
||||
End If
|
||||
|
||||
e.Row.FCLiteral("LtlTipo").Text = String.Format("<div class='truncate' style='width:27px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("TipoDocto"))
|
||||
e.Row.FCLiteral("LtlFolio").Text = String.Format("<div class='truncate' style='width:56px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Folio"))
|
||||
e.Row.FCLiteral("LtlFolio").Text = String.Format("<div class='truncate' style='width:95px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Folio"))
|
||||
e.Row.FCLiteral("LtlFecha").Text = String.Format("<div class='truncate' style='width:64px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Fecha").ToDate.ToShortDateString)
|
||||
e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Nombre"))
|
||||
'e.Row.FCLiteral("LtlSubTotal").Text = Liga & e.Row.DBCampo("SubTotal").FormatoNumero & " </a>"
|
||||
e.Row.FCLiteral("LtlTotal").Text = String.Format("<div class='truncate' style='width:56px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Total").FormatoNumero)
|
||||
e.Row.FCLiteral("LtlMon").Text = String.Format("<div class='truncate' style='width:30px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Abreviatura"))
|
||||
e.Row.FCLiteral("LtlSucursal").Text = String.Format("<div class='truncate' style='width:80px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("SubProyecto"))
|
||||
e.Row.FCLiteral("LtlEstatus").Text = String.Format("<div class='truncate' style='width:80px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("EstatusFactura"))
|
||||
e.Row.FCLiteral("LtlPedidoContrato").Text = String.Format("<div class='truncate' style='width:80px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("PedidoContrato"))
|
||||
|
||||
@@ -65,12 +65,10 @@ Partial Class Ventas_RepAuxiliarFacturas
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - C O M B O S"
|
||||
Private Sub CargaClientes()
|
||||
DdlClientes.ddl.Items.Clear()
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
'Private Sub CargaClientes()
|
||||
|
||||
' DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'End Sub
|
||||
|
||||
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlEstatus.Items.Clear()
|
||||
@@ -139,7 +137,7 @@ Partial Class Ventas_RepAuxiliarFacturas
|
||||
|
||||
Private Sub CargaCombos()
|
||||
'Cargo Clientes
|
||||
CargaClientes()
|
||||
'CargaClientes()
|
||||
|
||||
'Cargo Proyectos
|
||||
DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1)
|
||||
|
||||
@@ -130,12 +130,15 @@
|
||||
</ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Contrato: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlContrato" DataTextField="ContratoCompleto" DataValueField="CveContrato" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 ">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
<%-- <asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -188,13 +191,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
<%-- <asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
<label class="col-md-1">Contrato: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlContrato" DataTextField="ContratoCompleto" DataValueField="CveContrato" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -232,7 +235,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Fecha Vencimiento" runat="server" CausesValidation="false"> </asp:Label>
|
||||
<asp:Label Text="F. Vencimiento" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaVencimiento" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
||||
@@ -287,7 +290,7 @@
|
||||
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="10%" >
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Total" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
|
||||
@@ -66,7 +66,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
'Cargo categorias
|
||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoria.DataBind()
|
||||
|
||||
DdlCategoria.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
'Cargo Clasificaciones
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
@@ -164,7 +164,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
@@ -315,7 +315,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
|
||||
@@ -178,7 +178,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, If(CveVenta = -1, Orden, CveVenta), DdlClientes.SelectedValue.ToEntero, Sucursales,
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
@@ -299,7 +299,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales,
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, ddlmarcas.selectedvalue.toentero) Then
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
@@ -361,7 +361,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales,
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
|
||||
@@ -178,6 +178,16 @@
|
||||
<div class="col-md-2">
|
||||
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
|
||||
</div>
|
||||
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
|
||||
Garantía:
|
||||
</div>
|
||||
<div class="col-md-2" id="divgarantia2" runat="server" visible="false">
|
||||
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:Dropdownlist>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -71,6 +71,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
'Cargo categorias
|
||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoria.DataBind()
|
||||
DdlCategoria.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
'Cargo Clasificaciones
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
@@ -90,6 +91,12 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
'garantia
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
divgarantia1.visible = True
|
||||
divgarantia2.visible = True
|
||||
End If
|
||||
|
||||
DdlMarcas.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarcas.DataBind()
|
||||
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
@@ -125,7 +132,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
If ObjVentas.GetReportePadreVentasUtilidad(If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM), DdlClientesWS.SelectedValue.ToEntero,
|
||||
If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM), txtFechaI.Text.ToDate, txtFechaF.Text.ToDate,
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero,
|
||||
DdlMarcas.SelectedValue.ToEntero) Then
|
||||
DdlMarcas.SelectedValue.ToEntero, DdlGarantia.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtDatos = ObjVentas.DtResultados
|
||||
End If
|
||||
|
||||
@@ -3341,7 +3341,7 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuentaEfectivo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuentaEfectivo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RFVCuenta" runat="server" ClientValidationFunction="ValidaCuentaEfectivo" ControlToValidate="DdlCuentaEfectivo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3349,7 +3349,7 @@
|
||||
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Credito:</label>
|
||||
<label class="col-md-2">Crédito:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteCredito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
@@ -3357,7 +3357,7 @@
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="DivDdlCuentaTarjetaCredito" style="margin-right: -40px">
|
||||
<asp:DropDownList ID="DdlCuentaTarjetaCredito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RequiredFieldValidator1" runat="server" ClientValidationFunction="ValidaCuentaCredito" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-3" runat="server" id="DivMesesSinIntereses" visible="false" style="text-align: right;">
|
||||
@@ -3377,7 +3377,7 @@
|
||||
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Debito:</label>
|
||||
<label class="col-md-2">Débito:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteDebito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
@@ -3385,7 +3385,7 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuentaTarjetaDebito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="DdlCuentaTarjetaDebito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RequiredFieldValidator4" runat="server" ClientValidationFunction="ValidaCuentaDebito" ControlToValidate="DdlCuentaTarjetaDebito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender9" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator4" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3400,7 +3400,7 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuentaCheque" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="DdlCuentaCheque" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RequiredFieldValidator3" runat="server" ClientValidationFunction="ValidaCuentaCheque" ControlToValidate="DdlCuentaCheque" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender11" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator3" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3416,7 +3416,7 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuentaTransferencia" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransferencia" runat="server" ControlToValidate="DdlCuentaTransferencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ID="RFVTransferencia" runat="server" ClientValidationFunction="ValidaCuentaTransferencia" ControlToValidate="DdlCuentaTransferencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransferencia" runat="server" HighlightCssClass="vco" TargetControlID="RFVTransferencia" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3480,6 +3480,8 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:HiddenField ID="HdnCambioFaltante" runat="server" Value="1" ClientIDMode="Static" />
|
||||
<%--<asp:HiddenField ID="HdnPagadoContado" runat="server" Value="0" ClientIDMode="Static" />--%>
|
||||
</div>
|
||||
<label id="lblCambio" class="col-md-2">Cambio:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
@@ -7749,6 +7751,7 @@
|
||||
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAut" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlTipoAutorizacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label>
|
||||
</div>
|
||||
<div id="DivDiasVencidos" runat="server" visible="false" class="row">
|
||||
@@ -7836,6 +7839,61 @@
|
||||
$("#BtnDirClienteValidar").click();
|
||||
}
|
||||
|
||||
function ValidaCuentaEfectivo(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteEfectivo").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaCuentaCredito(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteCredito").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaCuentaDebito(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteDebito").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaCuentaCheque(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteCheque").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ValidaCuentaTransferencia(val, args) {
|
||||
//VALIDA SOLO SI EL IMPORTE ES MAYOR A CERO
|
||||
var totalPago = ToDouble($get("TxtImporteTransferencia").value);
|
||||
if (totalPago > 0) {
|
||||
args.IsValid = (ToDouble(args.Value) > 0);
|
||||
}else
|
||||
{
|
||||
args.IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
//FUNCIONES PARA COMERCIO EXTERIOR
|
||||
function CalculaTotalUSD(TotalUSD, ValorUnitario, TxtCantidad) {
|
||||
TotalUSD.innerText = FormatoNumero(ToDouble(ValorUnitario.value) * ToDouble(TxtCantidad.value), 2);
|
||||
@@ -8868,14 +8926,16 @@
|
||||
} catch (e) { }
|
||||
|
||||
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado + totalRNC + totalAmortizado + totalProntoPago;
|
||||
var totalVenta = ToDouble($get('TxtTotal').value);
|
||||
var totalVenta = ToDouble($get('TxtTotal').value);// - ToDouble($get('HdnPagadoContado').value);
|
||||
|
||||
if (total > totalVenta) {
|
||||
lblCambio.innerHTML = "Cambio:"
|
||||
lblCambio.innerHTML = "Cambio:";
|
||||
HdnCambioFaltante.value = "1";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
||||
} else {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(531) %>' == '1') {
|
||||
lblCambio.innerHTML = "Faltante:"
|
||||
lblCambio.innerHTML = "Faltante:";
|
||||
HdnCambioFaltante.value = "2";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
||||
} else {
|
||||
$get("TxtCambio").value = "$0.00"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -394,6 +394,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user