Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -5618,6 +5618,15 @@ Public Class ClsPaginas
|
|||||||
params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
|
params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
|
||||||
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||||
RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
|
RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
|
||||||
|
Dim MostrarImportes As Boolean = False
|
||||||
|
'SI EL CLIENTE ES PUBLICO GENERAL
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(381).Trim() = Vta.CveCliente.ToString() Then
|
||||||
|
MostrarImportes = True
|
||||||
|
End If
|
||||||
|
params.Add(New ReportParameter("MostrarImportes", MostrarImportes.ToString()))
|
||||||
|
End If
|
||||||
Case "Cot"
|
Case "Cot"
|
||||||
NombreArchivo = "Cotizacion"
|
NombreArchivo = "Cotizacion"
|
||||||
NombreArchivoDescarga = "Cotización"
|
NombreArchivoDescarga = "Cotización"
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ Public Class ClsSubProyectos
|
|||||||
Public Function AddCentroCosto(SubProyecto As String, IdSegNeg As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
Public Function AddCentroCosto(SubProyecto As String, IdSegNeg As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
||||||
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
||||||
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
||||||
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean
|
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1, Optional DeshabilitaAutorizacion As Boolean = False) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_CentroCostoAdd")
|
DataAdapter("PA_CentroCostoAdd")
|
||||||
@@ -369,7 +369,8 @@ Public Class ClsSubProyectos
|
|||||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||||
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
||||||
|
.Add("@DeshabilitaAutorizacion", SqlDbType.Bit).Value = DeshabilitaAutorizacion
|
||||||
|
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@CveSubProyecto", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
@@ -393,7 +394,7 @@ Public Class ClsSubProyectos
|
|||||||
Public Function UpdateCentroCosto(CveSubProyecto As Integer, SubProyecto As String, IdSegNeg As Integer, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
Public Function UpdateCentroCosto(CveSubProyecto As Integer, SubProyecto As String, IdSegNeg As Integer, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
||||||
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
||||||
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
||||||
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean
|
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1, Optional DeshabilitaAutorizacion As Boolean = False) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_CentroCostoUpdate")
|
DataAdapter("PA_CentroCostoUpdate")
|
||||||
@@ -432,6 +433,7 @@ Public Class ClsSubProyectos
|
|||||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||||
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
||||||
|
.Add("@DeshabilitaAutorizacion", SqlDbType.Bit).Value = DeshabilitaAutorizacion
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -1042,6 +1042,11 @@ Partial Class Compras_Compras
|
|||||||
End Property
|
End Property
|
||||||
Private Property RetIVAOriginal As Double
|
Private Property RetIVAOriginal As Double
|
||||||
Get
|
Get
|
||||||
|
|
||||||
|
If ViewState("RetIVAOriginal") Is Nothing Then
|
||||||
|
ViewState("RetIVAOriginal") = 0
|
||||||
|
End If
|
||||||
|
|
||||||
Return ViewState("RetIVAOriginal").ToString.ToDouble
|
Return ViewState("RetIVAOriginal").ToString.ToDouble
|
||||||
End Get
|
End Get
|
||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
@@ -1050,6 +1055,10 @@ Partial Class Compras_Compras
|
|||||||
End Property
|
End Property
|
||||||
Private Property RetISROriginal As Double
|
Private Property RetISROriginal As Double
|
||||||
Get
|
Get
|
||||||
|
If ViewState("RetISROriginal") Is Nothing Then
|
||||||
|
ViewState("RetISROriginal") = 0
|
||||||
|
End If
|
||||||
|
|
||||||
Return ViewState("RetISROriginal").ToString.ToDouble
|
Return ViewState("RetISROriginal").ToString.ToDouble
|
||||||
End Get
|
End Get
|
||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
@@ -16673,9 +16682,9 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 0)
|
TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 2)
|
||||||
TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 0)
|
TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 2)
|
||||||
TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 0)
|
TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 2)
|
||||||
|
|
||||||
ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble
|
ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble
|
||||||
ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble
|
ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble
|
||||||
@@ -16878,14 +16887,14 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If TxtIEPSModal.Text = "" Then
|
If TxtIEPSModal.Text = "" Then
|
||||||
TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 0)
|
TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 2)
|
||||||
End If
|
End If
|
||||||
ViewState("IEPSPSIVA") = If(PS("IEPSGrabaIVA").ToString = "True", PS("IEPSPorcentaje").ToString.ToDouble, 0)
|
ViewState("IEPSPSIVA") = If(PS("IEPSGrabaIVA").ToString = "True", PS("IEPSPorcentaje").ToString.ToDouble, 0)
|
||||||
|
|
||||||
|
|
||||||
'TxtIVAModal.Text = FormatoNumero(ViewState("IVAPS").ToString().ToDouble * 100, 0)
|
'TxtIVAModal.Text = FormatoNumero(ViewState("IVAPS").ToString().ToDouble * 100, 0)
|
||||||
TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 0)
|
TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 2)
|
||||||
TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0)
|
TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 2)
|
||||||
|
|
||||||
|
|
||||||
If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 And PS("IEPSPorcentaje").ToString.ToDecimal > 0 Then
|
If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 And PS("IEPSPorcentaje").ToString.ToDecimal > 0 Then
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,7 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||||
DataKeyNames="CveSubProyecto,SubProyecto,IdSegNeg,Estatus,Serie,IVA,Calle,NoExt,NoInt,Colonia,Localidad,Municipio,Estado,Pais,CP,CveProyecto,TipoSucursal,EsSucursal,
|
DataKeyNames="CveSubProyecto,SubProyecto,IdSegNeg,Estatus,Serie,IVA,Calle,NoExt,NoInt,Colonia,Localidad,Municipio,Estado,Pais,CP,CveProyecto,TipoSucursal,EsSucursal,
|
||||||
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen,CodigoSucursal,CveLocalidad"
|
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen,CodigoSucursal,CveLocalidad,DeshabilitaAutorizacion"
|
||||||
EmptyDataText="No se encontraron SubProyectos" ShowHeader="true" CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" GridLines="None">
|
EmptyDataText="No se encontraron SubProyectos" ShowHeader="true" CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="SubProyecto" HeaderText="Centro de costo" />
|
<asp:BoundField DataField="SubProyecto" HeaderText="Centro de costo" />
|
||||||
@@ -220,6 +220,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row" id="DivDeshabilitaAutorizaciones" runat="server" visible="false">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:CheckBox ID="ChkDeshabilitaAutorizaciones" runat="server" CssClass="form-control" Checked="false" />
|
||||||
|
<label for="<%= ChkDeshabilitaAutorizaciones.ClientID.ToString()%>">Deshabilita autorizaciones para público general</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|||||||
@@ -66,6 +66,10 @@ Partial Class CatSubProyectos
|
|||||||
DivCodigoSucursal.Visible = True
|
DivCodigoSucursal.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
|
||||||
|
DivDeshabilitaAutorizaciones.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
CargaProyecto()
|
CargaProyecto()
|
||||||
CargaSegmentosNegocio()
|
CargaSegmentosNegocio()
|
||||||
|
|
||||||
@@ -314,6 +318,7 @@ Partial Class CatSubProyectos
|
|||||||
'AplicaComercio()
|
'AplicaComercio()
|
||||||
ChkNoVerificaAlmacen.Checked = If(GvRow.DataKey("NoVerificaAlmacen").ToString = "True", True, False)
|
ChkNoVerificaAlmacen.Checked = If(GvRow.DataKey("NoVerificaAlmacen").ToString = "True", True, False)
|
||||||
TxtCodigoSucursal.Text = (GvRow.DataKey("CodigoSucursal"))
|
TxtCodigoSucursal.Text = (GvRow.DataKey("CodigoSucursal"))
|
||||||
|
ChkDeshabilitaAutorizaciones.Checked = CBool(GvRow.DataKey("DeshabilitaAutorizacion"))
|
||||||
|
|
||||||
BtnGuardar.Text = "Actualizar"
|
BtnGuardar.Text = "Actualizar"
|
||||||
CargaRequired()
|
CargaRequired()
|
||||||
@@ -423,7 +428,7 @@ Partial Class CatSubProyectos
|
|||||||
If Not ObjSubproyectos.AddCentroCosto(TxtCentroCosto.Text.Trim, IdSeg, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
If Not ObjSubproyectos.AddCentroCosto(TxtCentroCosto.Text.Trim, IdSeg, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
||||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=StrLocalidad, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=StrLocalidad, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||||
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
||||||
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then
|
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, DeshabilitaAutorizacion:=ChkDeshabilitaAutorizaciones.Checked) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Else
|
Else
|
||||||
CveSubProyecto = ObjSubproyectos.CveSubProyecto
|
CveSubProyecto = ObjSubproyectos.CveSubProyecto
|
||||||
@@ -433,7 +438,7 @@ Partial Class CatSubProyectos
|
|||||||
If Not ObjSubproyectos.UpdateCentroCosto(CveCentroCosto, TxtCentroCosto.Text.Trim, IdSeg, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
If Not ObjSubproyectos.UpdateCentroCosto(CveCentroCosto, TxtCentroCosto.Text.Trim, IdSeg, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
||||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=TxtLocalidad.Text.Trim, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=TxtLocalidad.Text.Trim, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||||
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
||||||
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then
|
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, DeshabilitaAutorizacion:=ChkDeshabilitaAutorizaciones.Checked) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -448,9 +453,9 @@ Partial Class CatSubProyectos
|
|||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjSubproyectos.Commit()
|
ObjSubproyectos.Commit()
|
||||||
If HdnModalidad.Value = "I" Then
|
If HdnModalidad.Value = "I" Then
|
||||||
Alert("La nueva Sucursal se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La nueva sucursal se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
Alert("La Sucursal se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La sucursal se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarCentroCosto"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarCentroCosto"))
|
||||||
|
|||||||
@@ -2307,6 +2307,15 @@ Partial Class Ventas
|
|||||||
ViewState("CveContratoTipo") = value
|
ViewState("CveContratoTipo") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property HabilitaRemisionPublicoGeneral As Integer
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("HabilitaRemisionPublicoGeneral"), "0", ViewState("HabilitaRemisionPublicoGeneral")).ToString().ToEntero()
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("HabilitaRemisionPublicoGeneral") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
'#Region "AuxiliarConta"
|
'#Region "AuxiliarConta"
|
||||||
@@ -6903,6 +6912,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
CalculaLineasAdicionales()
|
CalculaLineasAdicionales()
|
||||||
|
HabilitaRemisionPublicoGeneral = 0
|
||||||
|
HabilitarRemisionesPublicoGeneral()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -6917,6 +6928,71 @@ Partial Class Ventas
|
|||||||
'End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub HabilitarRemisionesPublicoGeneral()
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
|
||||||
|
'SI ESTA BLOQUEADO POR AUTORIZACION, HABILITAR LA OPCION DE REMISION PARA PUBLICO EN GENERAL
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(381).Trim() = CveCliente.ToString() Then
|
||||||
|
Dim DeshabilitarAutorizacion As Boolean = CBool(GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("DeshabilitaAutorizacion"))
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue = "PA" AndAlso DeshabilitarAutorizacion Then
|
||||||
|
If DdlTipoComprobante.Items.FindByValue("Rem") Is Nothing Then
|
||||||
|
DdlTipoComprobante.Items.Insert(0, New ListItem("Remisión", "Rem"))
|
||||||
|
End If
|
||||||
|
DdlTipoComprobante.SelectedValueExist("Rem")
|
||||||
|
HabilitaRemisionPublicoGeneral = 1
|
||||||
|
End If
|
||||||
|
|
||||||
|
'SI TIENE LA HABILITACION DE REMISION ACTIVA Y LA SUCURSAL NO LO PERMITE
|
||||||
|
If Not DeshabilitarAutorizacion AndAlso HabilitaRemisionPublicoGeneral = 1 Then
|
||||||
|
HabilitaRemisionPublicoGeneral = 0
|
||||||
|
DdlTipoComprobante.SelectedValueExist("PA")
|
||||||
|
If DdlTipoComprobante.Items.FindByValue("Rem") IsNot Nothing Then
|
||||||
|
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpParametros.Update()
|
||||||
|
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
HabilitaRemisionPublicoGeneral = 0
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function ValidaImportePublicoGeneral() As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Rem" AndAlso HabilitaRemisionPublicoGeneral = 1 Then
|
||||||
|
Dim Total As Decimal = TxtTotal.Text.ToDecimal()
|
||||||
|
|
||||||
|
If DdlMoneda.SelectedValue = "1" Then
|
||||||
|
If Total <= 5000D Then
|
||||||
|
retorno = True
|
||||||
|
Else
|
||||||
|
Alert("No puede generar una remisión con un valor mayor a 5,000 MXN. Debe cambiar el tipo de documento a 'Autorización'", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DdlMoneda.SelectedValue = "2" Then
|
||||||
|
If TxtTipoCambio.Text.ToDecimal() > 0 Then
|
||||||
|
Dim TotalPesos As Decimal = (Total * TxtTipoCambio.Text.ToDecimal())
|
||||||
|
If TotalPesos <= 5000D Then
|
||||||
|
retorno = True
|
||||||
|
Else
|
||||||
|
Alert($"No puede generar una remisión con un valor mayor a {(5000 / TxtTipoCambio.Text.ToDecimal()).RoundSQL(2)} USD. Debe cambiar el tipo de documento a 'Autorización'", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("No se ha especificado un tipo de cambio", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
retorno = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub CargaRelacionadasPendientes()
|
Private Sub CargaRelacionadasPendientes()
|
||||||
|
|
||||||
If CveVenta > 0 AndAlso UsuarioActual.TienePermisoProceso(321) Then
|
If CveVenta > 0 AndAlso UsuarioActual.TienePermisoProceso(321) Then
|
||||||
@@ -8838,6 +8914,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ValidaImportePublicoGeneral() Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) Then
|
If (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) Then
|
||||||
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
|
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -17985,6 +18065,7 @@ Partial Class Ventas
|
|||||||
ObjSubProyectos.Dispose()
|
ObjSubProyectos.Dispose()
|
||||||
|
|
||||||
CargaVendedores()
|
CargaVendedores()
|
||||||
|
HabilitarRemisionesPublicoGeneral()
|
||||||
|
|
||||||
UpDetalle.Update()
|
UpDetalle.Update()
|
||||||
UpEmitirTransitorio.Update()
|
UpEmitirTransitorio.Update()
|
||||||
@@ -20027,6 +20108,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ValidaImportePublicoGeneral()
|
||||||
|
|
||||||
UPObservaciones.Update()
|
UPObservaciones.Update()
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
|
|||||||
Reference in New Issue
Block a user