Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -758,11 +758,12 @@ Public Class ClsAcumuladores
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetGarantiasPolizaVirtual(CveVenta As Integer) As Boolean
|
||||
Public Function GetGarantiasPolizaVirtual(CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Acum_GarantiasPolizaVirtualGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1554,7 +1554,9 @@ Public Class ClsClientes
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String, Pais As String, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, NumCuentaPago As String, Optional CvePrecioLista As Integer = -1) As Boolean
|
||||
Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String,
|
||||
Pais As String, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_ClientesNoFrecuenteAdd")
|
||||
|
||||
@@ -1575,6 +1577,8 @@ Public Class ClsClientes
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveMetodoPago33", SqlDbType.Int).Value = CveMetodoPago33
|
||||
.Add("@CveFormaPago33", SqlDbType.Int).Value = CveFormaPago33
|
||||
.Add("@NumCuentaPago", SqlDbType.VarChar).Value = NumCuentaPago
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||
|
||||
@@ -1604,8 +1608,8 @@ Public Class ClsClientes
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#Region "UNIFICAR CLIENTES"
|
||||
Public Function UnificarClientes(CveClienteAUnificar As Integer, CveClienteOriginal As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1267,6 +1267,11 @@ Public Class ClsOC
|
||||
_CveOrdenCompraDetalle = SqlAdapter.SelectCommand.Parameters("@vCveOrdenCompraDetalle").Value.ToString.ToEntero
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
|
||||
If ex.Message.Contains("CK_OC_OrdenesCompraDetalle_RetIVA_Total") Then
|
||||
Alert("La retención de iva no coincide con su total", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
OnError("Ocurrió un error al agregar el detalle de OrdenCompras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
|
||||
@@ -2677,6 +2677,45 @@ Public Class ClsVentas
|
||||
Return OnError
|
||||
End Function
|
||||
|
||||
Public Function GetFacturasCanceladasPendientesWS(RFC As String, CveEmpresa As Integer, Optional showalert As Boolean = True) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
|
||||
Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient()
|
||||
Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
|
||||
If resp.Estado = 0 Then
|
||||
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
|
||||
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
|
||||
Dim theDataSet As DataSet = New DataSet()
|
||||
theDataSet.ReadXml(theReader)
|
||||
|
||||
If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
|
||||
Dim sb = New StringBuilder()
|
||||
|
||||
For Each item As DataRow In theDataSet.Tables(0).Rows
|
||||
sb.AppendFormat("{0};", item("Uuid").ToString())
|
||||
Next
|
||||
|
||||
If GetFacturasCanceladasPendientes(sb.ToString(), CveEmpresa) Then
|
||||
retorno = True
|
||||
End If
|
||||
|
||||
Else
|
||||
If showalert Then
|
||||
Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Alert("Error al obtener cancelaciones pendientes: " & resp.Descripcion, ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
Me.OnError("Error al obtener cancelaciones pendientes: ", ex, "")
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateVentaFacturas(CveFactura As Integer, CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim OnError As Boolean = False
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ Namespace Modelos
|
||||
End If
|
||||
Timbre = New CFDITimbre
|
||||
End Sub
|
||||
Public Sub New(UsuarioActual As Usuario, CveVenta As Integer, CveEmpresa As Integer, Optional DirectorioServidor As String = "")
|
||||
Public Sub New(UsuarioActual As Usuario, CveVenta As Integer, CveEmpresa As Integer, Optional DirectorioServidor As String = "", Optional EsCancelacion As Boolean = False)
|
||||
Me.UsuarioActual = UsuarioActual
|
||||
Me.CveVenta = CveVenta
|
||||
Me.CveEmpresa = CveEmpresa
|
||||
@@ -393,7 +393,7 @@ Namespace Modelos
|
||||
Me.DtDetalle = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
IniciaValoresVentas()
|
||||
IniciaValoresVentas(EsCancelacion)
|
||||
If String.IsNullOrEmpty(DirectorioServidor) Then
|
||||
DirectorioServidor = HttpContext.Current.Server.MapPath("/")
|
||||
End If
|
||||
@@ -446,7 +446,7 @@ Namespace Modelos
|
||||
Me.IEPS = 0
|
||||
Me.CveAlmacenTraspasoOrigen = 0
|
||||
End Sub
|
||||
Private Sub IniciaValoresVentas()
|
||||
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
|
||||
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
|
||||
Me.DtAnticipos = New DataTable()
|
||||
Me.DtAntNCVinculadas = New DataTable()
|
||||
@@ -492,6 +492,10 @@ Namespace Modelos
|
||||
Me.DtNCVinculadas = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
|
||||
EsNCAmortizacion = True
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
|
||||
Me.DtAnticipos = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
@@ -2333,7 +2337,7 @@ Namespace Modelos
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs") AndAlso ValorMultiplicador = -1 Then
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant") AndAlso ValorMultiplicador = -1 Then
|
||||
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal * ValorMultiplicador '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
|
||||
@@ -2344,7 +2348,10 @@ Namespace Modelos
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2("CveVenta").ToString().ToEntero, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
|
||||
CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=row2("CveVenta").ToString().ToEntero, CveCliente:=ObjFactura.CveCliente,
|
||||
CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
||||
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
Else
|
||||
|
||||
@@ -81,6 +81,14 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
ViewState("UsuarioProgramo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveProveedor As Integer
|
||||
Get
|
||||
Return ViewState("CveProveedor").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProveedor") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -91,7 +99,6 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
Orden = ""
|
||||
Opcion = "-1"
|
||||
HdnEmp.Value = UsuarioActual.CveEmpresa.ToString
|
||||
|
||||
If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
@@ -303,7 +310,7 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
CveProveedor = DdlProveedores.SelectedValue.ToEntero
|
||||
Dim CveUsuarioProgramo As Integer = DdlUsuarioProgramo.SelectedValue.ToEntero 'UsuarioActual.CveUsuario
|
||||
If Not ChkProgramadas.Checked Then CveUsuarioProgramo = -1
|
||||
If ChkProgramadas.Checked And DdlUsuarioProgramo.SelectedValue.ToEntero = -1 Then CveUsuarioProgramo = -2
|
||||
@@ -803,7 +810,8 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
|
||||
End Sub
|
||||
Private Sub Imprimir(Optional Formato As String = "PDF")
|
||||
Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedores.SelectedText}")
|
||||
|
||||
Dim Proveedor = If(CveProveedor = -1, "", $" <b>Proveedor:</b> {GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {CveProveedor}").Rows(0)("RazonSocial").ToString}")
|
||||
Dim Clasificacion = If(DdlProveedoresClasificaciones.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlProveedoresClasificaciones.SelectedItem.Text}")
|
||||
Dim AplicaNC = If(DdlAplicaNC.SelectedValue = "-1", "", $" <b>Aplica NC:</b> {DdlAplicaNC.SelectedItem.Text}")
|
||||
Dim TipoProv = If(DdlTipoProveedor.SelectedValue = "0", "", $" <b>Tipo Prov.:</b> {DdlTipoProveedor.SelectedItem.Text}")
|
||||
|
||||
@@ -907,8 +907,10 @@
|
||||
<td runat="server" id="tdT5" visible="false">
|
||||
<asp:Label Text="" ID="LbIVAOriginal" runat="server" />
|
||||
</td>
|
||||
<td runat="server" id="tdIVA6" visible="false">
|
||||
<asp:LinkButton runat="server" ID="LnkActivaIva6" Text="" ToolTip="Ret IVA Servicios" OnClick="LnkActivaIva6_Click"><i class="fa fa-usd" aria-hidden="true"></i></asp:LinkButton>
|
||||
<td runat="server" id="tdIVA6" visible="false" class="label label-sm label-success" style="color:white!important" >
|
||||
|
||||
<asp:LinkButton runat="server" ID="LnkActivaIva6" Text="" ToolTip="Ret IVA Servicios" OnClick="LnkActivaIva6_Click" style="color:white!important" >Deglose 6%</asp:LinkButton>
|
||||
<%--<asp:LinkButton runat="server" ID="LnkActivaIva6" Text="" ToolTip="Ret IVA Servicios" OnClick="LnkActivaIva6_Click"><i class="fa fa-usd" aria-hidden="true"></i></asp:LinkButton>--%>
|
||||
</td>
|
||||
|
||||
<%--<td align="left" runat="server" id="TdIVA" visible="false">
|
||||
|
||||
@@ -1025,10 +1025,17 @@ Partial Class Compras_Compras
|
||||
Set(value As Double)
|
||||
ViewState("SubTotal2Original") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
|
||||
Private Property IVAOriginal As Double
|
||||
Get
|
||||
Return ViewState("IVAOriginal").ToString.ToDouble
|
||||
Get
|
||||
|
||||
If ViewState("IVAOriginal") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("IVAOriginal").ToString.ToDouble
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("IVAOriginal") = value
|
||||
@@ -2087,8 +2094,12 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5"))
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5"))
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -2237,15 +2248,15 @@ Partial Class Compras_Compras
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then
|
||||
|
||||
'If UsuarioActual.CveRol = 1 Then
|
||||
' Alert("Ok funcionalidad 577")
|
||||
'End If
|
||||
|
||||
|
||||
If RetencionIVA = 0 And IVAOriginal > 0 Then
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
If dRow("CveTipoPS").ToString.ToEntero = 1 Then
|
||||
tdIVA6.Visible = True
|
||||
|
||||
'comentado para reubicar el boton
|
||||
'tdIVA6.Visible = True
|
||||
|
||||
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
@@ -17024,8 +17035,9 @@ Partial Class Compras_Compras
|
||||
|
||||
If RetencionIVA = 0 And IVAOriginal > 0 Then
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
If dRow("CveTipoPS").ToString.ToEntero = 1 Then
|
||||
tdIVA6.Visible = True
|
||||
If dRow("CveTipoPS").ToString.ToEntero = 1 Then
|
||||
'Comnetado para reubicar el boton
|
||||
'tdIVA6.Visible = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
@@ -19305,7 +19317,7 @@ Partial Class Compras_Compras
|
||||
|
||||
DdlRetIVAConcepto.SelectedValueExist("5")
|
||||
|
||||
LblRetIVA.Text = "0.06%"
|
||||
LblRetIVA.Text = "6.0%"
|
||||
|
||||
RetencionIVA = TmpDT.SUMD("RetIVA")
|
||||
TxtRetIVA.Text = RetencionIVA.ToString("###,###,###.00")
|
||||
|
||||
@@ -1322,7 +1322,7 @@ Partial Class PopUpVerFactura
|
||||
If CveConcepto = 33 Then ConceptoFormato = "ENTRADA MANUAL"
|
||||
|
||||
'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145, 146) Then
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Concepto", ConceptoFormato))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
@@ -1471,7 +1471,7 @@ Partial Class PopUpVerFactura
|
||||
If Archivo.Exists Then
|
||||
|
||||
'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 4, 145) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 4, 145, 146) Then
|
||||
Dim CiudadSucursal As String = ""
|
||||
Dim DomicilioSucursal As String = ""
|
||||
Dim DomicilioCliente As String = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("SucClienteDireccion").ToString, DtMovimientos(0)("SucClienteNoExt").ToString, DtMovimientos(0)("SucClienteNoInt").ToString, DtMovimientos(0)("SucClienteColonia"), DtMovimientos(0)("SucClienteCP").ToString, DtMovimientos(0)("SucClienteCiudad"), DtMovimientos(0)("SucClientePais").ToString)
|
||||
@@ -1487,7 +1487,7 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||
|
||||
params.Add(New ReportParameter("Fecha", String.Format("{0} {1}", FechaHora.ToDate.ToString("yyyy-MM-dd"), FechaHora.ToDateTime.ToString("HH:mm:ss"))))
|
||||
params.Add(New ReportParameter("SucursalCliente", DtMovimientos(0)("SucCliente").ToString))
|
||||
|
||||
@@ -2815,6 +2815,9 @@ Partial Class Compras_eFacturas
|
||||
CveProveedor = gvRow.DataKey("CveProveedor").ToEntero
|
||||
Dim ObjCompras As New ClsCompras
|
||||
|
||||
|
||||
Dim TieneRegistros As Boolean = False
|
||||
|
||||
If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then
|
||||
GvVincularPago.DataSource = ObjCompras.DtResultados
|
||||
|
||||
@@ -2822,7 +2825,7 @@ Partial Class Compras_eFacturas
|
||||
SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString
|
||||
DivVincularPagoManualmente.Visible = False
|
||||
BtnVincularPago.Visible = True
|
||||
|
||||
TieneRegistros = True
|
||||
Else
|
||||
DivVincularPagoManualmente.Visible = True
|
||||
BtnVincularPago.Visible = False
|
||||
@@ -2835,6 +2838,7 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
|
||||
|
||||
For Each drow As DataRow In ObjCompras.DtResultados.FiltraParametros("CveIE > 0 AND FechaDocumento IS NOT NULL", "", {"FechaDocumento"}).Rows
|
||||
|
||||
Dim FechaDocumento As Date = drow("FechaDocumento").ToString.ToDate
|
||||
@@ -2873,12 +2877,18 @@ Partial Class Compras_eFacturas
|
||||
TextoDiferenciaImporte = $"<b> - IE ${ImporteIES.FormatoNumero}</b> <div style='color:red'><strong>Diferencia { DiferenciaImportes.FormatoNumero() }</strong></div>"
|
||||
BtnVincularPago.Visible = False
|
||||
MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes)})"
|
||||
|
||||
If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then
|
||||
DivVincularPagoManualmente.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
'BtnVincularPago.Visible = True
|
||||
'TextoDiferenciaImporte = ""
|
||||
End If
|
||||
|
||||
|
||||
|
||||
LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
|
||||
LblImportePago.Text = Monto.ToString("###,###,###.00") 'ImportePago.FormatoNumero
|
||||
LblPagosCantidad.Text = PagosCantidad.ToString
|
||||
@@ -2893,7 +2903,7 @@ Partial Class Compras_eFacturas
|
||||
Else
|
||||
LblMensajeComlementoError.Text = ""
|
||||
DVMensajecomplementoError.Visible = False
|
||||
|
||||
DivVincularPagoManualmente.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -84,6 +84,14 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Cuenta As String
|
||||
Get
|
||||
Return ViewState("Cuenta").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Cuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -226,6 +234,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
Exit Sub
|
||||
End If
|
||||
IdCuenta = DdlCuentas.SelectedValue.ToEntero
|
||||
Cuenta = DdlCuentas.SelectedItem.ToString
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, DdlMoneda.SelectedValue.ToEntero, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
@@ -463,6 +472,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("CveMoneda", DdlMoneda.SelectedValue))
|
||||
params.Add(New ReportParameter("Cuenta", Cuenta))
|
||||
ImprimirPDF("Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
||||
End Sub
|
||||
Protected Sub DdlTipoCuentas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoCuentas.SelectedIndexChanged
|
||||
|
||||
@@ -1318,7 +1318,7 @@
|
||||
</TablixRowHierarchy>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>0.06346cm</Top>
|
||||
<Top>0.06345cm</Top>
|
||||
<Height>3cm</Height>
|
||||
<Width>20.37044cm</Width>
|
||||
<Style>
|
||||
@@ -1334,7 +1334,7 @@
|
||||
<Width>8.01986in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>0.81597in</Height>
|
||||
<Height>1.14931in</Height>
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
@@ -1438,6 +1438,49 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Cuenta">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Cuenta: </Value>
|
||||
<Style>
|
||||
<FontFamily>Verdana</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Cuenta.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Verdana</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Cuenta</rd:DefaultName>
|
||||
<Top>0.84375in</Top>
|
||||
<Height>0.25in</Height>
|
||||
<Width>5.42127in</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1470,7 +1513,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>0.07023cm</Top>
|
||||
<Top>0.07022cm</Top>
|
||||
<Left>15.87314cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>4.4973cm</Width>
|
||||
@@ -1611,6 +1654,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Cuenta">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<Code>Dim myVal As boolean
|
||||
Public Function SetMyVal(ByVal temp As String) As boolean
|
||||
|
||||
@@ -1749,19 +1749,22 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>2.12527cm</Width>
|
||||
<Width>1.34132cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.02474cm</Width>
|
||||
<Width>1.32237cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>10.17786cm</Width>
|
||||
<Width>2.53649cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>8.96945cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.52862cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.15415cm</Width>
|
||||
<Width>3.27979cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -1776,7 +1779,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Cantidad</Value>
|
||||
<Value>Cant.</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
@@ -1838,6 +1841,42 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Código</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>#ff1037</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox79">
|
||||
@@ -1973,7 +2012,7 @@
|
||||
<Value>=Fields!Cantidad.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
<Format>#,0;(#,0)</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2041,6 +2080,48 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Codigo">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Codigo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Codigo</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Style>None</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Style>None</Style>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Style>None</Style>
|
||||
</LeftBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="PS1">
|
||||
@@ -2225,6 +2306,38 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Style>Solid</Style>
|
||||
</TopBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox83">
|
||||
@@ -2336,6 +2449,7 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
@@ -2355,7 +2469,7 @@
|
||||
<Top>5.75246cm</Top>
|
||||
<Left>0.11468cm</Left>
|
||||
<Height>1.07241cm</Height>
|
||||
<Width>20.01064cm</Width>
|
||||
<Width>19.97804cm</Width>
|
||||
<ZIndex>26</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -1742,6 +1742,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="TipoDocumento">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="compuproveedores">
|
||||
|
||||
316
Inicio.aspx
316
Inicio.aspx
@@ -605,62 +605,62 @@
|
||||
<div class="modal-body">
|
||||
<div align="right">
|
||||
<input type="text" id="TxtBusq" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusq','{0}')", GvVtaPUE.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusq','{0}')", GvVtaPUE.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusq','{0}')", GvVtaPUE.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvVtaPUE" runat="server" AutoGenerateColumns="False"
|
||||
DataKeysNames="CveVenta"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="SerieFolio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNum" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}") %>' Text='<%# Eval("SerieFolio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
DataKeysNames="CveVenta"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="SerieFolio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNum" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}") %>' Text='<%# Eval("SerieFolio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("NombreComercial")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("NombreComercial")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<div style="margin-right: 20px">
|
||||
<asp:Literal runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<div style="margin-right: 20px">
|
||||
<asp:Literal runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
@@ -674,6 +674,112 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="ModalMitoteresat" class="modal ADS fade " role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content modal-lg">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<asp:HyperLink runat="server" NavigateUrl="/Ventas/RepConciliacionEmitidosSat.aspx?RegistroEn=4&FechaInicio=2000/01/01" CssClass="btn btn-xs btn-default" style="float:right;">Ir a Reporte</asp:HyperLink>
|
||||
<h4 class="modal-title">Ventas sin registrar en SIG</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div style="text-align: right">
|
||||
<input type="text" id="TxtBusquedaFolioSat" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaFolioSat','{0}')", GvFoliosSAT.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaFolioSat','{0}')", GvFoliosSAT.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvFoliosSAT" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron factura canceladas pendientes"
|
||||
DataKeyNames="FolioFiscal,RFC,Total"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Folio Fiscal">
|
||||
<ItemTemplate>
|
||||
<div style="white-space:nowrap "><asp:Label runat="server" Text='<%# Eval("FolioFiscal")%>'> </asp:Label></div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Serie Folio" DataField="SerieFolio" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreProveedor" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<%--<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-plus'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea Agregar la factura?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-remove'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelacar la factura ante el sat?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalMitotereCancelaPendiente" class="modal ADS fade " role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content modal-lg">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<asp:HyperLink runat="server" NavigateUrl="/Ventas/RepCancelacionesPorAtender.aspx" CssClass="btn btn-xs btn-default" style="float:right;">Ir a Reporte</asp:HyperLink>
|
||||
<h4 class="modal-title">Cancelaciones por Atender</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div style="text-align: right">
|
||||
<input type="text" id="TxtBusquedaCancelaPendiente" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCancelaPendiente','{0}')", gvCancelaPendiente.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaCancelaPendiente','{0}')", gvCancelaPendiente.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="gvCancelaPendiente" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron factura canceladas pendientes"
|
||||
DataKeyNames="FolioFiscal,RFC,Total"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Folio Fiscal">
|
||||
<ItemTemplate>
|
||||
<div style="white-space:nowrap "><asp:Label runat="server" Text='<%# Eval("FolioFiscal")%>'> </asp:Label></div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Serie Folio" DataField="SerieFolio" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreProveedor" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<%--<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-plus'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea Agregar la factura?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-remove'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelacar la factura ante el sat?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalComprasPUE" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -685,64 +791,64 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div align="right">
|
||||
<div style="text-align:right">
|
||||
<input type="text" id="TxtBus" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvCompPUE.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvCompPUE.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvCompPUE.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvCompPUE" runat="server" AutoGenerateColumns="False"
|
||||
DataKeysNames="CveCompra"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="SerieFolio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNum" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>' Text='<%# Eval("SerieFolio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
DataKeysNames="CveCompra"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="SerieFolio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNum" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>' Text='<%# Eval("SerieFolio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Proveedor">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("NombreComercial")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Proveedor">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("NombreComercial")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<div style="margin-right: 20px">
|
||||
<asp:Literal runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<div style="margin-right: 20px">
|
||||
<asp:Literal runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
@@ -767,13 +873,15 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div align="left">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
# Inconsistencias:
|
||||
<asp:Label ID="LblInconsistenciasNum" runat="server" Text="0" Font-Bold="true"></asp:Label>
|
||||
</div>
|
||||
<div align="right">
|
||||
<div class="col-md-6" style="text-align :right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIncons.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIncons.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIncons.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvIncons" runat="server" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
</asp:GridView>
|
||||
@@ -800,7 +908,15 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
# No Timbradas:
|
||||
<div class="row">
|
||||
<div class="col-md-6"># No Timbradas:</div>
|
||||
<div class="col-md-6" style="text-align :right">
|
||||
<input type="text" id="TxtBusquedaCentroCosto" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCentroCosto','{0}')", GvNoTimbradasCentroCosto.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaCentroCosto','{0}')", GvNoTimbradasCentroCosto.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<asp:Label ID="LblNoTimbradas" runat="server" Text="0" Font-Bold="true"></asp:Label>
|
||||
<asp:GridView ID="GvNoTimbradasCentroCosto" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="false" runat="server" GridLines="None">
|
||||
<Columns>
|
||||
@@ -892,7 +1008,7 @@
|
||||
<h4 class="modal-title" id="myModalLabel2" runat="server">Evaluaciones Pendientes</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" >
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaEva" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaEva','{0}')", GvEvaluaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEvaluaciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
|
||||
@@ -11,12 +11,72 @@ Imports System.Drawing
|
||||
Partial Class Inicio
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}
|
||||
|
||||
Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}
|
||||
|
||||
|
||||
Public Function GetFacturasCanceladasPendientesWS(objventas As ClsVentas, RFC As String, CveEmpresa As Integer, Optional showalert As Boolean = True) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
|
||||
Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient()
|
||||
Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
|
||||
If resp.Estado = 0 Then
|
||||
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
|
||||
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
|
||||
Dim theDataSet As DataSet = New DataSet()
|
||||
theDataSet.ReadXml(theReader)
|
||||
|
||||
If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
|
||||
Dim sb = New StringBuilder()
|
||||
|
||||
For Each item As DataRow In theDataSet.Tables(0).Rows
|
||||
sb.AppendFormat("{0};", item("Uuid").ToString())
|
||||
Next
|
||||
|
||||
If objventas.GetFacturasCanceladasPendientes(sb.ToString(), CveEmpresa) Then
|
||||
retorno = True
|
||||
End If
|
||||
|
||||
Else
|
||||
If showalert Then
|
||||
Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Alert("Error al obtener cancelaciones pendientes: " & resp.Descripcion, ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
Me.OnError("Error al obtener cancelaciones pendientes: ", ex, "")
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
'RESTRICCION AD
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
|
||||
Using objgral As New ClsGenerales
|
||||
objgral.RepConciliacionSatDetalleGET(UsuarioActual.CveEmpresa, "I", "", "", 10)
|
||||
If objgral.DtResultados.Rows.Count > 0 Then
|
||||
GvFoliosSAT.DataSource = objgral.DtResultados
|
||||
RegistraScript("$('#ModalMitoteresat').modal();", "mitoterosat")
|
||||
End If
|
||||
|
||||
End Using
|
||||
GvFoliosSAT.DataBind()
|
||||
End If
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
Using objventas As New ClsVentas
|
||||
If (GetFacturasCanceladasPendientesWS(objventas, UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa, False)) AndAlso objventas.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("$('#ModalMitotereCancelaPendiente').modal();", "mitoterosatCanceladasPendientesWS")
|
||||
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
'RESTRICCION AD
|
||||
If Not IsNothing(Request("ADCod")) Then
|
||||
'viene el msg encriptado, para sacar el modulo
|
||||
Dim Codigo As String = Decripta(Request("ADCod"))
|
||||
|
||||
@@ -655,13 +655,14 @@ function AbrirVentana(Pagina, Ancho, Alto, tmp, Titulo) {
|
||||
if (!(Alto)) { Alto = '601'; }
|
||||
$('#ajaxidmodal #myFrame').css({ width: Ancho, height: Alto });
|
||||
$('#ajaxidmodal ').css({ width: Ancho, height: Alto });
|
||||
$('#ajaxidmodal #myFrame').load(function() {
|
||||
$('#ajaxidmodal').removeClass("hidden");
|
||||
$("#ajax").modal();
|
||||
$("#ajax").modal();
|
||||
$('#ajaxidmodal').removeClass("hidden");
|
||||
$("#ajaxidmodal #myFrame").unbind("load");
|
||||
$('#ajaxidmodal #myFrame').load(function () {
|
||||
Metronic.unblockUI();
|
||||
});
|
||||
$('#ajaxidmodal #myFrame').prop('src', Pagina);
|
||||
$("#ajax").modal();
|
||||
//$("#ajax").modal();
|
||||
}
|
||||
|
||||
function CerrarVentana() {
|
||||
|
||||
@@ -838,7 +838,7 @@
|
||||
</div>
|
||||
<div id="DivRetenciones" runat="server">
|
||||
<div id="DivTipoRetenciones" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoRetencion" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoRetencion_SelectedIndexChanged" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar">
|
||||
<asp:DropDownList ID="DdlTipoRetencion" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Retención" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Arrendamiento" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Servicios Profesionales" Value="2"></asp:ListItem>
|
||||
|
||||
@@ -9940,23 +9940,6 @@ Partial Class Clientes
|
||||
Acum.Dispose()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Select Case DdlTipoRetencion.SelectedValue
|
||||
Case "1" 'Arrendamiento
|
||||
TxtRetIVA.Text = "10"
|
||||
TxtRetISR.Text = "10"
|
||||
Case "2" 'Servicios Profesionales
|
||||
TxtRetIVA.Text = "10"
|
||||
TxtRetISR.Text = "10"
|
||||
Case "3" 'Fletes
|
||||
TxtRetIVA.Text = "4"
|
||||
TxtRetISR.Text = "4"
|
||||
Case "4" 'Servicios
|
||||
TxtRetIVA.Text = "6"
|
||||
TxtRetISR.Text = "6"
|
||||
End Select
|
||||
UpFiscalContable.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1648,10 +1648,12 @@ Partial Class PV
|
||||
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
|
||||
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString)
|
||||
'DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
|
||||
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
|
||||
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||
End If
|
||||
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
||||
@@ -4729,7 +4731,10 @@ Partial Class PV
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "") Then
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim,
|
||||
TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim,
|
||||
TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero, DdlFormaCliente.SelectedValue.ToEntero) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("hideDivEC();")
|
||||
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString.ToEntero
|
||||
|
||||
@@ -27,39 +27,49 @@ public partial class Ventas_RepCancelacionesPorAtender : ClsPaginas
|
||||
}
|
||||
private void CargarPendientes()
|
||||
{
|
||||
Cancelacion.CancelacionSoapClient objServicio = new Cancelacion.CancelacionSoapClient();
|
||||
Cancelacion.StructCancel resp = objServicio.ObtienePendientes(UsuarioActual.Empresa.RFC, "UserTest", "1234567890");
|
||||
if (resp.Estado == 0)
|
||||
|
||||
//Cancelacion.CancelacionSoapClient objServicio = new Cancelacion.CancelacionSoapClient();
|
||||
//Cancelacion.StructCancel resp = objServicio.ObtienePendientes(UsuarioActual.Empresa.RFC, "UserTest", "1234567890");
|
||||
//if (resp.Estado == 0)
|
||||
//{
|
||||
// string XmlPendientes = DecodeBase64(resp.Xml);
|
||||
// StringReader theReader = new StringReader(XmlPendientes);
|
||||
// DataSet theDataSet = new DataSet();
|
||||
// theDataSet.ReadXml(theReader);
|
||||
// if (theDataSet.Tables[0].Rows[0]["Uuid"].ToString() != "null")
|
||||
// {
|
||||
// var sb = new StringBuilder();
|
||||
// foreach (DataRow item in theDataSet.Tables[0].Rows)
|
||||
// {
|
||||
// sb.AppendFormat("{0};", item["Uuid"].ToString());
|
||||
// }
|
||||
// var ObjVentas = new ClsVentas();
|
||||
// if (ObjVentas.GetFacturasCanceladasPendientes(sb.ToString(), UsuarioActual.CveEmpresa))
|
||||
// {
|
||||
// GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
// }
|
||||
// ObjVentas.Dispose();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GvDatos.DataSource = null;
|
||||
// Alert("No se encontraron cancelaciones pendientes");
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// GvDatos.DataSource = null;
|
||||
// Alert("Error al obtener cancelaciones pendientes: " + resp.Descripcion, ModExtensiones.TipoMensaje.MsgError);
|
||||
//}
|
||||
using (ClsVentas ObjVentas = new ClsVentas())
|
||||
{
|
||||
string XmlPendientes = DecodeBase64(resp.Xml);
|
||||
StringReader theReader = new StringReader(XmlPendientes);
|
||||
DataSet theDataSet = new DataSet();
|
||||
theDataSet.ReadXml(theReader);
|
||||
if (theDataSet.Tables[0].Rows[0]["Uuid"].ToString() != "null")
|
||||
if (ObjVentas.GetFacturasCanceladasPendientesWS(UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (DataRow item in theDataSet.Tables[0].Rows)
|
||||
{
|
||||
sb.AppendFormat("{0};", item["Uuid"].ToString());
|
||||
}
|
||||
var ObjVentas = new ClsVentas();
|
||||
if (ObjVentas.GetFacturasCanceladasPendientes(sb.ToString(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
GvDatos.DataSource = null;
|
||||
Alert("No se encontraron cancelaciones pendientes");
|
||||
GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GvDatos.DataSource = null;
|
||||
Alert("Error al obtener cancelaciones pendientes: " + resp.Descripcion, ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
|
||||
GvDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
@@ -153,9 +163,8 @@ public partial class Ventas_RepCancelacionesPorAtender : ClsPaginas
|
||||
private string DecodeBase64(string strXMLCodificado)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] decbuff = Convert.FromBase64String(strXMLCodificado);
|
||||
return System.Text.Encoding.UTF8.GetString(decbuff);
|
||||
{
|
||||
return System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(strXMLCodificado));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -10,11 +10,13 @@ using System.Xml;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using ADSistemaLibrary.SatXml;
|
||||
using ADSistemaLibrary.SatXml;
|
||||
|
||||
//using ADS_CFDI_SAT;
|
||||
|
||||
public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
{
|
||||
#region "Propiedades"
|
||||
const string rqFechaInicio = "FechaInicio";
|
||||
const string rqFechaFin = "FechaFin";
|
||||
const string rqRegistroEn = "RegistroEn";
|
||||
@@ -59,10 +61,44 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
set { ViewState["RegistroEn"] = value; }
|
||||
}
|
||||
private StringBuilder strErrores;
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
string path;
|
||||
if (Request["op"] != null && Request["op"].ToString().Length > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
if (System.IO.File.Exists((path = string.Format("{0}\\{1}", UsuarioActual.Empresa.Ruta.Trim(), Extensiones.ModExtensiones.Decripta(Request["op"].ToString()).Trim()).Replace("/", "\\"))))
|
||||
{
|
||||
|
||||
System.IO.FileInfo archivo = new System.IO.FileInfo(path);
|
||||
|
||||
HttpContext.Current.Response.Clear();
|
||||
HttpContext.Current.Response.ClearContent();
|
||||
HttpContext.Current.Response.ContentType = "text/plain";
|
||||
HttpContext.Current.Response.AppendHeader("Content-disposition", string.Format("attachment; filename={0}", archivo.Name));
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", archivo.Length.ToString());
|
||||
HttpContext.Current.Response.TransmitFile(path);
|
||||
HttpContext.Current.Response.End();
|
||||
}
|
||||
else
|
||||
{
|
||||
RegistraScript("window.close()");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Extensiones.ModExtensiones.GuardaLog(ex.ToString());
|
||||
RegistraScript("window.close()");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fillrequestfields();
|
||||
DdlSubProyectoDatos.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ");
|
||||
DdlSubProyectoDatos.DataBind();
|
||||
@@ -92,7 +128,7 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
}
|
||||
private void downfile(string path)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
public void fillrequestfields()
|
||||
{
|
||||
@@ -151,8 +187,10 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
{
|
||||
|
||||
{
|
||||
string ruta = string.Format("{0}\\{1}", UsuarioActual.Empresa.Ruta.Trim(), gvrow.DataKey("RutaXml").Trim()).Replace("/", "\\"); //gvrow.DataKey("RutaXml");
|
||||
//Alert(ruta);
|
||||
|
||||
string ruta = gvrow.DataKey("RutaXml");
|
||||
//return false;
|
||||
strErrores = new StringBuilder();
|
||||
XmlSatCFDI objxml = null;
|
||||
Modelos.Factura objfact = null;
|
||||
@@ -743,18 +781,18 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
string navurl = "";
|
||||
if(e.Row.DBCampo("Tipo") == "1")
|
||||
if (e.Row.DBCampo("Tipo") == "1")
|
||||
{
|
||||
string RutaXml = e.Row.DBCampo("RutaXml");
|
||||
if (RutaXml.IndexOf("Empresas")>0)
|
||||
{
|
||||
RutaXml = RutaXml.Substring(RutaXml.IndexOf("Empresas"));
|
||||
}
|
||||
navurl =string.Format("RepConciliacionEmitidosSat.aspx?op=", e.Row.DBCampo("RutaXml"));
|
||||
//if (RutaXml.IndexOf("Empresas")>0)
|
||||
//{
|
||||
// RutaXml = RutaXml.Substring(RutaXml.IndexOf("Empresas"));
|
||||
//}
|
||||
navurl = string.Format("RepConciliacionEmitidosSat.aspx?op={0}", Extensiones.ModExtensiones.Encripta(e.Row.DataKey("RutaXml")));
|
||||
}
|
||||
else
|
||||
{
|
||||
navurl = string.Format("/Compras/PopUpVerFactura.aspx?P={0}", Extensiones.ModExtensiones.Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveVenta"), "XML", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("TipoDocto"))));
|
||||
navurl = string.Format("/Compras/PopUpVerFactura.aspx?P={0}", Extensiones.ModExtensiones.Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveVenta"), "XML", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("TipoDocto"))));
|
||||
}
|
||||
e.Row.FCHyperLink("HypXml").NavigateUrl = navurl;
|
||||
}
|
||||
|
||||
7036
Ventas/Ventas.aspx
7036
Ventas/Ventas.aspx
File diff suppressed because it is too large
Load Diff
@@ -4113,6 +4113,7 @@ Partial Class Ventas
|
||||
|
||||
'Sección Detalle
|
||||
DdlMoneda.Enabled = False
|
||||
DdlTipoRetencion.Enabled = False
|
||||
TxtFechaEjecucion.ReadOnly = True
|
||||
ImgCalendarFechaEje.Enabled = False
|
||||
'DdlSucursalEjecucion.Enabled = False
|
||||
@@ -4293,6 +4294,8 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaCodigoUnico()
|
||||
|
||||
UpPS.Update()
|
||||
UpContado.Update()
|
||||
UpEstatus.Update()
|
||||
@@ -4701,6 +4704,9 @@ Partial Class Ventas
|
||||
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
||||
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
||||
|
||||
DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString)
|
||||
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
||||
|
||||
ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
|
||||
If ObjCliente.RetieneIVAFletes Then
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
@@ -4739,8 +4745,6 @@ Partial Class Ventas
|
||||
End If
|
||||
ViewState("CargoUsado") = ObjCliente.CargoUsados
|
||||
|
||||
'DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString)
|
||||
|
||||
Dim dr As DataRow = Nothing
|
||||
dr = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal = 1 And Estatus = 'Activo' AND CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
If dr IsNot Nothing Then
|
||||
@@ -5013,6 +5017,8 @@ Partial Class Ventas
|
||||
|
||||
TrVistaPrevia.Visible = True
|
||||
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||
|
||||
If Not (ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then
|
||||
CargaRestriccionesCreditoCliente(True, Me.CveVenta)
|
||||
End If
|
||||
@@ -5924,6 +5930,20 @@ Partial Class Ventas
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString.ToDecimal)
|
||||
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero
|
||||
TmpDT.Rows(e.RowIndex)("UM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedItem.Text
|
||||
@@ -7595,10 +7615,10 @@ Partial Class Ventas
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False)
|
||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False)
|
||||
|
||||
If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion)
|
||||
Else
|
||||
ObjFactura = New Modelos.Factura
|
||||
End If
|
||||
@@ -14229,6 +14249,20 @@ Partial Class Ventas
|
||||
Row("PorcentajeIVA") = DrPS("IVA")
|
||||
End If
|
||||
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso DrPS("CveTipoPS").ToString().ToEntero() = 1 Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
Row("IVA") = Row("PorcentajeIVA")
|
||||
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
||||
@@ -16332,181 +16366,186 @@ Partial Class Ventas
|
||||
Private Sub BtnEditarRemision_Click(sender As Object, e As EventArgs) Handles BtnEditarRemision.Click
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
|
||||
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero
|
||||
Dim TipoCambio As Double = TxtTipoCambio.Text.ToDouble
|
||||
EditoRemision = True
|
||||
'Dim SubTotal, Descuento, IVA, RetIVA, RetISR, IEPS, Total As Decimal
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
Try
|
||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||
If DdlMoneda.SelectedValue.ToEntero <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, 6)
|
||||
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Next
|
||||
|
||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||
If DdlMoneda.SelectedValue.ToEntero <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, 6)
|
||||
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Next
|
||||
|
||||
Dim ImpuestosLocales As Double = 0
|
||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TxtTipoCambioDlls.Text.Trim.ToDecimal).FormatoNumero
|
||||
ImpuestosLocales += Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
End If
|
||||
Next
|
||||
|
||||
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
|
||||
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
|
||||
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
|
||||
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
|
||||
|
||||
TipoCambio = TxtTipoCambioDlls.Text.Trim.ToDecimal
|
||||
Moneda = 2
|
||||
End If
|
||||
|
||||
'CONVERTIR REMISION - TIPO MONEDA -PESO A DOLARES
|
||||
If DdlMoneda.SelectedValue.ToEntero <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
|
||||
Dim Importe As Decimal
|
||||
Dim TCC As Decimal = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * TCC, 6)
|
||||
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal * TCC, NumeroDecimales)
|
||||
Importe = Row("Total").ToString.ToDecimal - Row("Descuento").ToString.ToDecimal
|
||||
Row("ImporteIEPS") = Math.Round(Importe * Row("PorcentajeIEPS").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteIVA") = Math.Round(Importe * Row("PorcentajeIVA").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(Importe * Row("PorcentajeRetIVA").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetISR") = Math.Round(Importe * Row("PorcentajeRetISR").ToString.ToDecimal, NumeroDecimales)
|
||||
Next
|
||||
|
||||
Dim ImpuestosLocales As Double = 0
|
||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TxtTipoCambio.Text.Trim.ToDecimal).FormatoNumero
|
||||
ImpuestosLocales += Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
End If
|
||||
Next
|
||||
|
||||
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
|
||||
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
|
||||
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
|
||||
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
|
||||
|
||||
|
||||
TipoCambio = 1
|
||||
Moneda = 1
|
||||
End If
|
||||
|
||||
'Actualizo los parametros de la venta
|
||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero,
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'Cargo de nueva cuenta el detalle de Ventas (Conceptos)
|
||||
If Not OcurrioError Then
|
||||
Dim index As Integer = 0
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero()
|
||||
If CveVentaDetalle > 0 Then
|
||||
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal(), Row("ImporteIEPS").ToString.ToDecimal(), Row("Obs").ToString, UsuarioActual.CveUsuario) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
Dim ImpuestosLocales As Double = 0
|
||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TxtTipoCambioDlls.Text.Trim.ToDecimal).FormatoNumero
|
||||
ImpuestosLocales += Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
End If
|
||||
Else
|
||||
If Not ObjVentas.AddVentaDetalle(CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero,
|
||||
Row("PU").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
||||
Row("Obs").ToString, Row("Descuento").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero, PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, IEPS:=Row("ImporteIEPS").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString,
|
||||
CveVentaDetallePadre:=Row("CveVentaDetalle").ToString.ToEntero, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString}").ToEntero, -1),
|
||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDouble, CuentaPredial:=Row("CuentaPredial").ToString) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
Next
|
||||
|
||||
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
|
||||
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
|
||||
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
|
||||
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
|
||||
|
||||
TipoCambio = TxtTipoCambioDlls.Text.Trim.ToDecimal
|
||||
Moneda = 2
|
||||
End If
|
||||
|
||||
'CONVERTIR REMISION - TIPO MONEDA -PESO A DOLARES
|
||||
If DdlMoneda.SelectedValue.ToEntero <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
|
||||
Dim Importe As Decimal
|
||||
Dim TCC As Decimal = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * TCC, 6)
|
||||
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal * TCC, NumeroDecimales)
|
||||
Importe = Row("Total").ToString.ToDecimal - Row("Descuento").ToString.ToDecimal
|
||||
Row("ImporteIEPS") = Math.Round(Importe * Row("PorcentajeIEPS").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteIVA") = Math.Round(Importe * Row("PorcentajeIVA").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(Importe * Row("PorcentajeRetIVA").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetISR") = Math.Round(Importe * Row("PorcentajeRetISR").ToString.ToDecimal, NumeroDecimales)
|
||||
Next
|
||||
|
||||
Dim ImpuestosLocales As Double = 0
|
||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TxtTipoCambio.Text.Trim.ToDecimal).FormatoNumero
|
||||
ImpuestosLocales += Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
End If
|
||||
Next
|
||||
|
||||
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
|
||||
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
|
||||
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
|
||||
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
|
||||
|
||||
|
||||
TipoCambio = 1
|
||||
Moneda = 1
|
||||
End If
|
||||
|
||||
'Actualizo los parametros de la venta
|
||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero,
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'Cargo de nueva cuenta el detalle de Ventas (Conceptos)
|
||||
If Not OcurrioError Then
|
||||
Dim index As Integer = 0
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero()
|
||||
If CveVentaDetalle > 0 Then
|
||||
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal(), Row("ImporteIEPS").ToString.ToDecimal(), Row("Obs").ToString, UsuarioActual.CveUsuario) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TmpDT.Rows(index)("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||
If Not ObjVentas.AddVentaDetalle(CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero,
|
||||
Row("PU").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
||||
Row("Obs").ToString, Row("Descuento").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero, PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, IEPS:=Row("ImporteIEPS").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString,
|
||||
CveVentaDetallePadre:=Row("CveVentaDetalle").ToString.ToEntero, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString}").ToEntero, -1),
|
||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDouble, CuentaPredial:=Row("CuentaPredial").ToString) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
Else
|
||||
TmpDT.Rows(index)("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
index = index + 1
|
||||
Next
|
||||
End If
|
||||
index = index + 1
|
||||
Next
|
||||
End If
|
||||
|
||||
'ELIMINA LOS DETALLES
|
||||
If Not OcurrioError Then
|
||||
Dim DtEliminados As New DataTable
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
DtEliminados = ObjVentas.DtResultados.FiltraParametros("", "", {"CveVentaDetalle"})
|
||||
For Each Dr1 As DataRow In DtEliminados.Rows
|
||||
If TmpDT.FiltraParametros($"CveVentaDetalle = {Dr1("CveVentaDetalle")}").Rows.Count = 0 Then
|
||||
If Not ObjVentas.RemoveVentasDetalle(CveVenta, Dr1("CveVentaDetalle").ToString.ToEntero) Then
|
||||
'ELIMINA LOS DETALLES
|
||||
If Not OcurrioError Then
|
||||
Dim DtEliminados As New DataTable
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
DtEliminados = ObjVentas.DtResultados.FiltraParametros("", "", {"CveVentaDetalle"})
|
||||
For Each Dr1 As DataRow In DtEliminados.Rows
|
||||
If TmpDT.FiltraParametros($"CveVentaDetalle = {Dr1("CveVentaDetalle")}").Rows.Count = 0 Then
|
||||
If Not ObjVentas.RemoveVentasDetalle(CveVenta, Dr1("CveVentaDetalle").ToString.ToEntero) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'OcurrioError = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, 1, ObjBancos, ObjVentas)
|
||||
|
||||
'Actualizo impuestos locales
|
||||
If Not OcurrioError Then
|
||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
If Not ObjVentas.UpdateVentaImpuestoLocales(CveVenta, gvr.DataKey("CveImpuestoLocal").ToString.ToEntero, gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'OcurrioError = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, 1, ObjBancos, ObjVentas)
|
||||
|
||||
'Actualizo impuestos locales
|
||||
If Not OcurrioError Then
|
||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
If Not ObjVentas.UpdateVentaImpuestoLocales(CveVenta, gvr.DataKey("CveImpuestoLocal").ToString.ToEntero, gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'Orden Produccion'
|
||||
If Not OcurrioError Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(126) Then
|
||||
If CveVenta > 0 And DdlOrdenProduccion.SelectedValue.ToEntero > 0 Then
|
||||
If Not ObjCGame.UpdateOrdenProduccionVenta(DdlOrdenProduccion.SelectedValue.ToEntero(), CveVenta) Then
|
||||
OcurrioError = True
|
||||
'Orden Produccion'
|
||||
If Not OcurrioError Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(126) Then
|
||||
If CveVenta > 0 And DdlOrdenProduccion.SelectedValue.ToEntero > 0 Then
|
||||
If Not ObjCGame.UpdateOrdenProduccionVenta(DdlOrdenProduccion.SelectedValue.ToEntero(), CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||
If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||
OcurrioError = True
|
||||
Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
If RegeneracionPolizas(ObjVentas, ObjAC, ObjConta, ObjBancos) Then
|
||||
OcurrioError = True
|
||||
Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
If RegeneracionPolizas(ObjVentas, ObjAC) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OcurrioError = True
|
||||
OnError("Ocurrió un error al actualizar la remisión", ex)
|
||||
End Try
|
||||
|
||||
If OcurrioError Then
|
||||
ObjVentas.RollBack()
|
||||
@@ -17312,19 +17351,22 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAgregarCliente_Click(sender As Object, e As EventArgs) Handles BtnAgregarCliente.Click
|
||||
Dim CvePreioLista As Integer = -1
|
||||
Dim CvePrecioLista As Integer = -1
|
||||
If DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
If Dr("CvePrecioLista").ToString.ToEntero > 0 Then
|
||||
CvePreioLista = Dr("CvePrecioLista").ToString.ToEntero
|
||||
CvePrecioLista = Dr("CvePrecioLista").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CvePreioLista) Then
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim,
|
||||
TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("hideDivEC();")
|
||||
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString.ToEntero
|
||||
@@ -17416,34 +17458,26 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function RegeneracionPolizas(ByRef ObjVentas As ClsVentas, ByRef ObjAC As ClsContPAQi) As Boolean
|
||||
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
|
||||
|
||||
Dim CvePlantillaPoliza As Integer
|
||||
Private Function RegeneracionPolizas(ByRef ObjVentas As ClsVentas, ByRef ObjAC As ClsContPAQi, ByRef ObjConta As ClsContabilidad, ObjBancos As ClsBancos) As Boolean
|
||||
|
||||
Dim ErrorCancelar As Boolean = False
|
||||
Dim Mensaje As String = ""
|
||||
|
||||
CreaObjetosVenta()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
CvePlantillaPoliza = 7
|
||||
ElseIf ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant") Then
|
||||
CvePlantillaPoliza = 4
|
||||
Else
|
||||
CvePlantillaPoliza = 4
|
||||
End If
|
||||
|
||||
'Removemos los conceptos de la prepoliza
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, -1, CveVenta, 2)
|
||||
'REMOVEMOS LOS CONCEPTOS DE LA PREPOLIZA
|
||||
ErrorCancelar = Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, -1, CveVenta, 2)
|
||||
|
||||
ObjFactura.CveVenta = CveVenta
|
||||
ObjFactura.CvePrePoliza = CvePrePoliza
|
||||
ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, 1, ObjBancos, ObjVentas)
|
||||
|
||||
'VUELVE A GENERAR LAS PREPOLIZAS
|
||||
If Not ErrorCancelar Then ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, 1, ObjBancos, ObjVentas)
|
||||
|
||||
If Not ErrorCancelar Then ErrorCancelar = GuardarVentaImpuestosLocales(ObjVentas, ObjConta, ObjFactura, 1)
|
||||
|
||||
Return ErrorCancelar
|
||||
@@ -18447,7 +18481,8 @@ Partial Class Ventas
|
||||
CancelarRefacturada()
|
||||
End If
|
||||
|
||||
CreaObjetosVenta()
|
||||
CreaObjetosVenta(EsCancelacion:=True)
|
||||
|
||||
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveVenta > 0 Then
|
||||
@@ -18465,9 +18500,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
If ChkDevAlm.Checked Then
|
||||
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
End If
|
||||
|
||||
resp = ObjFactura.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar)
|
||||
End If
|
||||
@@ -23871,54 +23903,63 @@ Partial Class Ventas
|
||||
CargaRNC()
|
||||
RegistraScript("$('#ModalAplicarRemisionesNC').modal({backdrop: 'static', keyboard: false });")
|
||||
End Sub
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
||||
Dim DtUsados As DataTable = Nothing
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetGarantiasDetalle(ObjFactura.CveVenta) Then
|
||||
DtUsados = ObjAcum.DtResultados.Copy()
|
||||
|
||||
#Region "P O L I Z A - V I R T U A L"
|
||||
Private Sub CargaCodigoUnico()
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetGarantiasPolizaVirtual(Me.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
GvCodigosUnicos.DataSource = ObjAcum.DtResultados
|
||||
DivCodigosUnicos.Visible = True
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
GvCodigosUnicos.DataBind()
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
End Sub
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
||||
Try
|
||||
For Each Row As DataRow In DtUsados.Rows
|
||||
Dim obj As New Modelos.MPolizaVentaWS
|
||||
'DATOS DEL CLIENTE
|
||||
obj.customer_name = ObjFactura.Cliente.Nombre
|
||||
obj.customer_last_name1 = ""
|
||||
obj.customer_last_name2 = ""
|
||||
obj.customer_birthday = Nothing
|
||||
obj.customer_phone = ObjFactura.Cliente.Telefono
|
||||
obj.customer_email = ObjFactura.Cliente.Mail
|
||||
obj.customer_gender = "03" 'OTRO GENERO
|
||||
obj.customer_advertising = False
|
||||
obj.customer_car_brand = "00"
|
||||
obj.customer_car_model = "00"
|
||||
obj.customer_car_year = ObjFactura.Fecha.Year
|
||||
For Each Row As GridViewRow In GvCodigosUnicos.Rows
|
||||
If Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim obj As New Modelos.MPolizaVentaWS
|
||||
'DATOS DEL CLIENTE
|
||||
obj.customer_name = ObjFactura.Cliente.Nombre
|
||||
obj.customer_last_name1 = ""
|
||||
obj.customer_last_name2 = ""
|
||||
obj.customer_birthday = Nothing
|
||||
obj.customer_phone = ObjFactura.Cliente.Telefono
|
||||
obj.customer_email = ObjFactura.Cliente.Mail
|
||||
obj.customer_gender = "03" 'OTRO GENERO
|
||||
obj.customer_advertising = False
|
||||
obj.customer_car_brand = "00"
|
||||
obj.customer_car_model = "00"
|
||||
obj.customer_car_year = ObjFactura.Fecha.Year
|
||||
|
||||
'DATOS DE VENTA
|
||||
obj.sale_date = ObjFactura.Fecha
|
||||
obj.sale_paidby = "01"
|
||||
obj.sale_type = "01" 'PISO
|
||||
obj.sale_type_service = "02" 'COMERCIAL
|
||||
obj.sale_total = ObjFactura.Total
|
||||
obj.sale_discount = ObjFactura.Descuento
|
||||
obj.sale_id = String.Format("{0}{1}{2}", ObjFactura.Serie, ObjFactura.Folio, ObjFactura.CveVenta)
|
||||
'DATOS DE VENTA
|
||||
obj.sale_date = ObjFactura.Fecha
|
||||
obj.sale_paidby = "01"
|
||||
obj.sale_type = "01" 'PISO
|
||||
obj.sale_type_service = "02" 'COMERCIAL
|
||||
obj.sale_total = ObjFactura.Total
|
||||
obj.sale_discount = ObjFactura.Descuento
|
||||
obj.sale_id = String.Format("{0}{1}{2}", ObjFactura.Serie, ObjFactura.Folio, ObjFactura.CveVenta)
|
||||
|
||||
'DATOS DEL PRODUCTO
|
||||
obj.product_code = Row("IdProductoPolizaVirtual").ToString()
|
||||
obj.product_unique_code = Row("SerieLote").ToString() 'se indique el código único de la batería. (SERIE LOTE)
|
||||
obj.product_sale_type = "01 " 'VENTA
|
||||
'DATOS DEL PRODUCTO
|
||||
obj.product_code = Row.DataKey("IdProductoPolizaVirtual").ToString()
|
||||
obj.product_unique_code = Row.FCTextBox("TxtCodigoUnico").Text 'se indique el código único de la batería. (SERIE LOTE)
|
||||
obj.product_sale_type = "01 " 'VENTA
|
||||
|
||||
Dim FechaUsado As DateTime = Row("FechaAjuste").ToString().ToDateTime()
|
||||
Dim FechaUsado As DateTime = Row.DataKey("FechaAjuste").ToString().ToDateTime()
|
||||
|
||||
'DATOS DE USADO
|
||||
obj.used_product = True
|
||||
obj.used_brand = Row("IdModelo").ToString() 'MARCAR DEL USADO
|
||||
obj.used_bci = Row("CveBCIUsado").ToString() 'VALOR DEL BCI
|
||||
obj.used_month = FechaUsado.Month
|
||||
obj.used_year = FechaUsado.Year
|
||||
obj.used_sale_date = FechaUsado
|
||||
'DATOS DE USADO
|
||||
obj.used_product = True
|
||||
obj.used_brand = Row.DataKey("IdModelo").ToString() 'MARCAR DEL USADO
|
||||
obj.used_bci = Row.DataKey("IdBCI").ToString() 'VALOR DEL BCI
|
||||
obj.used_month = FechaUsado.Month
|
||||
obj.used_year = FechaUsado.Year
|
||||
obj.used_sale_date = FechaUsado
|
||||
|
||||
EnviarPolizaVentaWS(obj)
|
||||
EnviarPolizaVentaWS(obj)
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al generar la poliza virtual", ex)
|
||||
@@ -23998,19 +24039,39 @@ Partial Class Ventas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
'Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' Dim PorcentajeRetencion As Decimal = 0
|
||||
' Select Case DdlTipoRetencion.SelectedValue
|
||||
' Case "1" 'Arrendamiento
|
||||
' PorcentajeRetencion = 10
|
||||
' Case "2" 'Servicios Profesionales
|
||||
' PorcentajeRetencion = 10
|
||||
' Case "3" 'Fletes
|
||||
' PorcentajeRetencion = 4
|
||||
' Case "4" 'Servicios
|
||||
' PorcentajeRetencion = 6
|
||||
' End Select
|
||||
#End Region
|
||||
|
||||
'End Sub
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
|
||||
For Each RowServicio As DataRow In TmpDT.Rows
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso RowServicio("CveTipoPS").ToString().ToEntero() = 1 Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal()
|
||||
RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL()
|
||||
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
|
||||
|
||||
Next
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
|
||||
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||
If PorcentajeRetIVA > 0 Then
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
UpPS.Update()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user