Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -61,11 +61,18 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
|||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
|
'If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
|
||||||
|
' e.Row.CssClass = "SubTotales2"
|
||||||
|
'End If
|
||||||
|
If e.Row.DBCampo("TipoHeader").ToString = "1" Then
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
ElseIf e.Row.DBCampo("TipoHeader").ToString = "2" Then
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
ElseIf e.Row.DBCampo("TipoHeader").ToString = "3" Then
|
||||||
e.Row.CssClass = "SubTotales2"
|
e.Row.CssClass = "SubTotales2"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ Public Class ClsEdocumentacion
|
|||||||
#Region "D O C U M E N T A C I O N "
|
#Region "D O C U M E N T A C I O N "
|
||||||
|
|
||||||
|
|
||||||
Public Function DocumentacionGet(CveDocumentacion As Integer, CveDocumentacionTipo As Integer, Estatus As Integer, CveEmpresa As Integer, Optional Modulo As Integer = 1) As Boolean
|
Public Function DocumentacionGet(CveDocumentacion As Integer, CveDocumentacionTipo As Integer, Estatus As Integer, CveEmpresa As Integer, Optional Modulo As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Edoc_DocumentacionGet")
|
DataAdapter("PA_Edoc_DocumentacionGet")
|
||||||
@@ -433,7 +433,7 @@ Public Class ClsEdocumentacion
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function DocumentacionTipoGet(CveEmpresa As Integer, Optional Modulo As Integer = 1) As Boolean
|
Public Function DocumentacionTipoGet(CveEmpresa As Integer, Optional Modulo As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|||||||
@@ -4563,7 +4563,9 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Ventas/CatClientes.aspx".ToUpper(), 5)
|
PaginaDict.Add("/Ventas/CatClientes.aspx".ToUpper(), 5)
|
||||||
PaginaDict.Add("/Ventas/CatClientesClasificaciones.aspx".ToUpper(), 408)
|
PaginaDict.Add("/Ventas/CatClientesClasificaciones.aspx".ToUpper(), 408)
|
||||||
PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 6)
|
PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 6)
|
||||||
|
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 366)
|
||||||
PaginaDict.Add("/Ventas/RepVentas.aspx".ToUpper(), 9)
|
PaginaDict.Add("/Ventas/RepVentas.aspx".ToUpper(), 9)
|
||||||
|
PaginaDict.Add("/Ventas/RepVentas.aspx?Op=Cot".ToUpper(), 367)
|
||||||
PaginaDict.Add("/Ventas/RepRemisiones.aspx".ToUpper(), 430)
|
PaginaDict.Add("/Ventas/RepRemisiones.aspx".ToUpper(), 430)
|
||||||
PaginaDict.Add("/Ventas/RepRemisionesDetalle.aspx".ToUpper(), 430)
|
PaginaDict.Add("/Ventas/RepRemisionesDetalle.aspx".ToUpper(), 430)
|
||||||
PaginaDict.Add("/Ventas/RepCotizaciones.aspx".ToUpper(), 430)
|
PaginaDict.Add("/Ventas/RepCotizaciones.aspx".ToUpper(), 430)
|
||||||
@@ -4641,7 +4643,7 @@ Public Class ClsPaginas
|
|||||||
'PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 2016)
|
'PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 2016)
|
||||||
'PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 2017)
|
'PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 2017)
|
||||||
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Rem".ToUpper(), 2018)
|
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Rem".ToUpper(), 2018)
|
||||||
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 2019)
|
'PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 2019)
|
||||||
PaginaDict.Add("/Ventas/VentasH.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Ventas/VentasH.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Ventas/ClientesAbonarH.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Ventas/ClientesAbonarH.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Ventas/PVRaul.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Ventas/PVRaul.aspx".ToUpper(), -1)
|
||||||
|
|||||||
@@ -3375,7 +3375,15 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Scotiabank CTA. 0686 4074 CLABE 0447 7011 006 8640 743</Value>
|
<Value>CONVENIO CIE Bancomer: 001598120 Referencia:</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>Myriad Pro</FontFamily>
|
||||||
|
<FontSize>9.64pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!ClienteCodigo.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Myriad Pro</FontFamily>
|
<FontFamily>Myriad Pro</FontFamily>
|
||||||
<FontSize>9.64pt</FontSize>
|
<FontSize>9.64pt</FontSize>
|
||||||
@@ -3388,15 +3396,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Referencia: </Value>
|
<Value>Scotiabank CTA. 0686 4074 CLABE 0447 7011 006 8640 743</Value>
|
||||||
<Style>
|
|
||||||
<FontFamily>Myriad Pro</FontFamily>
|
|
||||||
<FontSize>9.64pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Parameters!Referencia.Value</Value>
|
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Myriad Pro</FontFamily>
|
<FontFamily>Myriad Pro</FontFamily>
|
||||||
<FontSize>9.64pt</FontSize>
|
<FontSize>9.64pt</FontSize>
|
||||||
@@ -3411,7 +3411,7 @@
|
|||||||
<Top>6.7921in</Top>
|
<Top>6.7921in</Top>
|
||||||
<Left>0.16632cm</Left>
|
<Left>0.16632cm</Left>
|
||||||
<Height>0.36385in</Height>
|
<Height>0.36385in</Height>
|
||||||
<Width>4.87092in</Width>
|
<Width>4.94037in</Width>
|
||||||
<ZIndex>14</ZIndex>
|
<ZIndex>14</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
|
|||||||
@@ -661,6 +661,16 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
||||||
|
|
||||||
|
If Not TxtImporte.Text.ToDecimal > 0 Then
|
||||||
|
Alert("Debe de llevar un Importe", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not (TxtFolio.Text.Trim <> "" Or RblTipoPago.SelectedValue = "2" Or RblTipoPago.SelectedValue = "3") Then
|
||||||
|
Alert("Debe de llevar un Folio", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim Cuenta As String = ""
|
Dim Cuenta As String = ""
|
||||||
Dim CuentaDeposito As String = ""
|
Dim CuentaDeposito As String = ""
|
||||||
|
|
||||||
@@ -676,7 +686,6 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = 0
|
Dim CvePrePoliza As Integer = 0
|
||||||
Dim IDPoliza As Integer = 0
|
Dim IDPoliza As Integer = 0
|
||||||
Dim FolioPoliza As String = ""
|
Dim FolioPoliza As String = ""
|
||||||
@@ -684,6 +693,29 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim CveVentasPago As New List(Of Integer)
|
Dim CveVentasPago As New List(Of Integer)
|
||||||
Dim SeriesPago As New List(Of String)
|
Dim SeriesPago As New List(Of String)
|
||||||
|
|
||||||
|
Dim MsgError As String = ""
|
||||||
|
Dim NCGeneradas As New List(Of Modelos.Factura.MMensajeFactura)
|
||||||
|
Dim ListaFacturasGenerarNC As New List(Of Modelos.Factura)
|
||||||
|
|
||||||
|
Dim ImporteSeleccionado As Decimal = 0
|
||||||
|
|
||||||
|
'02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR
|
||||||
|
Dim ErrorCancelarIE As Boolean = False
|
||||||
|
|
||||||
|
If CveIESustitucion > 0 Then
|
||||||
|
ErrorCancelarIE = CancelarIE()
|
||||||
|
If ErrorCancelarIE Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ObjIE As New ClsBancos()
|
||||||
|
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||||
|
Dim ObjVentasSaldos As New ClsVentas(ObjIE.IniciaTransacSQL)
|
||||||
|
Dim ObjEvento As New ClsOIEventos(ObjIE.IniciaTransacSQL)
|
||||||
|
Dim ObjConta As ClsContPAQi = Nothing
|
||||||
|
|
||||||
|
Try
|
||||||
Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||||
Dim filemove As String = ""
|
Dim filemove As String = ""
|
||||||
Dim Comprobante As String = ""
|
Dim Comprobante As String = ""
|
||||||
@@ -694,87 +726,6 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
filemove = fileItem.filename
|
filemove = fileItem.filename
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim MsgError As String = ""
|
|
||||||
Dim NCGeneradas As New List(Of Modelos.Factura.MMensajeFactura)
|
|
||||||
Dim ListaFacturasGenerarNC As New List(Of Modelos.Factura)
|
|
||||||
|
|
||||||
'comentada RMF 2018.09.28
|
|
||||||
'Dim Dep As New ClsGenerales
|
|
||||||
'If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
|
|
||||||
' Dim Row = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
|
||||||
' If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
|
|
||||||
' Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Dep.Dispose()
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'Dep.Dispose()
|
|
||||||
|
|
||||||
Dim ImporteSeleccionado As Decimal = 0
|
|
||||||
'If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
|
||||||
' Dim Validada As Boolean = False
|
|
||||||
' Dim MsgValidadas As New StringBuilder
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
|
||||||
|
|
||||||
|
|
||||||
' Dim Valida As New ClsValidaCFDi()
|
|
||||||
|
|
||||||
' 'veririco ante el SAT las ventas que voy a pagar
|
|
||||||
' For Each gvr As GridViewRow In GvCxC.Rows
|
|
||||||
' If gvr.FCCheckBox("Chk").Checked Then
|
|
||||||
' ImporteSeleccionado += gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
|
||||||
|
|
||||||
' If gvr.DataKey("UUID") <> "" Then
|
|
||||||
|
|
||||||
' Valida.Verificar(gvr.DataKey("UUID"), gvr.DataKey("RFC"), UsuarioActual.Empresa.RFC, gvr.DataKey("Original").ToDecimal)
|
|
||||||
|
|
||||||
' If Valida.EsValida > 0 Then
|
|
||||||
' If Valida.EsValida = 2 Then 'Cancelada
|
|
||||||
' MsgValidadas.AppendFormat("La factura está cancelada ante el SAT: {0}<br>", gvr.DataKey("SerieFolio"))
|
|
||||||
' Else
|
|
||||||
' Validada = True
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' Validada = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
' Valida.Dispose()
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
' If MsgValidadas.Length > 0 Then
|
|
||||||
' Alert(String.Format("<br>Las Facturas presentan la siguiente situación ante el SAT. <br>{0}", MsgValidadas.ToString), TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjIE As New ClsBancos()
|
|
||||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
|
||||||
Dim ObjVentasSaldos As New ClsVentas(ObjIE.IniciaTransacSQL)
|
|
||||||
Dim ObjConta As ClsContPAQi = Nothing
|
|
||||||
|
|
||||||
Dim ObjEvento As ClsOIEventos = New ClsOIEventos()
|
|
||||||
|
|
||||||
If TxtImporte.Text.ToDecimal > 0 Then
|
|
||||||
|
|
||||||
'02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR
|
|
||||||
Dim ErrorCancelarIE As Boolean = False
|
|
||||||
|
|
||||||
If CveIESustitucion > 0 Then
|
|
||||||
ErrorCancelarIE = CancelarIE()
|
|
||||||
If ErrorCancelarIE Then
|
|
||||||
'Alert("Ocurrio un error al Cancelar el IE.", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If TxtFolio.Text.Trim <> "" Or RblTipoPago.SelectedValue = "2" Or RblTipoPago.SelectedValue = "3" Then
|
|
||||||
Dim ConceptoPoliza As String = String.Format("{0} {1}", TxtAboneA.Text, TxtObservaciones.Text)
|
Dim ConceptoPoliza As String = String.Format("{0} {1}", TxtAboneA.Text, TxtObservaciones.Text)
|
||||||
|
|
||||||
If DdlCuenta.SelectedValue > 0 Then
|
If DdlCuenta.SelectedValue > 0 Then
|
||||||
@@ -1599,11 +1550,11 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim ErrorAC As Boolean = False
|
||||||
|
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
'se agregan las pólizas de Armonización Contable
|
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate
|
Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate
|
||||||
Dim ErrorAC As Boolean = False
|
|
||||||
ObjConta = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjConta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjConta.IniciaTransacSQL()
|
ObjConta.IniciaTransacSQL()
|
||||||
Dim Facturas As New StringBuilder
|
Dim Facturas As New StringBuilder
|
||||||
@@ -1629,23 +1580,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Total = drt("TotalPresupuesto").ToString.ToDecimal * PorcentajePago
|
Total = drt("TotalPresupuesto").ToString.ToDecimal * PorcentajePago
|
||||||
ConceptoRenglon = String.Format("{0} {1}", gvr.DataKey("SerieFolio"), drt("FuenteRecaudacionRubroIngreso").ToString)
|
ConceptoRenglon = String.Format("{0} {1}", gvr.DataKey("SerieFolio"), drt("FuenteRecaudacionRubroIngreso").ToString)
|
||||||
If Total > 0 Then
|
If Total > 0 Then
|
||||||
|
|
||||||
'' NO DEBERIA
|
|
||||||
'If gvr.DataKey("TipoDocto").Contiene("Com") Then
|
|
||||||
' If Not ObjConta.AddMovimiento(IDPoliza, drt("IdCuentaPorEjecutar").ToString.ToEntero, False, Total, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For
|
|
||||||
' If Not ObjConta.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, True, Total, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For
|
|
||||||
' If Not ObjConta.AddMovimiento(IDPoliza, drt("IdCuentaMatriz").ToString.ToEntero, True, Total, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For
|
|
||||||
'End If
|
|
||||||
'' NO DEBERIA
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ObjConta.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, False, Total, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For : Exit For
|
If Not ObjConta.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, False, Total, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For : Exit For
|
||||||
|
|
||||||
If Not ObjConta.AddMovimiento(IDPoliza, drt("IdCuentaRecaudado").ToString.ToEntero, True, Total, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For : Exit For
|
If Not ObjConta.AddMovimiento(IDPoliza, drt("IdCuentaRecaudado").ToString.ToEntero, True, Total, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For : Exit For
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
@@ -1672,44 +1609,41 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
ErrorAC = True
|
ErrorAC = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorAC Then
|
ErrorAC = Not ObjConta.AjustaPoliza(IDPoliza)
|
||||||
ObjConta.AjustaPoliza(IDPoliza)
|
|
||||||
ObjIE.UpdateIEPrePoliza(Fecha, FolioPoliza.ToString, IDPoliza, CvePrePoliza, CveIE, 0)
|
|
||||||
ObjIE.Commit()
|
|
||||||
ObjConta.Commit()
|
|
||||||
UPVentas.Update()
|
|
||||||
|
|
||||||
|
ErrorAC = Not ObjIE.UpdateIEPrePoliza(Fecha, FolioPoliza.ToString, IDPoliza, CvePrePoliza, CveIE, 0)
|
||||||
Dim TextoComplementoPago = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
|
|
||||||
Dim SbMensaje As New StringBuilder
|
|
||||||
SbMensaje.Append(String.Format("Abono Registrado Correctamente.<br/><br/> Poliza: <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>{1}</a><br/><br/>{2}", IDPoliza, FolioPoliza, TextoComplementoPago))
|
|
||||||
|
|
||||||
For Each NC In NCGeneradas
|
|
||||||
For Each msg In NC.Mensajes
|
|
||||||
SbMensaje.Append(msg)
|
|
||||||
Next
|
|
||||||
SbMensaje.Append("</br>")
|
|
||||||
Next
|
|
||||||
|
|
||||||
Alert(SbMensaje.ToString())
|
|
||||||
Else
|
|
||||||
ObjIE.RollBack()
|
|
||||||
If ObjConta IsNot Nothing Then ObjConta.RollBack()
|
|
||||||
Alert("Error al Agregar la Póliza de Armonización Contable.", TipoMensaje.MsgError)
|
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
End If
|
||||||
Else
|
|
||||||
|
If ErrorAC Then
|
||||||
|
MsgError = "Error al Agregar la Póliza de Armonización Contable"
|
||||||
|
End If
|
||||||
|
|
||||||
|
'BITACORA
|
||||||
|
If MsgError = "" Then
|
||||||
|
If CveIESustitucion > 0 And ComplementoSustitucionGenerado Then
|
||||||
|
If Not ObjEvento.AddEventoBitacora($"Complemento de pago Cancelado por sustitución con Folio <a href='/Bancos/IE.aspx?CveIE={CveIE}' target='_blank' class='Texto'>{TxtFolio.Text}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIESustitucion) Then
|
||||||
|
MsgError = "Ocurrió un error al agregar la bitacora"
|
||||||
|
End If
|
||||||
|
If Not ObjEvento.AddEventoBitacora($"Complemento de pago Generado por Sustitución de <a href='/Bancos/IE.aspx?CveIE={CveIESustitucion}' target='_blank' class='Texto'>{FolioIECancelado}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
||||||
|
MsgError = "Ocurrió un error al agregar la bitacora"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgError = "Ocurrió un error al guardar el movimiento"
|
||||||
|
OnError("Ocurrió un error al guardar el movimiento", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If MsgError = "" Then
|
||||||
ObjIE.Commit()
|
ObjIE.Commit()
|
||||||
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
||||||
UPVentas.Update()
|
|
||||||
|
|
||||||
Dim StrMsg As New StringBuilder
|
Dim StrMsg As New StringBuilder
|
||||||
StrMsg.Append("Abono Registrado Correctamente.<br/>")
|
StrMsg.Append("Abono Registrado Correctamente.<br/>")
|
||||||
|
|
||||||
|
|
||||||
StrMsg.AppendFormat("Folio <b><a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>{1}</a></b>", CveIE, ObjIE.Folio)
|
StrMsg.AppendFormat("Folio <b><a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>{1}</a></b>", CveIE, ObjIE.Folio)
|
||||||
|
|
||||||
|
|
||||||
If IDPoliza > 0 Then StrMsg.AppendFormat("<br/> Poliza: <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>{1}</a>", IDPoliza, FolioPoliza)
|
If IDPoliza > 0 Then StrMsg.AppendFormat("<br/> Poliza: <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>{1}</a>", IDPoliza, FolioPoliza)
|
||||||
|
|
||||||
Dim TextoComplementoPago = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
|
Dim TextoComplementoPago = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
|
||||||
@@ -1725,35 +1659,23 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
Alert($"{StrMsg.ToString}<br/><br/>{TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx"""))
|
Alert($"{StrMsg.ToString}<br/><br/>{TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx"""))
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
If ObjConta IsNot Nothing Then ObjConta.RollBack()
|
||||||
ObjIE.RollBack()
|
ObjIE.RollBack()
|
||||||
Alert(MsgError, TipoMensaje.MsgAdvertencia)
|
Alert(MsgError, TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
Alert("Debe de llevar un Folio", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Alert("Debe de llevar un Importe", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjIE.Dispose()
|
ObjIE.Dispose()
|
||||||
ObjVentasSaldos.Dispose()
|
ObjVentasSaldos.Dispose()
|
||||||
ObjMov.Dispose()
|
ObjMov.Dispose()
|
||||||
|
If ObjConta IsNot Nothing Then ObjConta.Dispose()
|
||||||
'BITACORA
|
|
||||||
If CveIESustitucion > 0 And ComplementoSustitucionGenerado Then
|
|
||||||
If Not ObjEvento.AddEventoBitacora($"Complemento de pago Cancelado por sustitución con Folio <a href='/Bancos/IE.aspx?CveIE={CveIE}' target='_blank' class='Texto'>{TxtFolio.Text}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIESustitucion) Then
|
|
||||||
|
|
||||||
End If
|
|
||||||
If Not ObjEvento.AddEventoBitacora($"Complemento de pago Generado por Sustitución de <a href='/Bancos/IE.aspx?CveIE={CveIESustitucion}' target='_blank' class='Texto'>{FolioIECancelado}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
ObjEvento.Dispose()
|
ObjEvento.Dispose()
|
||||||
|
|
||||||
LimpiaCampos()
|
LimpiaCampos()
|
||||||
|
|
||||||
|
UPVentas.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " N O T A - D E - C R E D I T O"
|
#Region " N O T A - D E - C R E D I T O"
|
||||||
@@ -1764,31 +1686,42 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
ObjFacturaDevolucion.CveUsuario = UsuarioActual.CveUsuario
|
ObjFacturaDevolucion.CveUsuario = UsuarioActual.CveUsuario
|
||||||
ObjFacturaDevolucion.UsuarioCreo = UsuarioActual.Usuario
|
ObjFacturaDevolucion.UsuarioCreo = UsuarioActual.Usuario
|
||||||
|
|
||||||
'If CveVentaPadre > 0 Then
|
Dim CveSubProyecto As Integer = Me.CveSubProyecto
|
||||||
' ObjFacturaDevolucion.CveVentaPadre = CveVentaPadre
|
Dim CveMoneda As Integer = Me.CveMoneda
|
||||||
' ObjFacturaDevolucion.CveVentaRelacion = CveVentaPadre
|
Dim CveCliente As Integer = Me.CveCliente
|
||||||
|
|
||||||
|
If CveSubProyecto <= 0 Then
|
||||||
|
CveSubProyecto = ListaVentasGenerarNC(0).CveSubProyecto
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveMoneda <= 0 Then
|
||||||
|
CveMoneda = ListaVentasGenerarNC(0).CveMoneda
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveCliente <= 0 Then
|
||||||
|
CveCliente = ListaVentasGenerarNC(0).CveCliente
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Folio As Integer = -1
|
||||||
|
Dim Serie As String = "-1"
|
||||||
|
|
||||||
|
'Dim ObjFolios As New ClsGralFolios()
|
||||||
|
'If ObjFolios.GetFolios("Egs", UsuarioActual.CveEmpresa) Then
|
||||||
|
' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' AND CveSubProyecto = {0}", Me.CveSubProyecto))
|
||||||
|
' If DT.Rows.Count > 0 Then
|
||||||
|
' Serie = DT.Rows(0)("Serie").ToString()
|
||||||
|
' Folio = DT.Rows(0)("FActual").ToString()
|
||||||
|
' End If
|
||||||
|
' DT.Dispose()
|
||||||
'End If
|
'End If
|
||||||
|
'ObjFolios.Dispose()
|
||||||
Dim Folio As String = ""
|
|
||||||
Dim Serie As String = ""
|
|
||||||
|
|
||||||
Dim ObjFolios As New ClsGralFolios()
|
|
||||||
If ObjFolios.GetFolios("Egs", UsuarioActual.CveEmpresa) Then
|
|
||||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' AND CveSubProyecto = {0}", Me.CveSubProyecto))
|
|
||||||
If DT.Rows.Count > 0 Then
|
|
||||||
Serie = DT.Rows(0)("Serie").ToString()
|
|
||||||
Folio = DT.Rows(0)("FActual").ToString()
|
|
||||||
End If
|
|
||||||
DT.Dispose()
|
|
||||||
End If
|
|
||||||
ObjFolios.Dispose()
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveEmpresa = UsuarioActual.CveEmpresa
|
ObjFacturaDevolucion.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
ObjFacturaDevolucion.TipoCambio = If(Me.CveMoneda = 1, 1, GlobalTipoCambio(Now).FormatoNumero(4).ToDecimal())
|
ObjFacturaDevolucion.TipoCambio = If(Me.CveMoneda = 1, 1, GlobalTipoCambio(Now).FormatoNumero(4).ToDecimal())
|
||||||
ObjFacturaDevolucion.ConvertirPesos = False
|
ObjFacturaDevolucion.ConvertirPesos = False
|
||||||
ObjFacturaDevolucion.CveMoneda = Me.CveMoneda
|
ObjFacturaDevolucion.CveMoneda = CveMoneda
|
||||||
ObjFacturaDevolucion.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {Me.CveMoneda}")
|
ObjFacturaDevolucion.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda}")
|
||||||
ObjFacturaDevolucion.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {Me.CveMoneda}")
|
ObjFacturaDevolucion.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda}")
|
||||||
ObjFacturaDevolucion.Serie = Serie
|
ObjFacturaDevolucion.Serie = Serie
|
||||||
ObjFacturaDevolucion.Folio = Folio
|
ObjFacturaDevolucion.Folio = Folio
|
||||||
ObjFacturaDevolucion.Fecha = Now
|
ObjFacturaDevolucion.Fecha = Now
|
||||||
@@ -1812,10 +1745,10 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
ObjFacturaDevolucion.MetodoPago = ""
|
ObjFacturaDevolucion.MetodoPago = ""
|
||||||
ObjFacturaDevolucion.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {ObjFacturaDevolucion.CveMetodoPago33}")
|
ObjFacturaDevolucion.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {ObjFacturaDevolucion.CveMetodoPago33}")
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveSubProyecto = Me.CveSubProyecto
|
ObjFacturaDevolucion.CveSubProyecto = CveSubProyecto
|
||||||
ObjFacturaDevolucion.SetSubProyecto()
|
ObjFacturaDevolucion.SetSubProyecto()
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveCliente = Me.CveCliente
|
ObjFacturaDevolucion.CveCliente = CveCliente
|
||||||
ObjFacturaDevolucion.SetCliente()
|
ObjFacturaDevolucion.SetCliente()
|
||||||
|
|
||||||
Dim ObjCliente As New ClsClientes
|
Dim ObjCliente As New ClsClientes
|
||||||
@@ -1866,10 +1799,6 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
ObjFacturaDevolucion.TipoDocumento = ""
|
ObjFacturaDevolucion.TipoDocumento = ""
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If ObjFacturaDevolucion.TipoDocto IsNot Nothing Then
|
|
||||||
ViewState("TipoDoctoDevolucion") = ObjFacturaDevolucion.TipoDocto
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.FechaPago = Now
|
ObjFacturaDevolucion.FechaPago = Now
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveCorte = -1
|
ObjFacturaDevolucion.CveCorte = -1
|
||||||
@@ -1915,8 +1844,12 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
DtVentasNC.AcceptChanges()
|
DtVentasNC.AcceptChanges()
|
||||||
|
|
||||||
ObjFacturaDevolucion.DtVentasNC = DtVentasNC
|
ObjFacturaDevolucion.DtVentasNC = DtVentasNC
|
||||||
ObjFacturaDevolucion.GenerarPDFFactura = True
|
'ObjFacturaDevolucion.GenerarPDFFactura = True
|
||||||
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=Trasac, ObjContPaqTransac:=ObjConta)
|
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=Trasac, ObjContPaqTransac:=ObjConta)
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.Dispose()
|
||||||
|
|
||||||
|
|
||||||
Return Resp
|
Return Resp
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
@@ -2825,6 +2758,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim IdPolizaNueva = -1
|
Dim IdPolizaNueva = -1
|
||||||
Dim FolioPolizaNueva = -1
|
Dim FolioPolizaNueva = -1
|
||||||
|
|
||||||
|
Try
|
||||||
'CANCELA IE CONTABILIZADO
|
'CANCELA IE CONTABILIZADO
|
||||||
If IDPoliza > 0 Then
|
If IDPoliza > 0 Then
|
||||||
If ObjAC Is Nothing Then
|
If ObjAC Is Nothing Then
|
||||||
@@ -2943,10 +2877,14 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ErrorCancelar = True
|
||||||
|
OnError("Ocurrió un error al cancelar el IE", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
|
||||||
Banc.Commit()
|
Banc.Commit()
|
||||||
|
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
||||||
|
|
||||||
Dim Msg As New StringBuilder
|
Dim Msg As New StringBuilder
|
||||||
Msg.Append("El movimiento bancario quedó cancelado exitosamente.")
|
Msg.Append("El movimiento bancario quedó cancelado exitosamente.")
|
||||||
@@ -2954,8 +2892,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If IdPolizaNueva > 0 Then Msg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza de cancelación</a>", IdPolizaNueva)
|
If IdPolizaNueva > 0 Then Msg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza de cancelación</a>", IdPolizaNueva)
|
||||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
|
||||||
Banc.RollBack()
|
Banc.RollBack()
|
||||||
|
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
||||||
Alert("El movimiento bancario no se pudo cancelar. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("El movimiento bancario no se pudo cancelar. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -2830,6 +2830,7 @@
|
|||||||
<ADS:DropDownLost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange" >
|
<ADS:DropDownLost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange" >
|
||||||
</ADS:DropDownLost>
|
</ADS:DropDownLost>
|
||||||
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
|
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
|
||||||
|
<asp:HiddenField ID="HdnPSAjusteClasificacion" ClientIDMode="Static" runat="server" Value="-1" />
|
||||||
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
|
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2916,6 +2917,7 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||||
|
<asp:CustomValidator id="CVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" ClientValidationFunction="ValidarCodigoInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||||
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>
|
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>
|
||||||
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||||
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
|
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
|
||||||
@@ -3011,26 +3013,68 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function ValidarCodigoEnsamble(source, arguments) {
|
function ValidarCodigoEnsamble(source, arguments) {
|
||||||
var CveMarca = HdnPSAjusteMarca.value;
|
let CveMarca = HdnPSAjusteMarca.value;
|
||||||
|
let CveClasificacion = HdnPSAjusteClasificacion.value;
|
||||||
|
let regex = "";
|
||||||
|
|
||||||
|
//SI ES MOTOBATERIA
|
||||||
|
if (CveClasificacion = "20517") {
|
||||||
|
regex = "[*]|"
|
||||||
|
//SI ES OPTIMA
|
||||||
|
} else if (CveClasificacion = "20511") {
|
||||||
|
regex = "[1X]|"
|
||||||
|
}
|
||||||
|
|
||||||
|
//MARCA OPTIMA
|
||||||
if (CveMarca == "1086") {
|
if (CveMarca == "1086") {
|
||||||
var re = new RegExp("^[0-9]+$");
|
let re = new RegExp("^" + regex + "[0-9]+$");
|
||||||
arguments.IsValid = re.test(parseInt(arguments.Value));
|
arguments.IsValid = re.test(parseInt(arguments.Value));
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
var re = new RegExp("^[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$");
|
let re = new RegExp("^" + regex + "[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$");
|
||||||
arguments.IsValid = re.test(arguments.Value);
|
arguments.IsValid = re.test(arguments.Value);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ValidarCodigoLinea(source, arguments) {
|
function ValidarCodigoLinea(source, arguments) {
|
||||||
var CveMarca = HdnPSAjusteMarca.value;
|
var CveMarca = HdnPSAjusteMarca.value;
|
||||||
|
let CveClasificacion = HdnPSAjusteClasificacion.value;
|
||||||
|
let regex = "";
|
||||||
|
|
||||||
|
//SI ES MOTOBATERIA
|
||||||
|
if (CveClasificacion = "20517") {
|
||||||
|
regex = "[*]|";
|
||||||
|
} else {
|
||||||
|
regex = "";
|
||||||
|
}
|
||||||
|
|
||||||
if (CveMarca == "1086") {
|
if (CveMarca == "1086") {
|
||||||
var re = new RegExp("^[0-9]+$");
|
var re = new RegExp("^" + regex + "[0-9]+$");
|
||||||
arguments.IsValid = re.test(parseInt(arguments.Value));
|
arguments.IsValid = re.test(parseInt(arguments.Value));
|
||||||
} else {
|
} else {
|
||||||
var re = new RegExp("^[*]$");
|
var re = new RegExp("^" + regex + "$");
|
||||||
arguments.IsValid = re.test(arguments.Value);
|
arguments.IsValid = re.test(arguments.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ValidarCodigoInspeccion(source, arguments) {
|
||||||
|
let CveClasificacion = HdnPSAjusteClasificacion.value;
|
||||||
|
|
||||||
|
let clasificaciones = ["20517", "20511"]
|
||||||
|
|
||||||
|
//SI ES MOTOBATERIA
|
||||||
|
if (clasificaciones.includes(CveClasificacion)) {
|
||||||
|
var re = new RegExp("^[*]|[A-L][0-9][1-9A-Z][A-HJ-M]$");
|
||||||
|
arguments.IsValid = re.test(parseInt(arguments.Value));
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
var re = new RegExp("^[A-L][0-9][1-9A-Z][A-HJ-M]$");
|
||||||
|
arguments.IsValid = re.test(arguments.Value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function CalculaMesesUso() {
|
function CalculaMesesUso() {
|
||||||
$get("BtnCalculaMesesUso").click();
|
$get("BtnCalculaMesesUso").click();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5232,11 +5232,13 @@ Partial Class PV
|
|||||||
Dim CvePSParametro As Integer = DdlPSAjuste.SelectedValue.ToEntero
|
Dim CvePSParametro As Integer = DdlPSAjuste.SelectedValue.ToEntero
|
||||||
Dim PrecioSugerido As Decimal = 0
|
Dim PrecioSugerido As Decimal = 0
|
||||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||||
Dim CveMarca As Integer
|
Dim CveMarca As Integer = -1
|
||||||
|
Dim CveClasificacion As Integer = -1
|
||||||
|
|
||||||
If drPS IsNot Nothing Then
|
If drPS IsNot Nothing Then
|
||||||
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
||||||
CveMarca = drPS("CveMarca").ToString.ToEntero
|
CveMarca = drPS("CveMarca").ToString.ToEntero
|
||||||
|
CveClasificacion = drPS("CveClasificacion").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
||||||
@@ -5247,6 +5249,7 @@ Partial Class PV
|
|||||||
DdlTipoUso.DataBind()
|
DdlTipoUso.DataBind()
|
||||||
|
|
||||||
HdnPSAjusteMarca.Value = CveMarca.ToString()
|
HdnPSAjusteMarca.Value = CveMarca.ToString()
|
||||||
|
HdnPSAjusteClasificacion.Value = CveClasificacion.ToString()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -355,7 +355,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Póliza Virtual</asp:LinkButton>
|
<asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Póliza Virtual</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<%-- <li>
|
<%-- <li>
|
||||||
<asp:LinkButton runat="server" ID="LnkDescargarFacturaPrueba" OnClick="LnkDescargarFacturaPrueba_Click">Descargar Factura Prueba</asp:LinkButton>
|
<asp:LinkButton runat="server" ID="LnkDescargarFacturaPrueba" OnClick="LnkDescargarFacturaPrueba_Click">Descargar Factura Prueba</asp:LinkButton>
|
||||||
</li>--%>
|
</li>--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -6090,7 +6090,7 @@
|
|||||||
<asp:GridView ID="GvAplicaDevolucion" runat="server" OnRowDataBound="GvAplicaDevolucion_RowDataBound" AutoGenerateColumns="false" GridLines="None" CssClass="table table-grid table-striped table-advance table-hover Widthall"
|
<asp:GridView ID="GvAplicaDevolucion" runat="server" OnRowDataBound="GvAplicaDevolucion_RowDataBound" AutoGenerateColumns="false" GridLines="None" CssClass="table table-grid table-striped table-advance table-hover Widthall"
|
||||||
DataKeyNames="CveVentaDetalle, PU, Total, Cantidad,Descuento,CvePS,PS,Codigo,CodigoPS,CveTipoPS,CveTipoInvPS,CveUM,UM,CveClasificacion,
|
DataKeyNames="CveVentaDetalle, PU, Total, Cantidad,Descuento,CvePS,PS,Codigo,CodigoPS,CveTipoPS,CveTipoInvPS,CveUM,UM,CveClasificacion,
|
||||||
Clasificacion,CveProyecto,Proyecto,CveSubProyecto,SubProyecto,Obs,PorcentajeIVA,ImporteIVA,PorcentajeRetIVA,ImporteRetIVA,PorcentajeRetISR,
|
Clasificacion,CveProyecto,Proyecto,CveSubProyecto,SubProyecto,Obs,PorcentajeIVA,ImporteIVA,PorcentajeRetIVA,ImporteRetIVA,PorcentajeRetISR,
|
||||||
ImporteRetISR,PorcentajeIEPS,ImporteIEPS,SATClaveProdServ,SATClaveUM,CantSur,CantRes"
|
ImporteRetISR,PorcentajeIEPS,ImporteIEPS,SATClaveProdServ,SATClaveUM,CantSur,CantRes,CveTamaño"
|
||||||
AllowPaging="False">
|
AllowPaging="False">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -6506,6 +6506,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function CalculaSaldoRNCChk(TxtImporte, Saldo, Chk) {
|
||||||
|
if (Chk.checked) {
|
||||||
|
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||||
|
} else {
|
||||||
|
TxtImporte.value = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
|
||||||
|
var Importe = 0;
|
||||||
|
if (TxtImporte.value != '') {
|
||||||
|
Importe = parseFloat(TxtImporte.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Importe > Saldo) {
|
||||||
|
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||||
|
} else {
|
||||||
|
TxtImporte.value = FormatoNumero(Importe, 2);;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function CalculaTotalChk(Total, SubTotal, TxtTotalGv, TxtImporte, Saldo, Porcentaje, Chk) {
|
function CalculaTotalChk(Total, SubTotal, TxtTotalGv, TxtImporte, Saldo, Porcentaje, Chk) {
|
||||||
var Importe = 0, ImporteSinPorcentaje = 0;
|
var Importe = 0, ImporteSinPorcentaje = 0;
|
||||||
|
|||||||
@@ -6419,7 +6419,7 @@ Partial Class Ventas
|
|||||||
'VALIDA EXISTENCIA
|
'VALIDA EXISTENCIA
|
||||||
CveProducto = dr("CvePS").ToString.ToEntero
|
CveProducto = dr("CvePS").ToString.ToEntero
|
||||||
CveUnidad = dr("CveUM").ToString.ToEntero
|
CveUnidad = dr("CveUM").ToString.ToEntero
|
||||||
Cantidad = TmpDT.SUM("Cantidad", $"CvePS = {CveProducto}") 'VALIDA CONTRA LA SUMA DEL MISMO PS
|
Cantidad = TmpDT.SUM("Cantidad", $"CvePS = {CveProducto} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") 'VALIDA CONTRA LA SUMA DEL MISMO PS
|
||||||
If UsuarioActual.Empresa.UsaInventarios AndAlso RemisionesLista.Count < 1 AndAlso dr("EntregaDirecta").ToString.ToEntero < 1 Then
|
If UsuarioActual.Empresa.UsaInventarios AndAlso RemisionesLista.Count < 1 AndAlso dr("EntregaDirecta").ToString.ToEntero < 1 Then
|
||||||
Existencia = ObjInventarios.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
Existencia = ObjInventarios.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
||||||
If Existencia < Cantidad Then
|
If Existencia < Cantidad Then
|
||||||
@@ -13828,7 +13828,7 @@ Partial Class Ventas
|
|||||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||||
'VALIDA EXISTENCIA
|
'VALIDA EXISTENCIA
|
||||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then
|
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then
|
||||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS}") < TxtCantidad.Text.ToDouble Then
|
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -21074,6 +21074,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
UpDescNC.Update()
|
UpDescNC.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub GvDescNC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNC.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||||
|
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -21362,7 +21368,7 @@ Partial Class Ventas
|
|||||||
PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double,
|
PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double,
|
||||||
Total As Double, SerieLote As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
|
Total As Double, SerieLote As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
|
||||||
SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer,
|
SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer,
|
||||||
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer)
|
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1)
|
||||||
|
|
||||||
Dim Row As DataRow = Nothing
|
Dim Row As DataRow = Nothing
|
||||||
Row = TmpDT.NewRow()
|
Row = TmpDT.NewRow()
|
||||||
@@ -21421,6 +21427,8 @@ Partial Class Ventas
|
|||||||
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
|
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
|
||||||
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
||||||
|
|
||||||
|
Row("CveTamaño") = CveTamaño
|
||||||
|
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -21573,7 +21581,8 @@ Partial Class Ventas
|
|||||||
Dim ObjVenta As New ClsVentas
|
Dim ObjVenta As New ClsVentas
|
||||||
If ObjVenta.GetVentaDetalle(CveVenta) Then
|
If ObjVenta.GetVentaDetalle(CveVenta) Then
|
||||||
If Not ObjVenta.DtResultados.SUM("CantSur").ToString.ToDecimal > 0 Then SeEsconde = True
|
If Not ObjVenta.DtResultados.SUM("CantSur").ToString.ToDecimal > 0 Then SeEsconde = True
|
||||||
GvAplicaDevolucion.DataSource = ObjVenta.DtResultados.FiltraParametros("CantRes > 0")
|
'NO MOSTRAR LOS PRODUCTOS CON LA CLASIFICACION DE USADOS
|
||||||
|
GvAplicaDevolucion.DataSource = ObjVenta.DtResultados.FiltraParametros("CantRes > 0 AND CveClasificacion <> 20519")
|
||||||
End If
|
End If
|
||||||
ObjVenta.Dispose()
|
ObjVenta.Dispose()
|
||||||
|
|
||||||
@@ -21622,6 +21631,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253)
|
Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253)
|
||||||
|
|
||||||
|
Dim DtUsados As DataTable = TmpDT.FiltraParametros("CveClasificacion = 20519")
|
||||||
|
|
||||||
TmpDT.Clear()
|
TmpDT.Clear()
|
||||||
For Each Gv As GridViewRow In GvAplicaDevolucion.Rows
|
For Each Gv As GridViewRow In GvAplicaDevolucion.Rows
|
||||||
If Gv.FCCheckBox("Chk").Checked And Gv.FCTextBox("TxtCantidadAplicaDevolucion").Text.ToDecimal > 0 Then
|
If Gv.FCCheckBox("Chk").Checked And Gv.FCTextBox("TxtCantidadAplicaDevolucion").Text.ToDecimal > 0 Then
|
||||||
@@ -21644,9 +21655,48 @@ Partial Class Ventas
|
|||||||
Gv.DataKey("PorcentajeRetIVA").ToString.ToDecimal, ImporteRetIVA,
|
Gv.DataKey("PorcentajeRetIVA").ToString.ToDecimal, ImporteRetIVA,
|
||||||
Gv.DataKey("PorcentajeRetISR").ToString.ToDecimal, ImporteRetISR, Gv.DataKey("PorcentajeIEPS").ToString.ToDecimal,
|
Gv.DataKey("PorcentajeRetISR").ToString.ToDecimal, ImporteRetISR, Gv.DataKey("PorcentajeIEPS").ToString.ToDecimal,
|
||||||
ImporteIEPS, -1, Descuento, Total, "", "", -1, -1,
|
ImporteIEPS, -1, Descuento, Total, "", "", -1, -1,
|
||||||
Gv.DataKey("SATClaveProdServ").ToString, Gv.DataKey("SATClaveUM").ToString, -1, Gv.DataKey("CveVentaDetalle").ToString.ToEntero, -1, -1, -1, -1)
|
Gv.DataKey("SATClaveProdServ").ToString, Gv.DataKey("SATClaveUM").ToString, -1, Gv.DataKey("CveVentaDetalle").ToString.ToEntero, -1, -1, -1, -1, Gv.DataKey("CveTamaño").ToEntero())
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'AGREGAR LOS USADOS EN LA DEVOLUCION
|
||||||
|
CalculaUsados(DtUsados)
|
||||||
|
'If DtUsados IsNot Nothing AndAlso DtUsados.Rows.Count > 0 Then
|
||||||
|
' Dim DtPSVenta As DataTable = TmpDT.Copy()
|
||||||
|
' For Each Row As DataRow In DtPSVenta.Rows
|
||||||
|
' Dim RowCargo As DataRow = DTTamanios.FiltroPrimero($"CveTamaño = { Row("CveTamaño").ToString.ToEntero } ")
|
||||||
|
' If RowCargo IsNot Nothing Then
|
||||||
|
' Dim CvePSCargo As Integer = RowCargo("CvePSCargo").ToString.ToEntero
|
||||||
|
|
||||||
|
' For Each RowUsado As DataRow In DtUsados.FiltraParametros($"CvePS = {CvePSCargo}").Rows
|
||||||
|
' 'If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
||||||
|
' 'End If
|
||||||
|
' Dim Cantidad As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
||||||
|
' Dim Descuento As Decimal = Cantidad * RowUsado("Descuento").ToString.ToDecimal / RowUsado("Cantidad").ToString.ToDecimal
|
||||||
|
' Dim PU As Decimal = RowUsado("PU").ToString().ToDecimal()
|
||||||
|
' Dim Total As Decimal = (Cantidad * PU)
|
||||||
|
' Dim TotalImpuestos As Decimal = (Cantidad * PU) - Descuento
|
||||||
|
' Dim ImporteIVA As Decimal = TotalImpuestos * RowUsado("PorcentajeIVA").ToString.ToDecimal
|
||||||
|
' Dim ImporteRetIVA As Decimal = TotalImpuestos * RowUsado("PorcentajeRetIVA").ToString.ToDecimal
|
||||||
|
' Dim ImporteRetISR As Decimal = TotalImpuestos * RowUsado("PorcentajeRetISR").ToString.ToDecimal
|
||||||
|
' Dim ImporteIEPS As Decimal = TotalImpuestos * RowUsado("PorcentajeIEPS").ToString.ToDecimal
|
||||||
|
|
||||||
|
' AgregaTempDT(TmpDT, RowUsado("CvePS").ToString.ToEntero, RowUsado("PS").ToString, RowUsado("Codigo").ToString, RowUsado("CodigoPS").ToString,
|
||||||
|
' RowUsado("CveTipoPS").ToString.ToEntero, RowUsado("CveTipoInvPS").ToString.ToEntero,
|
||||||
|
' RowUsado("CveUM").ToString.ToEntero, RowUsado("UM").ToString, RowUsado("CveClasificacion").ToString.ToEntero,
|
||||||
|
' RowUsado("Clasificacion").ToString, RowUsado("CveProyecto").ToString.ToEntero, RowUsado("Proyecto").ToString,
|
||||||
|
' RowUsado("CveSubProyecto").ToString.ToEntero, RowUsado("SubProyecto").ToString,
|
||||||
|
' RowUsado("Obs").ToString, Cantidad, PU, RowUsado("PorcentajeIVA").ToString.ToDecimal, ImporteIVA,
|
||||||
|
' RowUsado("PorcentajeRetIVA").ToString.ToDecimal, ImporteRetIVA,
|
||||||
|
' RowUsado("PorcentajeRetISR").ToString.ToDecimal, ImporteRetISR, RowUsado("PorcentajeIEPS").ToString.ToDecimal,
|
||||||
|
' ImporteIEPS, -1, Descuento, Total, "", "", -1, -1,
|
||||||
|
' RowUsado("SATClaveProdServ").ToString, RowUsado("SATClaveUM").ToString, -1, RowUsado("CveVentaDetalle").ToString.ToEntero, -1, -1, -1, -1)
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Next
|
||||||
|
'End If
|
||||||
|
|
||||||
TrTipoRelacion.Visible = True
|
TrTipoRelacion.Visible = True
|
||||||
DdlTiposRelacion.SelectedValueExist("3")
|
DdlTiposRelacion.SelectedValueExist("3")
|
||||||
|
|
||||||
@@ -23712,8 +23762,8 @@ Partial Class Ventas
|
|||||||
#Region "U S A D O S"
|
#Region "U S A D O S"
|
||||||
|
|
||||||
|
|
||||||
Private Sub CalculaUsados()
|
Private Sub CalculaUsados(Optional DtUsadosDevolucion As DataTable = Nothing)
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then
|
||||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
||||||
|
|
||||||
Dim DTCvePSCostos As DataTable
|
Dim DTCvePSCostos As DataTable
|
||||||
@@ -23831,16 +23881,23 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
||||||
Modalidad = "A"
|
Modalidad = "A"
|
||||||
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
||||||
|
|
||||||
|
Dim CveVentaDetalleDevolucion As Integer = -1
|
||||||
|
|
||||||
|
If DtUsadosDevolucion IsNot Nothing AndAlso DtUsadosDevolucion.Rows.Count > 0 Then
|
||||||
|
CveVentaDetalleDevolucion = DtUsadosDevolucion.FiltroPrimeroValor("CveVentaDetalle", $"CvePS = {drowPsTamaños("CvePS").ToString.ToEntero}").ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
||||||
drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
||||||
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
||||||
drowPsTamaños("SubProyecto").ToString)
|
drowPsTamaños("SubProyecto").ToString, CveVentaDetalle:=CveVentaDetalleDevolucion)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user