This commit is contained in:
AbrahamCastilloV
2024-02-21 22:18:24 -07:00
74 changed files with 136 additions and 77 deletions

View File

@@ -335,7 +335,7 @@ Public Class ClsContratos
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "",
Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "",
Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing, Optional CantidadPasajeros As Integer = Nothing, Optional CveRuta As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Integer Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing, Optional CantidadPasajeros As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Con_ContratosAdd") DataAdapter("PA_Con_ContratosAdd")
@@ -397,7 +397,6 @@ Public Class ClsContratos
.Add("@CveChofer2", SqlDbType.Int).Value = CveChofer2 .Add("@CveChofer2", SqlDbType.Int).Value = CveChofer2
.Add("@CveAF", SqlDbType.Int).Value = CveAF .Add("@CveAF", SqlDbType.Int).Value = CveAF
.Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros .Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
.Add("@CvePartida", SqlDbType.Int).Value = CvePartida .Add("@CvePartida", SqlDbType.Int).Value = CvePartida
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino .Add("@CveDestino", SqlDbType.Int).Value = CveDestino
.Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo .Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo

View File

@@ -2178,7 +2178,7 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1) As Boolean Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional MostrarTodosAlmacenes As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_ProductosServiciosInventario") DataAdapter("PA_ProductosServiciosInventario")
@@ -2190,6 +2190,7 @@ Public Class ClsInventarios
.Add("@AplicaParaVenta", SqlDbType.Int).Value = AplicaParaVenta .Add("@AplicaParaVenta", SqlDbType.Int).Value = AplicaParaVenta
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@MostrarTodosAlmacenes", SqlDbType.Bit).Value = MostrarTodosAlmacenes
End With End With
Try Try

View File

@@ -135,14 +135,14 @@ Public Class ClsTransportes
#End Region #End Region
#Region "Boletos" #Region "Boletos"
Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer, CveVendedor As Integer) As Integer Public Function AddViajesPasajeros(CveContrato As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer, CveVendedor As Integer) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Trans_ViajesPasajerosAdd") DataAdapter("PA_Trans_ViajesPasajerosAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveViajePasajero", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveViajePasajero", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
.Add("@Importe", SqlDbType.Money).Value = Importe .Add("@Importe", SqlDbType.Money).Value = Importe
@@ -167,12 +167,12 @@ Public Class ClsTransportes
Return Retorno Return Retorno
End Function End Function
Public Function GetViajesPasajeros(CveViaje As Integer, Optional CveViajePasajero As Integer = -1, Optional Estatus As Integer = -1) As Boolean Public Function GetViajesPasajeros(CveContrato As Integer, Optional CveViajePasajero As Integer = -1, Optional Estatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Trans_ViajesPasajerosGet") DataAdapter("PA_Trans_ViajesPasajerosGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero .Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
.Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@Estatus", SqlDbType.Int).Value = Estatus
End With End With

View File

@@ -626,13 +626,13 @@ Public Class Timbres
Return Retorno Return Retorno
End Function End Function
Public Function Timbrar() As Boolean Public Function Timbrar(Optional CvePACEspecifico As Integer = -1) As Boolean
Dim Respuesta As Boolean = False Dim Respuesta As Boolean = False
Dim ObjTimbrado As New Timbrado Dim ObjTimbrado As New Timbrado
If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePACEspecial:=CvePACEspecifico) Then
Respuesta = True Respuesta = True
Else Else
Respuesta = False Respuesta = False

View File

@@ -929,33 +929,39 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim CveMarca = IfNull(context.Request("cvemarca"), "-1").ToString.ToEntero Dim CveMarca = IfNull(context.Request("cvemarca"), "-1").ToString.ToEntero
Dim UsaGlobal As Boolean = True Dim UsaGlobal As Boolean = True
Dim MostrarTodosAlmacenes As Boolean = False
'verifica existencias 'verifica existencias
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso usuario.Empresa.Funcionalidad(141) = "1" Then If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso usuario.Empresa.Funcionalidad(141) = "1" Then
UsaGlobal = False UsaGlobal = False
'If CveEmpresa.Contiene(140, 141) And Pagina.Contiene("ventas/ventas") Then If (usuario.Empresa.Funcionalidad(558) = "1") AndAlso Pagina.Contiene("ventas/ventas") Then
' AplicaParaVenta = 1 MostrarTodosAlmacenes = True
'End If End If
Dim objInv As New ClsInventarios Dim objInv As New ClsInventarios
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca) Then Try
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca, MostrarTodosAlmacenes:=MostrarTodosAlmacenes) Then
' limpio los almacenes donde no tiene ningun producto existencia ' limpio los almacenes donde no tiene ningun producto existencia
Dim i As Integer = 0 Dim i As Integer = 0
While i < objInv.DtResultados.Columns.Count While i < objInv.DtResultados.Columns.Count
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion", "CveClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion", "CveClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then
objInv.DtResultados.Columns.RemoveAt(i) objInv.DtResultados.Columns.RemoveAt(i)
Else Else
i = i + 1 i = i + 1
End If End If
End While End While
DtPSRetorno = objInv.DtResultados DtPSRetorno = objInv.DtResultados
End If
Catch ex As Exception
GuardaLog(ex.ToString())
End Try
End If
objInv.Dispose() objInv.Dispose()

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3293,7 +3293,7 @@ Partial Class Compras_Compras
If RetIVAOriginal > 0 Then If RetIVAOriginal > 0 Then
Dim CalRetIVAPor As Decimal = (RetIVAOriginal * 1 / SubTotal2Original).RoundAD(6).ToDecimal Dim CalRetIVAPor As Decimal = (RetIVAOriginal * 1 / SubTotal2Original).RoundAD(6).ToDecimal
If (CalRetIVAPor).RoundSQL(6) = 0.106667 OrElse (CalRetIVAPor).RoundSQL(6) = 0.053333 Then If (CalRetIVAPor).RoundSQL(5) = 0.10666 OrElse (CalRetIVAPor).RoundSQL(5) = 0.05333 Then
DdlRetIVAConcepto.SelectedValueExist("1") '10.66 servicios profesionales DdlRetIVAConcepto.SelectedValueExist("1") '10.66 servicios profesionales
End If End If
If RetIVAFlete Then '4 Fletes If RetIVAFlete Then '4 Fletes
@@ -3314,6 +3314,7 @@ Partial Class Compras_Compras
'permitido en un margen de 1% a 2% 'permitido en un margen de 1% a 2%
If RetISRResico OrElse (CalRetISRPor >= 0.01 AndAlso CalRetISRPor <= 0.02) Then '1.25 Recico regimen simplificado confianza If RetISRResico OrElse (CalRetISRPor >= 0.01 AndAlso CalRetISRPor <= 0.02) Then '1.25 Recico regimen simplificado confianza
DdlRetISRConcepto.SelectedValueExist("3") DdlRetISRConcepto.SelectedValueExist("3")
RetISRResico = True
End If End If
End If End If
End If End If

View File

@@ -1481,7 +1481,7 @@ Sello digital del SAT:
<ClientRectangle>0,2.68,14.6,0.8</ClientRectangle> <ClientRectangle>0,2.68,14.6,0.8</ClientRectangle>
<Conditions isList="true" count="0" /> <Conditions isList="true" count="0" />
<Expressions isList="true" count="0" /> <Expressions isList="true" count="0" />
<Font>Myriad Pro,9,Regular,Point,False,0</Font> <Font>Myriad Pro,8,Regular,Point,False,0</Font>
<Guid>179a957f89d04921b856805a4c2e9d49</Guid> <Guid>179a957f89d04921b856805a4c2e9d49</Guid>
<Margins>0,0,0,0</Margins> <Margins>0,0,0,0</Margins>
<Name>Text9</Name> <Name>Text9</Name>
@@ -1542,7 +1542,7 @@ DESPUES DE 72 HORAS POSTERIORES A LA FECHA DE ELABORACIÓN"</Text>
<ReportAlias>Factura</ReportAlias> <ReportAlias>Factura</ReportAlias>
<ReportChanged>1/18/2024 9:39:09 AM</ReportChanged> <ReportChanged>1/18/2024 9:39:09 AM</ReportChanged>
<ReportCreated>7/11/2022 2:49:19 PM</ReportCreated> <ReportCreated>7/11/2022 2:49:19 PM</ReportCreated>
<ReportFile>Factura.mrt</ReportFile> <ReportFile>C:\inetpub\WWWSigGit\Empresas\186\Formatos\Factura.mrt</ReportFile>
<ReportGuid>4a902ea660c34d0baeae36e92ea35edd</ReportGuid> <ReportGuid>4a902ea660c34d0baeae36e92ea35edd</ReportGuid>
<ReportName>Factura</ReportName> <ReportName>Factura</ReportName>
<ReportUnit>Centimeters</ReportUnit> <ReportUnit>Centimeters</ReportUnit>

View File

@@ -1056,7 +1056,7 @@ Fecha Cirugia: {FechaCirugia}</Text>
<ClientRectangle>0,2.48,13.2,0.8</ClientRectangle> <ClientRectangle>0,2.48,13.2,0.8</ClientRectangle>
<Conditions isList="true" count="0" /> <Conditions isList="true" count="0" />
<Expressions isList="true" count="0" /> <Expressions isList="true" count="0" />
<Font>Myriad Pro,9,Regular,Point,False,0</Font> <Font>Myriad Pro,8,Regular,Point,False,0</Font>
<Guid>1891a87e013d48868bd75b5710529e30</Guid> <Guid>1891a87e013d48868bd75b5710529e30</Guid>
<Margins>0,0,0,0</Margins> <Margins>0,0,0,0</Margins>
<Name>Text13</Name> <Name>Text13</Name>

View File

@@ -1080,7 +1080,7 @@ Vendedor: {VendedorNombre}</Text>
<ClientRectangle>0,2.48,10.6,1</ClientRectangle> <ClientRectangle>0,2.48,10.6,1</ClientRectangle>
<Conditions isList="true" count="0" /> <Conditions isList="true" count="0" />
<Expressions isList="true" count="0" /> <Expressions isList="true" count="0" />
<Font>Myriad Pro,9,Regular,Point,False,0</Font> <Font>Myriad Pro,8,Regular,Point,False,0</Font>
<Guid>fca703f575e74a9f8bc6628424c9a960</Guid> <Guid>fca703f575e74a9f8bc6628424c9a960</Guid>
<Margins>0,0,0,0</Margins> <Margins>0,0,0,0</Margins>
<Name>Text13</Name> <Name>Text13</Name>
@@ -1138,7 +1138,7 @@ Episodio: {Episodio}</Text>
<ReportAlias>Report</ReportAlias> <ReportAlias>Report</ReportAlias>
<ReportChanged>10/11/2022 8:18:55 PM</ReportChanged> <ReportChanged>10/11/2022 8:18:55 PM</ReportChanged>
<ReportCreated>7/11/2022 2:49:19 PM</ReportCreated> <ReportCreated>7/11/2022 2:49:19 PM</ReportCreated>
<ReportFile>Remision.mrt</ReportFile> <ReportFile>C:\inetpub\WWWSigGit\Empresas\186\Formatos\Remision.mrt</ReportFile>
<ReportGuid>49b2dec77fe542ea952b501bf54fafb1</ReportGuid> <ReportGuid>49b2dec77fe542ea952b501bf54fafb1</ReportGuid>
<ReportName>Report</ReportName> <ReportName>Report</ReportName>
<ReportUnit>Centimeters</ReportUnit> <ReportUnit>Centimeters</ReportUnit>

View File

@@ -145,6 +145,15 @@ Partial Class Inventarios_EntradasSalidas
ViewState("TieneSalida") = value ViewState("TieneSalida") = value
End Set End Set
End Property End Property
Public Property CveEntregaAlmacen() As Integer
Get
Return ViewState("CveEntregaAlmacen").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveEntregaAlmacen") = value
End Set
End Property
Private Property DtBitacora As DataTable Private Property DtBitacora As DataTable
Get Get
Return CType(ViewState("DtBitacora"), DataTable) Return CType(ViewState("DtBitacora"), DataTable)
@@ -471,7 +480,6 @@ Partial Class Inventarios_EntradasSalidas
CargaDatosEntregaAlmacen(Request("CveEntregaAlmacen").ToString.ToEntero) CargaDatosEntregaAlmacen(Request("CveEntregaAlmacen").ToString.ToEntero)
End If End If
'BLOQUEA PERMISOS 'BLOQUEA PERMISOS
BtnGuardar.Enabled = PermiteGuardar() BtnGuardar.Enabled = PermiteGuardar()
BtnEliminar.Enabled = PermiteEliminar() BtnEliminar.Enabled = PermiteEliminar()
@@ -507,7 +515,6 @@ Partial Class Inventarios_EntradasSalidas
'ImgFecha.Visible = True 'ImgFecha.Visible = True
End If End If
If CveMovimiento > 0 And CveConcepto.Contiene(8) And UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then If CveMovimiento > 0 And CveConcepto.Contiene(8) And UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
ValidaUsaConsola() ValidaUsaConsola()
End If End If
@@ -1238,7 +1245,7 @@ Partial Class Inventarios_EntradasSalidas
End Sub End Sub
Private Sub CargaDatosEntregaAlmacen(CveEntregaAlmacen As Integer) Private Sub CargaDatosEntregaAlmacen(tCveEntregaAlmacen As Integer)
'RECARGA ALMACENES SOLO DE recepcion de usados 'RECARGA ALMACENES SOLO DE recepcion de usados
DdlAlmacen.Items.Clear() DdlAlmacen.Items.Clear()
DdlAlmacen.DataBind() DdlAlmacen.DataBind()
@@ -1254,8 +1261,8 @@ Partial Class Inventarios_EntradasSalidas
Dim ObjGenerales As New ClsGenerales() Dim ObjGenerales As New ClsGenerales()
If (ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen)) Then If (ObjGenerales.GetEntregaAlmacenRutaDetalle(tCveEntregaAlmacen)) Then
CveEntregaAlmacen = tCveEntregaAlmacen
For Each dr As DataRow In ObjGenerales.DtResultados.Rows For Each dr As DataRow In ObjGenerales.DtResultados.Rows
AddNew(dr("CvePS").ToString.ToEntero, dr("CodigoPS").ToString, dr("CveUnidadMedida").ToString.ToEntero, dr("Abreviatura").ToString, dr("Cantidad").ToString.ToDecimal, AddNew(dr("CvePS").ToString.ToEntero, dr("CodigoPS").ToString, dr("CveUnidadMedida").ToString.ToEntero, dr("Abreviatura").ToString, dr("Cantidad").ToString.ToDecimal,
0, "", "", "", "", "E", "", MinFecha, 0, "") 0, "", "", "", "", "E", "", MinFecha, 0, "")
@@ -1975,8 +1982,7 @@ Partial Class Inventarios_EntradasSalidas
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.Replace(",", "").ToDate, obs, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.Replace(",", "").ToDate, obs, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, DdlConcepto.SelectedValue.ToEntero, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text, PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor, Modulo:="ES/1") CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, DdlConcepto.SelectedValue.ToEntero, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text, PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor, Modulo:="ES/1", CveEntregaAlmacen:=CveEntregaAlmacen)
If CveMovimiento <= 0 OrElse CvePrePoliza <= 0 Then If CveMovimiento <= 0 OrElse CvePrePoliza <= 0 Then
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError) Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)

View File

@@ -81,10 +81,20 @@
</div> </div>
<div class="portlet-body" style="display: none;"> <div class="portlet-body" style="display: none;">
<div class="row"> <div class="row">
<label class="col-md-1 " id="Label1" runat="server" style="width: 90px; margin-top: 5px;">Chofer:</label> <label class="col-md-1 " id="Label1" runat="server" >Chofer:</label>
<div class="col-md-2" > <div class="col-md-2" >
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" CssClass="form-control input-sm select2me" Width="100%" CausesValidation="true"></asp:DropDownList> <asp:DropDownList ID="DdlChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" CssClass="form-control input-sm select2me" Width="100%" CausesValidation="true"></asp:DropDownList>
</div> </div>
<label class="col-md-1 " id="LblTipo" runat="server">Tipo:</label>
<div class="col-md-2" >
<asp:DropDownList ID="DdlTipo" runat="server" CssClass="form-control input-sm select2me" Width="100%" CausesValidation="true">
<asp:ListItem Value="-1" Text="Todos"></asp:ListItem>
<asp:ListItem Value="T" Text="Traspasos"></asp:ListItem>
<asp:ListItem Value="R" Text="Recolecciones"></asp:ListItem>
<asp:ListItem Value="E" Text="Entregas"></asp:ListItem>
<asp:ListItem Value="I" Text="Ingresos"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>

View File

@@ -345,7 +345,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
{ {
ClsGenerales ObjGeneral = new ClsGenerales(); ClsGenerales ObjGeneral = new ClsGenerales();
if (ObjGeneral.GetInvEntregaAlmacenRutaRep(DdlSucursales.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), DdlChofer.SelectedValue.ToEntero(), UsuarioActual.CveUsuario)) if (ObjGeneral.GetInvEntregaAlmacenRutaRep(DdlSucursales.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), DdlChofer.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, Tipo:DdlTipo.SelectedValue))
{ {
DTDatos = ObjGeneral.DtResultados; DTDatos = ObjGeneral.DtResultados;
GVDatos.DataSource = DTDatos; GVDatos.DataSource = DTDatos;
@@ -491,7 +491,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
Timbres ObjTimbres = new Timbres(TimbreTipoDocto, cvetimbre, UsuarioActual); Timbres ObjTimbres = new Timbres(TimbreTipoDocto, cvetimbre, UsuarioActual);
StringBuilder MensajeAlert = new StringBuilder(); StringBuilder MensajeAlert = new StringBuilder();
MensajeAlert.AppendFormat("Folio: <b>{0}</b> &nbsp;", ObjTimbres.ObjFactura.SerieFolio); MensajeAlert.AppendFormat("Folio: <b>{0}</b> &nbsp;", ObjTimbres.ObjFactura.SerieFolio);
if (ObjTimbres.MsgError == "" && ObjTimbres.Timbrar()) int CvePAC = 4;
if (ObjTimbres.MsgError == "" && ObjTimbres.Timbrar(CvePAC))
{ {
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML &nbsp;<i class='fa fa-file'></i></i></a>&nbsp;&nbsp;", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))); MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML &nbsp;<i class='fa fa-file'></i></i></a>&nbsp;&nbsp;", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion); Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);

View File

@@ -500,7 +500,7 @@ Partial Class Inventarios_TraspasoAlmacen
' DdlProducto.Visible = False ' DdlProducto.Visible = False
'End If 'End If
CargaPS() FiltraPS()
'Folio 'Folio
SiguienteFolio(If(ChkTransitorio.Checked, 9, 8)) SiguienteFolio(If(ChkTransitorio.Checked, 9, 8))
@@ -508,6 +508,17 @@ Partial Class Inventarios_TraspasoAlmacen
'DdlProducto.DataBind() 'DdlProducto.DataBind()
CargarCamiones() CargarCamiones()
End Sub End Sub
Private Sub FiltraPS()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlAlmacenOrigen.SelectedValue.ToEntero() > 0 Then
Dim DtAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero())
If DtAlmacen IsNot Nothing Then
Dim CveSubProyecto As Integer = DtAlmacen.FiltroPrimeroValor("CveSubProyecto").ToEntero()
CargaPS(CveSubProyecto)
End If
Else
CargaPS(-1)
End If
End Sub
Private Sub CargaAlmacenOrigen() Private Sub CargaAlmacenOrigen()
DdlAlmacenOrigen.Enabled = True DdlAlmacenOrigen.Enabled = True
DdlAlmacenOrigen.Items.Clear() DdlAlmacenOrigen.Items.Clear()
@@ -517,7 +528,7 @@ Partial Class Inventarios_TraspasoAlmacen
DdlAlmacenOrigen.DataBind() DdlAlmacenOrigen.DataBind()
DdlAlmacenOrigen.SelectedValueExist(UsuarioActual.CveAlmacen) DdlAlmacenOrigen.SelectedValueExist(UsuarioActual.CveAlmacen)
End Sub End Sub
Private Sub CargaPS() Private Sub CargaPS(CveSubProyecto As Integer)
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
DdlProducto2.setEsWebService(EsWS) DdlProducto2.setEsWebService(EsWS)
@@ -526,8 +537,8 @@ Partial Class Inventarios_TraspasoAlmacen
'DdlProducto2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue) 'DdlProducto2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
If UsuarioActual.Empresa.Funcionalidad(141) = "1" Then If UsuarioActual.Empresa.Funcionalidad(141) = "1" Then
DdlProducto2.ddlWS.Attributes.Add("data-pagina", "inv/traspaso") DdlProducto2.ddlWS.Attributes.Add("data-pagina", "inv/traspaso")
DdlProducto2.ddlWS.Attributes.Add("data-cvesubproyecto", CveSubProyecto.ToString())
DdlProducto2.ddlWS.Attributes.Add("Data-onresult", "CargaExistenciaAlmacenes") DdlProducto2.ddlWS.Attributes.Add("Data-onresult", "CargaExistenciaAlmacenes")
CargaExistenciasSucursal()
DdlAlmacenOrigen.AutoPostBack = True DdlAlmacenOrigen.AutoPostBack = True
End If End If
Else Else
@@ -538,8 +549,8 @@ Partial Class Inventarios_TraspasoAlmacen
End Sub End Sub
Private Sub CargaExistenciasSucursal() Private Sub CargaExistenciasSucursal()
DdlProducto2.Attributes.Remove("Data-cvesubproyecto") DdlProducto2.Attributes.Clear()
DdlProducto2.Attributes.Add("Data-cvesubproyecto", GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}")) FiltraPS()
End Sub End Sub
Private Sub SiguienteFolio(CveConcepto As Integer) Private Sub SiguienteFolio(CveConcepto As Integer)
'Dim Inv As New ClsInventarios 'Dim Inv As New ClsInventarios
@@ -1006,9 +1017,8 @@ Partial Class Inventarios_TraspasoAlmacen
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"), Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDecimal > 0, TxtGastoIndirecto.Text, "-1").ToDecimal, CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDecimal > 0, TxtGastoIndirecto.Text, "-1").ToDecimal,
CveChofer:=If(ChkTransitorio.Checked, DdlChofer.SelectedValue.ToEntero, -1), Placa:="", FechaEntrega:=If(ChkTransitorio.Checked, TxtFechaEntrega.Text.Trim.ToDateTime.ToString("dd/MM/yyyy"), "-1"), EspecifUnidad:="", ResponsableCarga:="", ResponsableRecibio:="",
ResponsableCarga:="", ResponsableRecibio:="", Identificacion:="", Domicilio:="", Modulo:="TA/G2", CveFolioGarantia:=CveFolioGarantia)
Telefono:="", Ciudad:="", Licencia:="", Modulo:="TA/G2", CveFolioGarantia:=CveFolioGarantia)
FolioSalida = ObjInventario.Folio FolioSalida = ObjInventario.Folio
Folio = ObjInventario.Folio Folio = ObjInventario.Folio
If CveMovimientoSalida <= 0 Then If CveMovimientoSalida <= 0 Then
@@ -2745,7 +2755,7 @@ Partial Class Inventarios_TraspasoAlmacen
MensajeAlert.Append("<br/><br/>") MensajeAlert.Append("<br/><br/>")
If ObjTimbres.Timbrar() Then If ObjTimbres.Timbrar(CvePACEspecifico:=4) Then
Try Try
PdfFactura(ObjTimbres.ObjFactura) PdfFactura(ObjTimbres.ObjFactura)
@@ -2992,8 +3002,8 @@ Partial Class Inventarios_TraspasoAlmacen
ProductosNoCargados.AppendFormat("{0},", RowPS("PSCodigo").ToString()) ProductosNoCargados.AppendFormat("{0},", RowPS("PSCodigo").ToString())
End If End If
Else Else
RowsNoCargados = RowsNoCargados + 1 RowsNoCargados = RowsNoCargados + 1
ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString()) ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString())
End If End If
End If End If

View File

@@ -19,8 +19,8 @@ Partial Class ListadoContratos
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("MM/dd/yyyy").Replace(" ", "T") txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
txtFechaF.Text = DateTime.Now.AddDays(7).ToString("MM/dd/yyyy").Replace(" ", "T") txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString
If Not IsPostBack Then If Not IsPostBack Then
InicializaCombos() InicializaCombos()
@@ -56,6 +56,7 @@ Partial Class ListadoContratos
GvContratos.DataSource = ObjContratos.DtResultados GvContratos.DataSource = ObjContratos.DtResultados
GvContratos.DataBind() GvContratos.DataBind()
End If End If
ObjContratos.Dispose()
'Generamos Folio - NumeroContrato 'Generamos Folio - NumeroContrato
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero

View File

@@ -107,6 +107,7 @@ Partial Class ListadoViajes
Protected Sub AddViaje(sender As Object, e As EventArgs) Protected Sub AddViaje(sender As Object, e As EventArgs)
'Generador de Viajes Masivos 'Generador de Viajes Masivos
Dim CveSubProyecto As Integer = DdlRutas.SelectedValue.ToEntero 'GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
If IsMasivo.Checked = True Then If IsMasivo.Checked = True Then
If TxtFechaInicial.Text = "" Or TxtFrecuencia.Text = "" Then If TxtFechaInicial.Text = "" Or TxtFrecuencia.Text = "" Then
Alert("Es necesario agregar la fecha inicial y la frecuencia", TipoMensaje.MsgAdvertencia) Alert("Es necesario agregar la fecha inicial y la frecuencia", TipoMensaje.MsgAdvertencia)
@@ -127,7 +128,6 @@ Partial Class ListadoViajes
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
'Generamos folio 'Generamos folio
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
If ObjFolio.GetFolios("Con", UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto) Then If ObjFolio.GetFolios("Con", UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto) Then
If ObjFolio.DtResultados.Rows.Count > 0 Then If ObjFolio.DtResultados.Rows.Count > 0 Then
Dim drr As DataRow = ObjFolio.DtResultados.FiltroPrimero("") Dim drr As DataRow = ObjFolio.DtResultados.FiltroPrimero("")
@@ -136,7 +136,7 @@ Partial Class ListadoViajes
End If End If
'Agregamos contrato 'Agregamos contrato
ObjContratos.IniciaTransacSQL() ObjContratos.IniciaTransacSQL()
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, fecha, fecha, "", "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CveRuta:=DdlRutas.Text.ToEntero, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero, CveMasivo:=CveMasivo, CveVendedor:=UsuarioActual.CveVendedor) > 0 Then If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, fecha, fecha, "", "", CveSubProyecto, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero, CveMasivo:=CveMasivo, CveVendedor:=UsuarioActual.CveVendedor) > 0 Then
ObjContratos.Commit() ObjContratos.Commit()
End If End If
'Actualizamos Folio 'Actualizamos Folio
@@ -164,13 +164,13 @@ Partial Class ListadoViajes
Try Try
'Agregamos Viaje 'Agregamos Viaje
If BtnGuardar.Text = "Agregar" Then If BtnGuardar.Text = "Agregar" Then
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaViaje.Text.ToDate, TxtFechaViaje.Text.ToDate, "", "", -1, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, 0, 0, 0, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) > 0 Then If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaViaje.Text.ToDate, TxtFechaViaje.Text.ToDate, "", "", CveSubProyecto, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, 0, 0, 0, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) > 0 Then
ObjContratos.Commit() ObjContratos.Commit()
Alert("Viaje agregado correctamente.") Alert("Viaje agregado correctamente.")
End If End If
Else Else
'Actualizamos Viaje 'Actualizamos Viaje
If ObjContratos.UpdateContratos(CveContrato.ToEntero, LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaInicial.Text.ToDate, TxtFechaInicial.Text.ToDate, "", "", DdlRutas.SelectedValue.ToEntero, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) = True Then If ObjContratos.UpdateContratos(CveContrato.ToEntero, LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaInicial.Text.ToDate, TxtFechaInicial.Text.ToDate, "", "", CveSubProyecto, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) = True Then
ObjContratos.Commit() ObjContratos.Commit()
Alert("El viaje se actualizó correctamente.") Alert("El viaje se actualizó correctamente.")
End If End If
@@ -180,12 +180,8 @@ Partial Class ListadoViajes
ObjContratos.RollBack() ObjContratos.RollBack()
Finally Finally
'Reiniciamos modal 'Reiniciamos modal
DdlRutas.Text = ""
TxtFechaViaje.Text = "" TxtFechaViaje.Text = ""
DdlPartida.Text = ""
DdlDestino.SelectedValue = ""
'Actualizamos Folio 'Actualizamos Folio
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
Dim ObjFolios As New ClsGralFolios Dim ObjFolios As New ClsGralFolios
If ObjFolios.UpdateFolioActual(CveSubProyecto, "Con", True, UsuarioActual.CveEmpresa) Then If ObjFolios.UpdateFolioActual(CveSubProyecto, "Con", True, UsuarioActual.CveEmpresa) Then
ObjFolios.Dispose() ObjFolios.Dispose()

View File

@@ -545,7 +545,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
CveEstatusFactura = -1; CveEstatusFactura = -1;
} }
retorno = factura.CancelarPorRefacturacion(factura.CveMotivoCancelacion, factura.MotivoCancelacion, FolioSustitucion: FolioSustitucion, CveEstatusFacturaAsignado: CveEstatusFactura); retorno = factura.CancelarPorRefacturacion(factura.CveMotivoCancelacion, factura.MotivoCancelacion, FolioSustitucion: FolioSustitucion, CveEstadoCancelacion: CveEstatusFactura);
} }
else else
{ {

View File

@@ -3463,10 +3463,14 @@ Partial Class Ventas
LblRotacion.Text = FechaRotaAlinea.AddMonths(6).ToShortDateString LblRotacion.Text = FechaRotaAlinea.AddMonths(6).ToShortDateString
LblAlineacion.Text = FechaRotaAlinea.AddMonths(6).ToShortDateString LblAlineacion.Text = FechaRotaAlinea.AddMonths(6).ToShortDateString
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso Me.CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then If Me.CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
HplDownPDF.Visible = False HplDownPDF.Visible = False
End If End If
DdlPS.Attributes.Remove("data-cvesubproyecto")
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
UpPS.Update()
UPObservaciones.Update() UPObservaciones.Update()
End If End If
@@ -7893,10 +7897,10 @@ Partial Class Ventas
End If End If
Dim cvesubproyecto As String = DdlSubProyectoDatos.SelectedValue Dim cvesubproyecto As String = DdlSubProyectoDatos.SelectedValue
If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
'cuando es empresa llantera (558) o cuando es empresa acumuladores ' 'cuando es empresa llantera (558) o cuando es empresa acumuladores
cvesubproyecto = "-1" ' cvesubproyecto = "-1"
End If 'End If
Objeto.Attributes.Add("data-cvesubproyecto", cvesubproyecto) Objeto.Attributes.Add("data-cvesubproyecto", cvesubproyecto)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString()) Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString())
@@ -13315,14 +13319,26 @@ Partial Class Ventas
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica AndAlso RBLTipoVenta.SelectedValue.ToEntero <> 2 Then If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
CveAlmacenTraspasoDestino = CveAlmacenAsignado
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
If Not ChkRequiereTecnico.Checked Then
CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString().ToEntero()
End If
If CveAlmacenTraspasoDestino <= 0 Then
ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado.")
End If
If CveAlmacenAsignado <= 0 Then
ErrorList.Add("Ocurrió un error al seleccionar el almacen de resguardo del cliente.")
Else Else
CveAlmacenTraspasoDestino = CveAlmacenAsignado If CveAlmacenTraspasoDestino <= 0 Then
ErrorList.Add("Ocurrió un error al seleccionar el almacen de resguardo del cliente.")
End If
End If End If
End If End If
Dim TotalImpuestoLocal As Double = 0 Dim TotalImpuestoLocal As Double = 0
@@ -13394,6 +13410,7 @@ Partial Class Ventas
CveMedico = DdlMedico.SelectedValue.ToEntero CveMedico = DdlMedico.SelectedValue.ToEntero
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero) CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero)
'CveAlmacenTraspasoDestino
End If End If
@@ -14815,7 +14832,7 @@ Partial Class Ventas
importeMovimiento = 0 importeMovimiento = 0
Case 103 'Descuento Case 103 'Descuento
If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso (DdlTipoAmortizacionAnticipo.SelectedValue = "-1" OrElse UsuarioActual.CveEmpresa = 141) Then If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso (DdlTipoAmortizacionAnticipo.SelectedValue = "-1" OrElse UsuarioActual.CveEmpresa.Contiene(140, 141)) Then
importeMovimiento = ObjFactura.Descuento * Multiplicador * ValorMultiplicador importeMovimiento = ObjFactura.Descuento * Multiplicador * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador * ValorMultiplicador importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador * ValorMultiplicador
@@ -17431,6 +17448,11 @@ Partial Class Ventas
CargaVendedores() CargaVendedores()
HabilitarRemisionesPublicoGeneral() HabilitarRemisionesPublicoGeneral()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
DdlPS.Attributes.Remove("data-cvesubproyecto")
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
End If
UpDetalle.Update() UpDetalle.Update()
UpEmitirTransitorio.Update() UpEmitirTransitorio.Update()
End Sub End Sub
@@ -36406,7 +36428,7 @@ Partial Class Ventas
DvModalRequiereOSFecha.Visible = True DvModalRequiereOSFecha.Visible = True
Case "2" ' Pago Directo Case "2" ' Pago Directo
ChkRequiereTecnicoModal.Checked = True ChkRequiereTecnicoModal.Checked = True
ChkRequiereTecnicoModal.Enabled = False ChkRequiereTecnicoModal.Enabled = True
DvModalRequiereOSFecha.Visible = True DvModalRequiereOSFecha.Visible = True
DvModalTipoVentaCliente.Visible = True DvModalTipoVentaCliente.Visible = True
Case "3" 'A-Vista Case "3" 'A-Vista
@@ -36608,15 +36630,21 @@ Partial Class Ventas
If RBLTipoVenta.SelectedValue.Contiene("2") Then 'si es pago directo es factura If RBLTipoVenta.SelectedValue.Contiene("2") Then 'si es pago directo es factura
'DdlTipoComprobante.SelectedValueExist("Ing") 'DdlTipoComprobante.SelectedValueExist("Ing")
DdlTipoComprobante.SelectedValueExist("Ped")
TrVentasMedicas1.Visible = True TrVentasMedicas1.Visible = True
TrVentasMedicas2.Visible = True TrVentasMedicas2.Visible = True
TdFechaOS1.Visible = True TdFechaOS1.Visible = True
TdFechaOS2.Visible = True TdFechaOS2.Visible = True
ChkRequiereTecnico.Checked = True ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
ChkRequiereTecnico.Enabled = False ChkRequiereTecnico.Enabled = True
If ChkRequiereTecnico.Checked Then
DdlTipoComprobante.SelectedValueExist("Ped")
Else
DdlTipoComprobante.SelectedValueExist("Rem")
End If
ElseIf RBLTipoVenta.SelectedValue.Contiene("3") Then ' A vista ElseIf RBLTipoVenta.SelectedValue.Contiene("3") Then ' A vista
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped")) DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))