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))
|
||||
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, 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"
|
||||
NombreArchivo = "Cotizacion"
|
||||
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 = "",
|
||||
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 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
|
||||
|
||||
DataAdapter("PA_CentroCostoAdd")
|
||||
@@ -370,6 +370,7 @@ Public Class ClsSubProyectos
|
||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
||||
.Add("@DeshabilitaAutorizacion", SqlDbType.Bit).Value = DeshabilitaAutorizacion
|
||||
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
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 = "",
|
||||
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 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
|
||||
|
||||
DataAdapter("PA_CentroCostoUpdate")
|
||||
@@ -432,6 +433,7 @@ Public Class ClsSubProyectos
|
||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
||||
.Add("@DeshabilitaAutorizacion", SqlDbType.Bit).Value = DeshabilitaAutorizacion
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -1042,6 +1042,11 @@ Partial Class Compras_Compras
|
||||
End Property
|
||||
Private Property RetIVAOriginal As Double
|
||||
Get
|
||||
|
||||
If ViewState("RetIVAOriginal") Is Nothing Then
|
||||
ViewState("RetIVAOriginal") = 0
|
||||
End If
|
||||
|
||||
Return ViewState("RetIVAOriginal").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
@@ -1050,6 +1055,10 @@ Partial Class Compras_Compras
|
||||
End Property
|
||||
Private Property RetISROriginal As Double
|
||||
Get
|
||||
If ViewState("RetISROriginal") Is Nothing Then
|
||||
ViewState("RetISROriginal") = 0
|
||||
End If
|
||||
|
||||
Return ViewState("RetISROriginal").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
@@ -16673,9 +16682,9 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
|
||||
TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 0)
|
||||
TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 0)
|
||||
TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 0)
|
||||
TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 2)
|
||||
TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 2)
|
||||
TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 2)
|
||||
|
||||
ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble
|
||||
ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble
|
||||
@@ -16878,14 +16887,14 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
If TxtIEPSModal.Text = "" Then
|
||||
TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 0)
|
||||
TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 2)
|
||||
End If
|
||||
ViewState("IEPSPSIVA") = If(PS("IEPSGrabaIVA").ToString = "True", PS("IEPSPorcentaje").ToString.ToDouble, 0)
|
||||
|
||||
|
||||
'TxtIVAModal.Text = FormatoNumero(ViewState("IVAPS").ToString().ToDouble * 100, 0)
|
||||
TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 0)
|
||||
TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0)
|
||||
TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 2)
|
||||
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
|
||||
|
||||
@@ -718,7 +718,10 @@
|
||||
<Width>0.94204in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>4.47563in</Width>
|
||||
<Width>3.55472in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.98425in</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -905,6 +908,42 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox14">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=IIf(Parameters!MostrarImportes.Value = true, "Total", "")</Value>
|
||||
<Style>
|
||||
<FontSize>10.16pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>#008204</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
@@ -1079,6 +1118,39 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Total">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=IIf(Parameters!MostrarImportes.Value = true, Fields!Total.Value, "")</Value>
|
||||
<Style>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Total</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
@@ -1090,6 +1162,7 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
@@ -1106,7 +1179,7 @@
|
||||
<Top>2.74327in</Top>
|
||||
<Left>0.06548in</Left>
|
||||
<Height>0.37206in</Height>
|
||||
<Width>8.20137in</Width>
|
||||
<Width>8.26471in</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1129,10 +1202,10 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>7.96763cm</Top>
|
||||
<Left>0.16632cm</Left>
|
||||
<Top>7.94822cm</Top>
|
||||
<Left>0.15466cm</Left>
|
||||
<Height>0.14316cm</Height>
|
||||
<Width>20.88652cm</Width>
|
||||
<Width>21.00402cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1163,7 +1236,7 @@
|
||||
<Top>8.70049cm</Top>
|
||||
<Left>0.16632cm</Left>
|
||||
<Height>0.11466cm</Height>
|
||||
<Width>20.88652cm</Width>
|
||||
<Width>20.99236cm</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1612,6 +1685,121 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Rectangle>
|
||||
<Tablix Name="Tablix3">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>2.99824cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.48004cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Importe">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Importe.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Importe</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
</TablixBody>
|
||||
<TablixColumnHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<Group Name="ImpuestoLocal">
|
||||
<GroupExpressions>
|
||||
<GroupExpression>=Fields!ImpuestoLocal.Value</GroupExpression>
|
||||
</GroupExpressions>
|
||||
</Group>
|
||||
<TablixHeader>
|
||||
<Size>2.93858cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="ImpuestoLocal">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>ImpuestoLocal</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>White</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixHeader>
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>8.17047cm</Top>
|
||||
<Left>15.04546cm</Left>
|
||||
<Height>0.48004cm</Height>
|
||||
<Width>5.93682cm</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Parameters!MostrarImportes.Value = false</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
</ReportItems>
|
||||
<Height>18.12046cm</Height>
|
||||
<Style />
|
||||
@@ -2289,6 +2477,11 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="MostrarImportes">
|
||||
<DataType>Boolean</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="Logo119">
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<div class="col-md-12">
|
||||
<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,
|
||||
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">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="Centro de costo" />
|
||||
@@ -220,6 +220,14 @@
|
||||
</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>
|
||||
</ajax:TabPanel>
|
||||
|
||||
@@ -66,6 +66,10 @@ Partial Class CatSubProyectos
|
||||
DivCodigoSucursal.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
|
||||
DivDeshabilitaAutorizaciones.Visible = True
|
||||
End If
|
||||
|
||||
CargaProyecto()
|
||||
CargaSegmentosNegocio()
|
||||
|
||||
@@ -314,6 +318,7 @@ Partial Class CatSubProyectos
|
||||
'AplicaComercio()
|
||||
ChkNoVerificaAlmacen.Checked = If(GvRow.DataKey("NoVerificaAlmacen").ToString = "True", True, False)
|
||||
TxtCodigoSucursal.Text = (GvRow.DataKey("CodigoSucursal"))
|
||||
ChkDeshabilitaAutorizaciones.Checked = CBool(GvRow.DataKey("DeshabilitaAutorizacion"))
|
||||
|
||||
BtnGuardar.Text = "Actualizar"
|
||||
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,
|
||||
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,
|
||||
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
|
||||
Else
|
||||
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,
|
||||
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,
|
||||
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
|
||||
End If
|
||||
Else
|
||||
@@ -448,9 +453,9 @@ Partial Class CatSubProyectos
|
||||
If Not TieneError Then
|
||||
ObjSubproyectos.Commit()
|
||||
If HdnModalidad.Value = "I" Then
|
||||
Alert("La nueva Sucursal se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Alert("La nueva sucursal se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("La Sucursal se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
||||
Alert("La sucursal se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarCentroCosto"))
|
||||
|
||||
@@ -2307,6 +2307,15 @@ Partial Class Ventas
|
||||
ViewState("CveContratoTipo") = value
|
||||
End Set
|
||||
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
|
||||
|
||||
'#Region "AuxiliarConta"
|
||||
@@ -6903,6 +6912,8 @@ Partial Class Ventas
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
CalculaLineasAdicionales()
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
HabilitarRemisionesPublicoGeneral()
|
||||
End If
|
||||
|
||||
|
||||
@@ -6917,6 +6928,71 @@ Partial Class Ventas
|
||||
'End If
|
||||
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()
|
||||
|
||||
If CveVenta > 0 AndAlso UsuarioActual.TienePermisoProceso(321) Then
|
||||
@@ -8838,6 +8914,10 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -17985,6 +18065,7 @@ Partial Class Ventas
|
||||
ObjSubProyectos.Dispose()
|
||||
|
||||
CargaVendedores()
|
||||
HabilitarRemisionesPublicoGeneral()
|
||||
|
||||
UpDetalle.Update()
|
||||
UpEmitirTransitorio.Update()
|
||||
@@ -20027,6 +20108,8 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
ValidaImportePublicoGeneral()
|
||||
|
||||
UPObservaciones.Update()
|
||||
UpContado.Update()
|
||||
UpPS.Update()
|
||||
|
||||
Reference in New Issue
Block a user