This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-12-11 18:53:36 -07:00
12 changed files with 363 additions and 100 deletions

View File

@@ -700,7 +700,7 @@ Public Class ClsAcumuladores
#Region "GARANTIAS DETALLES" #Region "GARANTIAS DETALLES"
Public Function AddGarantiasDetalle(CveVentaDetalle As Integer, CveFolioGarantia As Integer, CveTipoUso As Integer, Public Function AddGarantiasDetalle(CveVentaDetalle As Integer, CvePS As Integer, CveFolioGarantia As Integer, CveTipoUso As Integer,
CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String, CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String,
CveTipoDefecto As Integer, NumPoliza As String, Importe As Double, CveTipoDefecto As Integer, NumPoliza As String, Importe As Double,
Consecutivo As String) As Boolean Consecutivo As String) As Boolean
@@ -708,6 +708,7 @@ Public Class ClsAcumuladores
SqlDataAdapter("PA_Acum_GarantiasDetalleAdd") SqlDataAdapter("PA_Acum_GarantiasDetalleAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle .Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
.Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso .Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso
.Add("@CodigoEnsamble", SqlDbType.VarChar).Value = CodigoEnsamble .Add("@CodigoEnsamble", SqlDbType.VarChar).Value = CodigoEnsamble
@@ -893,6 +894,33 @@ Public Class ClsAcumuladores
End Function End Function
Public Function GetRepInicadorDiario(FechaInicio As Date, FechaFin As Date, CveSubProeycto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_Acum_RepInicadorDiarioGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveSubProeycto", SqlDbType.Int).Value = CveSubProeycto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al consultar los datos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region " IDisposable Support " #Region " IDisposable Support "

View File

@@ -4581,6 +4581,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Acumuladores/CatTiposUso.aspx".ToUpper(), 1034) PaginaDict.Add("/Acumuladores/CatTiposUso.aspx".ToUpper(), 1034)
PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035) PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035)
PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036) PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036)
PaginaDict.Add("/Acumuladores/RepIndicadorDiario.aspx".ToUpper(), 2055)
'PaginaDict.Add("/Acumuladores/EntradasUsados.aspx".ToUpper(), 543) 'PaginaDict.Add("/Acumuladores/EntradasUsados.aspx".ToUpper(), 543)
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032) PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)

View File

@@ -2344,13 +2344,14 @@ Public Class ClsVentas
#Region " ANTICIPOS/NOTASCREDITO - VENTAS " #Region " ANTICIPOS/NOTASCREDITO - VENTAS "
Public Function GetVentasAntNC(CveVenta As Integer, CveVentaNC As Integer) As Boolean Public Function GetVentasAntNC(CveVenta As Integer, CveVentaNC As Integer, Optional AplicaAmortizacion As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasAntNCGet") DataAdapter("PA_Vta_VentasAntNCGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CveVentaNC", SqlDbType.Int).Value = CveVentaNC .Add("@CveVentaNC", SqlDbType.Int).Value = CveVentaNC
.Add("@AplicaAmortizacion", SqlDbType.Bit).Value = AplicaAmortizacion
End With End With
Try Try

View File

@@ -491,6 +491,10 @@ Namespace Modelos
If ObjVentas.GetVentasAntNC(-1, CveVenta) Then If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
Me.DtNCVinculadas = ObjVentas.DtResultados.Copy() Me.DtNCVinculadas = ObjVentas.DtResultados.Copy()
End If End If
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
Me.DtAnticipos = ObjVentas.DtResultados.Copy()
End If
End If End If
End If End If
@@ -501,12 +505,6 @@ Namespace Modelos
ObjVentas.Dispose() ObjVentas.Dispose()
'Dim ObjMovtos As New ClsMovimientos()
'If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda) Then
' Me.DtAnticipos = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, "AND Tipo = 'Ant'", "")} {If(TipoDocto = "Ant", "AND Tipo = 'NC'", "")}")
'End If
'ObjMovtos.Dispose()
If Me.RealizarDevolucionAlmacen Then If Me.RealizarDevolucionAlmacen Then
Me.CveAlmacenDevolucion = Me.CveAlmacenDevolucionVenta Me.CveAlmacenDevolucion = Me.CveAlmacenDevolucionVenta
End If End If
@@ -1349,7 +1347,7 @@ Namespace Modelos
'Ajustes' 'Ajustes'
If DtAjustes IsNot Nothing AndAlso DtAjustes.Rows.Count > 0 Then If DtAjustes IsNot Nothing AndAlso DtAjustes.Rows.Count > 0 Then
For Each Dr As DataRow In DtAjustes.Rows For Each Dr As DataRow In DtAjustes.Rows
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero, If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero, Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString) Then Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString) Then
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.") ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
@@ -2335,12 +2333,12 @@ Namespace Modelos
Exit Select Exit Select
End If End If
If ObjFactura.TipoDocto = "Ing" AndAlso ValorMultiplicador = -1 Then If ObjFactura.TipoDocto.Contiene("Ing", "Egs") AndAlso ValorMultiplicador = -1 Then
For Each row2 As DataRow In ObjFactura.DtAntNCVinculadas.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)
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
CveIEAnticipo = -1
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta
@@ -2358,38 +2356,40 @@ Namespace Modelos
Next Next
End If End If
'cuando es anticipo If ValorMultiplicador = 1 Then
' cuando es amortización de nota de crédito, y es la nc 'cuando es anticipo
' cuando es amortización por descuento, y es el ingreso ' cuando es amortización de nota de crédito, y es la nc
' cuando es amortización en cero ' cuando es amortización por descuento, y es el ingreso
If ObjFactura.CveTipoAmortizacionAnticipo = 2 AndAlso ObjFactura.TipoDocto.Contiene("Egs") OrElse ' cuando es amortización en cero
ObjFactura.CveTipoAmortizacionAnticipo = 1 AndAlso ObjFactura.TipoDocto.Contiene("Ing") OrElse If ObjFactura.CveTipoAmortizacionAnticipo = 2 AndAlso ObjFactura.TipoDocto.Contiene("Egs") OrElse
ObjFactura.CveTipoAmortizacionAnticipo = 3 Then ObjFactura.CveTipoAmortizacionAnticipo = 1 AndAlso ObjFactura.TipoDocto.Contiene("Ing") OrElse
ObjFactura.CveTipoAmortizacionAnticipo = 3 Then
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
If row2("CveConceptoContable").ToString().ToEntero = 3 Then If row2("CveConceptoContable").ToString().ToEntero = 11 Then
CveIEAnticipo = row2("CveIE").ToString.ToEntero CveIEAnticipo = -1
importeMovimiento = row2("Importe").ToString().ToDecimal() '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal) importeMovimiento = row2("Importe").ToString().ToDecimal()
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
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, If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta,
CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, CveVentaAmortizacion:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo,
ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
CveSubProyecto:=CveSubProyectoContabilizar) Then CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
Else Else
ObjFactura.SeGuardoPrePoliza = True ObjFactura.SeGuardoPrePoliza = True
End If End If
End If End If
End If End If
Next Next
End If
End If End If
'Cuando la funcionalidad de amortizacion en PS esta activa 'Cuando la funcionalidad de amortizacion en PS esta activa
If Not ErrorPrepoliza Then If Not ErrorPrepoliza Then
DT = TmpDTDetalle.FiltraParametros($"CvePS = {ObjFactura.CvePSAmortizacion}") DT = TmpDTDetalle.FiltraParametros($"CvePS = {ObjFactura.CvePSAmortizacion}")
@@ -2667,7 +2667,7 @@ Namespace Modelos
importeMovimiento = 0 importeMovimiento = 0
Case 150 'Descuento sobre ventas Case 150 'Descuento sobre ventas
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then If ObjFactura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then
Dim ConceptoContableAplicar = 150 Dim ConceptoContableAplicar = 150
Dim CveVentaAplicar = ObjFactura.CveVenta Dim CveVentaAplicar = ObjFactura.CveVenta
@@ -3859,7 +3859,7 @@ Namespace Modelos
End If End If
If ObjFactura.TipoDocto = "Ant" AndAlso ObjFactura.SaldoAmortizado > 0 Then If ObjFactura.TipoDocto = "Ant" AndAlso ObjFactura.SaldoAmortizado > 0 Then
Retorno.Mensaje = "La factura no se puede cancelar debido a que esta amortizada." Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados."
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
Return Retorno Return Retorno
@@ -5554,6 +5554,7 @@ Namespace Modelos
Public Property CveVentaRelacion As Integer = -1 Public Property CveVentaRelacion As Integer = -1
Public Property ImporteRelacion As Decimal Public Property ImporteRelacion As Decimal
Public Property EsNCAmortizacion As Boolean
#End Region #End Region
@@ -9746,6 +9747,119 @@ Namespace Modelos
Public Property RequierePersonal As Boolean Public Property RequierePersonal As Boolean
Public Property EsAcumulador As Boolean Public Property EsAcumulador As Boolean
End Class End Class
#End Region #End Region
#Region "P O L I Z A - V I R T U A L"
Public Class MPolizaVentaLTHWSD
Public Property customer_name As String
Public Property customer_last_name1 As String
Public Property customer_last_name2 As String
Public Property customer_birthday As DateTime
Public Property customer_phone As String
Public Property customer_email As String
Public Property customer_gender As String
Public Property customer_advertising As Boolean
Public Property sale_date As DateTime
Public Property sale_paidby As String
Public Property sale_type As String
Public Property sale_type_service As String
Public Property product_code As String
Public Property product_unique_code As String
Public Property product_sale_type As String
Public Property used_product As Boolean
Public Property used_brand As String
Public Property used_bci As String
Public Property used_month As Integer
Public Property used_year As Integer
Public Property used_sale_date As DateTime
Public Property customer_car_brand As String
Public Property customer_car_model As String
Public Property customer_car_year As Integer
Public Property sale_discount As Decimal
Public Property sale_id As String
End Class
Public Class MPolizaVentaWS
Public Property customer_name As String
Public Property customer_last_name1 As String
Public Property customer_last_name2 As String
Public Property customer_birthday As DateTime
Public Property customer_phone As String
Public Property customer_email As String
Public Property customer_gender As String
Public Property customer_advertising As Boolean
Public Property sale_date As DateTime
Public Property sale_paidby As String
Public Property sale_type As String
Public Property sale_type_service As String
Public Property sale_total As Decimal
Public Property product_code As String
Public Property product_unique_code As String
Public Property product_sale_type As String
Public Property used_product As Boolean
Public Property used_brand As String
Public Property used_bci As String
Public Property used_month As Integer
Public Property used_year As Integer
Public Property used_sale_date As DateTime
Public Property customer_car_brand As String
Public Property customer_car_model As String
Public Property customer_car_year As Integer
Public Property sale_discount As Decimal
Public Property sale_id As String
End Class
Public Class MIndicador
Sub New(Optional UsaValoresPrueba As Boolean = False)
If UsaValoresPrueba Then
Dim Index As Integer = 0
For Each p As Reflection.PropertyInfo In Me.GetType().GetProperties()
Index = Index + 1
p.SetValue(Me, Convert.ChangeType(Index, p.PropertyType), Nothing)
Next
End If
End Sub
Public Property v_b_optima As Integer
Public Property v_b_fullpower As Integer
Public Property v_b_hitec As Integer
Public Property v_b_agm As Integer
Public Property v_b_suv As Integer
Public Property v_b_taxi As Integer
Public Property v_b_america As Integer
Public Property v_b_lth As Integer
Public Property v_b_cronos As Integer
Public Property v_b_diener As Integer
Public Property v_b_heavyduty As Integer
Public Property v_m_lth As Integer
Public Property v_o_filtros As Integer
Public Property v_o_lub1 As Integer
Public Property v_o_lubgalon As Integer
Public Property v_o_lub5 As Integer
Public Property v_o_aa As Integer
Public Property v_o_aaa As Integer
Public Property g_b_optima As Integer
Public Property g_b_fullpower As Integer
Public Property g_b_hitec As Integer
Public Property g_b_agm As Integer
Public Property g_b_suv As Integer
Public Property g_b_taxi As Integer
Public Property g_b_america As Integer
Public Property g_b_lth As Integer
Public Property g_b_cronos As Integer
Public Property g_b_diener As Integer
Public Property g_b_heavyduty As Integer
Public Property g_m_lth As Integer
Public Property a_b_optima As Integer
Public Property a_b_fullpower As Integer
Public Property a_b_hitec As Integer
Public Property a_b_agm As Integer
Public Property a_b_suv As Integer
Public Property a_b_taxi As Integer
Public Property a_b_america As Integer
Public Property a_b_lth As Integer
Public Property a_b_cronos As Integer
Public Property a_b_diener As Integer
Public Property a_b_heavyduty As Integer
End Class
#End Region
End Namespace End Namespace

View File

@@ -371,15 +371,15 @@ Partial Class General_SaldosIniciales
Exit Sub Exit Sub
End If End If
If Not dt.Columns(12).ColumnName = "Servicio" Then 'If Not dt.Columns(12).ColumnName = "Servicio" Then
Alert("El nombre de la treceava columna debe ser 'Servicio'. Favor de corregirlo", TipoMensaje.MsgError) ' Alert("El nombre de la treceava columna debe ser 'Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub ' Exit Sub
End If 'End If
If Not dt.Columns(13).ColumnName = "Conversion Unidad" Then 'If Not dt.Columns(13).ColumnName = "Conversion Unidad" Then
Alert("El nombre de la catorceava columna debe ser 'Conversion Unidad'. Favor de corregirlo", TipoMensaje.MsgError) ' Alert("El nombre de la catorceava columna debe ser 'Conversion Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub ' Exit Sub
End If 'End If
ElseIf RblFormato.SelectedValue = "6" Then ElseIf RblFormato.SelectedValue = "6" Then
If Not dt.Columns(0).ColumnName = "Código" Then If Not dt.Columns(0).ColumnName = "Código" Then
@@ -669,8 +669,8 @@ Partial Class General_SaldosIniciales
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
Dim Tamaño As String = Row("Tamaño").ToString.Trim Dim Tamaño As String = Row("Tamaño").ToString.Trim
Dim SATClavePS As String = Row("Código SAT").ToString.Trim Dim SATClavePS As String = Row("Código SAT").ToString.Trim
Dim Clasificacion2 As String = Row("Servicio").ToString.Trim Dim Clasificacion2 As String = If(dt.Columns.Contains("Servicio"), Row("Servicio").ToString.Trim, "")
Dim Litraje As Double = Row("Conversion Unidad").ToString.ToDouble Dim Litraje As Double = If(dt.Columns.Contains("Conversion Unidad"), Row("Conversion Unidad").ToString.ToDouble, 0)
Dim RinTamaño As String = If(Row.Table.Columns.Contains("Tamaño de Rin"), Row("Tamaño de Rin").ToString.Trim, "") Dim RinTamaño As String = If(Row.Table.Columns.Contains("Tamaño de Rin"), Row("Tamaño de Rin").ToString.Trim, "")
Dim Medida As String = If(Row.Table.Columns.Contains("Medida"), Row("Medida").ToString.Trim, "") Dim Medida As String = If(Row.Table.Columns.Contains("Medida"), Row("Medida").ToString.Trim, "")
Dim SATClaveUnidadMedida As String = If(Row.Table.Columns.Contains("Clave Unidad"), Row("Clave Unidad").ToString.Trim, "") Dim SATClaveUnidadMedida As String = If(Row.Table.Columns.Contains("Clave Unidad"), Row("Clave Unidad").ToString.Trim, "")

View File

@@ -336,7 +336,7 @@
<div id="DivVirtualAdvertencia" visible="false" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;"> <div id="DivVirtualAdvertencia" visible="false" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button> <button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong> <strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
<asp:Literal Text="" runat="server" ID="Literal1"></asp:Literal> <asp:Literal Text="La mercancía sera trasladada al almacén virtual" runat="server"></asp:Literal>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -99,6 +99,7 @@ Partial Class RH_CatPersonalRequerido
End Sub End Sub
Private Sub CargaDepartamento() Private Sub CargaDepartamento()
DdlDepartamento.Items.Clear()
DdlDepartamento.DataSource = GlobalDTDepartamentos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) DdlDepartamento.DataSource = GlobalDTDepartamentos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlDepartamento.DataBind() DdlDepartamento.DataBind()
End Sub End Sub

View File

@@ -105,7 +105,8 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="margin-top: -10px; text-align: center;" GridLines="None"> <asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal" DataKeyNames="SubProyecto"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="margin-top: -2px; text-align: center;" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText ="Proyecto" DataField="proyecto" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText ="Proyecto" DataField="proyecto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText ="Subproyecto" DataField="Subproyecto" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText ="Subproyecto" DataField="Subproyecto" ItemStyle-HorizontalAlign="Left" />

View File

@@ -108,7 +108,8 @@ Partial Class Ventas_RepIndiceRotacionPersonal
Protected Sub GVRegDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVRegDatos.RowDataBound Protected Sub GVRegDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVRegDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
Dim sPorcentaje As String = e.Row.DBCampo("IRP").Trim Dim sPorcentaje As String = e.Row.DBCampo("IRP").Trim
@@ -124,12 +125,15 @@ Partial Class Ventas_RepIndiceRotacionPersonal
e.Row.FCLabel("LblIrp").CssClass = "label label-success" e.Row.FCLabel("LblIrp").CssClass = "label label-success"
ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then ElseIf (porcentaje > 15.0 And porcentaje <= 30.0) Then
e.Row.FCLabel("LblIrp").CssClass = "label label-warning" e.Row.FCLabel("LblIrp").CssClass = "label label-warning"
End If End If
End If
If e.Row.DataKey("SubProyecto").ToString.Trim = "" Then
End If e.Row.CssClass = "SubTotales"
' e.Row.Attributes.Add("class", "SubTotales")
End If
End If End If

View File

@@ -1071,7 +1071,7 @@ Partial Class PV
CargaSucursales() CargaSucursales()
CargaClasificaciones() CargaClasificaciones()
CargaPS(-1, DdlPS) CargaPS(-1, DdlPS)
CargaPS(-1, DdlPSAjuste) CargaPS(-1, DdlPSAjuste, AplicaAlmacen:=False)
CargaEmpresa() CargaEmpresa()
CreaDTVentas() CreaDTVentas()
CargaMetodosPago() CargaMetodosPago()
@@ -1866,7 +1866,7 @@ Partial Class PV
End If End If
DdlClasificacion.DataBind() DdlClasificacion.DataBind()
End Sub End Sub
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost) Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost, Optional AplicaAlmacen As Boolean = True)
Objeto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141).ToString = "1") Objeto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141).ToString = "1")
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
Objeto.ddl.Items.Clear() Objeto.ddl.Items.Clear()
@@ -1877,7 +1877,11 @@ Partial Class PV
Else Else
Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue) Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString) Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas") If AplicaAlmacen Then
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
Else
Objeto.ddlWS.Attributes.Add("data-pagina", "-1")
End If
Objeto.ddlWS.Attributes.Add("data-Estatus", "1") Objeto.ddlWS.Attributes.Add("data-Estatus", "1")
End If End If
End Sub End Sub

View File

@@ -1003,8 +1003,8 @@
</table> </table>
<%--</asp:Panel>--%> <%--</asp:Panel>--%>
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False" <asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle" DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle"
CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;"> CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;">
<Columns> <Columns>
<%--0--%> <%--0--%>
@@ -1287,12 +1287,12 @@
<div class="col-md-6 "> <div class="col-md-6 ">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<table id="TbDescuentosRNC" border="0" rules="none" class="well TextTab" style="float: right;" runat="server" visible="false"> <table id="TbDescuentosRNC" border="0" rules="none" class="well TextTab" style="float: right;" runat="server" visible="false">
<tr align="right"> <tr align="right">
<td style="border: 1px none white"><b>Descuentos. RNC.:</b></td> <td style="border: 1px none white"><b>Descuentos. RNC.:</b></td>
<td> <td>
<asp:Label ID="LblDescuentosRNC" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00" Width="78px"></asp:Label></td> <asp:Label ID="LblDescuentosRNC" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00" Width="78px"></asp:Label></td>
<td align="right">&nbsp;<asp:LinkButton ID="LnkDescuentosRNC" runat="server" OnClick="LnkDescuentosRNC_Click" Text="<i class='fa fa-tag fa-lg font-green'></i>" AlternateText="Aplicacion de RNC" Style="cursor: pointer;" /> <td align="right">&nbsp;<asp:LinkButton ID="LnkDescuentosRNC" runat="server" OnClick="LnkDescuentosRNC_Click" Text="<i class='fa fa-tag fa-lg font-green'></i>" AlternateText="Aplicacion de RNC" Style="cursor: pointer;" />
</td> </td>
</tr> </tr>
<tr align="right"> <tr align="right">
@@ -5873,8 +5873,7 @@
<div class="col-md-2"> <div class="col-md-2">
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<asp:Button ID = "BtnModalAplicarRemisionesNC" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" data-toggle="modal" data-target="#ModalAplicarRemisionesNC"/> <asp:Button ID="BtnModalAplicarRemisionesNC" Text="Aplicar Remisiones" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" />
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
</div> </div>
@@ -6354,7 +6353,7 @@
</div> </div>
</div> </div>
<%--APLICAR REMISIONES DE NC--%> <%--APLICAR REMISIONES DE NC--%>
<div id="ModalAplicarDescuentoNC" class="modal ADS fade" role="dialog"> <div id="ModalAplicarDescuentoNC" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpDescNC" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDescNC" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
@@ -7544,28 +7543,34 @@
$('#divAgregarCliente').modal('hide'); $('#divAgregarCliente').modal('hide');
} }
function CompararNC() { var ValidarRNC = false;
var TotalRem = ToDouble(document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').value); function AplicarValidarRNC(Valor)
var TotalNC = ToDouble(document.getElementById('<%= TxtNCImporte.ClientID %>').value); {
ValidarRNC = Valor;
if (TotalRem == TotalNC) {
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
}
else {
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
}
} }
function CompararNC() {
if (ValidarRNC) {
var TotalRem = ToDouble(document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').value);
var TotalNC = ToDouble(document.getElementById('<%= TxtNCImporte.ClientID %>').value);
function CerrarModalRemNC() { if (TotalRem == TotalNC) {
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') { document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
} else {
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
}
}
}
function CerrarModalRemNC() {
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
AplicarValidarRNC(true);
CompararNC(); CompararNC();
} }
$('#ModalAplicarRemisionesNC').modal('hide'); $('#ModalAplicarRemisionesNC').modal('hide');

View File

@@ -8,6 +8,7 @@ Imports System.Xml
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports System.Security.Cryptography.X509Certificates Imports System.Security.Cryptography.X509Certificates
Imports System.Globalization Imports System.Globalization
Imports System.Net.Http
Partial Class Ventas Partial Class Ventas
Inherits ClsPaginas Inherits ClsPaginas
@@ -6731,6 +6732,12 @@ Partial Class Ventas
End If End If
End If End If
End If End If
'ENVIAR POLIZA VIRTUAL
If ErrorList.Count = 0 Then
If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then
GeneraPolizaVentaWS(ObjFactura)
End If
End If
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 Then If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 Then
@@ -7597,7 +7604,6 @@ Partial Class Ventas
'ObjFactura.AnticipoPosicion = DdlAmortizacionConceptos.SelectedValue.ToEntero 'ObjFactura.AnticipoPosicion = DdlAmortizacionConceptos.SelectedValue.ToEntero
'ObjFactura.AnticipoEnSubTotal = If(ChkAnticipoEnSubTotal.Checked, True, False) 'ObjFactura.AnticipoEnSubTotal = If(ChkAnticipoEnSubTotal.Checked, True, False)
'ObjFactura.CveTipoRelacion = DdlTipoRelacion.SelectedValue.ToEntero 'ObjFactura.CveTipoRelacion = DdlTipoRelacion.SelectedValue.ToEntero
'ObjFactura.CveTipoAmortizacionAnticipo = DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero
'ObjFactura.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text) 'ObjFactura.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text)
@@ -20928,9 +20934,11 @@ Partial Class Ventas
Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs) Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(344) = "1" Then If UsuarioActual.Empresa.Funcionalidad(344) = "1" Then
If TxtImportesRemisionesNC.Text.ToDecimal() <> TxtNCImporte.Text.ToDecimal() Then If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia) If TxtImportesRemisionesNC.Text.ToDecimal() <> TxtNCImporte.Text.ToDecimal() Then
Exit Sub Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If End If
End If End If
DdlTipoComprobante.SelectedValue = "Egs" DdlTipoComprobante.SelectedValue = "Egs"
@@ -23802,6 +23810,102 @@ Partial Class Ventas
Protected Sub BtnModalAplicarRemisionesNC_Click(sender As Object, e As EventArgs) Protected Sub BtnModalAplicarRemisionesNC_Click(sender As Object, e As EventArgs)
CargaRNC() CargaRNC()
RegistraScript("$('#ModalAplicarRemisionesNC').modal()") RegistraScript("$('#ModalAplicarRemisionesNC').modal({backdrop: 'static', keyboard: false });")
End Sub End Sub
Protected Function GeneraPolizaVentaWS(ObjFactura As Modelos.Factura) As Boolean
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 = Now
obj.sale_paidby = "01"
obj.sale_type = "01" 'PISO
obj.sale_type_service = "01" 'PARTICULAR
obj.sale_total = ObjFactura.Total
obj.sale_discount = ObjFactura.SubTotal
obj.sale_id = ObjFactura.CveVenta.ToString()
'DATOS DEL PRODUCTO
obj.product_code = "174925"
obj.product_unique_code = "65047187"
obj.product_sale_type = "02" 'AJUSTE
'DATOS DE USADO
obj.used_product = True
obj.used_brand = "01"
obj.used_bci = "25"
obj.used_month = 1
obj.used_year = 2015
obj.used_sale_date = ObjFactura.Fecha
Return False
'EnviarPolizaVentaWS(obj)
End Function
Protected Sub EnviarPolizaVentaWS(obj As Modelos.MPolizaVentaWS)
Dim Retorno As String = "[]"
Dim User As String = "cslth.2809@jcilink.com"
Dim Password As String = "ff31580a95f36b51ad27f970428b77a5a9245076"
Try
Using wc As New HttpClient()
Dim Url = New Uri("http://polizavirtual.com.mx/webservice/api/Venta")
Dim Parametros = New List(Of KeyValuePair(Of String, String))
Parametros.Add(New KeyValuePair(Of String, String)("User", User))
Parametros.Add(New KeyValuePair(Of String, String)("password", Password))
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", obj.customer_name))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", obj.customer_last_name1))
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", obj.customer_last_name1))
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", obj.customer_birthday.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", obj.customer_phone))
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", obj.customer_email))
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", obj.customer_gender))
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", obj.customer_advertising.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", obj.sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", obj.sale_paidby))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", obj.sale_type))
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", obj.sale_type_service))
Parametros.Add(New KeyValuePair(Of String, String)("product_code", obj.product_code))
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", obj.product_unique_code))
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", obj.product_sale_type))
Parametros.Add(New KeyValuePair(Of String, String)("sale_total", obj.sale_total.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_product", obj.used_product.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", obj.used_brand))
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", obj.used_bci))
Parametros.Add(New KeyValuePair(Of String, String)("used_month", obj.used_month.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_year", obj.used_year.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", obj.used_sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", obj.customer_car_brand.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", obj.customer_car_model.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", obj.customer_car_year.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", obj.sale_discount.ToString()))
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", obj.sale_id.ToString()))
Dim content As New FormUrlEncodedContent(Parametros)
Dim response = wc.PostAsync(Url, content).Result
Retorno = response.Content.ReadAsStringAsync().Result
End Using
Catch ex As Exception
ex.GuardaLog(ex.Message)
End Try
End Sub
End Class End Class