Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -7131,13 +7131,22 @@ Public Class ClsPaginas
|
||||
Dim VendedorMail As String = ""
|
||||
Dim VendedorTelefono As String = ""
|
||||
Dim VendedorCelular As String = ""
|
||||
Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
|
||||
|
||||
Dim RowVendedor As DataRow = Nothing
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
RowVendedor = ObjVendedores.DtResultados.FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
|
||||
End If
|
||||
ObjVendedores.Dispose()
|
||||
|
||||
If Not IsNothing(RowVendedor) Then
|
||||
VendedorNombre = RowVendedor("Vendedor").ToString
|
||||
VendedorMail = RowVendedor("Correo").ToString
|
||||
VendedorTelefono = RowVendedor("Telefono").ToString
|
||||
VendedorCelular = RowVendedor("Celular").ToString
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("VendedorNombre", VendedorNombre))
|
||||
params.Add(New ReportParameter("VendedorMail", VendedorMail))
|
||||
params.Add(New ReportParameter("VendedorTelefono", VendedorTelefono))
|
||||
|
||||
@@ -4820,24 +4820,55 @@ Namespace Modelos
|
||||
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
If Vigencia.Estado.ToUpper().Contains("CANCELADO") Then
|
||||
ContinuarCancelacion = False
|
||||
ObtenerAcuse = True
|
||||
Dim solicitud = New WSGF.Service1SoapClient()
|
||||
Dim acuse = solicitud.GetAcuse(UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx", "rene2018", FolioFiscal)
|
||||
RequiereAceptacion = False
|
||||
|
||||
If acuse.Estado = 0 Then
|
||||
Dim xmlAcuse = New System.Xml.XmlDocument()
|
||||
xmlAcuse.LoadXml(DecodeBase64(acuse.CfdiB64))
|
||||
CancelacionAcuse = xmlAcuse.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate()
|
||||
CveEstatus = 5
|
||||
Else
|
||||
'VERIFICA EN EL SERVICIO SI SE CANCELO
|
||||
Try
|
||||
Dim solicitud = New WSGF.Service1SoapClient()
|
||||
Dim acuse = solicitud.GetAcuse(UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx", "rene2018", FolioFiscal)
|
||||
|
||||
If acuse.Estado = 0 Then
|
||||
Dim xmlAcuse = New System.Xml.XmlDocument()
|
||||
xmlAcuse.LoadXml(DecodeBase64(acuse.CfdiB64))
|
||||
CancelacionAcuse = xmlAcuse.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate()
|
||||
CveEstatus = 5
|
||||
Else
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionAcuse = ""
|
||||
CveEstatus = 5
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLog(ex.ToString())
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionAcuse = ""
|
||||
CveEstatus = 5
|
||||
End Try
|
||||
|
||||
'SI NO SE PUDO OBTENER DEL SERVICIO, UTILIZA EL METODO DE CANCELACION PARA OBTENER EL ACUSE
|
||||
If CancelacionAcuse = "" Then
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, TotalT, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion, FolioSustitucion:=FolioSustitucion) Then
|
||||
'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN
|
||||
If RequiereAceptacion Then
|
||||
CancelacionFecha = Now.Date
|
||||
CveEstatus = 20
|
||||
Else
|
||||
CancelacionFecha = ObjCancelacion.CancelacionFecha
|
||||
CveEstatus = 5
|
||||
End If
|
||||
CancelacionAcuse = ObjCancelacion.CancelacionAcuse
|
||||
Else
|
||||
Retorno.Mensaje = "Los servicios de cancelación del SAT no se encuentran disponibles o presentan time out. Intente de nuevo en unos minutos.<br/>Origen del error: WebService www.sat.gob.mx"
|
||||
Retorno.TipoMensaje = TipoMensaje.MsgError
|
||||
|
||||
Return Retorno
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
ElseIf Vigencia.Estado.ToUpper().Contains("VIGENTE") Then
|
||||
|
||||
If Vigencia.EstatusCancelacion.ToUpper() = "EN PROCESO" Then
|
||||
@@ -9304,21 +9335,28 @@ Namespace Modelos
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Property GlobalDTContaConceptosContables(CvePlantillaPoliza As Integer) As DataTable
|
||||
Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
|
||||
Get
|
||||
If CvePlantillaPoliza <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
|
||||
Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Using ObjContabilidad As New ClsContabilidad
|
||||
If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
|
||||
End Using
|
||||
|
||||
End If
|
||||
If CveConceptoContable <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTContaConceptosContables = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable)
|
||||
GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
HttpContext.Current.Application("GlobalDTContaConceptosContables") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
@@ -133,6 +133,10 @@ Public Class Timbrado
|
||||
Dim Retorno As Boolean = False
|
||||
Dim MsgCancelacion As New StringBuilder
|
||||
|
||||
If CvePACCancelacion = 3 Then
|
||||
ValidaFactura = False
|
||||
End If
|
||||
|
||||
If Not (Empresa.Funcionalidad(529) = "1") Then
|
||||
If ValidaFactura Then
|
||||
Dim Vigencia = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||
@@ -448,28 +452,42 @@ Public Class Timbrado
|
||||
Dim resp As Profact.TimbraCFDI.ResultadoConsulta
|
||||
resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal)
|
||||
MsgCancelacion.AppendFormat("-3.3")
|
||||
If resultadoCancelacion.Exitoso Then
|
||||
|
||||
'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE
|
||||
If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError = "202" Then
|
||||
MsgCancelacion.AppendFormat("-3.4")
|
||||
CancelacionMensaje = resultadoCancelacion.Descripcion
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
|
||||
MsgCancelacion.AppendFormat("-3.4.1")
|
||||
Try
|
||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)))
|
||||
Catch ex As Exception
|
||||
xmlDoc.LoadXml(resp.Xml)
|
||||
If resp.NumeroError.ToEntero() > 0 Then
|
||||
CancelacionMensaje = resp.Descripcion
|
||||
Else
|
||||
Try
|
||||
xmlDoc.LoadXml(resp.Xml)
|
||||
Catch ex2 As Exception
|
||||
Me.OnError("Ocurrió un error al leer el xml", ex)
|
||||
End Try
|
||||
End If
|
||||
End Try
|
||||
|
||||
MsgCancelacion.AppendFormat("-3.4.1")
|
||||
If xmlDoc.HasChildNodes Then
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||
MsgCancelacion.AppendFormat("-3.4.2")
|
||||
xpath = "Acuse/Signature"
|
||||
nodes = xmlDoc.SelectNodes(xpath)
|
||||
MsgCancelacion.AppendFormat("-3.4.3")
|
||||
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
||||
Else
|
||||
CancelacionFecha = Now
|
||||
End If
|
||||
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||
MsgCancelacion.AppendFormat("-3.4.2")
|
||||
xpath = "Acuse/Signature"
|
||||
nodes = xmlDoc.SelectNodes(xpath)
|
||||
MsgCancelacion.AppendFormat("-3.4.3")
|
||||
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
||||
Retorno = True
|
||||
Else
|
||||
MsgCancelacion.AppendFormat("-3.5")
|
||||
|
||||
@@ -320,6 +320,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
|
||||
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||
lrds.Add(rds)
|
||||
@@ -4266,19 +4267,24 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
|
||||
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
|
||||
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
|
||||
'Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
|
||||
'Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
|
||||
|
||||
Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
|
||||
'Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
params.Add(New ReportParameter("Direccion", Almacen))
|
||||
params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
|
||||
params.Add(New ReportParameter("FechaConFormato", Now.ToString("dd/MM/yyyy")))
|
||||
'params.Add(New ReportParameter("FechaInicial", Fecha))
|
||||
'params.Add(New ReportParameter("FechaFinal", Today.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Sucursal", "Sucursal"))
|
||||
params.Add(New ReportParameter("Cliente", NombreCliente))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy hh:mm tt")))
|
||||
params.Add(New ReportParameter("Recibio", Recibio))
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
'params.Add(New ReportParameter("Observaciones", "Observaciones con un tamaño mas grande para ver como se ve en el ticket chico."))
|
||||
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/UsadosEntradas.rdlc", UsuarioActual.CveEmpresa), DtMovimientos, params, "Reporte entrada usados", "PDF", "DsInventarios")
|
||||
Case 7
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkAnticipos" runat="server" Text="Incluye Anticipos" TextAlign="Left" Visible="false" />
|
||||
<asp:CheckBox ID="ChkAnticipos" runat="server" Text="Incluye Anticipos" TextAlign="Left" Checked="true" Visible="false" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
<Width>2.19837cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>8.85259cm</Width>
|
||||
<Width>6.04844cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.80415cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.41521cm</Width>
|
||||
@@ -196,6 +199,48 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox8">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Serie</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>Solid</Style>
|
||||
<Width>1pt</Width>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>Solid</Style>
|
||||
<Width>1pt</Width>
|
||||
</BottomBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox13">
|
||||
@@ -420,6 +465,39 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Serie">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Serie.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Serie</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<VerticalAlign>Bottom</VerticalAlign>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="PU">
|
||||
@@ -500,6 +578,7 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
@@ -611,7 +690,7 @@
|
||||
<Height>0.72418in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>7.72259in</Width>
|
||||
<Width>7.70923in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>5.08094cm</Height>
|
||||
@@ -639,7 +718,7 @@
|
||||
<Top>0.03803cm</Top>
|
||||
<Left>4.37423cm</Left>
|
||||
<Height>2.04667cm</Height>
|
||||
<Width>12.55984cm</Width>
|
||||
<Width>12.37463cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -733,9 +812,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>0.63803cm</Top>
|
||||
<Left>17.07518cm</Left>
|
||||
<Left>16.74886cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>1.2347cm</Width>
|
||||
<Width>2.82632cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -757,15 +836,15 @@
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>0.03803cm</Top>
|
||||
<Left>17.07518cm</Left>
|
||||
<Left>16.74886cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>1.18203cm</Width>
|
||||
<Width>1.50835cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -923,9 +1002,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>1.94386cm</Top>
|
||||
<Left>17.07518cm</Left>
|
||||
<Left>16.74886cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>1.2347cm</Width>
|
||||
<Width>1.56102cm</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
|
||||
@@ -958,9 +1037,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>1.34386cm</Top>
|
||||
<Left>17.07518cm</Left>
|
||||
<Left>16.74886cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.07667cm</Width>
|
||||
<Width>2.40299cm</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
|
||||
@@ -1627,6 +1706,10 @@
|
||||
<DataField>Clasificacion</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Serie">
|
||||
<DataField>Serie</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DsInventarios</rd:DataSetName>
|
||||
|
||||
1273
Empresas/140/Formatos/UsadosEntradas.rdlc
Normal file
1273
Empresas/140/Formatos/UsadosEntradas.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -568,7 +568,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" ValidationGroup="GrpAjuste" />
|
||||
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" />
|
||||
<asp:Button ID="BtnAgregarProductoAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnAgregarProductoAjuste_Click" runat="server" Text="Agregar" ValidationGroup="GrpAjuste" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3278,6 +3278,11 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlMarcaPSAjuste_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If DdlAlmacen.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe selecionar un almacen", TipoMensaje.MsgAdvertencia)
|
||||
UpAjuste.Update()
|
||||
Exit Sub
|
||||
End If
|
||||
CargaPSAjuste(-1, DdlPSAjuste, CveMarca:=DdlMarcaPSAjuste.SelectedValue.ToEntero())
|
||||
UpAjuste.Update()
|
||||
End Sub
|
||||
@@ -3290,7 +3295,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Objeto.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
Else
|
||||
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}")
|
||||
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero()}")
|
||||
|
||||
Objeto.Attributes.Add("data-cvesubproyecto", CveSubProyecto)
|
||||
'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
|
||||
@@ -3318,8 +3323,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim DtDatos As New DataTable
|
||||
Dim logouri = String.Format("{0}//{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim DtDatos As New DataTable
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
<asp:BoundField DataField="TipoAutorizacionTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="Dias Vencidos" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:HyperLinkField DataTextField="FacturaAplicada" Target="_blank" HeaderText="Factura" DataNavigateUrlFields="CveVentaAplicada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -568,12 +568,12 @@ Partial Class PV
|
||||
ViewState("Modalidad") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Index As Integer
|
||||
Private Property GvPSRowIndexEdit As Integer
|
||||
Get
|
||||
Return ViewState("Index").ToString.ToEntero
|
||||
Return ViewState("GvPSRowIndexEdit").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Index") = value
|
||||
ViewState("GvPSRowIndexEdit") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveVentaDetalle As Integer
|
||||
@@ -1095,7 +1095,7 @@ Partial Class PV
|
||||
DtPUFacturas = New DataTable
|
||||
|
||||
Modalidad = ""
|
||||
Index = -1
|
||||
GvPSRowIndexEdit = -1
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
ChkAjuste.Visible = True
|
||||
@@ -3793,7 +3793,7 @@ Partial Class PV
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.SubTotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
@@ -4008,20 +4008,20 @@ Partial Class PV
|
||||
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||
|
||||
'SUGIERE PRECIO
|
||||
Dim PrecioSugerido = 0.0
|
||||
PrecioSugerido = drPS("Precio").ToString.ToDouble
|
||||
Dim PrecioSugerido As Decimal = 0
|
||||
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
||||
If UsuarioActual.CveEmpresa.Contiene(80, 119) Then
|
||||
Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
ObjInventarios.Dispose()
|
||||
Dim PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||
Dim PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
End If
|
||||
@@ -4034,7 +4034,7 @@ Partial Class PV
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
||||
Dim PrecioAplicado As Decimal = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDecimal
|
||||
If PrecioAplicado > 0 Then
|
||||
PrecioSugerido = PrecioAplicado
|
||||
End If
|
||||
@@ -4046,7 +4046,7 @@ Partial Class PV
|
||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||
' si es 10. primero el cliente
|
||||
Dim CvePrecioListaPS As Integer
|
||||
Dim PorcentajePrecio As Double = 0
|
||||
Dim PorcentajePrecio As Decimal = 0
|
||||
|
||||
If TipoPrecioLista = 10 Then
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
@@ -4063,15 +4063,15 @@ Partial Class PV
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
Dim CostoPS As Decimal = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
@@ -4124,9 +4124,13 @@ Partial Class PV
|
||||
|
||||
End If
|
||||
'Descuento por clasificación
|
||||
If drPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
TxtDescuento.Text = (PrecioSugerido * ClasificacionesDescuentos(drPS("CveClasificacion").ToString.ToEntero)).ToString("F2")
|
||||
Dim ObjDescuento As New Descuentos
|
||||
|
||||
ObjDescuento = CalcularDescuentos(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, PrecioSugerido)
|
||||
If ObjDescuento.EsPUModificado Then
|
||||
PrecioSugerido = ObjDescuento.PU
|
||||
End If
|
||||
TxtDescuento.Text = ObjDescuento.ImporteDescuento.ToString("N2")
|
||||
|
||||
HdnDescuentoOriginal.Value = TxtDescuento.Text.ToDecimal().ToString()
|
||||
LblDescuentoIncluido.Text = TxtDescuento.Text.ToDecimal().FormatoNumero(2)
|
||||
@@ -4317,6 +4321,10 @@ Partial Class PV
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
Descuento = PU * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjDescuento.ImporteDescuento = Descuento
|
||||
@@ -4785,13 +4793,7 @@ Partial Class PV
|
||||
ElseIf Modalidad = "U" Then
|
||||
Dim Contador As Integer = 0
|
||||
If CveVentaDetalle <= 0 Then
|
||||
For Each Dr As DataRow In TmpDT.Rows
|
||||
If Dr("Consec").ToString.ToEntero = Index Then
|
||||
Exit For
|
||||
End If
|
||||
Contador = Contador + 1
|
||||
Next
|
||||
Row = TmpDT.Rows(Contador)
|
||||
Row = TmpDT.Rows(GvPSRowIndexEdit)
|
||||
Else
|
||||
Row = TmpDT.Select($"CveVentaDetalle={CveVentaDetalle}")(0)
|
||||
End If
|
||||
@@ -4859,9 +4861,9 @@ Partial Class PV
|
||||
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
||||
|
||||
If Modalidad = "A" Then
|
||||
Row("Consec") = TmpDT.Rows.Count + 1
|
||||
Row("Consec") = TmpDT.MAX("Consec").ToEntero() + 1
|
||||
If Not EsCargo Then
|
||||
ConsecutivoVenta = TmpDT.Rows.Count + 1
|
||||
ConsecutivoVenta = TmpDT.MAX("Consec").ToEntero() + 1
|
||||
End If
|
||||
ElseIf Modalidad = "U" Then
|
||||
If Not EsCargo Then
|
||||
@@ -5201,10 +5203,10 @@ Partial Class PV
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Modalidad = "U"
|
||||
Index = GvRow.DataKey("Consec").ToEntero
|
||||
GvPSRowIndexEdit = GvRow.RowIndex
|
||||
ConsecutivoVenta = GvRow.DataKey("Consec").ToEntero
|
||||
CveVentaDetalle = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||
|
||||
Dim EsCargo = CBool(GvRow.DataKey("EsCargo"))
|
||||
LnkAgregarPS.Text = "Actualizar"
|
||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero, DdlPS)
|
||||
@@ -5249,7 +5251,27 @@ Partial Class PV
|
||||
Ajuste()
|
||||
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
||||
|
||||
'BUSCA EN TMPDT LOS DATOS DE USADOS
|
||||
If TmpDT.Rows.Count > 0 AndAlso TmpDTRecepcionUsados IsNot Nothing AndAlso TmpDTRecepcionUsados.Rows.Count > 0 Then
|
||||
If Not EsCargo Then
|
||||
Dim RowUsado As DataRow = TmpDTRecepcionUsados.Select($"ConsecRelacionado={ConsecutivoVenta}").FirstOrDefault()
|
||||
If RowUsado IsNot Nothing Then
|
||||
DdlRecepcionUsados.SelectedValueExist(RowUsado("CvePS"))
|
||||
DdlRecepcionUsados_SelectedIndexChanged(DdlRecepcionUsados, EventArgs.Empty)
|
||||
|
||||
DdlBCIUsado.SelectedValueExist(RowUsado("CveBCIUsado"))
|
||||
DdlModeloAuto.SelectedValueExist(RowUsado("CveModeloAuto"))
|
||||
|
||||
TxtAnioVehiculo.Text = RowUsado("AnioVehiculo").ToString()
|
||||
TxtFechaVigencia.Text = RowUsado("FechaUsado").ToString().ToDate().ToString("dd/MM/yyyy")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
UpVenta.Update()
|
||||
UpAddVenta.Update()
|
||||
|
||||
RegistraScript("$('#DivAddVenta').modal({backdrop: 'static', keyboard: false});", "EdicionVenta")
|
||||
End Sub
|
||||
Protected Sub LnkAgregarPS_Click(sender As Object, e As EventArgs)
|
||||
@@ -6906,7 +6928,7 @@ Partial Class PV
|
||||
Dim Contador As Integer = 1
|
||||
Dim PUFactura As Decimal = 0
|
||||
For Each Dr As DataRow In DtPUFacturas.Rows
|
||||
If Index = Contador Then
|
||||
If GvPSRowIndexEdit = Contador Then
|
||||
PUFactura = Dr("PU").ToString.ToDecimal
|
||||
End If
|
||||
Contador += 1
|
||||
@@ -7337,7 +7359,7 @@ Partial Class PV
|
||||
End If
|
||||
Next
|
||||
If Elimino Then
|
||||
TmpDTRecepcionUsados.AcceptChanges()
|
||||
TmpDTPolizaVirtual.AcceptChanges()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -7424,12 +7446,15 @@ Partial Class PV
|
||||
TmpDTRecepcionUsados = New DataTable
|
||||
TmpDTRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
|
||||
TmpDTRecepcionUsados.Columns.Add("CvePSRelacionado", GetType(Integer))
|
||||
TmpDTRecepcionUsados.Columns.Add("ConsecRelacionado", GetType(Integer))
|
||||
TmpDTRecepcionUsados.Columns.Add("Cantidad", GetType(Decimal))
|
||||
TmpDTRecepcionUsados.Columns.Add("AnioVehiculo", GetType(String))
|
||||
TmpDTRecepcionUsados.Columns.Add("CveUM", GetType(Integer))
|
||||
TmpDTRecepcionUsados.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||
TmpDTRecepcionUsados.Columns.Add("PU", GetType(Double))
|
||||
TmpDTRecepcionUsados.Columns.Add("CveBCIUsado", GetType(Integer))
|
||||
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
|
||||
TmpDTRecepcionUsados.Columns.Add("FechaUsado", GetType(DateTime))
|
||||
TmpDTRecepcionUsados.Columns.Add("EliminarDB", GetType(Boolean))
|
||||
TmpDTRecepcionUsados.Columns("EliminarDB").DefaultValue = False
|
||||
End Sub
|
||||
@@ -7503,6 +7528,10 @@ Partial Class PV
|
||||
Row("PU") = DrTamanio("Cargo").ToString().ToDecimal
|
||||
Row("CveBCIUsado") = DdlBCIUsado.SelectedValue.ToEntero
|
||||
Row("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero
|
||||
Row("ConsecRelacionado") = ConsecPSPadre
|
||||
Row("FechaUsado") = TxtFechaVigencia.Text.ToDateTime()
|
||||
Row("AnioVehiculo") = TxtAnioVehiculo.Text
|
||||
|
||||
TmpDTRecepcionUsados.Rows.Add(Row)
|
||||
|
||||
End If
|
||||
|
||||
@@ -105,18 +105,18 @@
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Número de Parte / Código:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
<asp:TextBox ID="TxtCodigoBarras" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigoBarras.ClientID.ToString()%>">Código Barras:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divCodigo2" runat="server" visible ="false">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4" id="divCodigo2" runat="server" visible ="false">
|
||||
<asp:TextBox ID="TxtCodigo2" CssClass="form-control " runat="server" MaxLength="50" ></asp:TextBox>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo2.ClientID.ToString()%>">Código CPK:</label>
|
||||
<i></i>
|
||||
@@ -263,6 +263,12 @@
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtVentaMinima.ClientID.ToString()%>">Venta Mínima:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divLitraje" visible="false" runat="server">
|
||||
<asp:TextBox ID="TxtLitraje" CssClass="form-control " runat="server" ReadOnly="true"></asp:TextBox>
|
||||
<%--<ajax:FilteredTextBoxExtender ID="FTBETVentaMinima" TargetControlID="TxtVentaMinima" FilterType="Numbers" runat="server" ValidChars=".," />--%>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtLitraje.ClientID.ToString()%>">Litraje:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
@@ -245,6 +245,8 @@ Partial Class ProductosyServicios
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivPSAdicionalVigencia.Visible = True
|
||||
divCodigo2.Visible = True
|
||||
divLitraje.Visible = True
|
||||
|
||||
CargaPSAdicionalesVigencias()
|
||||
End If
|
||||
|
||||
@@ -846,6 +848,7 @@ Partial Class ProductosyServicios
|
||||
TxtCodigo2.Text = ObjProductosServicios.Codigo2
|
||||
TxtCodigoBarras.Text = ObjProductosServicios.CodigoBarras
|
||||
CodigoBarrasCargado = ObjProductosServicios.CodigoBarras
|
||||
TxtLitraje.Text = ObjProductosServicios.DtResultados.Rows(0)("Litraje").ToString
|
||||
|
||||
TxtPS.Text = ObjProductosServicios.PS
|
||||
TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma
|
||||
|
||||
@@ -305,7 +305,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
|
||||
CveCliente = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente").ToEntero() > 0, Request("CveCliente").ToEntero(), -1).ToString.ToEntero
|
||||
CveSubProyectoEjecucion = If(Request("CveSubProyectoEjecucion") IsNot Nothing AndAlso Request("CveSubProyectoEjecucion").ToEntero() > 0, Request("CveSubProyectoEjecucion").ToEntero(), -1).ToString
|
||||
CveVendedor = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor").ToEntero() > 0, Request("CveVendedor").ToEntero(), -1).ToString.ToEntero
|
||||
CveVendedor = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor").ToEntero() >= 0, Request("CveVendedor").ToEntero(), -1).ToString.ToEntero
|
||||
CveEstatus = If(Request("CveEstatus") IsNot Nothing AndAlso Request("CveEstatus").ToEntero() > 0, Request("CveEstatus").ToEntero(), -1).ToString
|
||||
CveUsuario = If(Request("CveUsuario") IsNot Nothing AndAlso Request("CveUsuario").ToEntero() > 0, Request("CveUsuario").ToEntero(), -1).ToString
|
||||
TipoDocto = If(Request("TipoDocto") IsNot Nothing AndAlso Request("TipoDocto").ToString() <> "-1", Request("TipoDocto").ToString(), "-1").ToString
|
||||
@@ -421,6 +421,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
|
||||
'DdlClientes.SelectedValueExist(CveCliente)
|
||||
DdlSubProyectoEjecucion.SelectedValueExist(CveSubProyectoEjecucion)
|
||||
If CveVendedor = 0 Then DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
DdlVendedor.SelectedValueExist(CveVendedor)
|
||||
DdlUsuario.SelectedValueExist(CveUsuario)
|
||||
DdlTipoComprobante.SelectedValuesIfExistM(TipoDocto)
|
||||
|
||||
@@ -8293,11 +8293,11 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ValidaPagosContado() Then
|
||||
If ValidaPagosContado(TipoDoctoViejo:=TipoDoctoViejo) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
CreaObjetosVenta()
|
||||
CreaObjetosVenta(TipoDoctoViejo:=TipoDoctoViejo)
|
||||
|
||||
'Verifica versión 3.3.()
|
||||
If ObjFactura.Version = "3.3" AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then
|
||||
@@ -9714,6 +9714,8 @@ Partial Class Ventas
|
||||
|
||||
If NCDescuento Then
|
||||
|
||||
factura.Num3 = 1000 ' MARCADA PARA AUMENTAR EL FOLIO
|
||||
|
||||
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
||||
DtVentasNC.Rows(IndexNC)("Importe") = factura.Total
|
||||
DtVentasNC.Rows(IndexNC)("TC") = factura.TipoCambio
|
||||
@@ -9874,7 +9876,7 @@ Partial Class Ventas
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False)
|
||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False, Optional TipoDoctoViejo As String = "")
|
||||
|
||||
If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion)
|
||||
@@ -9904,6 +9906,11 @@ Partial Class Ventas
|
||||
'si es cancelacion, debe de conservar el folio actual
|
||||
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
|
||||
|
||||
'SI ES FACTURACION DE REMISION O COTIZACION NO TOMAR EL FOLIO QUE SE MUESTRA
|
||||
If Not EsCancelacion AndAlso ObjFactura.Folio > 0 AndAlso TipoDoctoViejo.Contiene("Rem", "Cot") Then
|
||||
ObjFactura.Folio = -1
|
||||
End If
|
||||
|
||||
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1)
|
||||
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
|
||||
|
||||
@@ -10693,6 +10700,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.Num1 = TxtNum1.Text.Trim.ToDouble
|
||||
ObjFacturaDevolucion.Num2 = TxtNum2.Text.Trim.ToDouble
|
||||
ObjFacturaDevolucion.Num3 = If(ObjFacturaDevolucion.TipoDocto = "OP", DdlOrdenPago.SelectedValue.ToDouble, TxtNum3.Text.Trim.ToDouble)
|
||||
|
||||
ObjFacturaDevolucion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = CveCorte
|
||||
@@ -11745,15 +11753,15 @@ Partial Class Ventas
|
||||
Exit For
|
||||
Else
|
||||
'VERIFICAR QUE EL DESCUENTO NO PASE EL 40%
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Row("CveClasificacion").ToString().ToEntero() <> 20519 AndAlso (Not Row("Obs").ToString().Contains("Descuento por garantía")) Then
|
||||
Dim TotalDetalle = Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6)
|
||||
Dim DescuentoDetalle = Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1))
|
||||
Dim PorcentajeDescuento As Double = (DescuentoDetalle / TotalDetalle) * 100D
|
||||
If PorcentajeDescuento > 40 Then
|
||||
ErrorList.Add(String.Format("El descuento del producto/servicio {0} no puede ser mayor al 40%. Porcentaje Actual: {1}%", Row("CodigoPS"), PorcentajeDescuento.RoundSQL(2)))
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Row("CveClasificacion").ToString().ToEntero() <> 20519 AndAlso (Not Row("Obs").ToString().Contains("Descuento por garantía")) Then
|
||||
' Dim TotalDetalle = Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6)
|
||||
' Dim DescuentoDetalle = Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1))
|
||||
' Dim PorcentajeDescuento As Double = (DescuentoDetalle / TotalDetalle) * 100D
|
||||
' If PorcentajeDescuento > 40 Then
|
||||
' ErrorList.Add(String.Format("El descuento del producto/servicio {0} no puede ser mayor al 40%. Porcentaje Actual: {1}%", Row("CodigoPS"), PorcentajeDescuento.RoundSQL(2)))
|
||||
' Exit For
|
||||
' End If
|
||||
'End If
|
||||
'Agregamos el gasto de contrato
|
||||
If CveContrato > 0 AndAlso factura.TipoDocto = "Rem" AndAlso AplicaGastoContrato Then
|
||||
|
||||
@@ -21595,7 +21603,7 @@ Partial Class Ventas
|
||||
Private Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged
|
||||
LimpiaEscondeContado()
|
||||
End Sub
|
||||
Private Function ValidaPagosContado(Optional MostrarAlertas As Boolean = True) As Boolean
|
||||
Private Function ValidaPagosContado(Optional MostrarAlertas As Boolean = True, Optional TipoDoctoViejo As String = "") As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
Dim AmortizacionNC As Decimal = 0
|
||||
@@ -21638,7 +21646,8 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso RBLPago.SelectedValue = "2" AndAlso CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
|
||||
'VALIDA PAGOS EN FACTURAS DE ING,ANT NUEVAS O FACTURACION DE REM O COTIZACIONES
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso RBLPago.SelectedValue = "2" AndAlso ((CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant")) OrElse TipoDoctoViejo.Contiene("Rem", "Cot")) Then
|
||||
|
||||
If Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||
If MostrarAlertas Then
|
||||
@@ -32024,7 +32033,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
||||
Try
|
||||
If UsuarioActual.CveUsuario.Contiene(3033, 3491) Then
|
||||
If UsuarioActual.CveUsuario.Contiene(3491) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user