This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-01-13 18:43:40 -07:00
22 changed files with 6502 additions and 6134 deletions

View File

@@ -477,20 +477,21 @@ Public Class ClsAcumuladores
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region " FOLIOS GARANTÍA " #Region " FOLIOS GARANTÍA "
Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer) As Boolean Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
SqlDataAdapter("PA_Acum_FoliosGarantiaGet") SqlDataAdapter("PA_Acum_FoliosGarantiaGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
.Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With

View File

@@ -568,7 +568,7 @@ Public Class ClsClientes
Optional ObservacionRevsion As String = "-1", Optional ReferenciaFiscal As String = "-1", Optional Celular As String = "-1", Optional ExtOtros As String = "-1", Optional CveUsoCFDI As Integer = -1, Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional DesglosaIEPS As Boolean = True, Optional ObservacionRevsion As String = "-1", Optional ReferenciaFiscal As String = "-1", Optional Celular As String = "-1", Optional ExtOtros As String = "-1", Optional CveUsoCFDI As Integer = -1, Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional DesglosaIEPS As Boolean = True,
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False, Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False) As Boolean Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -702,6 +702,7 @@ Public Class ClsClientes
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CargoUsado", SqlDbType.Bit).Value = CargoUsado .Add("@CargoUsado", SqlDbType.Bit).Value = CargoUsado
.Add("@BonificacionUsado", SqlDbType.Bit).Value = BonificacionUsado .Add("@BonificacionUsado", SqlDbType.Bit).Value = BonificacionUsado
.Add("@CveTipoRetencion", SqlDbType.TinyInt).Value = CveTipoRetencion
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With End With
@@ -747,7 +748,7 @@ Public Class ClsClientes
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False, Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False) As Boolean Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -896,7 +897,8 @@ Public Class ClsClientes
.Add("@EsDistribuidor", SqlDbType.Bit).Value = EsDistribuidor .Add("@EsDistribuidor", SqlDbType.Bit).Value = EsDistribuidor
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CargoUsado", SqlDbType.Bit).Value = CargoUsado .Add("@CargoUsado", SqlDbType.Bit).Value = CargoUsado
.Add("@BonificacionUsado", SqlDbType.Bit).Value = BonificacionUsado .Add("@BonificacionUsado", SqlDbType.Bit).Value = BonificacionUsado
.Add("@CveTipoRetencion", SqlDbType.TinyInt).Value = CveTipoRetencion
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -5768,6 +5768,7 @@ Public Class ClsContabilidad
.Add("@Opcion", SqlDbType.Int).Value = Opcion .Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output .Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
.Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 800).Direction = ParameterDirection.Output
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output .Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
End With End With

View File

@@ -368,7 +368,7 @@ Namespace Modelos
End If End If
Timbre = New CFDITimbre Timbre = New CFDITimbre
End Sub 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.UsuarioActual = UsuarioActual
Me.CveVenta = CveVenta Me.CveVenta = CveVenta
Me.CveEmpresa = CveEmpresa Me.CveEmpresa = CveEmpresa
@@ -393,7 +393,7 @@ Namespace Modelos
Me.DtDetalle = ObjVentas.DtResultados.Copy() Me.DtDetalle = ObjVentas.DtResultados.Copy()
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
IniciaValoresVentas() IniciaValoresVentas(EsCancelacion)
If String.IsNullOrEmpty(DirectorioServidor) Then If String.IsNullOrEmpty(DirectorioServidor) Then
DirectorioServidor = HttpContext.Current.Server.MapPath("/") DirectorioServidor = HttpContext.Current.Server.MapPath("/")
End If End If
@@ -446,7 +446,7 @@ Namespace Modelos
Me.IEPS = 0 Me.IEPS = 0
Me.CveAlmacenTraspasoOrigen = 0 Me.CveAlmacenTraspasoOrigen = 0
End Sub End Sub
Private Sub IniciaValoresVentas() Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
If CveVenta > 0 AndAlso CveEmpresa > 0 Then If CveVenta > 0 AndAlso CveEmpresa > 0 Then
Me.DtAnticipos = New DataTable() Me.DtAnticipos = New DataTable()
Me.DtAntNCVinculadas = New DataTable() Me.DtAntNCVinculadas = New DataTable()
@@ -492,6 +492,10 @@ Namespace Modelos
Me.DtNCVinculadas = ObjVentas.DtResultados.Copy() Me.DtNCVinculadas = ObjVentas.DtResultados.Copy()
End If End If
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
EsNCAmortizacion = True
End If
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
Me.DtAnticipos = ObjVentas.DtResultados.Copy() Me.DtAnticipos = ObjVentas.DtResultados.Copy()
End If End If
@@ -2333,7 +2337,7 @@ Namespace Modelos
Exit Select Exit Select
End If 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 For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
If row2("CveConceptoContable").ToString().ToEntero = 11 Then 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) 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 CveSubProyectoContabilizar = CveSubProyectoVenta
If importeMovimiento <> 0 Then 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 ErrorPrepoliza = True
Exit For Exit For
Else Else

View File

@@ -54,8 +54,8 @@ Namespace Extensiones
' BaseDatos = CType(System.Web.HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.BaseDatosNombre ' BaseDatos = CType(System.Web.HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.BaseDatosNombre
'End If 'End If
Return ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
Return String.Format("Data Source=192.168.0.2;Initial Catalog={0};User Id=JCaudillo;Password=JCau127*953;pooling=True; Min Pool Size=10;Application Name=SIG;", BaseDatos) ' Return String.Format("Data Source=192.168.0.2;Initial Catalog={0};User Id=JCaudillo;Password=JCau127*953;pooling=True; Min Pool Size=10;Application Name=SIG;", BaseDatos)
End Function End Function

View File

@@ -247,13 +247,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'ObjProveedores.Dispose() 'ObjProveedores.Dispose()
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}") Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"RazonSocial like '%{Name}%'") DtRetorno = dt.FiltraParametros($"NombreCortoProveedor like '%{Name}%'")
End If End If
End If End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
DtRetorno.Columns("CveProveedor").ColumnName = "id" DtRetorno.Columns("CveProveedor").ColumnName = "id"
DtRetorno.Columns("RazonSocial").ColumnName = "text" DtRetorno.Columns("NombreCortoProveedor").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtRetorno).ToString retorno = JsonConvert.SerializeObject(DtRetorno).ToString
context.Response.Write(retorno) context.Response.Write(retorno)
Else Else

View File

@@ -1471,7 +1471,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then If Archivo.Exists Then
'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH '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 CiudadSucursal As String = ""
Dim DomicilioSucursal 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) 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 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("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)) params.Add(New ReportParameter("SucursalCliente", DtMovimientos(0)("SucCliente").ToString))

View File

@@ -373,6 +373,9 @@
<asp:TemplateField ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="ImgBancos" runat="server" CausesValidation="False" CssClass="btn btn-circle btn-sm btn-warning" OnClick="Bancos_Click" Text="<i class='fa fa-money'></i>" Visible="false" /> <asp:LinkButton ID="ImgBancos" runat="server" CausesValidation="False" CssClass="btn btn-circle btn-sm btn-warning" OnClick="Bancos_Click" Text="<i class='fa fa-money'></i>" Visible="false" />
<asp:DropDownList ID="DdlProveedores" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="160px" Visible="false" AutoPostBack="true" OnSelectedIndexChanged="DdlProveedores_SelectedIndexChanged1"></asp:DropDownList><br />
<asp:DropDownList ID="DdlCompras" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SerieFolio" DataValueField="CveCompra" Width="160px" Visible="false"></asp:DropDownList><br />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

View File

@@ -794,6 +794,18 @@ Partial Class ContabilidadC_RegPrePoliza
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
End If End If
End If End If
If e.Row.DataKey("CveConcepto").ToEntero.Contiene(17) Then
e.Row.FCDropDownList("DdlProveedores").Visible = True
e.Row.FCDropDownList("DdlProveedores").DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlProveedores").DataBind()
e.Row.FCDropDownList("DdlProveedores").Items.Insert(0, New ListItem(" - ", "-1"))
'If CveTipoTransaccion > 0 And CveCuenta > 0 And Folio.Length > 0 And ImporteDocumento > 0 And Beneficiario.Length > 0 Then
' e.Row.FCLinkButton("ImgPagoCompra").CssClass = "btn btn-circle btn-sm green"
'End If
End If
End If End If
End Sub End Sub
@@ -854,15 +866,20 @@ Partial Class ContabilidadC_RegPrePoliza
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
FolioIE = ObjIE.Folio FolioIE = ObjIE.Folio
End If End If
End If End If
Dim CveProveedor As Integer = -1
Dim CveCompra As Integer = -1
'inserto las compras que voy a pagarDdlSaldos 'inserto las compras que voy a pagarDdlSaldos
For Each gvr As GridViewRow In GvMov.Rows For Each gvr As GridViewRow In GvMov.Rows
If gvr.DataKey("IDCuenta").ToEntero > 0 Then If gvr.DataKey("IDCuenta").ToEntero > 0 Then
IdCtaContable = gvr.DataKey("IDCuenta") IdCtaContable = gvr.DataKey("IDCuenta")
End If End If
CveProveedor = gvr.DataKey("CveProveedor").ToEntero
CveCompra = gvr.DataKey("CveCompra").ToEntero
CveConcepto = gvr.DataKey("CveConcepto").ToEntero
If gvr.DataKey("TipoMovto").ToDouble <> 0 Then If gvr.DataKey("TipoMovto").ToDouble <> 0 Then
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
@@ -870,6 +887,11 @@ Partial Class ContabilidadC_RegPrePoliza
Else Else
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
TipoMovto = False TipoMovto = False
End If
'Registra pago de compra
If CveConcepto = 17 Then
CveProveedor = gvr.FCDropDownList("DdlProveedores").SelectedValue.ToEntero
CveCompra = gvr.FCDropDownList("DdlCompras").SelectedValue.ToEntero
End If End If
If CveConcepto = 41 Then If CveConcepto = 41 Then
@@ -890,7 +912,7 @@ Partial Class ContabilidadC_RegPrePoliza
If Importe <> 0 Then If Importe <> 0 Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero, gvr.FCTextBox("TxtConcepto").Text, If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero, gvr.FCTextBox("TxtConcepto").Text,
TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=CveIE, TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=CveIE,
CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, CveCompra:=CveCompra,
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=If(gvr.DataKey("TC").ToString.ToDouble > 0, gvr.DataKey("TC").ToString.ToDouble, 1), CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=If(gvr.DataKey("TC").ToString.ToDouble > 0, gvr.DataKey("TC").ToString.ToDouble, 1),
@@ -1560,10 +1582,34 @@ Partial Class ContabilidadC_RegPrePoliza
Protected Sub LnkComplementoPago_Click(sender As Object, e As EventArgs) Protected Sub LnkComplementoPago_Click(sender As Object, e As EventArgs)
GeneraTimbre(CvePrePoliza) GeneraTimbre(CvePrePoliza)
End Sub End Sub
#End Region #End Region
Protected Sub DdlProveedores_SelectedIndexChanged1(sender As Object, e As EventArgs)
Dim ddl As DropDownList = CType(sender, DropDownList)
Dim ddl2 As DropDownList = DirectCast(ddl.BindingContainer, GridViewRow).FCDropDownList("DdlCompras")
CargaCompras2(ddl.SelectedValue.ToEntero, ddl2)
End Sub
Private Sub CargaCompras2(CveProveedor As Integer, ddl As DropDownList)
Dim ObjCompras As New ClsCompras
ddl.ClearSelection()
If ObjCompras.GetCompras(-1, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then
ddl.DataSource = ObjCompras.DtResultados.FiltraParametros("Saldo > 0")
ddl.DataBind()
ddl.Items.Insert(0, New ListItem(" - ", "-1"))
ddl.Visible = True
Else
ddl.DataSource = Nothing
ddl.DataBind()
ddl.Items.Insert(0, New ListItem(" - ", "-1"))
End If
ObjCompras.Dispose()
End Sub
End Class End Class

View File

@@ -1749,19 +1749,22 @@
<TablixBody> <TablixBody>
<TablixColumns> <TablixColumns>
<TablixColumn> <TablixColumn>
<Width>2.12527cm</Width> <Width>1.34132cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>2.02474cm</Width> <Width>1.32237cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>10.17786cm</Width> <Width>2.53649cm</Width>
</TablixColumn>
<TablixColumn>
<Width>8.96945cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>2.52862cm</Width> <Width>2.52862cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>3.15415cm</Width> <Width>3.27979cm</Width>
</TablixColumn> </TablixColumn>
</TablixColumns> </TablixColumns>
<TablixRows> <TablixRows>
@@ -1776,7 +1779,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Cantidad</Value> <Value>Cant.</Value>
<Style> <Style>
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize> <FontSize>9pt</FontSize>
@@ -1838,6 +1841,42 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </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> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Textbox79"> <Textbox Name="Textbox79">
@@ -1973,7 +2012,7 @@
<Value>=Fields!Cantidad.Value</Value> <Value>=Fields!Cantidad.Value</Value>
<Style> <Style>
<FontSize>7pt</FontSize> <FontSize>7pt</FontSize>
<Format>#,0.00;(#,0.00)</Format> <Format>#,0;(#,0)</Format>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -2041,6 +2080,48 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </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> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="PS1"> <Textbox Name="PS1">
@@ -2225,6 +2306,38 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </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> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Textbox83"> <Textbox Name="Textbox83">
@@ -2336,6 +2449,7 @@
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember />
</TablixMembers> </TablixMembers>
</TablixColumnHierarchy> </TablixColumnHierarchy>
<TablixRowHierarchy> <TablixRowHierarchy>
@@ -2355,7 +2469,7 @@
<Top>5.75246cm</Top> <Top>5.75246cm</Top>
<Left>0.11468cm</Left> <Left>0.11468cm</Left>
<Height>1.07241cm</Height> <Height>1.07241cm</Height>
<Width>20.01064cm</Width> <Width>19.97804cm</Width>
<ZIndex>26</ZIndex> <ZIndex>26</ZIndex>
<Style> <Style>
<Border> <Border>

View File

@@ -1742,6 +1742,12 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="TipoDocumento">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="compuproveedores"> <EmbeddedImage Name="compuproveedores">

View File

@@ -161,6 +161,10 @@
</span> </span>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
</div> </div>
@@ -175,6 +179,10 @@
</div> </div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="col-md-1"> <div class="col-md-1">

View File

@@ -1868,112 +1868,7 @@ Partial Class Inventarios_RecepcionEntrega
End If End If
' TERMINA: GARANTIAS ' TERMINA: GARANTIAS
' COMIENZA: VIRTUAL
If TipoDocto.Contiene("Ing") AndAlso UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
Dim DtPSVirtual As New DataTable("DtTamanios")
DtPSVirtual.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
DtPSVirtual.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
DtPSVirtual.Columns.Add(New DataColumn("PU", GetType(Decimal)))
DtPSVirtual.Columns.Add(New DataColumn("CveUM", GetType(Integer)))
Dim DtTamanios As DataTable = Nothing
If ObjAcumuladores.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
DtTamanios = ObjAcumuladores.DtResultados.Copy()
End If
Dim CveConceptoMovimientoVirtual As Integer = -1
Dim CveAlmacenVirtual As Integer = -1
Dim CveMovimientoRelacionadoVirtual As Integer = -1
Dim ValidaVirtual As Boolean = False
If TipoMovimiento = 1 Then
For Each GvRow As GridViewRow In GvDatos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.datakey("CveTamaño").tostring.toentero > 0 Then
ValidaVirtual = True ' si tiene tamaño, debe de tener virtual
Dim drr As DataRow = DtTamanios.FiltroPrimero(String.Format("CveTamaño={0}", GvRow.DataKey("CveTamaño")))
If drr IsNot Nothing Then
Dim CvePSCargo = drr("CvePSCargo").ToString().ToEntero()
Dim Row As DataRow = DtPSVirtual.NewRow()
Row("CvePS") = CvePSCargo
Row("Cantidad") = GvRow.FCTextBox("TbCantidadF").Text.ToDecimal()
Row("PU") = 0
Row("CveUM") = GvRow.DataKey("CveUM").ToEntero()
DtPSVirtual.Rows.Add(Row)
End If
End If
End If
Next
CveConceptoMovimientoVirtual = 3
CveAlmacenVirtual = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
ElseIf TipoMovimiento = 2 Then
ValidaVirtual = True
Dim CveMovimientoSalidaDev As Integer = -1
If ObjInventario.GetInv_Mov(CveVentaSurtir, UsuarioActual.CveEmpresa) Then
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND CveTipoAlmacen = 24 AND CveConcepto = 3 AND CveVenta > 0")
CveMovimientoSalidaDev = RowMovimiento("CveMovimiento").ToString().ToEntero()
CveAlmacenVirtual = RowMovimiento("CveAlmacen").ToString().ToEntero()
CveMovimientoRelacionadoVirtual = CveMovimientoSalidaDev
Else
ErrorMovInv = True
TextoError = "Ocurrió un error al procesar el movimiento. Por favor vuelva a intentar."
End If
'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaDev, UsuarioActual.CveEmpresa) Then
DtPSVirtual = ObjInventario.DtResultados.Copy()
Else
ErrorMovInv = True
TextoError = "Ocurrió un error al procesar los movimientos de devolución. Por favor vuelva a intentar."
End If
CveConceptoMovimientoVirtual = 18
End If
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="RE/G6")
FolioVirtual = ObjInventario.Folio
If CveMovimientoVirtual > 0 Then
For Each RowUsado As DataRow In DtPSVirtual.Rows
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
Exit For
End If
Next
Else
ErrorMovInv = True
End If
Else
If ValidaVirtual Then
ErrorMovInv = True
TextoError = "Ocurrió un error al procesar el movimiento en almacen virtual. Por favor vuelva a intentar."
End If
End If
If DtPSVirtual.Rows.Count = 0 AndAlso ValidaVirtual = True Then
ErrorMovInv = True
TextoError = "No se tienen productos para el almacen virtual."
End If
End If
' TERMINA: VIRTUAL
If Not ErrorMovInv Then If Not ErrorMovInv Then
Dim ConceptoMovimiento = 3 Dim ConceptoMovimiento = 3
@@ -2316,8 +2211,81 @@ Partial Class Inventarios_RecepcionEntrega
End If End If
End If End If
'AGREGA BITACORA A VENTA ' COMIENZA: VIRTUAL
If Not ErrorMovInv Then If TipoDocto.Contiene("Ing", "Dev") AndAlso UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso CveMovimiento > 0 Then
Dim DtPSVirtual As New DataTable("DtTamanios")
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa) Then
DtPSVirtual = ObjInventario.DtResultados
End If
'
'DtPSVirtual.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
'DtPSVirtual.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
'DtPSVirtual.Columns.Add(New DataColumn("PU", GetType(Decimal)))
'DtPSVirtual.Columns.Add(New DataColumn("CveUM", GetType(Integer)))
'Dim DtTamanios As DataTable = Nothing
'If ObjAcumuladores.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
' DtTamanios = ObjAcumuladores.DtResultados.Copy()
'End If
Dim CveConceptoMovimientoVirtual As Integer = -1
Dim CveAlmacenVirtual As Integer = -1
Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimiento
Dim ValidaVirtual As Boolean = False
CveAlmacenVirtual = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
If TipoMovimiento = 1 Then
CveConceptoMovimientoVirtual = 37
ElseIf TipoMovimiento = 2 Then
ValidaVirtual = True
CveConceptoMovimientoVirtual = 36
End If
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="RE/G6")
FolioVirtual = ObjInventario.Folio
If CveMovimientoVirtual > 0 Then
For Each RowUsado As DataRow In DtPSVirtual.Rows
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
Exit For
End If
Next
Else
ErrorMovInv = True
End If
Else
If ValidaVirtual Then
ErrorMovInv = True
TextoError = "Ocurrió un error al procesar el movimiento en almacen virtual. Por favor vuelva a intentar."
End If
End If
If DtPSVirtual.Rows.Count = 0 AndAlso ValidaVirtual = True Then
ErrorMovInv = True
TextoError = "No se tienen productos para el almacen virtual."
End If
End If
' TERMINA: VIRTUAL
'AGREGA BITACORA A VENTA
If Not ErrorMovInv Then
Dim MensajeBitacora = If(TipoMovimiento = 1, "Surtida", "Devuelta") Dim MensajeBitacora = If(TipoMovimiento = 1, "Surtida", "Devuelta")
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then
ErrorMovInv = True ErrorMovInv = True
@@ -2334,7 +2302,7 @@ Partial Class Inventarios_RecepcionEntrega
RegistraScript("playsonidito('beep-07.wav')") RegistraScript("playsonidito('beep-07.wav')")
Dim Msg As New StringBuilder Dim Msg As New StringBuilder
Msg.AppendFormat("Movimiento Salida: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimiento, Folio) Msg.AppendFormat("Movimiento {2}: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimiento, Folio, If(TipoMovimiento = 1, "Salida", "Entrada"))
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
If CveMovimientoEntrada > 0 Then If CveMovimientoEntrada > 0 Then
@@ -2355,7 +2323,7 @@ Partial Class Inventarios_RecepcionEntrega
End If End If
If CveMovimientoVirtual > 0 Then If CveMovimientoVirtual > 0 Then
Msg.AppendFormat("<br/><br/> Movimiento de Salida del Almacen Virtual: ") Msg.AppendFormat("<br/><br/> {0} Almacen Virtual: ", If(TipoMovimiento = 1, "Salida", "Entrada"))
Msg.AppendFormat("<b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoVirtual, FolioVirtual) Msg.AppendFormat("<b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoVirtual, FolioVirtual)
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtual))) Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtual)))
End If End If

View File

@@ -804,7 +804,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero() Dim CveAlmacenVirtual As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida) CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida)
FolioVirtualSalida = ObjInventario.Folio FolioVirtualSalida = ObjInventario.Folio
Dim dtvirtual As DataTable = Nothing Dim dtvirtual As DataTable = Nothing
@@ -829,11 +829,11 @@ Partial Class Inventarios_TraspasoAlmacen
'AGREGAMOS LA ENTRADA 'AGREGAMOS LA ENTRADA
If Not ChkTransitorio.Checked Then 'SI NO ES TRANSITORIO SE HACE LA RECEPCION DE INMEDIATO If Not ChkTransitorio.Checked Then 'SI NO ES TRANSITORIO SE HACE LA RECEPCION DE INMEDIATO
If Not ErrorMovInv Then If Not ErrorMovInv Then
Dim TipoMovimientoEntrada = 9 Dim TipoMovimientoEntrada = 36
AlmacenEntrada = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero) AlmacenEntrada = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero)
CveMovimientoEntrada = ObjInventario.AddMovimiento(AlmacenEntrada, TipoMovimientoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1, CveMovimientoEntrada = ObjInventario.AddMovimiento(AlmacenEntrada, TipoMovimientoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"), Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G") CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/G")
FolioEntrada = ObjInventario.Folio FolioEntrada = ObjInventario.Folio
If CveMovimientoEntrada <= 0 Then If CveMovimientoEntrada <= 0 Then
TextoError = "Ocurrió un error al generar el movimiento de entrada" TextoError = "Ocurrió un error al generar el movimiento de entrada"

View File

@@ -2556,9 +2556,11 @@
<div class="col-md-6 v-center"> <div class="col-md-6 v-center">
<label class="col-md-6 v-center truncate">Proveedor:</label> <label class="col-md-6 v-center truncate">Proveedor:</label>
<div class="col-md-6 v-center"> <div class="col-md-6 v-center">
<asp:DropDownList ID="DdlProveedorCot" runat="server" Width="100%" CssClass="select2me" DataTextField="RazonSocial" DataValueField="CveProveedor"></asp:DropDownList> <%--<asp:DropDownList ID="DdlProveedorCot" runat="server" Width="100%" CssClass="select2me" DataTextField="RazonSocial" DataValueField="CveProveedor"></asp:DropDownList>--%>
<asp:RequiredFieldValidator ID="RFVProveedorExcel" runat="server" ControlToValidate="DdlProveedorCot" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor selecionarlo." ValidationGroup="GrpCargarExcel"></asp:RequiredFieldValidator> <ADS:Dropdownlost runat="server" ID="DdlProveedorCot" CssStyle="width: 100%;" CssClassDdl="select2me " DataTextField="NombreCortoProveedor" DataValueField="CveProveedor" />
<ajax:ValidatorCalloutExtender ID="VCProveedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedorExcel" Width="300px"></ajax:ValidatorCalloutExtender>
<%-- <asp:RequiredFieldValidator ID="RFVProveedorExcel" runat="server" ControlToValidate="DdlProveedorCot" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor selecionarlo." ValidationGroup="GrpCargarExcel"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCProveedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedorExcel" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1294,7 +1294,12 @@ Partial Class OC
HplCompraContabilizada.Text = "No" HplCompraContabilizada.Text = "No"
End If End If
DdlProveedores.ddl.SelectedValueExist(objOC.CveProveedor.ToString) DdlProveedores.SelectedValue = objOC.CveProveedor.ToString
If DdlProveedores.SelectedValue.ToEntero > 0 Then
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString
Else
DdlProveedores.SelectedText = "-"
End If
'CARGAMOS LA SUCURSAL SI NO EXISTE SE AGREGA MATRIZ 'CARGAMOS LA SUCURSAL SI NO EXISTE SE AGREGA MATRIZ
Dim CveProveedorSucursal As Integer = IIf(objOC.CveProveedorSucursal.ToEntero = -1, 0, objOC.CveProveedorSucursal.ToEntero).ToString.ToEntero Dim CveProveedorSucursal As Integer = IIf(objOC.CveProveedorSucursal.ToEntero = -1, 0, objOC.CveProveedorSucursal.ToEntero).ToString.ToEntero
@@ -1330,7 +1335,12 @@ Partial Class OC
lblFolio.Text = "REQ " + objOC.Folio.ToString lblFolio.Text = "REQ " + objOC.Folio.ToString
lblTipoPadreHijo.Text = "OC" lblTipoPadreHijo.Text = "OC"
ChkCotizacion.Visible = True ChkCotizacion.Visible = True
DdlProveedores.ddl.SelectedValueExist(objOC.CveProveedor.ToString) DdlProveedores.SelectedValue = objOC.CveProveedor.ToString
If DdlProveedores.SelectedValue.ToEntero > 0 Then
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString
Else
DdlProveedores.SelectedText = "-"
End If
If objOC.CveProveedorSucursal.ToEntero > 0 Then If objOC.CveProveedorSucursal.ToEntero > 0 Then
DivProveedorSucursal.Visible = True DivProveedorSucursal.Visible = True
@@ -1741,20 +1751,25 @@ Partial Class OC
CboUnidadMedida.DataBind() CboUnidadMedida.DataBind()
End Sub End Sub
Private Sub CargaProveedores() Private Sub CargaProveedores()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
DdlProveedores.setEsWebService(True) DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("metodo", "getproveedores") DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Seleccione"
DdlProveedores.SelectedValue = "-1"
DdlProveedorCot.setEsWebService(True)
DdlProveedorCot.Attributes.Add("data-metodo", "getproveedores")
Else Else
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
DdlProveedores.DataSource = GlobalDTCompProveedores(CveEmpresaActual) DdlProveedores.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
DdlProveedores.DataBind() DdlProveedores.DataBind()
DdlProveedores.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlProveedorCot.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
DdlProveedorCot.DataBind()
DdlProveedorCot.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If End If
'DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlProveedorCot.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
DdlProveedorCot.DataBind()
DdlProveedorCot.Items.Insert(0, New ListItem("Seleccione", "-1"))
UPProv.Update() : UPPEmp.Update() UPProv.Update() : UPPEmp.Update()
End Sub End Sub
@@ -2105,6 +2120,8 @@ Partial Class OC
Return True Return True
End If End If
'SI ES REQUISICION, NO REQUIERE COTIZACION Y ES ESTATUSFINALOK... ENTONCES DEBE DE TENER UN PROVEEDOR SELECCIONADO Y LOS PRECIOS CAPTURADOS 'SI ES REQUISICION, NO REQUIERE COTIZACION Y ES ESTATUSFINALOK... ENTONCES DEBE DE TENER UN PROVEEDOR SELECCIONADO Y LOS PRECIOS CAPTURADOS
'If (TipoOC = "REQ" And ChkCotizacion.Checked = False And CboE.SelectedValue.ToEntero = CveEstatusFinalOK) OrElse TipoOC = "OC" Then 'If (TipoOC = "REQ" And ChkCotizacion.Checked = False And CboE.SelectedValue.ToEntero = CveEstatusFinalOK) OrElse TipoOC = "OC" Then
' If Not UsuarioActual.TienePermisoProceso(179) Then 'PERMISO PARA GENERAR CON O ' If Not UsuarioActual.TienePermisoProceso(179) Then 'PERMISO PARA GENERAR CON O
@@ -2222,6 +2239,13 @@ Partial Class OC
TieneError = True TieneError = True
End If End If
'Valida que tenga proveedore
If (EsNuevo = True AndAlso TipoOC.ToUpper = "OC"4) AndAlso DdlProveedores.SelectedValue.ToEntero() <= 0 Then
Alert("Debe seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
TieneError = True
End If
'VALIDA QUE ANTES DE QUE PUEDA MANDARLA A SUPERVISADA SE TIENE QUE SELECCIONAR UN PROVEEDOR 'VALIDA QUE ANTES DE QUE PUEDA MANDARLA A SUPERVISADA SE TIENE QUE SELECCIONAR UN PROVEEDOR
If UsuarioActual.Empresa.Funcionalidad(565) = "1" Then If UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
If (TipoOC.ToUpper = "REQ" And CboE.SelectedValue.ToEntero.Contiene(CveEstatusSupervisada, CveEstatusFinalOK)) AndAlso DdlProveedores.SelectedValue.ToEntero() <= 0 Then If (TipoOC.ToUpper = "REQ" And CboE.SelectedValue.ToEntero.Contiene(CveEstatusSupervisada, CveEstatusFinalOK)) AndAlso DdlProveedores.SelectedValue.ToEntero() <= 0 Then
@@ -5966,7 +5990,7 @@ Partial Class OC
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath) Dim excelFile As ExcelFile = excelFile.Load(flatFilePath)
Dim unnamed As Integer = 0 Dim unnamed As Integer = 0
Dim cols As Integer Dim cols As Integer

View File

@@ -119,7 +119,7 @@ Partial Class CatSubProyectos
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjSub As New ClsSubProyectos Dim ObjSub As New ClsSubProyectos
If ObjSub.GetSubProyectos() Then If ObjSub.GetSubProyectos(UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjSub.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") GvDatos.DataSource = ObjSub.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
GvDatos.DataBind() GvDatos.DataBind()
End If End If
@@ -204,7 +204,7 @@ Partial Class CatSubProyectos
If ObjSubProyectos.RemoveSubProyecto(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then If ObjSubProyectos.RemoveSubProyecto(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
GvDatos.EditIndex = -1 GvDatos.EditIndex = -1
ViewState("DTSubProyectos") = ObjSubProyectos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTSubProyectos") = ObjSubProyectos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTSubProyectos(-1) = ObjSubProyectos.DtResultados GlobalDTSubProyectos(UsuarioActual.CveEmpresa) = ObjSubProyectos.DtResultados
Alert("El SubProyecto se eliminó correctamente.", TipoMensaje.MsgInformacion) Alert("El SubProyecto se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -232,7 +232,7 @@ Partial Class CatSubProyectos
If ObjSubProyectos.UpdateSubProyectoSegNeg(CveSubProyecto, CveSegmento, UsuarioActual.CveEmpresa) Then If ObjSubProyectos.UpdateSubProyectoSegNeg(CveSubProyecto, CveSegmento, UsuarioActual.CveEmpresa) Then
GvDatos.EditIndex = -1 GvDatos.EditIndex = -1
ViewState("DTSubProyectos") = ObjSubProyectos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTSubProyectos") = ObjSubProyectos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTSubProyectos(-1) = ObjSubProyectos.DtResultados GlobalDTSubProyectos(UsuarioActual.CveEmpresa) = ObjSubProyectos.DtResultados
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
Else Else
ErrorSubProyecto = True ErrorSubProyecto = True

File diff suppressed because it is too large Load Diff

View File

@@ -820,6 +820,10 @@ Partial Class Clientes
UpFiscalContable.Update() UpFiscalContable.Update()
End If End If
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
DivTipoRetenciones.Visible = True
End If
If Request("CveEmpresaCRM") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresaCRM")) AndAlso Request("CveEmpresaCRM").ToEntero > 0 Then If Request("CveEmpresaCRM") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresaCRM")) AndAlso Request("CveEmpresaCRM").ToEntero > 0 Then
ViewState("CveEmpresaCRM") = Request("CveEmpresaCRM") ViewState("CveEmpresaCRM") = Request("CveEmpresaCRM")
CargaDatosCRM() CargaDatosCRM()
@@ -1374,7 +1378,8 @@ Partial Class Clientes
TxtGiro.Text = ObjClientes.Giro TxtGiro.Text = ObjClientes.Giro
DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString
TxtCC.Text = ObjClientes.NotificarA TxtCC.Text = ObjClientes.NotificarA
ChkMail.Checked = ObjClientes.EnviarFactura ChkMail.Checked = ObjClientes.EnviarFactura
DdlTipoRetencion.SelectedValueExist(ObjClientes.DtResultados(0)("CveTipoRetencion").ToString)
TxtRetIVA.Text = ObjClientes.RetIVA.ToString TxtRetIVA.Text = ObjClientes.RetIVA.ToString
TxtRetISR.Text = ObjClientes.RetISR.ToString TxtRetISR.Text = ObjClientes.RetISR.ToString
ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
@@ -2411,7 +2416,7 @@ Partial Class Clientes
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero, CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero,
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked) Then TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero()) Then
ViewState("CveCliente") = ObjClientes.CveCliente ViewState("CveCliente") = ObjClientes.CveCliente
@@ -2505,7 +2510,8 @@ Partial Class Clientes
AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero, CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero, CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero,
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked) Then ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero()) Then
ObjClientes.LimpiaImpuestosLocales(CveCliente) ObjClientes.LimpiaImpuestosLocales(CveCliente)
@@ -9934,6 +9940,6 @@ Partial Class Clientes
Acum.Dispose() Acum.Dispose()
End Sub End Sub
#End Region #End Region
End Class End Class

View File

@@ -5018,7 +5018,7 @@ Partial Class PV
Private Sub CargaAjuste() Private Sub CargaAjuste()
Dim ObjAcum As New ClsAcumuladores Dim ObjAcum As New ClsAcumuladores
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa, 1) Then
DdlFolioGarantia.DataSource = ObjAcum.DtResultados DdlFolioGarantia.DataSource = ObjAcum.DtResultados
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If End If

View File

@@ -812,7 +812,7 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpTurno" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="width: 30%;display: flex;flex-direction:row;color:white;background-color:#c49f47"> <asp:UpdatePanel ID="UpTurno" runat="server" UpdateMode="Conditional" Visible="false" class="portlet light xspadding bordered whitoutcol" style="width: 20%;display: flex;flex-direction:row;color:white;background-color:#c49f47">
<ContentTemplate> <ContentTemplate>
<div id="DivTurno" runat="server" style="width:100%;text-align:center;"> <div id="DivTurno" runat="server" style="width:100%;text-align:center;">
Turno: <asp:Label runat="server" ID="LblTurno"></asp:Label> Turno: <asp:Label runat="server" ID="LblTurno"></asp:Label>
@@ -1367,9 +1367,20 @@
<tr id="TrRetIVA" runat="server" align="right" style="display: none;"> <tr id="TrRetIVA" runat="server" align="right" style="display: none;">
<td style="border: 1px none white"><b>Ret. IVA:</b></td> <td style="border: 1px none white"><b>Ret. IVA:</b></td>
<td> <td>
<asp:TextBox ID="TxtRetIVA" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td> <asp:TextBox ID="TxtRetIVA" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox>
</td>
<td> <td>
<asp:Label ID="LblRetIVA" runat="server" BorderStyle="None" Text="0.00"></asp:Label>&nbsp;(%)</td> <asp:Label ID="LblRetIVA" runat="server" BorderStyle="None" Text="0.00"></asp:Label>&nbsp;(%)
</td>
<td>
<asp:DropDownList ID="DdlTipoRetencion" Visible="false" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoRetencion_SelectedIndexChanged" CssClass="form-control input-sm" 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>
<asp:ListItem Text="Fletes" Value="3"></asp:ListItem>
<asp:ListItem Text="Servicios" Value="4"></asp:ListItem>
</asp:DropDownList>
</td>
</tr> </tr>
<tr id="TrRetISR" runat="server" align="right" style="display: none;"> <tr id="TrRetISR" runat="server" align="right" style="display: none;">
@@ -3240,11 +3251,8 @@
<asp:TextBox ID="TxtObsAlmacen" runat="server" Rows="2" TextMode="MultiLine" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td> <asp:TextBox ID="TxtObsAlmacen" runat="server" Rows="2" TextMode="MultiLine" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td>
</tr> </tr>
<tr align="left" id="TrKilometraje" runat="server" visible ="false"> <tr align="left" id="TrKilometraje" runat="server" visible ="false">
<td>Kilometraje&nbsp;</td> <td>Kilometraje&nbsp;
</tr> <asp:TextBox ID="TxtKilometraje" runat="server" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td>
<tr align="left" id="TrKilometrajeTxt" runat="server" visible ="false">
<td>
<asp:TextBox ID="TxtKilometraje" runat="server" Rows="1" TextMode="MultiLine" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td>
</tr> </tr>
</table> </table>
</div> </div>

View File

@@ -2523,7 +2523,8 @@ Partial Class Ventas
DivDdlCuentaTarjetaCredito.Attributes.Add("class", "col-md-4") DivDdlCuentaTarjetaCredito.Attributes.Add("class", "col-md-4")
DivContadoOtros.Visible = True DivContadoOtros.Visible = True
TrKilometraje.Visible = True TrKilometraje.Visible = True
TrKilometrajeTxt.Visible = True TrPedido.Visible = False
' TrKilometrajeTxt.Visible = True
End If End If
End If End If
@@ -2582,8 +2583,9 @@ Partial Class Ventas
LkbEstadodeCaja.Visible = True LkbEstadodeCaja.Visible = True
LkbIngreso.Visible = True LkbIngreso.Visible = True
LkbRetiro.Visible = True LkbRetiro.Visible = True
UpTurno.Update() UpTurno.Visible = True
Else Else
UpTurno.Visible = False
'Ingresar un nuevo Turno 'Ingresar un nuevo Turno
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }") RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
End If End If
@@ -4111,6 +4113,7 @@ Partial Class Ventas
'Sección Detalle 'Sección Detalle
DdlMoneda.Enabled = False DdlMoneda.Enabled = False
DdlTipoRetencion.Enabled = False
TxtFechaEjecucion.ReadOnly = True TxtFechaEjecucion.ReadOnly = True
ImgCalendarFechaEje.Enabled = False ImgCalendarFechaEje.Enabled = False
'DdlSucursalEjecucion.Enabled = False 'DdlSucursalEjecucion.Enabled = False
@@ -4699,6 +4702,9 @@ Partial Class Ventas
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100 ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100 ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString)
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
If ObjCliente.RetieneIVAFletes Then If ObjCliente.RetieneIVAFletes Then
TrRetIVA.Style.Add("display", "") TrRetIVA.Style.Add("display", "")
@@ -5920,6 +5926,20 @@ Partial Class Ventas
Dim TotalCalculableImpuestosIVA As Decimal = 0 Dim TotalCalculableImpuestosIVA As Decimal = 0
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString.ToDecimal) 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)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero
TmpDT.Rows(e.RowIndex)("UM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedItem.Text TmpDT.Rows(e.RowIndex)("UM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedItem.Text
@@ -6462,22 +6482,32 @@ Partial Class Ventas
End If End If
'Valida si en caso de que el detalle tenga llantas o polizas se agreguén kilometraje/serie en la parte de observaciones(solo para el caso de empresas llanteras) 'Valida si en caso de que el detalle tenga llantas o polizas se agreguén kilometraje/serie en la parte de observaciones(solo para el caso de empresas llanteras)
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
If txtkilometraje.text.toentero = 0 Then
'cuando es la clasificacion de llantas
Dim FaltaObservacion As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion = 20342").ToEntero
If FaltaObservacion = 20342 Then
Alert("No se ha especificado el <strong>kilometraje</strong>.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
If TxtObsFact.Text = "" Then If TxtObsFact.Text = "" Then
Dim FaltaObservacion As Integer = -1 Dim FaltaObservacion As Integer = -1
For Each PS As GridViewRow In GvPS.Rows 'For Each PS As GridViewRow In GvPS.Rows
Dim PsRenglon As GridViewRow = PS ' Dim PsRenglon As GridViewRow = PS
Dim CveClasificacion As Integer = PsRenglon.DataKey("CveClasificacion").ToEntero ' Dim CveClasificacion As Integer = PsRenglon.DataKey("CveClasificacion").ToEntero
If CveClasificacion = 20345 Or CveClasificacion = 20342 Then ' If CveClasificacion = 20345 Or CveClasificacion = 20342 Then
FaltaObservacion = CveClasificacion ' FaltaObservacion = CveClasificacion
Exit For ' Exit For
End If ' End If
Next '
FaltaObservacion = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion = 20345").ToEntero
'cuando es la clasificacion de polizas
If FaltaObservacion = 20345 Then If FaltaObservacion = 20345 Then
Alert("No se ha especificado la <strong>serie</strong> para la poliza en la sección de Observaciones", TipoMensaje.MsgAdvertencia) Alert("No se ha especificado la <strong>serie</strong> para la poliza en la sección de Observaciones", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
ElseIf FaltaObservacion = 20342 Then
Alert("No se ha especificado el <strong>kilometraje</strong> para la llanta en el sección de Observaciones", TipoMensaje.MsgAdvertencia)
Exit Sub
End If End If
End If End If
End If End If
@@ -7581,10 +7611,10 @@ Partial Class Ventas
End Function 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 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 Else
ObjFactura = New Modelos.Factura ObjFactura = New Modelos.Factura
End If End If
@@ -9125,7 +9155,7 @@ Partial Class Ventas
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)), CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False), DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then Kilometraje:=TxtKilometraje.Text.todouble) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico") ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
@@ -14215,6 +14245,20 @@ Partial Class Ventas
Row("PorcentajeIVA") = DrPS("IVA") Row("PorcentajeIVA") = DrPS("IVA")
End If 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("IVA") = Row("PorcentajeIVA")
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales) Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales)
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales) Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
@@ -14276,7 +14320,7 @@ Partial Class Ventas
'AGREGA PS ADICIONAL 'AGREGA PS ADICIONAL
If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso Not UsuarioActual.TienePermisoProceso(284) AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso Not UsuarioActual.TienePermisoProceso(285) AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then
For Each Dr As DataRow In GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows For Each Dr As DataRow In GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows
Dim CvePSAdicional As Integer = Dr("CvePSAdicional").ToString.ToEntero Dim CvePSAdicional As Integer = Dr("CvePSAdicional").ToString.ToEntero
@@ -16408,7 +16452,7 @@ Partial Class Ventas
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1), Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero,
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
OcurrioError = True OcurrioError = True
End If End If
@@ -18433,7 +18477,8 @@ Partial Class Ventas
CancelarRefacturada() CancelarRefacturada()
End If End If
CreaObjetosVenta() CreaObjetosVenta(EsCancelacion:=True)
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveVenta > 0 Then If ObjFactura IsNot Nothing AndAlso ObjFactura.CveVenta > 0 Then
@@ -18451,9 +18496,6 @@ Partial Class Ventas
End If End If
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
If ChkDevAlm.Checked Then
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
End If
resp = ObjFactura.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar) resp = ObjFactura.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar)
End If End If
@@ -22080,7 +22122,7 @@ Partial Class Ventas
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1), 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, PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero,
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
MensajeError = "Ocurrió un error al actualizar la información de la cotización" MensajeError = "Ocurrió un error al actualizar la información de la cotización"
OcurrioError = True OcurrioError = True
End If End If
@@ -23857,10 +23899,12 @@ Partial Class Ventas
CargaRNC() CargaRNC()
RegistraScript("$('#ModalAplicarRemisionesNC').modal({backdrop: 'static', keyboard: false });") RegistraScript("$('#ModalAplicarRemisionesNC').modal({backdrop: 'static', keyboard: false });")
End Sub End Sub
#Region "P O L I Z A - V I R T U A L"
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura) Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
Dim DtUsados As DataTable = Nothing Dim DtUsados As DataTable = Nothing
Dim ObjAcum As New ClsAcumuladores Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetGarantiasDetalle(ObjFactura.CveVenta) Then If ObjAcum.GetGarantiasPolizaVirtual(ObjFactura.CveVenta) Then
DtUsados = ObjAcum.DtResultados.Copy() DtUsados = ObjAcum.DtResultados.Copy()
End If End If
ObjAcum.Dispose() ObjAcum.Dispose()
@@ -23984,5 +24028,39 @@ Partial Class Ventas
Return Retorno Return Retorno
End Function End Function
#End Region
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 End Class