Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -62,7 +62,7 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||||
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (4)")
|
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (4)")
|
||||||
DdlAlmacenOrigen.DataBind()
|
DdlAlmacenOrigen.DataBind()
|
||||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22) and Almacen like '%sado%'")
|
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22) and Almacen like '%sado%' and CveAlmacen IN (449,616,628)") ' alm,. matriz,nav,obr recep sados
|
||||||
DdlAlmacenDestino.DataBind()
|
DdlAlmacenDestino.DataBind()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -220,9 +220,9 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
Dim ErrorMovInv As Boolean = False
|
Dim ErrorMovInv As Boolean = False
|
||||||
Dim Fecha As DateTime = NowADS()
|
Dim Fecha As DateTime = NowADS()
|
||||||
Dim Concepto As String = "Traspaso Recolección"
|
Dim Concepto As String = "Traspaso Recolección"
|
||||||
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 26, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveEntregaAlmacen:=CveEntregaAlmacen)
|
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 45, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveEntregaAlmacen:=CveEntregaAlmacen, Modulo:="clasifUsados")
|
||||||
Dim FolioSalida As Integer = ObjInventario.Folio
|
Dim FolioSalida As Integer = ObjInventario.Folio
|
||||||
Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalida, CveEntregaAlmacen:=CveEntregaAlmacen)
|
Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 42, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalida, CveEntregaAlmacen:=CveEntregaAlmacen, Modulo:="clasifUsados")
|
||||||
Dim CveUM As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=HdnPSRecoleccion.Value.ToEntero).FiltroPrimeroValor("CveUnidadMedida", "").ToEntero
|
Dim CveUM As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=HdnPSRecoleccion.Value.ToEntero).FiltroPrimeroValor("CveUnidadMedida", "").ToEntero
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, HdnCantidadRecoleccion.Value.ToDecimal, CveUM, HdnPSRecoleccion.Value.ToEntero, 0) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, HdnCantidadRecoleccion.Value.ToDecimal, CveUM, HdnPSRecoleccion.Value.ToEntero, 0) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
|
|||||||
@@ -1776,7 +1776,7 @@ Public Class ClsContabilidad
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener lod datos de Concepto Contables.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al obtener los datos de Concepto Contables.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
@@ -1893,7 +1893,7 @@ Public Class ClsContabilidad
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener lod datos de Concepto Contables.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al obtener los datos de Concepto Contables.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|||||||
@@ -1545,7 +1545,7 @@ Public Class ClsProductosServicios
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function AddMarcas(Marca As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
Public Function AddMarcas(Marca As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer, Optional ActualizarFranquicias As Boolean = False) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Gral_MarcasAdd")
|
DataAdapter("PA_Gral_MarcasAdd")
|
||||||
@@ -1555,6 +1555,7 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@ActualizarFranquicias", SqlDbType.Bit).Value = ActualizarFranquicias
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -1597,7 +1598,7 @@ Public Class ClsProductosServicios
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function UpdateMarca(Marca As String, CveMarca As Integer, Estatus As Boolean) As Boolean
|
Public Function UpdateMarca(Marca As String, CveMarca As Integer, Estatus As Boolean, CveEmpresa As Integer, Optional ActualizarFranquicias As Boolean = False) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Gral_MarcasUpdate")
|
DataAdapter("PA_Gral_MarcasUpdate")
|
||||||
@@ -1605,6 +1606,8 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@Marca", SqlDbType.VarChar).Value = Marca
|
.Add("@Marca", SqlDbType.VarChar).Value = Marca
|
||||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@ActualizarFranquicias", SqlDbType.Bit).Value = ActualizarFranquicias
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -2303,7 +2303,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'AJUSTES'
|
'AJUSTES'
|
||||||
If DtAjustes IsNot Nothing AndAlso DtAjustes.Rows.Count > 0 Then
|
If DtAjustes IsNot Nothing AndAlso DtAjustes.FiltraParametros("CveVentaDetalle > 0").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("CvePS").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("CodigoTD").ToString, Dr("TipoComprobante").ToString.ToEntero(),
|
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero, Dr("CodigoTD").ToString, Dr("TipoComprobante").ToString.ToEntero(),
|
||||||
|
|||||||
@@ -2693,7 +2693,7 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
|||||||
For Each docp As CFDIComplementoPago In ObjCFDITimbre.ComplementoPagos20.ComplementoPagos
|
For Each docp As CFDIComplementoPago In ObjCFDITimbre.ComplementoPagos20.ComplementoPagos
|
||||||
|
|
||||||
Dim MonDiferente As Integer = (From c In docp.DocumentosRelacionados
|
Dim MonDiferente As Integer = (From c In docp.DocumentosRelacionados
|
||||||
Where c.MonedaDR <> docp.MonedaP
|
Where c.MonedaDR <> docp.MonedaP AndAlso docp.MonedaP = "USD"
|
||||||
Select c.MonedaDR).Count()
|
Select c.MonedaDR).Count()
|
||||||
If MonDiferente > 0 Then cfdi.ContieneVariasMonedas = True 'consideración adicional Rev. B
|
If MonDiferente > 0 Then cfdi.ContieneVariasMonedas = True 'consideración adicional Rev. B
|
||||||
|
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ Partial Class Bancos_RepCortes
|
|||||||
DtCortesVentas = Vent.DtResultados
|
DtCortesVentas = Vent.DtResultados
|
||||||
divDetalle.Visible = True
|
divDetalle.Visible = True
|
||||||
End If
|
End If
|
||||||
If DtCortesVentasResumen.Rows.Count > 0 Or DtCortesVentas.Rows.Count > 0 Then
|
If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then
|
||||||
HplDownPDF.Visible = True
|
HplDownPDF.Visible = True
|
||||||
HplDownEXCEL.Visible = True
|
HplDownEXCEL.Visible = True
|
||||||
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}&CVESUBPROYECTO={2}", CveCorte, "PDF", DdlSubProyectos.SelectedValue.ToEntero)))
|
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}&CVESUBPROYECTO={2}", CveCorte, "PDF", DdlSubProyectos.SelectedValue.ToEntero)))
|
||||||
|
|||||||
@@ -921,7 +921,23 @@
|
|||||||
<asp:Button runat="server" ID="btnProrateo" Visible="false" Text="Prorratear" CommandArgument="Compras" CssClass="btn btn-success" />
|
<asp:Button runat="server" ID="btnProrateo" Visible="false" Text="Prorratear" CommandArgument="Compras" CssClass="btn btn-success" />
|
||||||
<asp:Button runat="server" ID="btnProrateo2" Visible="false" Text="Prorratear Nomina" CommandArgument="Nomina" CssClass="btn btn-success" />
|
<asp:Button runat="server" ID="btnProrateo2" Visible="false" Text="Prorratear Nomina" CommandArgument="Nomina" CssClass="btn btn-success" />
|
||||||
<asp:Button runat="server" ID="BtnProrateoDeducible" Visible="false" Text="Prorratear 8.5%" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" />
|
<asp:Button runat="server" ID="BtnProrateoDeducible" Visible="false" Text="Prorratear 8.5%" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpDVAtencionOCAnticipo" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div style="z-index: 5; position: relative;">
|
||||||
|
<div class="alert alert-danger alert-dismissable" runat="server" id="DVAtencionOCAnticipo" visible="false" 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>
|
||||||
|
<strong style="font-size: 20px; margin-right: 25px;">Atención! </strong>
|
||||||
|
El Proveedor tiene Saldo a favor pendiente por aplicar
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6 ">
|
<div class="col-md-6 ">
|
||||||
|
|||||||
@@ -714,6 +714,18 @@ Partial Class Compras_Compras
|
|||||||
ViewState("CveMetodoPago") = value
|
ViewState("CveMetodoPago") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property MetodoPagoOC As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("MetodoPagoOC") Is Nothing Then
|
||||||
|
ViewState("MetodoPagoOC") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("MetodoPagoOC").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("MetodoPagoOC") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property TipoCambio As Decimal
|
Private Property TipoCambio As Decimal
|
||||||
Get
|
Get
|
||||||
Return ViewState("TipoCambio").ToString.ToDecimal
|
Return ViewState("TipoCambio").ToString.ToDecimal
|
||||||
@@ -1018,6 +1030,20 @@ Partial Class Compras_Compras
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CveIEAnticipo As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveIEAnticipo") Is Nothing Then
|
||||||
|
ViewState("CveIEAnticipo") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CveIEAnticipo").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveIEAnticipo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Property FechaCompraOriginal As Date
|
Public Property FechaCompraOriginal As Date
|
||||||
Get
|
Get
|
||||||
Return ViewState("FechaCompraOriginal").ToString.ToDate
|
Return ViewState("FechaCompraOriginal").ToString.ToDate
|
||||||
@@ -3967,6 +3993,11 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'------------------ INICIA VALIDACIONES ------------------
|
'------------------ INICIA VALIDACIONES ------------------
|
||||||
|
|
||||||
|
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
|
||||||
|
Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal()
|
Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal()
|
||||||
|
|
||||||
If Not CveSubProyectoPrincipal > 0 Then
|
If Not CveSubProyectoPrincipal > 0 Then
|
||||||
@@ -6475,9 +6506,15 @@ Partial Class Compras_Compras
|
|||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento.RoundSQL, importeMovimiento * tipoCambioActual * Multiplicador, ConceptoContabilizacionNC, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveClasificacion:=tCveClasif, CveSubProyecto:=tCveSubProyecto, Contabilizable:=SeContabiliza) Then
|
For Each Gvr As GridViewRow In GvFacturaNC.Rows
|
||||||
ErrorPrepoliza = True
|
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then ' recorro la seleccion y tomo el TC de cada aplicación
|
||||||
End If
|
Dim timporteMovimientoNC As Decimal = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
|
||||||
|
Dim TCNC As Decimal = Gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, timporteMovimientoNC.RoundSQL, timporteMovimientoNC * TCNC * Multiplicador, ConceptoContabilizacionNC, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=TCNC, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveClasificacion:=tCveClasif, CveSubProyecto:=tCveSubProyecto, Contabilizable:=SeContabiliza) Then
|
||||||
|
ErrorPrepoliza = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -13650,6 +13687,7 @@ Partial Class Compras_Compras
|
|||||||
CargaOC()
|
CargaOC()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaOC()
|
Private Sub CargaOC()
|
||||||
|
MetodoPagoOC = -1
|
||||||
Dim EntregaDirecta As Integer = 0
|
Dim EntregaDirecta As Integer = 0
|
||||||
DivOCSolicitudAnticipo.Visible = False
|
DivOCSolicitudAnticipo.Visible = False
|
||||||
DivOCSolicitudAnticipoModal.Visible = False
|
DivOCSolicitudAnticipoModal.Visible = False
|
||||||
@@ -13688,6 +13726,7 @@ Partial Class Compras_Compras
|
|||||||
HdnVCveOC.Value += String.Format("{0}{1}", If(HdnVCveOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveOrdenCompra").ToString)
|
HdnVCveOC.Value += String.Format("{0}{1}", If(HdnVCveOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveOrdenCompra").ToString)
|
||||||
HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString)
|
HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString)
|
||||||
EntregaDirecta += If(OC.DtResultados.Rows(0)("EntregaDirecta").ToString = "True", 1, 0)
|
EntregaDirecta += If(OC.DtResultados.Rows(0)("EntregaDirecta").ToString = "True", 1, 0)
|
||||||
|
MetodoPagoOC = OC.DtResultados.Rows(0)("EntregaDirecta").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -13703,6 +13742,7 @@ Partial Class Compras_Compras
|
|||||||
HdnVCveOC.Value += String.Format("{0}{1}", If(HdnVCveOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveOrdenCompra").ToString)
|
HdnVCveOC.Value += String.Format("{0}{1}", If(HdnVCveOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveOrdenCompra").ToString)
|
||||||
HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString)
|
HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString)
|
||||||
EntregaDirecta += If(OC.DtResultados.Rows(0)("EntregaDirecta").ToString = "True", 1, 0)
|
EntregaDirecta += If(OC.DtResultados.Rows(0)("EntregaDirecta").ToString = "True", 1, 0)
|
||||||
|
MetodoPagoOC = OC.DtResultados.Rows(0)("EntregaDirecta").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -13745,7 +13785,9 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub BtnVOC_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnVOC_Click(sender As Object, e As EventArgs)
|
||||||
VinculaOC()
|
VinculaOC()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub VinculaOC()
|
Private Sub VinculaOC()
|
||||||
|
CveIEAnticipo = -1
|
||||||
If TxtOC.Text <> "" Then
|
If TxtOC.Text <> "" Then
|
||||||
|
|
||||||
'VARIABLES
|
'VARIABLES
|
||||||
@@ -13792,6 +13834,7 @@ Partial Class Compras_Compras
|
|||||||
If ObjOC.DtResultados.Rows(0)("CveIEAnticipo").ToString.ToEntero > 0 Then
|
If ObjOC.DtResultados.Rows(0)("CveIEAnticipo").ToString.ToEntero > 0 Then
|
||||||
FoliosOCAnticipo += $"{ObjOC.DtResultados.Rows(0)("FolioOC").ToString},"
|
FoliosOCAnticipo += $"{ObjOC.DtResultados.Rows(0)("FolioOC").ToString},"
|
||||||
FoliosOCAnticipoIE += $"{ObjOC.DtResultados.Rows(0)("FolioIEAnticipo").ToString},"
|
FoliosOCAnticipoIE += $"{ObjOC.DtResultados.Rows(0)("FolioIEAnticipo").ToString},"
|
||||||
|
CveIEAnticipo = ObjOC.DtResultados.Rows(0)("CveIEAnticipo").ToString.ToEntero
|
||||||
DivOCSolicitudAnticipo.Visible = True
|
DivOCSolicitudAnticipo.Visible = True
|
||||||
DivOCSolicitudAnticipoModal.Visible = True
|
DivOCSolicitudAnticipoModal.Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -13883,6 +13926,9 @@ Partial Class Compras_Compras
|
|||||||
If DivOCSolicitudAnticipo.Visible And FoliosOCAnticipo.Length > 0 Then
|
If DivOCSolicitudAnticipo.Visible And FoliosOCAnticipo.Length > 0 Then
|
||||||
LtSolicitudAnticipoFoliosOC.Text = $"La(s) siguiente(s) OC: {FoliosOCAnticipo.Substring(0, FoliosOCAnticipo.Length - 1)}. tienen vinculado un anticipo"
|
LtSolicitudAnticipoFoliosOC.Text = $"La(s) siguiente(s) OC: {FoliosOCAnticipo.Substring(0, FoliosOCAnticipo.Length - 1)}. tienen vinculado un anticipo"
|
||||||
LtSolicitudAnticipoFoliosIE.Text = $" {FoliosOCAnticipoIE.Substring(0, FoliosOCAnticipoIE.Length - 1)}"
|
LtSolicitudAnticipoFoliosIE.Text = $" {FoliosOCAnticipoIE.Substring(0, FoliosOCAnticipoIE.Length - 1)}"
|
||||||
|
|
||||||
|
DVAtencionOCAnticipo.Visible = True
|
||||||
|
UpDVAtencionOCAnticipo.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'PROMOCIONES
|
'PROMOCIONES
|
||||||
@@ -14430,13 +14476,39 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'ANTICIPO OC
|
'ANTICIPO OC
|
||||||
If DivOCSolicitudAnticipo.Visible Then
|
If DivOCSolicitudAnticipo.Visible Then
|
||||||
|
|
||||||
|
If CveIEAnticipo > 0 Then
|
||||||
|
DVAtencionOCAnticipo.Visible = True
|
||||||
|
UpDVAtencionOCAnticipo.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim scripsSeccion As String = ""
|
||||||
|
For Each gvRow As GridViewRow In GVAnticipos.Rows
|
||||||
|
If gvRow.DataKey("CveIE").ToEntero = CveIEAnticipo Then
|
||||||
|
Dim Chk As CheckBox = gvRow.FCCheckBox("Chk")
|
||||||
|
scripsSeccion = scripsSeccion & $"$('#{Chk.ClientID}').click();"
|
||||||
|
'RegistraScript($"$('#{Chk.ClientID}').click();", "100")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
RegistraScript("MuestraAnticipos();", "MuestaAnticiposOC")
|
RegistraScript("MuestraAnticipos();", "MuestaAnticiposOC")
|
||||||
|
RegistraScript("
|
||||||
|
setTimeout(function() {
|
||||||
|
" & scripsSeccion & "
|
||||||
|
}, 200)
|
||||||
|
")
|
||||||
UpAnticipos.Update()
|
UpAnticipos.Update()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CalculaTotales()
|
CalculaTotales()
|
||||||
CompraEstaVinculadaOC = True
|
CompraEstaVinculadaOC = True
|
||||||
|
|
||||||
|
|
||||||
|
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
|
||||||
|
Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub VinculacionAsync(Optional VinculacionCompleta As Boolean = False)
|
Private Sub VinculacionAsync(Optional VinculacionCompleta As Boolean = False)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Imports iText.Barcodes.Dmcode
|
|||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports Modelos
|
Imports Modelos
|
||||||
Imports Stimulsoft.Base.Context
|
Imports Stimulsoft.Base.Context
|
||||||
|
Imports ZXing
|
||||||
|
|
||||||
|
|
||||||
Partial Class PopUpVerFactura
|
Partial Class PopUpVerFactura
|
||||||
@@ -6039,6 +6040,13 @@ Partial Class PopUpVerFactura
|
|||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
If DtPrecios IsNot Nothing Then
|
If DtPrecios IsNot Nothing Then
|
||||||
|
|
||||||
|
DtPrecios.Columns.Add(New DataColumn("CBBase64", GetType(String)))
|
||||||
|
|
||||||
|
For Each Row As DataRow In DtPrecios.Rows
|
||||||
|
Row("CBBase64") = Convert.ToBase64String(GeneraCodigoQR(Row("CodigoBarras").ToString(), 40, 150, 0, "CODE_39", True))
|
||||||
|
Next
|
||||||
|
|
||||||
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||||
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
||||||
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
||||||
@@ -6153,4 +6161,94 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte()
|
||||||
|
|
||||||
|
Dim barcodeWriter As New BarcodeWriter
|
||||||
|
Dim opciones As New ZXing.Common.EncodingOptions
|
||||||
|
Dim FormatoBar As New BarcodeFormat
|
||||||
|
'Dim Respuesta As Byte()
|
||||||
|
|
||||||
|
opciones.Height = Alto
|
||||||
|
opciones.Width = Largo
|
||||||
|
opciones.Margin = Margen
|
||||||
|
opciones.PureBarcode = PureBacode
|
||||||
|
barcodeWriter.Options = opciones
|
||||||
|
|
||||||
|
Select Case Formato
|
||||||
|
Case "All_1D"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.All_1D
|
||||||
|
Exit Select
|
||||||
|
Case "AZTEC"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.AZTEC
|
||||||
|
Exit Select
|
||||||
|
Case "CODABAR"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODABAR
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_128"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_128
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_39"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_39
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_93"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_93
|
||||||
|
Exit Select
|
||||||
|
Case "DATA_MATRIX"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.DATA_MATRIX
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_13"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_13
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_8"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_8
|
||||||
|
Exit Select
|
||||||
|
Case "IMB"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.IMB
|
||||||
|
Exit Select
|
||||||
|
Case "ITF"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.ITF
|
||||||
|
Exit Select
|
||||||
|
Case "MAXICODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MAXICODE
|
||||||
|
Exit Select
|
||||||
|
Case "MSI"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MSI
|
||||||
|
Exit Select
|
||||||
|
Case "PDF_417"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PDF_417
|
||||||
|
Exit Select
|
||||||
|
Case "PLESSEY"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PLESSEY
|
||||||
|
Exit Select
|
||||||
|
Case "QR_CODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.QR_CODE
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_14"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_14
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_EXPANDED"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_EXPANDED
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_A"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_A
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_E"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_E
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_EAN_EXTENSION"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_EAN_EXTENSION
|
||||||
|
Exit Select
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Dim imgCod As Drawing.Bitmap = barcodeWriter.Write(CodigoBarras)
|
||||||
|
Dim memoriStream As New System.IO.MemoryStream
|
||||||
|
imgCod.Save(memoriStream, Drawing.Imaging.ImageFormat.Bmp)
|
||||||
|
|
||||||
|
'Respuesta = Convert.ToBase64String(memoriStream.ToArray())
|
||||||
|
|
||||||
|
Return memoriStream.ToArray()
|
||||||
|
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ Partial Class RegPoliza
|
|||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
Response.Redirect("/Contabilidad2/RegPrePolizaS.aspx")
|
Response.Redirect("/Contabilidad/RegPrePolizaS.aspx")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ViewState("Orden0") = ""
|
ViewState("Orden0") = ""
|
||||||
|
|||||||
@@ -497,6 +497,7 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
Alert("El traspaso de movimientos en la cuenta tuvo un error.", TipoMensaje.MsgError)
|
||||||
TieneError = True
|
TieneError = True
|
||||||
ObjConta.RollBack()
|
ObjConta.RollBack()
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ Partial Class Contabilidad2_RepLibroDiario
|
|||||||
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
lista.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
lista.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||||
|
|
||||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/LibroDiario.rpt"), DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato)
|
ImprimirbytesPDF(ImprimirPDFCrystal(DirectorioEmpresas + "\Grales\Formatos\LibroDiario.rpt", DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato)
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2321,7 +2321,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!Importe.Value</Value>
|
<Value>=IIf(Fields!Importe.Value = 0.01 ,0.00,Fields!Importe.Value)</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>9.64pt</FontSize>
|
<FontSize>9.64pt</FontSize>
|
||||||
@@ -4108,7 +4108,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</Style>
|
</Style>
|
||||||
</Body>
|
</Body>
|
||||||
<Width>21.0638cm</Width>
|
<Width>21.06381cm</Width>
|
||||||
<Page>
|
<Page>
|
||||||
<PageFooter>
|
<PageFooter>
|
||||||
<Height>0.5327cm</Height>
|
<Height>0.5327cm</Height>
|
||||||
|
|||||||
@@ -1677,7 +1677,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!Importe.Value</Value>
|
<Value>=IIf(Fields!Importe.Value = 0.01 ,0.00,Fields!Importe.Value)</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Myriad Pro</FontFamily>
|
<FontFamily>Myriad Pro</FontFamily>
|
||||||
<FontSize>9.64pt</FontSize>
|
<FontSize>9.64pt</FontSize>
|
||||||
|
|||||||
@@ -62,23 +62,42 @@ Partial Class General_CatMarcas
|
|||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
Dim CveMarca = gvRow.DataKey("CveMarca").ToEntero
|
Dim CveMarca = gvRow.DataKey("CveMarca").ToEntero
|
||||||
If ObjPS.RemoveMarca(CveMarca) Then
|
If ObjPS.RemoveMarca(CveMarca) Then
|
||||||
Alert("Se borró correctamente de la base de Datos.", TipoMensaje.MsgInformacion)
|
Alert("Se borró correctamente de la base de Datos.", TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
Alert("La marca esta siendo utilizada por un Producto", TipoMensaje.MsgError)
|
Alert("La marca esta siendo utilizada por un Producto", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
ObjPS.Dispose()
|
|
||||||
CargaDatos()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkAgregarMarca_Click(sender As Object, e As EventArgs)
|
|
||||||
LimpiaModal()
|
|
||||||
Modalidad = "A"
|
|
||||||
BtnGuardar.Text = "Agregar"
|
|
||||||
DivEstatus.Visible = False
|
|
||||||
UpModal.Update()
|
|
||||||
RegistraScript("$('#DModalMarca').modal()")
|
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkAgregarMarca_Click(sender As Object, e As EventArgs)
|
||||||
|
LimpiaModal()
|
||||||
|
Modalidad = "A"
|
||||||
|
BtnGuardar.Text = "Agregar"
|
||||||
|
DivEstatus.Visible = False
|
||||||
|
UpModal.Update()
|
||||||
|
RegistraScript("$('#DModalMarca').modal()")
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim ActualizarFranquicias As Boolean = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
ActualizarFranquicias = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
ObjPS.IniciaTransacSQL()
|
||||||
|
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
Try
|
||||||
|
If Modalidad = "A" Then
|
||||||
|
If Not ObjPS.AddMarcas(TxtMarca.Text, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ActualizarFranquicias:=ActualizarFranquicias) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
End If
|
||||||
|
ElseIf Modalidad = "U" Then
|
||||||
|
If Not ObjPS.UpdateMarca(TxtMarca.Text, CveMarca, ChkEstatus.Checked, UsuarioActual.CveEmpresa, ActualizarFranquicias:=ActualizarFranquicias) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
|||||||
@@ -781,7 +781,7 @@ Partial Class Inventarios_CartaPorteManual
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjTimbres.Timbrar() Then
|
If ObjTimbres.Timbrar(4) Then
|
||||||
|
|
||||||
Try
|
Try
|
||||||
PdfFactura(ObjTimbres.ObjFactura)
|
PdfFactura(ObjTimbres.ObjFactura)
|
||||||
|
|||||||
@@ -4398,7 +4398,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
If Valido Then
|
If Valido Then
|
||||||
Dim CveClasificacion As Integer
|
Dim CveClasificacion As Integer
|
||||||
Dim CveUM As Double
|
Dim CveUM As Integer
|
||||||
Dim CodigoPS As String = ""
|
Dim CodigoPS As String = ""
|
||||||
Dim PS As String = ""
|
Dim PS As String = ""
|
||||||
|
|
||||||
@@ -4415,6 +4415,14 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
PS = dr("PS").ToString.ToString
|
PS = dr("PS").ToString.ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CantidadExistencia = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenCambioVigencias.SelectedValue.ToEntero, CveSeccionAlmacen, Serie, Lote, Caducidad.ToDateTime())
|
||||||
|
|
||||||
|
If Cantidad > CantidadExistencia Then
|
||||||
|
Dim msg = $"El producto {PS} no tiene existencia. " + If(Serie.Length > 0, $"Serie: {Serie} ", "") + If(Lote.Length > 0, $"Lote: {Lote} ", "") + If(Caducidad.ToDateTime() > MinFecha, $"Caducidad: {Caducidad} ", "")
|
||||||
|
Alert(msg, TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim registro As DataRow = DtMovimientosCambioVigencias.NewRow
|
Dim registro As DataRow = DtMovimientosCambioVigencias.NewRow
|
||||||
registro.Item("Cantidad") = Cantidad
|
registro.Item("Cantidad") = Cantidad
|
||||||
registro.Item("CveUM") = CveUM
|
registro.Item("CveUM") = CveUM
|
||||||
|
|||||||
@@ -2519,7 +2519,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
if (dconr != null)
|
if (dconr != null)
|
||||||
{
|
{
|
||||||
CveConcepto = dconr["CveConcepto"].ToString();
|
CveConcepto = dconr["CveConcepto"].ToString();
|
||||||
dtxz.Columns[i].ColumnName = CveConcepto;
|
if (dtxz.Columns.Contains(CveConcepto))
|
||||||
|
{
|
||||||
|
stringError = string.Format("Ocurrio un Error al procesar el excel código duplicado '{0}'({1}).", conceptocodigo, i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dtxz.Columns[i].ColumnName = CveConcepto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
109
OC/OC.aspx
109
OC/OC.aspx
@@ -455,7 +455,7 @@
|
|||||||
<tr id="TrMetodoPago" runat="server" visible="false">
|
<tr id="TrMetodoPago" runat="server" visible="false">
|
||||||
<td><b>Método de pago:</b></td>
|
<td><b>Método de pago:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlMetodoPago" CssClass="form-control select2me" runat="server" Width="100%" CausesValidation="true">
|
<asp:DropDownList ID="DdlMetodoPago" CssClass="form-control select2me" runat="server" Width="100%" CausesValidation="true" AutoPostBack="true" OnSelectedIndexChanged="DdlMetodoPago_SelectedIndexChanged">
|
||||||
<asp:ListItem Text="-" Value="-1"></asp:ListItem>
|
<asp:ListItem Text="-" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
|
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
|
||||||
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
|
||||||
@@ -1563,6 +1563,89 @@
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpPanelDVAnticiposContado" class="portlet-body form" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="col-md-3" runat="server" id="DVAnticposContado" visible="false">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="portlet light xspadding bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Anticipos </span>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript;" class="expand" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
|
||||||
|
<div class="row ">
|
||||||
|
<label class="col-md-3">Porcentaje:</label>
|
||||||
|
<div class="col-md-4 form-group">
|
||||||
|
<div class="input-group">
|
||||||
|
<asp:TextBox ID="TxtSAImPorcentajeContado" min="0" max="100" CssClass="form-control input-sm" runat="server" onkeyup="SAImPorcentajeContadokeyup()" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVSAImPorcentajeContado" runat="server" ControlToValidate="TxtSAImPorcentajeContado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Porcentaje''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCESAImPorcentajeContado" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVSAImPorcentajeContado" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtSAImPorcentajeContado" ValidChars="1234567890." />
|
||||||
|
<span class="input-group-addon">
|
||||||
|
<i style="font-weight: 700;">%</i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row ">
|
||||||
|
<label class="col-md-3">Importe:</label>
|
||||||
|
<div class="col-md-4 form-group">
|
||||||
|
<div class="input-group">
|
||||||
|
<asp:TextBox ID="TxtSAImporteContado" min="0" max='<%=LblTotal.Text.ToString()%>' CssClass="form-control input-sm" runat="server" onkeyup="SAImporteContadokeyup()" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
<asp:RangeValidator ID="RVSAImporteContado" CssClass="form-control" runat="server" ControlToValidate="TxtSAImporteContado" Display="None" Type="Double" MinimumValue="1.00" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> debe ser mayor a cero." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCESAImporteContado" runat="server" HighlightCssClass="vco" TargetControlID="RVSAImporteContado" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtSAImporteContado" ValidChars="1234567890." />
|
||||||
|
<span class="input-group-addon">
|
||||||
|
<i style="font-weight: 700;">$</i>
|
||||||
|
</span>
|
||||||
|
<div class="input-group" style="text-align: right!important">
|
||||||
|
<asp:Label runat="server" ID="LblSaldoOCAnticipoContado"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-3">Solicitar a:</label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<asp:DropDownList ID="DdlSAUsuarioContado" CssClass="form-control input-sm select2me" DataTextField="Nombre" DataValueField="CveUsuario" runat="server" Width="100%"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVSAUsuarioContado" runat="server" InitialValue="-1" ControlToValidate="DdlSAUsuarioContado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Usuario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCESAUsuarioContado" runat="server" HighlightCssClass="vco" TargetControlID="RFVSAUsuarioContado" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-3">Observaciones:</label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<asp:TextBox ID="TxtSAObservacionesContado" CssClass="form-control input-sm" runat="server" Style="width: 100%; height: 40px;" ValidationGroup="GrpGuardar" TextMode="MultiLine" Rows="5" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-footer">
|
||||||
|
<%--<button id="CancelarSolicitarAnticipoContado" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||||
|
<asp:Button Text="Guardar" ID="BtnSolicitarAnticipoContado" CssClass="btn btn-primary" ValidationGroup="GrpGuardar" runat="server" />--%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
<div class="portlet light xspadding bordered">
|
<div class="portlet light xspadding bordered">
|
||||||
@@ -2912,10 +2995,34 @@
|
|||||||
$('#<%= TxtSAImPorcentaje.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
$('#<%= TxtSAImPorcentaje.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
<%--$('#<%= TxtSAImPorcentajeContado.ClientID%>').keyup(function () {
|
||||||
|
console.log($(this).val());
|
||||||
|
var importe = (ToDouble($(this).val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
||||||
|
$('#<%= TxtSAImporteContado.ClientID%>').val( FormatoNumero(importe, 2).replace(/,/g, "") );
|
||||||
|
});
|
||||||
|
$('#<%= TxtSAImporteContado.ClientID%>').keyup(function () {
|
||||||
|
var importe = (100 * ToDouble($(this).val())) / ToDouble($get("LblTotal").value.replace(/,/g, ""));
|
||||||
|
$('#<%= TxtSAImPorcentajeContado.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
||||||
|
});--%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$get('HdnWidth').value = $("#DivConceptosContenido").width();
|
$get('HdnWidth').value = $("#DivConceptosContenido").width();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function SAImPorcentajeContadokeyup() {
|
||||||
|
var importe = (ToDouble($('#TxtSAImPorcentajeContado').val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
||||||
|
$('#TxtSAImporteContado').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
function SAImporteContadokeyup() {
|
||||||
|
var importe = (100 * ToDouble($('#TxtSAImporteContado').val())) / ToDouble($get("LblTotal").value.replace(/,/g, ""));
|
||||||
|
$('#TxtSAImPorcentajeContado%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
||||||
|
}
|
||||||
|
|
||||||
function showDivEC(CveCotizacion) {
|
function showDivEC(CveCotizacion) {
|
||||||
$('#<%=TxtMotivoEliminacion.ClientID%>').val("");
|
$('#<%=TxtMotivoEliminacion.ClientID%>').val("");
|
||||||
$('#divEliminarCotizacion').modal();
|
$('#divEliminarCotizacion').modal();
|
||||||
|
|||||||
103
OC/OC.aspx.vb
103
OC/OC.aspx.vb
@@ -2,6 +2,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlClient
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
@@ -2820,6 +2821,15 @@ Partial Class OC_OC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not TieneError AndAlso DdlMetodoPago.SelectedValue.ToEntero = 0 AndAlso TipoOC = "OC" Then
|
||||||
|
|
||||||
|
If Not GeneraAnticpoContado(CveOrdenCompra, OC.IniciaTransacSQL()) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
If Conta IsNot Nothing Then Conta.Commit()
|
If Conta IsNot Nothing Then Conta.Commit()
|
||||||
OC.Commit()
|
OC.Commit()
|
||||||
@@ -3207,6 +3217,15 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'If Not TieneError AndAlso DdlMetodoPago.SelectedValue.ToEntero = 0 AndAlso TipoOC = "OC" Then
|
||||||
|
|
||||||
|
' If Not GeneraAnticpoContado(CveOrdenCompra, OC.IniciaTransacSQL()) Then
|
||||||
|
' TieneError = True
|
||||||
|
' End If
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
'COMMIT
|
'COMMIT
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
'If MonedaTexto <> DdlMoneda.SelectedItem.Text Then
|
'If MonedaTexto <> DdlMoneda.SelectedItem.Text Then
|
||||||
@@ -3258,6 +3277,9 @@ Partial Class OC_OC
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'TERMINA TODO POR SI OCURRIÓ ALGO RARO
|
'TERMINA TODO POR SI OCURRIÓ ALGO RARO
|
||||||
If TieneError Then
|
If TieneError Then
|
||||||
If OC IsNot Nothing Then OC.RollBack()
|
If OC IsNot Nothing Then OC.RollBack()
|
||||||
@@ -5379,7 +5401,12 @@ Partial Class OC_OC
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub EnviaCorreoSolicitudAnticipo(CveEvento As Integer)
|
Private Sub EnviaCorreoSolicitudAnticipo(CveEvento As Integer)
|
||||||
Dim Param As New List(Of String)
|
Dim Param As New List(Of String)
|
||||||
|
|
||||||
Dim DtPara As DataTable = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual)
|
Dim DtPara As DataTable = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual)
|
||||||
|
If DdlMetodoPago.SelectedValue.ToEntero = 0 Then
|
||||||
|
DtPara = GlobalDTUsuarios(DdlSAUsuarioContado.SelectedValue.ToString.ToEntero, CveEmpresaActual)
|
||||||
|
End If
|
||||||
|
|
||||||
Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para
|
Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para
|
||||||
Param.Add("Solicitud de anticipo de Orden de Compra") 'Asunto
|
Param.Add("Solicitud de anticipo de Orden de Compra") 'Asunto
|
||||||
Param.Add(GeneraCorreoAnticipo(lblFolio.Text, DtPara.Rows(0)("Nombre").ToString(), String.Format("http://sig.adssistemas.mx/OI/EventoDetalle.aspx?CveTipoEvento=1&CveEvento={0}", CveEvento), TxtSAImporte.Text, DdlProveedores.SelectedText))
|
Param.Add(GeneraCorreoAnticipo(lblFolio.Text, DtPara.Rows(0)("Nombre").ToString(), String.Format("http://sig.adssistemas.mx/OI/EventoDetalle.aspx?CveTipoEvento=1&CveEvento={0}", CveEvento), TxtSAImporte.Text, DdlProveedores.SelectedText))
|
||||||
@@ -8846,4 +8873,80 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub DdlMetodoPago_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
DVAnticposContado.Visible = False
|
||||||
|
|
||||||
|
If DdlMetodoPago.SelectedValue.ToEntero = 0 Then
|
||||||
|
DVAnticposContado.Visible = True
|
||||||
|
DdlSAUsuarioContado.DataSource = GlobalDTUsuarios(-1, CveEmpresaActual).FiltraParametros("CvePlataforma = 1", "Nombre")
|
||||||
|
DdlSAUsuarioContado.DataBind()
|
||||||
|
DdlSAUsuarioContado.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
'CargaAnticiposSolicitudesContado()
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpPanelDVAnticiposContado.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Function GeneraAnticpoContado(CveOrdenCompraContado As Integer, ByRef transaccionSql As SqlTransaction) As Boolean
|
||||||
|
|
||||||
|
Dim respuesta As Boolean = False
|
||||||
|
|
||||||
|
If TxtSAImporteContado.Text.ToDecimal > LblTotal.Text.ToDecimal Then
|
||||||
|
Alert("El importe solicitado supera el saldo de la orden de compra", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Descripcion As New StringBuilder
|
||||||
|
Descripcion.AppendFormat("Importe anticipo : ${0} ({1}%) - <a target=""_blank"" href=""/Bancos/IE.aspx?Opcion=EGSSINFACT&CveOC={2}"">Pagar anticipo</a> - <b>Observacion:</b> {2} ", TxtSAImporteContado.Text.FormatoNumero, TxtSAImPorcentajeContado.Text, CveOrdenCompraContado, TxtSAObservacionesContado.Text)
|
||||||
|
Descripcion.AppendFormat("Orden de compra : {0} - <a target=""_blank"" href=""/OC/OC.aspx?OC={1}"">Ir a la orden de compra</a> - <a target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={2}"">Imprimir OC</a>", Folio, CveOrdenCompraContado, Encripta(String.Format("OP=OC&CVEOC={0}", CveOrdenCompraContado)))
|
||||||
|
|
||||||
|
|
||||||
|
Dim Asunto As String = $"{lblFolio.Text} - Solicitud de anticipo "
|
||||||
|
Dim ObjOC As New ClsOC(transaccionSql)
|
||||||
|
Dim ObjOI As New ClsOIEventos(ObjOC.IniciaTransacSQL)
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
|
If ObjOI.AddEventoTarea(Asunto, Descripcion.ToString, 1, UsuarioActual.CveUsuario, DdlSAUsuarioContado.SelectedValue.ToString.ToEntero, NowADS(), NowADS().AddMinutes(15), -1, 1, -1, "-1", -1, -1, -1, -1, -1, CveOrdenCompraContado.ToEntero, -1, -1, UsuarioActual.CveUsuario, -1, CveEmpresaActual) Then
|
||||||
|
If Not ObjOC.AddSolicitudAnticipo(CveOrdenCompraContado, TxtSAImporteContado.Text.ToDecimal, CveEmpresaActual) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjOI.AddEventoBitacora($"Solicitud de anticipo de orden de compra por ${TxtSAImporteContado.Text.FormatoNumero}", "-1", UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompraContado) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
EnviaCorreoSolicitudAnticipo(ObjOI.CveEvento)
|
||||||
|
'LIMPIA
|
||||||
|
DdlSAUsuarioContado.SelectedValue = "-1"
|
||||||
|
TxtSAImporteContado.Text = ""
|
||||||
|
TxtSAObservacionesContado.Text = ""
|
||||||
|
TxtSAImPorcentajeContado.Text = ""
|
||||||
|
Alert("La solicitud de anticipo ha sido enviada correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al hacer la solicitud de anticipo.", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If TieneError Then
|
||||||
|
respuesta = False
|
||||||
|
Else
|
||||||
|
respuesta = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return respuesta
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -3037,16 +3037,16 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
|
|
||||||
Select Case DdlTipoVenta.SelectedValue.ToEntero
|
Select Case DdlTipoVenta.SelectedValue.ToEntero
|
||||||
Case 1, 2
|
Case 1, 2 ' *Fuera de liena *pago directo
|
||||||
Opcion = 1
|
Opcion = 1
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 3 ' por el momento ya no se usa
|
Case 3 ' por el momento ya no se usa
|
||||||
Opcion = 2
|
Opcion = 2
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 5
|
Case 5 ' consignacion uso
|
||||||
Opcion = 3
|
Opcion = 3
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 6
|
Case 6 ' a vista uso de material
|
||||||
Opcion = 4
|
Opcion = 4
|
||||||
Exit Select
|
Exit Select
|
||||||
Case Else
|
Case Else
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ Partial Class CatSubProyectos
|
|||||||
End If
|
End If
|
||||||
BtnGuardar.OnClientClick = $"ValidaGuardar();"
|
BtnGuardar.OnClientClick = $"ValidaGuardar();"
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(404) = "20" Then
|
If UsuarioActual.Empresa.Funcionalidad(404).Contiene("10", "20") Then
|
||||||
DVModalPrecioLista.Visible = True
|
DVModalPrecioLista.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -35,11 +35,11 @@
|
|||||||
<div class="titlefiltros caption ">
|
<div class="titlefiltros caption ">
|
||||||
<ul class="list-inline text-size-12">
|
<ul class="list-inline text-size-12">
|
||||||
<li>Tipo Periodo:
|
<li>Tipo Periodo:
|
||||||
<asp:DropDownList ID="DdlTipoPeriodo" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 150px !important;" ValidationGroup="GrpGuardar" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo">
|
<asp:DropDownList ID="DdlTipoPeriodo" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 120px !important;" ValidationGroup="GrpGuardar" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</li>
|
||||||
<li><asp:label ID="LblPeriodo" runat="server" Visible="true" >Periodo:</asp:label>
|
<li><asp:label ID="LblPeriodo" runat="server" Visible="true" >Periodo:</asp:label>
|
||||||
<asp:DropDownList ID="DdlRango" Visible="true" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 300px !important;" DataTextField="NominaEstatus" DataValueField="CvePeriodo" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlRango" Visible="true" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 275px !important;" DataTextField="NominaEstatus" DataValueField="CvePeriodo" ValidationGroup="GrpGuardar">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</li>
|
||||||
<%--<li>Fecha Inicio:
|
<%--<li>Fecha Inicio:
|
||||||
@@ -73,25 +73,24 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="CvcTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="CvTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="CvcTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="CvTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</li>--%>
|
</li>--%>
|
||||||
<li>SubProyecto:
|
<li>SubProyecto:
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control input-sm select2me" Style="width: 150px; !important;" DataTextField="SubProyecto" DataValueField="CveSubproyecto">
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control input-sm select2me" Style="width: 135px; !important;" DataTextField="SubProyecto" DataValueField="CveSubproyecto">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</li>
|
||||||
<li>Turno:
|
<li>Turno:
|
||||||
<asp:DropDownList ID="DdlTurno" runat="server" Class="form-control input-sm select2me" DataTextField="Turno" DataValueField="CveTurno" Width="150">
|
<asp:DropDownList ID="DdlTurno" runat="server" Class="form-control input-sm select2me" DataTextField="Turno" DataValueField="CveTurno" Width="100">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</li>
|
</li>
|
||||||
<li>Checador
|
<li>Checador
|
||||||
<asp:RadioButton ID="RdbChecador" runat="server" Checked="true" GroupName="Checador" />
|
<asp:RadioButton ID="RdbChecador" runat="server" Checked="true" GroupName="Checador" TextAlign="Right" />
|
||||||
</li>
|
</li>
|
||||||
<li>Lista Asistencia
|
<li>Lista Asistencia
|
||||||
<asp:RadioButton ID="RdbAsistencia" runat="server" GroupName="Checador" />
|
<asp:RadioButton ID="RdbAsistencia" runat="server" GroupName="Checador" TextAlign="Right" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" Enabled="false" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" Enabled="false" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -106,9 +105,9 @@
|
|||||||
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros"
|
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros"
|
||||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
|
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Numero" ItemStyle-HorizontalAlign="Left" >
|
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("CvePersonal") %>'> </asp:Label>
|
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("Codigo") %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Personal" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Personal" ItemStyle-HorizontalAlign="Left">
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
objNom.Dispose()
|
objNom.Dispose()
|
||||||
|
|
||||||
DdlTipoPeriodo.DataBind()
|
DdlTipoPeriodo.DataBind()
|
||||||
DdlTipoPeriodo.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
DdlTipoPeriodo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
DdlTurno.DataSource = GlobalDTTurno(UsuarioActual.CveEmpresa)
|
DdlTurno.DataSource = GlobalDTTurno(UsuarioActual.CveEmpresa)
|
||||||
DdlTurno.DataBind()
|
DdlTurno.DataBind()
|
||||||
@@ -327,7 +327,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Resultados.Columns.Add("CvePersonal")
|
Resultados.Columns.Add("CvePersonal")
|
||||||
Resultados.Columns.Add("NombreCompleto")
|
Resultados.Columns.Add("NombreCompleto")
|
||||||
'Resultados.Columns.Add("Codigo")
|
Resultados.Columns.Add("Codigo")
|
||||||
Resultados.Columns.Add("CveSubProyecto")
|
Resultados.Columns.Add("CveSubProyecto")
|
||||||
Resultados.Columns.Add("SalarioDiario")
|
Resultados.Columns.Add("SalarioDiario")
|
||||||
Resultados.Columns.Add("CveAsistenciasInasistencias")
|
Resultados.Columns.Add("CveAsistenciasInasistencias")
|
||||||
@@ -349,7 +349,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Resultados.Columns.Add("TipoCorto")
|
Resultados.Columns.Add("TipoCorto")
|
||||||
Resultados.Columns.Add("Sancion")
|
Resultados.Columns.Add("Sancion")
|
||||||
|
|
||||||
If DdlTurno.SelectedValue.ToEntero > 0 And DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
Dim FiltroSubProyecto As String = ""
|
Dim FiltroSubProyecto As String = ""
|
||||||
Dim filtroturno = If(DdlTurno.SelectedValue = "-1", "", $"AND CveTurno = { DdlTurno.SelectedValue}")
|
Dim filtroturno = If(DdlTurno.SelectedValue = "-1", "", $"AND CveTurno = { DdlTurno.SelectedValue}")
|
||||||
@@ -359,7 +359,19 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } {filtroturno} "
|
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } {filtroturno} "
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto)
|
'DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto)
|
||||||
|
|
||||||
|
Dim DtTempPeriodo As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
||||||
|
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||||
|
|
||||||
|
Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto).AsEnumerable()
|
||||||
|
Let Inicio = fila.Field(Of Date)("FechaInicio")
|
||||||
|
Let FechaFinOriginal = fila.Field(Of Date?)("FechaFin")
|
||||||
|
Let FechaFin = If(FechaFinOriginal.HasValue, FechaFinOriginal.Value, Now)
|
||||||
|
Where Inicio <= FechaInicioPeriodoFiltro AndAlso FechaInicioPeriodoFiltro <= FechaFin
|
||||||
|
Select fila
|
||||||
|
|
||||||
|
DtPersonal = FilasFiltradas.CopyToDataTable()
|
||||||
|
|
||||||
If objRH.ChecadorHorariosGet(-1, 1, UsuarioActual.Empresa.CveEmpresa) Then
|
If objRH.ChecadorHorariosGet(-1, 1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||||
DTHorarios = objRH.DtResultados
|
DTHorarios = objRH.DtResultados
|
||||||
@@ -422,6 +434,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim ContadorFaltas As Integer = 0
|
Dim ContadorFaltas As Integer = 0
|
||||||
Dim registrosPersonal As DataTable = DTChecadorRegistros.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
Dim registrosPersonal As DataTable = DTChecadorRegistros.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||||
|
|
||||||
|
Dim CveTurno As Integer = dRow("CveTurno").ToString.ToEntero
|
||||||
|
Dim DiaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {CveTurno} ").ToEntero - 1 'El -1 es por que en .net el domingo empieza 0 y en la sql en 1
|
||||||
|
Dim Codigo As String = dRow("Codigo").ToString
|
||||||
|
|
||||||
If registrosPersonal.Rows.Count > 0 Then
|
If registrosPersonal.Rows.Count > 0 Then
|
||||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & registrosPersonal(0)("CveHorario").ToString() & "")
|
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & registrosPersonal(0)("CveHorario").ToString() & "")
|
||||||
Retardos = 0
|
Retardos = 0
|
||||||
@@ -431,7 +447,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim ReRow As DataRow = Resultados.NewRow
|
Dim ReRow As DataRow = Resultados.NewRow
|
||||||
ReRow("CvePersonal") = dRow(0).ToString()
|
ReRow("CvePersonal") = dRow(0).ToString()
|
||||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
ReRow("Codigo") = Codigo
|
||||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||||
@@ -458,7 +474,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||||
Dim Asistencia As Boolean = True
|
Dim Asistencia As Boolean = True
|
||||||
|
|
||||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal, DiaDescanso)
|
||||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||||
|
|
||||||
Dim HorarioEntrada As TimeSpan = TimeSpan.Parse(Horario(0)(1).ToString())
|
Dim HorarioEntrada As TimeSpan = TimeSpan.Parse(Horario(0)(1).ToString())
|
||||||
@@ -615,7 +631,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
ReRow("CvePersonal") = dRow(0).ToString()
|
ReRow("CvePersonal") = dRow(0).ToString()
|
||||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
ReRow("Codigo") = Codigo
|
||||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||||
|
|
||||||
@@ -651,7 +667,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal, DiaDescanso)
|
||||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||||
|
|
||||||
If Not DiaLaboral Then
|
If Not DiaLaboral Then
|
||||||
@@ -705,6 +721,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim ContadorFaltas As Integer = 0
|
Dim ContadorFaltas As Integer = 0
|
||||||
Dim registrosPersonal As DataTable = DTAsistenciasInasistenciasReg.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
Dim registrosPersonal As DataTable = DTAsistenciasInasistenciasReg.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||||
|
|
||||||
|
|
||||||
|
Dim Codigo As String = dRow("Codigo").ToString
|
||||||
If registrosPersonal.Rows.Count > 0 Then
|
If registrosPersonal.Rows.Count > 0 Then
|
||||||
|
|
||||||
For x As Integer = 1 To (DiasPeriodo)
|
For x As Integer = 1 To (DiasPeriodo)
|
||||||
@@ -712,7 +730,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim ReRow As DataRow = Resultados.NewRow
|
Dim ReRow As DataRow = Resultados.NewRow
|
||||||
ReRow("CvePersonal") = dRow(0).ToString()
|
ReRow("CvePersonal") = dRow(0).ToString()
|
||||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
ReRow("Codigo") = Codigo
|
||||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||||
|
|
||||||
@@ -765,7 +783,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
ReRow("Codigo") = Codigo
|
||||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||||
ReRow("PorcentajePago") = "0"
|
ReRow("PorcentajePago") = "0"
|
||||||
ReRow("Asistio") = "False"
|
ReRow("Asistio") = "False"
|
||||||
@@ -802,8 +820,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
DtResultados = Resultados
|
DtResultados = Resultados
|
||||||
|
|
||||||
dt.Columns.Add("CvePersonal")
|
dt.Columns.Add("CvePersonal")
|
||||||
|
dt.Columns.Add("Codigo")
|
||||||
dt.Columns.Add("NombreCompleto")
|
dt.Columns.Add("NombreCompleto")
|
||||||
'dt.Columns.Add("Codigo")
|
|
||||||
dt.Columns.Add("Fecha1")
|
dt.Columns.Add("Fecha1")
|
||||||
dt.Columns.Add("Fecha2")
|
dt.Columns.Add("Fecha2")
|
||||||
dt.Columns.Add("Fecha3")
|
dt.Columns.Add("Fecha3")
|
||||||
@@ -836,6 +854,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
dt.Columns.Add("Fecha30")
|
dt.Columns.Add("Fecha30")
|
||||||
dt.Columns.Add("Fecha31")
|
dt.Columns.Add("Fecha31")
|
||||||
|
|
||||||
|
|
||||||
Dim DTFechas As DataTable
|
Dim DTFechas As DataTable
|
||||||
Dim DTUPersonal As DataTable
|
Dim DTUPersonal As DataTable
|
||||||
|
|
||||||
@@ -845,7 +864,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||||
|
|
||||||
For x As Integer = 3 To dt.Columns.Count
|
For x As Integer = 3 To dt.Columns.Count-1
|
||||||
GVRegDatos.Columns(x).HeaderText = ""
|
GVRegDatos.Columns(x).HeaderText = ""
|
||||||
GVRegDatos.Columns(x).Visible = False
|
GVRegDatos.Columns(x).Visible = False
|
||||||
Next
|
Next
|
||||||
@@ -866,9 +885,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
Dim RRow As DataRow = dt.NewRow
|
Dim RRow As DataRow = dt.NewRow
|
||||||
RRow("CvePersonal") = pRow("CvePersonal")
|
RRow("CvePersonal") = pRow("CvePersonal")
|
||||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||||
'RRow("Codigo") = pRow("Codigo")
|
RRow("Codigo") = pRow("Codigo")
|
||||||
|
|
||||||
ColumN = 2
|
ColumN = 3
|
||||||
|
|
||||||
Dim ResumenDia As New DataTable
|
Dim ResumenDia As New DataTable
|
||||||
Dim DTTempAsistencias As New DataTable
|
Dim DTTempAsistencias As New DataTable
|
||||||
@@ -970,170 +989,231 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ReprocesarTabla()
|
Private Sub ReprocesarTabla()
|
||||||
Dim dt As New DataTable
|
|
||||||
Dim DtPersonal As New DataTable
|
|
||||||
Dim DTAsistenciasInasistencias As New DataTable
|
|
||||||
|
|
||||||
|
|
||||||
Dim objRH As New ClsRH
|
|
||||||
|
|
||||||
|
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
Dim dt As New DataTable
|
||||||
DTAsistenciasInasistencias = objRH.DtResultados
|
Dim DtPersonal As New DataTable
|
||||||
End If
|
Dim DTAsistenciasInasistencias As New DataTable
|
||||||
|
|
||||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}"))
|
Dim objRH As New ClsRH
|
||||||
dt.Columns.Add("CvePersonal")
|
|
||||||
dt.Columns.Add("NombreCompleto")
|
|
||||||
'dt.Columns.Add("Codigo")
|
|
||||||
dt.Columns.Add("Fecha1")
|
|
||||||
dt.Columns.Add("Fecha2")
|
|
||||||
dt.Columns.Add("Fecha3")
|
|
||||||
dt.Columns.Add("Fecha4")
|
|
||||||
dt.Columns.Add("Fecha5")
|
|
||||||
dt.Columns.Add("Fecha6")
|
|
||||||
dt.Columns.Add("Fecha7")
|
|
||||||
dt.Columns.Add("Fecha8")
|
|
||||||
dt.Columns.Add("Fecha9")
|
|
||||||
dt.Columns.Add("Fecha10")
|
|
||||||
dt.Columns.Add("Fecha11")
|
|
||||||
dt.Columns.Add("Fecha12")
|
|
||||||
dt.Columns.Add("Fecha13")
|
|
||||||
dt.Columns.Add("Fecha14")
|
|
||||||
dt.Columns.Add("Fecha15")
|
|
||||||
dt.Columns.Add("Fecha16")
|
|
||||||
dt.Columns.Add("Fecha17")
|
|
||||||
dt.Columns.Add("Fecha18")
|
|
||||||
dt.Columns.Add("Fecha19")
|
|
||||||
dt.Columns.Add("Fecha20")
|
|
||||||
dt.Columns.Add("Fecha21")
|
|
||||||
dt.Columns.Add("Fecha22")
|
|
||||||
dt.Columns.Add("Fecha23")
|
|
||||||
dt.Columns.Add("Fecha24")
|
|
||||||
dt.Columns.Add("Fecha25")
|
|
||||||
dt.Columns.Add("Fecha26")
|
|
||||||
dt.Columns.Add("Fecha27")
|
|
||||||
dt.Columns.Add("Fecha28")
|
|
||||||
dt.Columns.Add("Fecha29")
|
|
||||||
dt.Columns.Add("Fecha30")
|
|
||||||
dt.Columns.Add("Fecha31")
|
|
||||||
|
|
||||||
Dim DTFechas As DataTable
|
If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||||
Dim DTUPersonal As DataTable
|
DTAsistenciasInasistencias = objRH.DtResultados
|
||||||
Dim DTVFechas As New DataView(DtResultados)
|
End If
|
||||||
DTFechas = DTVFechas.ToTable(True, "Fecha")
|
|
||||||
DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
|
||||||
|
|
||||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
Dim DtTempPeriodo As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
||||||
|
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||||
|
|
||||||
For x As Integer = 3 To ColumN - 1
|
Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}")).AsEnumerable()
|
||||||
GVRegDatos.Columns(x).HeaderText = ""
|
Let Inicio = fila.Field(Of Date)("FechaInicio")
|
||||||
GVRegDatos.Columns(x).Visible = False
|
Let FechaFinOriginal = fila.Field(Of Date?)("FechaFin")
|
||||||
Next
|
Let FechaFin = If(FechaFinOriginal.HasValue, FechaFinOriginal.Value, Now)
|
||||||
|
Where Inicio <= FechaInicioPeriodoFiltro AndAlso FechaInicioPeriodoFiltro <= FechaFin
|
||||||
|
Select fila
|
||||||
|
|
||||||
ColumN = 3
|
'DtPersonal = FilasFiltradas.CopyToDataTable()
|
||||||
For Each drow As DataRow In DTFechas.Rows
|
|
||||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
|
||||||
GVRegDatos.Columns(ColumN).Visible = True
|
|
||||||
ColumN = ColumN + 1
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each pRow As DataRow In DtPersonal.Rows
|
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}"))
|
||||||
|
|
||||||
Dim RRow As DataRow = dt.NewRow
|
dt.Columns.Add("CvePersonal")
|
||||||
RRow("CvePersonal") = pRow("CvePersonal")
|
dt.Columns.Add("NombreCompleto")
|
||||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
'dt.Columns.Add("Codigo")
|
||||||
'RRow("Codigo") = pRow("Codigo")
|
dt.Columns.Add("Fecha1")
|
||||||
|
dt.Columns.Add("Fecha2")
|
||||||
|
dt.Columns.Add("Fecha3")
|
||||||
|
dt.Columns.Add("Fecha4")
|
||||||
|
dt.Columns.Add("Fecha5")
|
||||||
|
dt.Columns.Add("Fecha6")
|
||||||
|
dt.Columns.Add("Fecha7")
|
||||||
|
dt.Columns.Add("Fecha8")
|
||||||
|
dt.Columns.Add("Fecha9")
|
||||||
|
dt.Columns.Add("Fecha10")
|
||||||
|
dt.Columns.Add("Fecha11")
|
||||||
|
dt.Columns.Add("Fecha12")
|
||||||
|
dt.Columns.Add("Fecha13")
|
||||||
|
dt.Columns.Add("Fecha14")
|
||||||
|
dt.Columns.Add("Fecha15")
|
||||||
|
dt.Columns.Add("Fecha16")
|
||||||
|
dt.Columns.Add("Fecha17")
|
||||||
|
dt.Columns.Add("Fecha18")
|
||||||
|
dt.Columns.Add("Fecha19")
|
||||||
|
dt.Columns.Add("Fecha20")
|
||||||
|
dt.Columns.Add("Fecha21")
|
||||||
|
dt.Columns.Add("Fecha22")
|
||||||
|
dt.Columns.Add("Fecha23")
|
||||||
|
dt.Columns.Add("Fecha24")
|
||||||
|
dt.Columns.Add("Fecha25")
|
||||||
|
dt.Columns.Add("Fecha26")
|
||||||
|
dt.Columns.Add("Fecha27")
|
||||||
|
dt.Columns.Add("Fecha28")
|
||||||
|
dt.Columns.Add("Fecha29")
|
||||||
|
dt.Columns.Add("Fecha30")
|
||||||
|
dt.Columns.Add("Fecha31")
|
||||||
|
|
||||||
ColumN = 2
|
Dim DTFechas As DataTable
|
||||||
|
Dim DTUPersonal As DataTable
|
||||||
|
Dim DTVFechas As New DataView(DtResultados)
|
||||||
|
DTFechas = DTVFechas.ToTable(True, "Fecha")
|
||||||
|
DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
||||||
|
|
||||||
|
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||||
|
|
||||||
|
For x As Integer = 3 To ColumN - 1
|
||||||
|
GVRegDatos.Columns(x).HeaderText = ""
|
||||||
|
GVRegDatos.Columns(x).Visible = False
|
||||||
|
Next
|
||||||
|
|
||||||
|
ColumN = 3
|
||||||
For Each drow As DataRow In DTFechas.Rows
|
For Each drow As DataRow In DTFechas.Rows
|
||||||
|
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
||||||
|
GVRegDatos.Columns(ColumN).Visible = True
|
||||||
|
ColumN = ColumN + 1
|
||||||
|
Next
|
||||||
|
|
||||||
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
For Each pRow As DataRow In DtPersonal.Rows
|
||||||
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
|
||||||
|
|
||||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
Dim RRow As DataRow = dt.NewRow
|
||||||
Dim TipoCorto As String = ""
|
RRow("CvePersonal") = pRow("CvePersonal")
|
||||||
|
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||||
|
'RRow("Codigo") = pRow("Codigo")
|
||||||
|
|
||||||
If DTTempAsistencias.Rows.Count > 1 Then
|
ColumN = 2
|
||||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
For Each drow As DataRow In DTFechas.Rows
|
||||||
End If
|
|
||||||
|
|
||||||
If TipoCorto <> "" Then
|
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||||
|
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||||
|
|
||||||
If TipoCorto = "F" Then
|
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||||
RRow(ColumN) = "F" & "|" & filtro
|
Dim TipoCorto As String = ""
|
||||||
|
|
||||||
|
If DTTempAsistencias.Rows.Count > 1 Then
|
||||||
|
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoCorto = "R" Then
|
If TipoCorto <> "" Then
|
||||||
RRow(ColumN) = "R" & "|" & filtro
|
|
||||||
Else
|
If TipoCorto = "F" Then
|
||||||
If TipoCorto = "A" Then
|
RRow(ColumN) = "F" & "|" & filtro
|
||||||
RRow(ColumN) = "A" & "|" & filtro
|
End If
|
||||||
|
|
||||||
|
If TipoCorto = "R" Then
|
||||||
|
RRow(ColumN) = "R" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If TipoCorto = "D" Then
|
If TipoCorto = "A" Then
|
||||||
RRow(ColumN) = "D" & "|" & filtro
|
RRow(ColumN) = "A" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
|
If TipoCorto = "D" Then
|
||||||
If TipoCorto = "V" Then
|
RRow(ColumN) = "D" & "|" & filtro
|
||||||
RRow(ColumN) = "V" & "|" & filtro
|
|
||||||
Else
|
Else
|
||||||
If TipoCorto = "I" Then
|
|
||||||
RRow(ColumN) = "I" & "|" & filtro
|
|
||||||
Else
|
|
||||||
If TipoCorto = "S" Then
|
|
||||||
RRow(ColumN) = "S" & "|" & filtro
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
If TipoCorto = "V" Then
|
||||||
|
RRow(ColumN) = "V" & "|" & filtro
|
||||||
|
Else
|
||||||
|
If TipoCorto = "I" Then
|
||||||
|
RRow(ColumN) = "I" & "|" & filtro
|
||||||
|
Else
|
||||||
|
If TipoCorto = "S" Then
|
||||||
|
RRow(ColumN) = "S" & "|" & filtro
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
RRow(ColumN) = "-"
|
RRow(ColumN) = "-"
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
||||||
|
|
||||||
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||||
RRow(ColumN) = "A|" & filtro
|
RRow(ColumN) = "A|" & filtro
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||||
RRow(ColumN) = "V" & "|" & filtro
|
RRow(ColumN) = "V" & "|" & filtro
|
||||||
Else
|
|
||||||
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
|
||||||
RRow(ColumN) = "F" & "|" & filtro
|
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||||
RRow(ColumN) = "R" & "|" & filtro
|
RRow(ColumN) = "F" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||||
RRow(ColumN) = "FR" & "|" & filtro
|
RRow(ColumN) = "R" & "|" & filtro
|
||||||
lblModalMensaje.Text = "Falta por retardo"
|
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||||
RRow(ColumN) = "D" & "|" & filtro
|
RRow(ColumN) = "FR" & "|" & filtro
|
||||||
|
lblModalMensaje.Text = "Falta por retardo"
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||||
RRow(ColumN) = "IN" & "|" & filtro
|
RRow(ColumN) = "D" & "|" & filtro
|
||||||
|
Else
|
||||||
|
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||||
|
RRow(ColumN) = "IN" & "|" & filtro
|
||||||
|
|
||||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||||
RRow(ColumN) = "IND" & "|" & filtro
|
RRow(ColumN) = "IND" & "|" & filtro
|
||||||
|
Else
|
||||||
|
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||||
|
RRow(ColumN) = "S" & "|" & filtro
|
||||||
|
|
||||||
|
Else
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||||
|
RRow(ColumN) = "M" & "|" & filtro
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||||
|
RRow(ColumN) = "A" & "|" & filtro
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||||
|
RRow(ColumN) = "V" & "|" & filtro
|
||||||
|
Else
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||||
|
RRow(ColumN) = "F" & "|" & filtro
|
||||||
|
Else
|
||||||
|
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||||
|
RRow(ColumN) = "R" & "|" & filtro
|
||||||
|
Else
|
||||||
|
If TipoCorto = "FR" Then
|
||||||
|
RRow(ColumN) = "FR" & "|" & filtro
|
||||||
|
lblModalMensaje.Text = "Falta por retardo"
|
||||||
|
Else
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
||||||
|
RRow(ColumN) = "D" & "|" & filtro
|
||||||
|
|
||||||
|
End If
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
||||||
|
RRow(ColumN) = "I" & "|" & filtro
|
||||||
|
Else
|
||||||
|
If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
||||||
|
RRow(ColumN) = "C" & "|" & filtro
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||||
RRow(ColumN) = "S" & "|" & filtro
|
RRow(ColumN) = "S" & "|" & filtro
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||||
RRow(ColumN) = "M" & "|" & filtro
|
RRow(ColumN) = "M" & "|" & filtro
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1141,62 +1221,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
|
||||||
RRow(ColumN) = "A" & "|" & filtro
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
|
||||||
RRow(ColumN) = "V" & "|" & filtro
|
|
||||||
Else
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
|
||||||
RRow(ColumN) = "F" & "|" & filtro
|
|
||||||
Else
|
|
||||||
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
|
||||||
RRow(ColumN) = "R" & "|" & filtro
|
|
||||||
Else
|
|
||||||
If TipoCorto = "FR" Then
|
|
||||||
RRow(ColumN) = "FR" & "|" & filtro
|
|
||||||
lblModalMensaje.Text = "Falta por retardo"
|
|
||||||
Else
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
|
||||||
RRow(ColumN) = "D" & "|" & filtro
|
|
||||||
|
|
||||||
End If
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
|
||||||
RRow(ColumN) = "I" & "|" & filtro
|
|
||||||
Else
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
|
||||||
RRow(ColumN) = "C" & "|" & filtro
|
|
||||||
Else
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
|
||||||
RRow(ColumN) = "S" & "|" & filtro
|
|
||||||
Else
|
|
||||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
|
||||||
RRow(ColumN) = "M" & "|" & filtro
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
ColumN = ColumN + 1
|
||||||
End If
|
Next
|
||||||
ColumN = ColumN + 1
|
dt.Rows.Add(RRow)
|
||||||
Next
|
Next
|
||||||
dt.Rows.Add(RRow)
|
Dim stopp As Integer = 0
|
||||||
Next
|
DtDatosTabla = dt
|
||||||
Dim stopp As Integer = 0
|
|
||||||
DtDatosTabla = dt
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function HorarioDiario(Fecha As Date, DTHorarioPersonal As DataTable) As DataTable
|
Private Function HorarioDiario(Fecha As Date, DTHorarioPersonal As DataTable, DiaDescanso As Integer) As DataTable
|
||||||
Dim respuesta As New DataTable
|
Dim respuesta As New DataTable
|
||||||
respuesta.Columns.Add("TRABAJO", System.Type.GetType("System.Boolean"))
|
respuesta.Columns.Add("TRABAJO", System.Type.GetType("System.Boolean"))
|
||||||
|
|
||||||
@@ -1212,9 +1251,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||||
|
|
||||||
|
DiaDescanso = If(DiaDescanso > -1, DiaDescanso, 0)
|
||||||
|
|
||||||
Select Case diaSemana
|
Select Case diaSemana
|
||||||
Case 0
|
Case 0
|
||||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Domingo").ToString()))
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Domingo").ToString()))
|
||||||
|
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Domingo").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntrada").ToString()))
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoSalidaComida").ToString()))
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntradaComida").ToString()))
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntradaComida").ToString()))
|
||||||
@@ -1222,42 +1264,48 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 1
|
Case 1
|
||||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Lunes").ToString()))
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Lunes").ToString()))
|
||||||
|
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Lunes").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntrada").ToString()))
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesSalidaComida").ToString()))
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntradaComida").ToString()))
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("LunesSalida").ToString()))
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("LunesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 2
|
Case 2
|
||||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Martes").ToString()))
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Martes").ToString()))
|
||||||
|
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Martes").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntrada").ToString()))
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesSalidaComida").ToString()))
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntradaComida").ToString()))
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MartesSalida").ToString()))
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MartesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 3
|
Case 3
|
||||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Miercoles").ToString()))
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Miercoles").ToString()))
|
||||||
|
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Miercoles").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntrada").ToString()))
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesSalidaComida").ToString()))
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntradaComida").ToString()))
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MiercolesSalida").ToString()))
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MiercolesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 4
|
Case 4
|
||||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Jueves").ToString()))
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Jueves").ToString()))
|
||||||
|
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Jueves").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntrada").ToString()))
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesSalidaComida").ToString()))
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntradaComida").ToString()))
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("JuevesSalida").ToString()))
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("JuevesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 5
|
Case 5
|
||||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Viernes").ToString()))
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Viernes").ToString()))
|
||||||
|
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Viernes").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntrada").ToString()))
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesSalidaComida").ToString()))
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntradaComida").ToString()))
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntradaComida").ToString()))
|
||||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("ViernesSalida").ToString()))
|
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("ViernesSalida").ToString()))
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 6
|
Case 6
|
||||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "False", drp("Sabado").ToString()))
|
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Sabado").ToString()))
|
||||||
|
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "False", drp("Sabado").ToString()))
|
||||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntrada").ToString()))
|
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntrada").ToString()))
|
||||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoSalidaComida").ToString()))
|
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoSalidaComida").ToString()))
|
||||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntradaComida").ToString()))
|
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntradaComida").ToString()))
|
||||||
|
|||||||
@@ -267,6 +267,7 @@ Partial Class Sistemas_CatSesiones
|
|||||||
If ObjVentas.GetCondicionesEntrega(-1) Then Application("GlobalDTVtaCondicionesEntrega") = ObjVentas.DtResultados Else Application("GlobalDTVtaCondicionesEntrega") = Nothing
|
If ObjVentas.GetCondicionesEntrega(-1) Then Application("GlobalDTVtaCondicionesEntrega") = ObjVentas.DtResultados Else Application("GlobalDTVtaCondicionesEntrega") = Nothing
|
||||||
|
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
GlobalDTTipoVenta(-1) = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaProductosServicios()
|
Private Sub CargaProductosServicios()
|
||||||
|
|||||||
@@ -414,7 +414,7 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Recepción de Correos</span>
|
<span class="caption-subject bold uppercase">Envío de Correos</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -464,20 +464,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div runat="server" class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlProtocolo" class="form-control select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="False" DataTextField="Protocolo" DataValueField="Buzon_Tipo">
|
|
||||||
<asp:ListItem Text="-" Value="-1"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="POP3" Value="POP3"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="IMAP" Value="IMAP"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
<label for="<%= DdlProtocolo.ClientID.ToString()%>">Protocolo:</label>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-md-6 ">
|
<div class="form-group col-md-6 ">
|
||||||
<div runat="server" class="form-group form-md-line-input input-iconright">
|
<div runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:CheckBox ID="ChkSendMailSSL" Text=" " CssClass="form-control make-switchsd" runat="server" style="margin-top:15px!important" data-size="small" />
|
<asp:CheckBox ID="ChkSendMailSSL" Text=" " CssClass="form-control make-switchsd" runat="server" style="margin-top:15px!important" data-size="small" />
|
||||||
@@ -495,7 +481,7 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Envío de Correos</span>
|
<span class="caption-subject bold uppercase">Recepción de Correos</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -528,20 +514,33 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
|
||||||
|
<div class="col-md-6">
|
||||||
<div runat="server" class="form-group form-md-line-input input-iconright">
|
<div runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtBuzon_Puerto" CssClass="form-control" runat="server" MaxLength="50" ></asp:TextBox>
|
<asp:DropDownList ID="DdlProtocolo" class="form-control select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="False" DataTextField="Protocolo" DataValueField="Buzon_Tipo">
|
||||||
<ajax:FilteredTextBoxExtender ID="FTBEBuzon_Puerto" runat="server" TargetControlID="TxtBuzon_Puerto" FilterType="Numbers" />
|
<asp:ListItem Text="-" Value="-1"></asp:ListItem>
|
||||||
<label for="<%= TxtBuzon_Puerto.ClientID.ToString()%>">Puerto:</label>
|
<asp:ListItem Text="POP3" Value="POP3"></asp:ListItem>
|
||||||
<i></i>
|
<asp:ListItem Text="IMAP" Value="IMAP"></asp:ListItem>
|
||||||
</div>
|
</asp:DropDownList>
|
||||||
</div>
|
<label for="<%= DdlProtocolo.ClientID.ToString()%>">Protocolo:</label>
|
||||||
<div class="form-group col-md-6 ">
|
<i></i>
|
||||||
<div runat="server" class="form-group form-md-line-input input-iconright">
|
</div>
|
||||||
<asp:CheckBox ID="ChkBuzon_SSL" Text=" " CssClass="form-control make-switchsd" runat="server" style="margin-top:15px!important" data-size="small" />
|
</div>
|
||||||
<label for="<%= ChkSendMailSSL.ClientID.ToString()%>" style="margin-top:-13px!important" >SSL:</label>
|
<div class="col-md-3">
|
||||||
</div>
|
<div runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
</div>
|
<asp:TextBox ID="TxtBuzon_Puerto" CssClass="form-control" runat="server" MaxLength="50" ></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBEBuzon_Puerto" runat="server" TargetControlID="TxtBuzon_Puerto" FilterType="Numbers" />
|
||||||
|
<label for="<%= TxtBuzon_Puerto.ClientID.ToString()%>">Puerto:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3 ">
|
||||||
|
<div runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:CheckBox ID="ChkBuzon_SSL" Text=" " CssClass="form-control make-switchsd" runat="server" style="margin-top:15px!important" data-size="small" />
|
||||||
|
<label for="<%= ChkSendMailSSL.ClientID.ToString()%>" style="margin-top:-13px!important" >SSL:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -546,7 +546,7 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Recepción de Correos</span>
|
<span class="caption-subject bold uppercase">Envío de Correos</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -583,16 +583,7 @@
|
|||||||
<asp:TextBox ID="TxtSendMailPort" CssClass="form-control input-sm" runat="server" MaxLength="50" Width="200px" Text="587" ValidationGroup="GrpGuardar"></asp:TextBox>
|
<asp:TextBox ID="TxtSendMailPort" CssClass="form-control input-sm" runat="server" MaxLength="50" Width="200px" Text="587" ValidationGroup="GrpGuardar"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FTBESendMailPort" runat="server" TargetControlID="TxtSendMailPort" FilterType="Numbers" />
|
<ajax:FilteredTextBoxExtender ID="FTBESendMailPort" runat="server" TargetControlID="TxtSendMailPort" FilterType="Numbers" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Protocolo:</td>
|
|
||||||
<td>
|
|
||||||
<asp:DropDownList ID="DdlProtocolo" class="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="False" DataTextField="Protocolo" DataValueField="Buzon_Tipo">
|
|
||||||
<asp:ListItem Text="-" Value="-1"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="POP3" Value="POP3"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="IMAP" Value="IMAP"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>SSL:</td>
|
<td>SSL:</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -606,7 +597,7 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Envío de Correos</span>
|
<span class="caption-subject bold uppercase">Recepción de Correos</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -632,6 +623,15 @@
|
|||||||
<asp:TextBox ID="TxtBuzon_Server" CssClass="form-control input-sm" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
<asp:TextBox ID="TxtBuzon_Server" CssClass="form-control input-sm" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Protocolo:</td>
|
||||||
|
<td>
|
||||||
|
<asp:DropDownList ID="DdlProtocolo" class="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="False" DataTextField="Protocolo" DataValueField="Buzon_Tipo">
|
||||||
|
<asp:ListItem Text="-" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="POP3" Value="POP3"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="IMAP" Value="IMAP"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Puerto:</td>
|
<td>Puerto:</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -277,6 +277,7 @@ Partial Class Sistemas_Empresa
|
|||||||
TxtMailSoporte.Text = .Soporte_Mail
|
TxtMailSoporte.Text = .Soporte_Mail
|
||||||
TxtServidorSoporte.Text = .Soporte_Server
|
TxtServidorSoporte.Text = .Soporte_Server
|
||||||
TxtPuertoSoporte.Text = .Soporte_Puerto.ToString
|
TxtPuertoSoporte.Text = .Soporte_Puerto.ToString
|
||||||
|
DdlProtocolo.Text = .Buzon_Tipo
|
||||||
ChkSSLSoporte.Checked = .Soporte_SSL
|
ChkSSLSoporte.Checked = .Soporte_SSL
|
||||||
TxtUsuarioSoporte.Text = .Soporte_USR
|
TxtUsuarioSoporte.Text = .Soporte_USR
|
||||||
DdlProtocoloSoporte.SelectedValue = .Soporte_Tipo
|
DdlProtocoloSoporte.SelectedValue = .Soporte_Tipo
|
||||||
@@ -311,7 +312,7 @@ Partial Class Sistemas_Empresa
|
|||||||
|
|
||||||
'NUEVOS
|
'NUEVOS
|
||||||
TxtAreaGeografica.Text = .AreaGeografica
|
TxtAreaGeografica.Text = .AreaGeografica
|
||||||
DdlProtocolo.Text = .Buzon_Tipo
|
|
||||||
|
|
||||||
'Fiel
|
'Fiel
|
||||||
LblPfx.Text = .FielPFX
|
LblPfx.Text = .FielPFX
|
||||||
|
|||||||
@@ -2,10 +2,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports ADSNetLibrary.Helpers
|
|
||||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Extensiones.ModExtensiones
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class RepContratoDetalle
|
Partial Class RepContratoDetalle
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ Partial Class ListadoContratos
|
|||||||
Else
|
Else
|
||||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
ObjContratos.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
LblModalidad.Visible = True
|
LblModalidad.Visible = True
|
||||||
DivModalidad.Visible = True
|
DivModalidad.Visible = True
|
||||||
End If
|
End If
|
||||||
If UsuarioActual.CveEmpresa = 189 Then
|
If UsuarioActual.CveEmpresa.Contiene(189, 190, 192) Then
|
||||||
LblModalidad.Visible = True
|
LblModalidad.Visible = True
|
||||||
DivModalidad.Visible = True
|
DivModalidad.Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -425,7 +425,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
.Precio = row.FCTextBox("TxtPrecio").Text.ToDecimal()
|
.Precio = row.FCTextBox("TxtPrecio").Text.ToDecimal()
|
||||||
}).QueryToDataTable(True)
|
}).QueryToDataTable(True)
|
||||||
If DtExcel.Rows.Count < 1 Then
|
If DtExcel.Rows.Count < 1 Then
|
||||||
Alert("No hay resutados en la busqueda.", TipoMensaje.MsgAdvertencia)
|
Alert("No hay resultados en la busqueda.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,16 @@
|
|||||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CvePrecioLista, PrecioLista, Estatus,Predeterminada" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CvePrecioLista, PrecioLista, Estatus,Predeterminada" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="PrecioLista" ItemStyle-Width="50%" HeaderText="Precio de lista" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="PrecioLista" ItemStyle-Width="50%" HeaderText="Precio de lista" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField HeaderText="Predeterminada" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Predeterminada" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblPred" runat="server" Text='<%#If(Eval("Predeterminada").ToString = "True", "Si", "") %>'></asp:Label>
|
<asp:Label ID="LblPred" runat="server" Text='<%#If(Eval("Predeterminada").ToString = "True", "Si", "") %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Crédito" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LblCred" runat="server" Text='<%#If(Eval("Credito").ToString = "True", "Si", "") %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="center" />
|
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="center" />
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -7378,50 +7378,56 @@ Partial Class PV
|
|||||||
Dim strDate As Date = ($"20{TxtEtiqueta.Text.Substring(2, 2)}/{TxtEtiqueta.Text.Substring(0, 2)}/01").ToDate
|
Dim strDate As Date = ($"20{TxtEtiqueta.Text.Substring(2, 2)}/{TxtEtiqueta.Text.Substring(0, 2)}/01").ToDate
|
||||||
Dim drg As DataRow = dtt.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
|
Dim drg As DataRow = dtt.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
|
||||||
If drg IsNot Nothing Then
|
If drg IsNot Nothing Then
|
||||||
|
Dim PorcentajeAjuste As Decimal = drg("Valor").ToString.ToDecimal
|
||||||
TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString
|
TxtPorcentajeAjuste.Text = (PorcentajeAjuste / 100).ToString
|
||||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
|
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
|
||||||
ImportePagarCliente = TxtImporteAjuste.Text.ToDecimal
|
ImportePagarCliente = TxtImporteAjuste.Text.ToDecimal
|
||||||
|
|
||||||
|
''ajustar un centavo
|
||||||
|
If PorcentajeAjuste = 0 Then 'PONE UN PAGO DE UN CENTAVO, PARA EL TIMBRADO
|
||||||
|
' TxtImporteAjuste.Text = (TxtImporteAjuste.Text.ToDecimal - 0.01D).FormatoNumero
|
||||||
|
TxtImporteAjuste.Text = "0.01"
|
||||||
|
End If
|
||||||
|
|
||||||
Dim CargoVendido As Decimal = 0
|
Dim CargoVendido As Decimal = 0
|
||||||
Dim CargoGarantia As Decimal = 0
|
Dim CargoGarantia As Decimal = 0
|
||||||
Dim CveTamaño As Integer = 0
|
Dim CveTamaño As Integer = 0
|
||||||
|
|
||||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("")
|
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
If Dr IsNot Nothing Then
|
If Dr IsNot Nothing Then
|
||||||
CargoGarantia = Dr("Cargo").ToString.ToDecimal
|
CargoGarantia = Dr("Cargo").ToString.ToDecimal
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If DdlPS.SelectedValue.ToEntero > 0 Then
|
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||||
Dim Dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
Dim Dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
If Dr IsNot Nothing Then
|
If Dr IsNot Nothing Then
|
||||||
CveTamaño = Dr("CveTamaño").ToString.ToEntero
|
CveTamaño = Dr("CveTamaño").ToString.ToEntero
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}")
|
Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}")
|
||||||
If DrCargo IsNot Nothing Then
|
If DrCargo IsNot Nothing Then
|
||||||
|
|
||||||
CargoVendido = DrCargo("Cargo").ToString.ToDecimal
|
CargoVendido = DrCargo("Cargo").ToString.ToDecimal
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'el ajuste no puede ser mayor al precio de lo vendido de nuevo
|
'el ajuste no puede ser mayor al precio de lo vendido de nuevo
|
||||||
If (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))) < 0 Then
|
If (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))) < 0 Then
|
||||||
|
|
||||||
TxtImporteAjuste.Text = "0.00"
|
TxtImporteAjuste.Text = "0.00"
|
||||||
CargoGarantia = CargoVendido
|
CargoGarantia = CargoVendido
|
||||||
ImportePagarCliente = 0
|
ImportePagarCliente = 0
|
||||||
End If
|
End If
|
||||||
ImportePagarCliente = (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))).ToDecimal
|
ImportePagarCliente = (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))).ToDecimal
|
||||||
|
|
||||||
TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}."
|
TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}."
|
||||||
TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
|
TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
|
||||||
'TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero
|
'TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero
|
||||||
Else
|
Else
|
||||||
Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia)
|
Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia)
|
||||||
'cuando no está registrada, no da ajuste
|
'cuando no está registrada, no da ajuste
|
||||||
TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo"
|
TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo"
|
||||||
TxtImporteAjuste.Text = "0.00"
|
TxtImporteAjuste.Text = "0.00"
|
||||||
|
|||||||
@@ -292,9 +292,9 @@
|
|||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||||
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
|
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
|
||||||
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||||
DataKeyNames="CveVenta,TipoDocto,Saldo,DescripcionVenta">
|
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Atención" DataField="AtencionA" />
|
||||||
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
@@ -310,14 +310,15 @@
|
|||||||
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
|
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="note note-success">
|
<div class="note note-success">
|
||||||
<b>Nombre:
|
<div class="row">
|
||||||
</b>
|
<div class="col-md-1"><b>Nombre:</b></div>
|
||||||
<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>
|
<div class="col-md-3"> <label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label> </div>
|
||||||
|
|
||||||
|
|
||||||
<b>
|
<div class="col-md-1"><b><asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal></b></div>
|
||||||
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal>
|
<div class="col-md-1"><b><asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox> </b></div>
|
||||||
</b>
|
<div class="col-md-3" style="text-align:right;"><asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" /></div>
|
||||||
<asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -514,15 +515,7 @@
|
|||||||
<asp:RegularExpressionValidator ID="REVCaja" runat="server" ControlToValidate="TxtDineroCaja" Display="None" ErrorMessage="El campo <b>''Dinero''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationExpression="^([1-9]{1}[\d]{0,2}(\,[\d]{3})*(\.[\d]{0,4})?|[1-9]{1}[\d]{0,}(\.[\d]{0,4})?|0(\.[\d]{0,2})?|(\.[\d]{1,4})?)$" ValidationGroup="GprIniciarTruno"></asp:RegularExpressionValidator>
|
<asp:RegularExpressionValidator ID="REVCaja" runat="server" ControlToValidate="TxtDineroCaja" Display="None" ErrorMessage="El campo <b>''Dinero''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationExpression="^([1-9]{1}[\d]{0,2}(\,[\d]{3})*(\.[\d]{0,4})?|[1-9]{1}[\d]{0,}(\.[\d]{0,4})?|0(\.[\d]{0,2})?|(\.[\d]{1,4})?)$" ValidationGroup="GprIniciarTruno"></asp:RegularExpressionValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="REVCaja" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="REVCaja" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td colspan="1">
|
|
||||||
<asp:Label runat="server" Text="Descripción:" Font-Bold="true" Width="120px" />
|
|
||||||
</td>
|
|
||||||
<td colspan="1">
|
|
||||||
<asp:TextBox runat="server" ID="TxtDescripcionCaja" TextMode="MultiLine" Width="100%" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="1"> </td>
|
<td colspan="1"> </td>
|
||||||
<td colspan="1"> </td>
|
<td colspan="1"> </td>
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||||
CveCorte = ObjPVenta.CveCorte
|
CveCorte = ObjPVenta.CveCorte
|
||||||
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5)
|
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5)
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then
|
If FechaICorte < NowADS().Date Then
|
||||||
DebeCerrarCorte = True
|
DebeCerrarCorte = True
|
||||||
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||||
Else
|
Else
|
||||||
@@ -244,7 +244,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero
|
TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||||
HdnTotal.Value = GvRow.DataKey("Saldo")
|
HdnTotal.Value = GvRow.DataKey("Saldo")
|
||||||
TxtImporteEfectivo.Focus()
|
TxtImporteEfectivo.Focus()
|
||||||
LtlNombre.Text = GvRow.DataKey("DescripcionVenta")
|
LtlNombre.Text = GvRow.DataKey("AtencionA")
|
||||||
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
|
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -340,6 +340,10 @@ Partial Class Ventas_PVCobranza
|
|||||||
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
|
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then
|
||||||
|
MsgError = "Error al aplicar el corte"
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
MsgError = "Error al registrar prepólizas"
|
MsgError = "Error al registrar prepólizas"
|
||||||
End If
|
End If
|
||||||
@@ -503,7 +507,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||||
Dim ObjPVenta As New ClsPuntoVenta
|
Dim ObjPVenta As New ClsPuntoVenta
|
||||||
|
|
||||||
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
|
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, "", UsuarioActual.CveEmpresa)
|
||||||
CveCorte = ObjPVenta.CveCorte
|
CveCorte = ObjPVenta.CveCorte
|
||||||
LblTurno.Text = NowADS().ToShortDateString
|
LblTurno.Text = NowADS().ToShortDateString
|
||||||
UpTurno.Visible = True
|
UpTurno.Visible = True
|
||||||
@@ -561,4 +565,15 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkLiberar_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
If ObjVentas.UpdateAsignaVentaCobranza(HdnCveVenta.Value.ToEntero, -1, -1, -1, "", Now) Then
|
||||||
|
PnlContado.Visible = False
|
||||||
|
HdnCveVenta.Value = ""
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -64,6 +64,9 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server">
|
<asp:UpdatePanel ID="UpAcciones" runat="server">
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID ="LnkGenerarEtiqueta"/>
|
||||||
|
</Triggers>
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkUnificar" runat="server" data-toggle="tooltip" data-placement="left" title="Unificar Productos" Text="<i class='material-icons'>loop</i> Unificar Producto" Visible="false"></asp:LinkButton>
|
<asp:LinkButton ID="LnkUnificar" runat="server" data-toggle="tooltip" data-placement="left" title="Unificar Productos" Text="<i class='material-icons'>loop</i> Unificar Producto" Visible="false"></asp:LinkButton>
|
||||||
@@ -74,6 +77,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LBBitacoraEcommerce" OnClick="LBBitacoraEcommerce_Click" Visible="false" runat="server"><i class="fa fa-stack-overflow"></i> Bitacora Ecommerce</asp:LinkButton>
|
<asp:LinkButton ID="LBBitacoraEcommerce" OnClick="LBBitacoraEcommerce_Click" Visible="false" runat="server"><i class="fa fa-stack-overflow"></i> Bitacora Ecommerce</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkGenerarEtiqueta" runat="server" data-toggle="tooltip" data-placement="left" title="Generar Etiqueta" Visible="false" OnClick="LnkGenerarEtiqueta_Click" Text="<i class='fa fa-qrcode'></i> Imprimir Etiqueta"></asp:LinkButton>
|
||||||
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ Imports System.Data
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports ZXing
|
Imports ZXing
|
||||||
|
|
||||||
Partial Class ProductosyServicios
|
Partial Class ProductosyServicios
|
||||||
@@ -1083,6 +1084,10 @@ Partial Class ProductosyServicios
|
|||||||
LnkUnificar.Visible = True
|
LnkUnificar.Visible = True
|
||||||
ChkPrecioLibre.Checked = ObjProductosServicios.PrecioLibre
|
ChkPrecioLibre.Checked = ObjProductosServicios.PrecioLibre
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
LnkGenerarEtiqueta.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then
|
||||||
|
|
||||||
TxtRegistroRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("RegistroRSCO").ToString
|
TxtRegistroRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("RegistroRSCO").ToString
|
||||||
@@ -2203,7 +2208,7 @@ Partial Class ProductosyServicios
|
|||||||
#Region "Codigo Barras"
|
#Region "Codigo Barras"
|
||||||
|
|
||||||
'Codigo barras/QR se retorna como una imagen bmp
|
'Codigo barras/QR se retorna como una imagen bmp
|
||||||
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String) As Byte()
|
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte()
|
||||||
|
|
||||||
Dim barcodeWriter As New BarcodeWriter
|
Dim barcodeWriter As New BarcodeWriter
|
||||||
Dim opciones As New ZXing.Common.EncodingOptions
|
Dim opciones As New ZXing.Common.EncodingOptions
|
||||||
@@ -2213,7 +2218,7 @@ Partial Class ProductosyServicios
|
|||||||
opciones.Height = Alto
|
opciones.Height = Alto
|
||||||
opciones.Width = Largo
|
opciones.Width = Largo
|
||||||
opciones.Margin = Margen
|
opciones.Margin = Margen
|
||||||
|
opciones.PureBarcode = PureBacode
|
||||||
barcodeWriter.Options = opciones
|
barcodeWriter.Options = opciones
|
||||||
|
|
||||||
Select Case Formato
|
Select Case Formato
|
||||||
@@ -3542,12 +3547,12 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
'If DdlMaterialPeligroso.SelectedValue.ToEntero > 0 And DdlEmbalaje.SelectedValue.ToEntero > 0 And DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero > 0 And CamposStringCCP.Length > 0 Then
|
'If DdlMaterialPeligroso.SelectedValue.ToEntero > 0 And DdlEmbalaje.SelectedValue.ToEntero > 0 And DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero > 0 And CamposStringCCP.Length > 0 Then
|
||||||
Dim ObjPS As New ClsProductosServicios(transaccionSQL)
|
Dim ObjPS As New ClsProductosServicios(transaccionSQL)
|
||||||
If Not ObjPS.AddUpdateProductosServiciosComplementos(CvePS, TxtPesoKg.Text.ToDecimal, DdlMaterialPeligroso.SelectedValue.ToEntero, DdlEmbalaje.SelectedValue.ToEntero, TxtDimensiones.Text, DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero,
|
If Not ObjPS.AddUpdateProductosServiciosComplementos(CvePS, TxtPesoKg.Text.ToDecimal, DdlMaterialPeligroso.SelectedValue.ToEntero, DdlEmbalaje.SelectedValue.ToEntero, TxtDimensiones.Text, DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero,
|
||||||
TxtNombreIngredienteActivo.Text.Trim, TxtNomQuimico.Text.Trim, TxtDenominacionGenerica.Text.Trim, TxtDenominacionDistintiva.Text.Trim, TxtFabricante.Text.Trim, DdlClaveFormaFarmaceutica.SelectedValue.ToEntero, DdlCondicionesEspTransporte.SelectedValue.ToEntero,
|
TxtNombreIngredienteActivo.Text.Trim, TxtNomQuimico.Text.Trim, TxtDenominacionGenerica.Text.Trim, TxtDenominacionDistintiva.Text.Trim, TxtFabricante.Text.Trim, DdlClaveFormaFarmaceutica.SelectedValue.ToEntero, DdlCondicionesEspTransporte.SelectedValue.ToEntero,
|
||||||
TxtRegistroSanitarioAutorizacion.Text.Trim, TxtPermisoImportacion.Text.Trim, TxtFolioImportacionVUCEM.Text.Trim, TxtNumCAS.Text.Trim, TxtRazonSocialEmpImportacion.Text, TxtNumRegistroPlagCOFEPRIS.Text.Trim, TxtDatosFabricante.Text.Trim,
|
TxtRegistroSanitarioAutorizacion.Text.Trim, TxtPermisoImportacion.Text.Trim, TxtFolioImportacionVUCEM.Text.Trim, TxtNumCAS.Text.Trim, TxtRazonSocialEmpImportacion.Text, TxtNumRegistroPlagCOFEPRIS.Text.Trim, TxtDatosFabricante.Text.Trim,
|
||||||
TxtDatosFormulador.Text.Trim, TxtDatosMaquilador.Text.Trim, TxtUsoAutorizado.Text, DdlTipoMateria.SelectedValue.ToEntero) Then
|
TxtDatosFormulador.Text.Trim, TxtDatosMaquilador.Text.Trim, TxtUsoAutorizado.Text, DdlTipoMateria.SelectedValue.ToEntero) Then
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
End If
|
End If
|
||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
@@ -3566,4 +3571,32 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkGenerarEtiqueta_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim CvePrecioListaPredeterminada = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = True").ToEntero()
|
||||||
|
Dim DtPrecios As DataTable = Nothing
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsProductosServicios
|
||||||
|
If ObjVentas.GetPSPrecios(CvePrecioListaPredeterminada, Me.CvePS.ToString()) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
DtPrecios = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If DtPrecios IsNot Nothing Then
|
||||||
|
|
||||||
|
DtPrecios.Columns.Add(New DataColumn("CBBase64", GetType(String)))
|
||||||
|
|
||||||
|
For Each Row As DataRow In DtPrecios.Rows
|
||||||
|
Row("CBBase64") = Convert.ToBase64String(GeneraCodigoQR(Row("CodigoBarras").ToString(), 40, 150, 0, "CODE_39", True))
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||||
|
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
||||||
|
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
||||||
|
End If
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
|
ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -788,7 +788,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString)
|
Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString)
|
||||||
If File.Exists(Archivo) Then
|
If File.Exists(Archivo) Then
|
||||||
archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf")
|
archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf")
|
||||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa.Contiene(119, 141, 152, 159, 160, 161, 162, 166) Then
|
||||||
Archivo = String.Format("{0}XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString)
|
Archivo = String.Format("{0}XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString)
|
||||||
If File.Exists(Archivo) Then
|
If File.Exists(Archivo) Then
|
||||||
archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml")
|
archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml")
|
||||||
|
|||||||
@@ -1386,7 +1386,7 @@
|
|||||||
<%--16--%>
|
<%--16--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("TotalImporte", "{0:#,##0.00##}") %>'></asp:Literal>
|
<asp:Literal ID="LtlTotal" runat="server" Text='<%# If(UsuarioActual.Empresa.Funcionalidad(109) = "1", Eval("TotalConImpuestos", "{0:#,##0.00##}"), Eval("TotalImporte", "{0:#,##0.00##}")) %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--17--%>
|
<%--17--%>
|
||||||
@@ -9840,7 +9840,7 @@
|
|||||||
console.log("evento descuento");
|
console.log("evento descuento");
|
||||||
if ($get("TxtPorPS").value != "") {
|
if ($get("TxtPorPS").value != "") {
|
||||||
let PorcentajeDescuento = parseFloat($get("TxtPorPS").value);
|
let PorcentajeDescuento = parseFloat($get("TxtPorPS").value);
|
||||||
if (PorcentajeDescuento < 0 || PorcentajeDescuento > 99) {
|
if (PorcentajeDescuento < 0 || PorcentajeDescuento > 100) {
|
||||||
alert("No se puede aplicar ese porcentaje de descuento");
|
alert("No se puede aplicar ese porcentaje de descuento");
|
||||||
$get("TxtPorPS").value = "0";
|
$get("TxtPorPS").value = "0";
|
||||||
recalcularUtilidad(0);
|
recalcularUtilidad(0);
|
||||||
|
|||||||
@@ -2695,6 +2695,7 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 Then
|
||||||
ViewState("CveCliente") = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
ViewState("CveCliente") = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||||
HdnCveCliente.Value = UsuarioActual.Empresa.Funcionalidad(714)
|
HdnCveCliente.Value = UsuarioActual.Empresa.Funcionalidad(714)
|
||||||
|
RBLPago.SelectedValue = "2"
|
||||||
CargaCliente(CveCliente)
|
CargaCliente(CveCliente)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -3435,7 +3436,7 @@ Partial Class Ventas
|
|||||||
HlAgregarExcel.Visible = True
|
HlAgregarExcel.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(109) <> "1" Then
|
||||||
' IPP 15 Julio 2017 - ERA FALSE
|
' IPP 15 Julio 2017 - ERA FALSE
|
||||||
ImgAntiPend.Visible = False
|
ImgAntiPend.Visible = False
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
@@ -3583,7 +3584,7 @@ Partial Class Ventas
|
|||||||
DivBloqueoAcceso.Visible = False
|
DivBloqueoAcceso.Visible = False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
DivBloqueoacceso.Visible = False
|
DivBloqueoAcceso.Visible = False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -3655,7 +3656,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
Usuario.Empresa = ObjEmpresa.Empresa
|
||||||
ADSSession.ADSSessionConfig.sessionUser.CveEmpresa = ObjEmpresa.Empresa.CveEmpresa
|
ADSSession.ADSSessionConfig.sessionUser.CveEmpresa = ObjEmpresa.Empresa.CveEmpresa
|
||||||
|
|
||||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, ObjEmpresa.Empresa.CveEmpresa)
|
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, ObjEmpresa.Empresa.CveEmpresa)
|
||||||
@@ -5060,6 +5061,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Select Case DbRowVenta("TipoDocto").ToString()
|
Select Case DbRowVenta("TipoDocto").ToString()
|
||||||
Case "Ing"
|
Case "Ing"
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
TxtAtencionA.Text = DbRowVenta("AtencionA").ToString()
|
||||||
|
End If
|
||||||
|
|
||||||
Trsaldo.Visible = True
|
Trsaldo.Visible = True
|
||||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||||
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||||
@@ -7163,6 +7168,12 @@ Partial Class Ventas
|
|||||||
CalculaLineasAdicionales()
|
CalculaLineasAdicionales()
|
||||||
HabilitaRemisionPublicoGeneral = 0
|
HabilitaRemisionPublicoGeneral = 0
|
||||||
HabilitarRemisionesPublicoGeneral()
|
HabilitarRemisionesPublicoGeneral()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
If Not String.IsNullOrEmpty(UsuarioActual.CveTipoDocumento) Then
|
||||||
|
DdlTipoComprobante.SelectedValueExist(UsuarioActual.CveTipoDocumento)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -7171,6 +7182,8 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||||
' Using ObjVentas As New ClsVentas
|
' Using ObjVentas As New ClsVentas
|
||||||
' If ObjVentas.GetLineasAdicionales(-1, CveCliente, -1, -1, DdlMoneda.SelectedValue.ToEntero(), MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa) Then
|
' If ObjVentas.GetLineasAdicionales(-1, CveCliente, -1, -1, DdlMoneda.SelectedValue.ToEntero(), MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -8822,6 +8835,7 @@ Partial Class Ventas
|
|||||||
TmpDT.Rows(e.RowIndex)("Descuento") = ObjDescuento.ImporteDescuento
|
TmpDT.Rows(e.RowIndex)("Descuento") = ObjDescuento.ImporteDescuento
|
||||||
TmpDT.Rows(e.RowIndex)("Total") = (Cantidad * PU)
|
TmpDT.Rows(e.RowIndex)("Total") = (Cantidad * PU)
|
||||||
TmpDT.Rows(e.RowIndex)("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
TmpDT.Rows(e.RowIndex)("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
TmpDT.Rows(e.RowIndex)("ImporteIVA") = (TmpDT.Rows(e.RowIndex)("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
|
TmpDT.Rows(e.RowIndex)("ImporteIVA") = (TmpDT.Rows(e.RowIndex)("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
|
||||||
TmpDT.Rows(e.RowIndex)("ImporteIEPS") = (TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
TmpDT.Rows(e.RowIndex)("ImporteIEPS") = (TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
TmpDT.Rows(e.RowIndex)("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
TmpDT.Rows(e.RowIndex)("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
@@ -8831,6 +8845,8 @@ Partial Class Ventas
|
|||||||
TmpDT.Rows(e.RowIndex)("PorcentajeRetISR") = ClienteRetISR
|
TmpDT.Rows(e.RowIndex)("PorcentajeRetISR") = ClienteRetISR
|
||||||
TmpDT.Rows(e.RowIndex)("CuentaPredial") = CuentaPredial
|
TmpDT.Rows(e.RowIndex)("CuentaPredial") = CuentaPredial
|
||||||
|
|
||||||
|
TmpDT.Rows(e.RowIndex)("TotalConImpuestos") = (TmpDT.Rows(e.RowIndex)("Total").ToString().ToDecimal() - TmpDT.Rows(e.RowIndex)("Descuento").ToString().ToDecimal() + TmpDT.Rows(e.RowIndex)("ImporteIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
|
||||||
Dim NumTurnos As Decimal = 0
|
Dim NumTurnos As Decimal = 0
|
||||||
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
|
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
|
||||||
NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal()
|
NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal()
|
||||||
@@ -12942,6 +12958,13 @@ Partial Class Ventas
|
|||||||
'si el codigo objeto impuesto es 02 y no tiene desglose de impuestos por el descuento, debe asignar el valor 04 - Si objeto de impuesto y no causa impuesto
|
'si el codigo objeto impuesto es 02 y no tiene desglose de impuestos por el descuento, debe asignar el valor 04 - Si objeto de impuesto y no causa impuesto
|
||||||
If concepto.Impuestos.Count = 0 AndAlso concepto.ObjetoImpuesto = "02" AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(2) = 0.00D Then
|
If concepto.Impuestos.Count = 0 AndAlso concepto.ObjetoImpuesto = "02" AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(2) = 0.00D Then
|
||||||
concepto.ObjetoImpuesto = "04"
|
concepto.ObjetoImpuesto = "04"
|
||||||
|
'se ajusta a un centavo, para que se pueda emitir con un centavo.
|
||||||
|
If UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
concepto.ObjetoImpuesto = "02"
|
||||||
|
concepto.Descuento = concepto.Descuento - 0.01D
|
||||||
|
Obj.SubTotal = Obj.SubTotal + 0.01D
|
||||||
|
Obj.Total = Obj.Total + 0.01D
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Timbre.Conceptos.Add(concepto)
|
Timbre.Conceptos.Add(concepto)
|
||||||
@@ -14949,10 +14972,17 @@ Partial Class Ventas
|
|||||||
CveVentaAplicar = CveDevolucion
|
CveVentaAplicar = CveDevolucion
|
||||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||||
End If
|
End If
|
||||||
|
'verifico que el AF, tenga valores iguales cuando esté vacío o "-1"
|
||||||
|
Dim drs As DataRow() = TmpDTDetalle.Select(" CveActivoFijo IS NULL")
|
||||||
|
For Each dr As DataRow In drs
|
||||||
|
dr("CveActivoFijo") = "-1"
|
||||||
|
Next
|
||||||
|
TmpDTDetalle.AcceptChanges()
|
||||||
|
|
||||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA", "CveActivoFijo"})
|
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA", "CveActivoFijo"})
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
|
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2} AND ISNULL(CveActivoFijo,-1) = {3}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"), If(Row2("CveActivoFijo").ToString().ToEntero() > 0, Row2("CveActivoFijo").ToString().ToEntero(), -1))).ToString().ToDecimal()) * ValorMultiplicador
|
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2} AND ISNULL(CveActivoFijo,-1) = {3}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"), If(Row2("CveActivoFijo").ToString().ToEntero() > 0, Row2("CveActivoFijo").ToString().ToEntero(), -1))).ToString().ToDecimal()) * ValorMultiplicador
|
||||||
@@ -16620,6 +16650,7 @@ Partial Class Ventas
|
|||||||
dr("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
dr("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||||
dr("PorcentajeRetIVA") = ClienteRetIVA
|
dr("PorcentajeRetIVA") = ClienteRetIVA
|
||||||
dr("PorcentajeRetISR") = ClienteRetISR
|
dr("PorcentajeRetISR") = ClienteRetISR
|
||||||
|
dr("TotalConImpuestos") = (dr("Total").ToString().ToDecimal() - dr("Descuento").ToString().ToDecimal() + dr("ImporteIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -17315,6 +17346,15 @@ Partial Class Ventas
|
|||||||
Alert("No hay una lista de precios predeterminada", TipoMensaje.MsgAdvertencia)
|
Alert("No hay una lista de precios predeterminada", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
If RBLPago.SelectedValue = "1" Then
|
||||||
|
Dim CvePrecioListaCredito = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "ISNULL(Credito,False) = True").ToEntero()
|
||||||
|
If CvePrecioListaCredito > 0 Then
|
||||||
|
CvePrecioListaPS = CvePrecioListaCredito
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If CvePrecioListaPS > 0 Then
|
If CvePrecioListaPS > 0 Then
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||||
@@ -17569,6 +17609,10 @@ Partial Class Ventas
|
|||||||
ImgAntiPend.Visible = False
|
ImgAntiPend.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||||
|
ImgAntiPend.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||||
|
|
||||||
@@ -17600,6 +17644,10 @@ Partial Class Ventas
|
|||||||
ImgAntiPend.Visible = True
|
ImgAntiPend.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||||
|
ImgAntiPend.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
MostrarOpcionesPaqueteria()
|
MostrarOpcionesPaqueteria()
|
||||||
|
|
||||||
TrAtencionA.Visible = True
|
TrAtencionA.Visible = True
|
||||||
@@ -18084,15 +18132,30 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||||
If Not UsuarioActual.TienePermisoProceso(169) Then
|
If Not UsuarioActual.TienePermisoProceso(169) AndAlso RBLTipoVenta.SelectedValue.ToEntero <> 5 Then
|
||||||
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
||||||
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") OrElse ((DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119)) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ped") And UsuarioActual.CveEmpresa.Contiene(186)))) Then
|
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") OrElse ((DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119)) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ped") And UsuarioActual.CveEmpresa.Contiene(186)))) Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
Dim BuscarEnTabla As Boolean = If(UsuarioActual.Empresa.Funcionalidad(715) = "1", True, False)
|
Dim BuscarEnTabla As Boolean = If(UsuarioActual.Empresa.Funcionalidad(715) = "1", True, False)
|
||||||
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(),
|
|
||||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1,
|
|
||||||
RestringirAlmacenes:=1, ExcluyeApartados:=-1, BuscarEnTabla:=BuscarEnTabla)
|
Dim Existencia As Decimal = 0D
|
||||||
|
''CveAlamcenFiltroDdl
|
||||||
|
|
||||||
|
If RBLTipoVenta.SelectedValue.ToEntero = 6 Then
|
||||||
|
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, CveAlamcenFiltroDdl, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=-1,
|
||||||
|
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=0, PendientePorSurtir:=1,
|
||||||
|
RestringirAlmacenes:=1, ExcluyeApartados:=-1, BuscarEnTabla:=BuscarEnTabla)
|
||||||
|
Else
|
||||||
|
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(),
|
||||||
|
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1,
|
||||||
|
RestringirAlmacenes:=1, ExcluyeApartados:=-1, BuscarEnTabla:=BuscarEnTabla)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||||
|
|
||||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||||
@@ -18886,6 +18949,8 @@ Partial Class Ventas
|
|||||||
Row("CvePromocionDetalle") = CvePromocionDetalle
|
Row("CvePromocionDetalle") = CvePromocionDetalle
|
||||||
Row("Total") = (Cantidad * PU)
|
Row("Total") = (Cantidad * PU)
|
||||||
Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||||
|
Row("TotalConImpuestos") = (Row("Total").ToString().ToDecimal() - Row("Descuento").ToString().ToDecimal() + Row("ImporteIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
|
||||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||||
|
|
||||||
@@ -19054,6 +19119,7 @@ Partial Class Ventas
|
|||||||
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
|
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
|
||||||
DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU)
|
DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU)
|
||||||
DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales)
|
DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales)
|
||||||
|
DrPoliza("TotalConImpuestos") = (DrPoliza("Total").ToString().ToDecimal() - DrPoliza("Descuento").ToString().ToDecimal() + DrPoliza("ImporteIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS")
|
DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS")
|
||||||
DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida")
|
DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida")
|
||||||
DrPoliza("CveActivoFijo") = -1
|
DrPoliza("CveActivoFijo") = -1
|
||||||
@@ -19191,6 +19257,8 @@ Partial Class Ventas
|
|||||||
'USO PARA COMERCIO EXTERIOR
|
'USO PARA COMERCIO EXTERIOR
|
||||||
TmpDT.Columns.Add("CantidadConversion", GetType(Decimal))
|
TmpDT.Columns.Add("CantidadConversion", GetType(Decimal))
|
||||||
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("TotalConImpuestos", GetType(Decimal))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CreaDTmpC()
|
Private Sub CreaDTmpC()
|
||||||
DTmpC = New DataTable
|
DTmpC = New DataTable
|
||||||
@@ -23222,6 +23290,9 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged
|
Private Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged
|
||||||
LimpiaEscondeContado()
|
LimpiaEscondeContado()
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
RecalculaPrecios()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Function ValidaPagosContado(Optional MostrarAlertas As Boolean = True, Optional TipoDoctoViejo As String = "") As Boolean
|
Private Function ValidaPagosContado(Optional MostrarAlertas As Boolean = True, Optional TipoDoctoViejo As String = "") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -23268,7 +23339,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'VALIDA PAGOS EN FACTURAS DE ING,ANT NUEVAS O FACTURACION DE REM O COTIZACIONES
|
'VALIDA PAGOS EN FACTURAS DE ING,ANT NUEVAS O FACTURACION DE REM O COTIZACIONES
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso RBLPago.SelectedValue = "2" AndAlso ((CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant")) OrElse TipoDoctoViejo.Contiene("Rem", "Cot")) Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso RBLPago.SelectedValue = "2" AndAlso ((CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant")) OrElse TipoDoctoViejo.Contiene("Rem", "Cot")) Then
|
||||||
|
Dim TotalPagadoGarantia As Decimal = 0
|
||||||
|
If TxtTotal.Text.ToDecimal = 0.01 AndAlso Me.EsGarantia = True Then
|
||||||
|
TotalPagadoGarantia = 0.01D
|
||||||
|
TienePagos = True
|
||||||
|
ViewState("SaldoVenta") = SaldoVenta - TotalPagadoGarantia
|
||||||
|
End If
|
||||||
If Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
If Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||||
If MostrarAlertas Then
|
If MostrarAlertas Then
|
||||||
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
|
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -23286,7 +23362,7 @@ Partial Class Ventas
|
|||||||
Dim TotalRNC As Decimal = If((ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) OrElse (ListaNCBonificacion IsNot Nothing AndAlso ListaNCBonificacion.Count > 0), LblDescuentosRNC.Text.Trim().ToDecimal(), 0)
|
Dim TotalRNC As Decimal = If((ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) OrElse (ListaNCBonificacion IsNot Nothing AndAlso ListaNCBonificacion.Count > 0), LblDescuentosRNC.Text.Trim().ToDecimal(), 0)
|
||||||
|
|
||||||
Dim ImporteTotal As Decimal = (TxtTotal.Text.ToDecimal).RoundSQL(2)
|
Dim ImporteTotal As Decimal = (TxtTotal.Text.ToDecimal).RoundSQL(2)
|
||||||
Dim TotalPagado As Decimal = (TotalPagoContado + TotalRNC + TotalProntoPago).RoundSQL(2)
|
Dim TotalPagado As Decimal = (TotalPagoContado + TotalRNC + TotalProntoPago + TotalPagadoGarantia).RoundSQL(2)
|
||||||
|
|
||||||
If TotalPagado <> ImporteTotal Then
|
If TotalPagado <> ImporteTotal Then
|
||||||
If MostrarAlertas Then
|
If MostrarAlertas Then
|
||||||
@@ -23308,10 +23384,7 @@ Partial Class Ventas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE SALDO PENDIENTE VALIDA SI TIENE PAGOS
|
'SI TIENE SALDO PENDIENTE VALIDA SI TIENE PAGOS
|
||||||
@@ -29701,7 +29774,7 @@ Partial Class Ventas
|
|||||||
Row("Descuento") = Math.Round(Descuento, NumeroDecimales)
|
Row("Descuento") = Math.Round(Descuento, NumeroDecimales)
|
||||||
Row("Total") = Math.Round(Total, NumeroDecimales)
|
Row("Total") = Math.Round(Total, NumeroDecimales)
|
||||||
Row("TotalImporte") = Math.Round(Total, NumeroDecimales)
|
Row("TotalImporte") = Math.Round(Total, NumeroDecimales)
|
||||||
|
Row("TotalConImpuestos") = (Row("Total").ToString().ToDecimal() - Row("Descuento").ToString().ToDecimal() + Row("ImporteIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
|
||||||
Row("Serie") = Serie
|
Row("Serie") = Serie
|
||||||
Row("TiempoEntrega") = TiempoEntrega
|
Row("TiempoEntrega") = TiempoEntrega
|
||||||
@@ -30621,7 +30694,7 @@ Partial Class Ventas
|
|||||||
divAnticipoMsg.Visible = False
|
divAnticipoMsg.Visible = False
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'NC' ", "")}")
|
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'NC' ", "")}")
|
||||||
divAmortizacionTipoRelacion.Visible = False
|
divAmortizacionTipoRelacion.Visible = False
|
||||||
GVAnticipos.DataSource = DtMovtos
|
GVAnticipos.DataSource = DtMovtos
|
||||||
@@ -34669,6 +34742,7 @@ Partial Class Ventas
|
|||||||
Row("Descuento") = Math.Round(Descuento, 2)
|
Row("Descuento") = Math.Round(Descuento, 2)
|
||||||
Row("Total") = Math.Round(Total, 2)
|
Row("Total") = Math.Round(Total, 2)
|
||||||
Row("TotalImporte") = Math.Round(Total, 2)
|
Row("TotalImporte") = Math.Round(Total, 2)
|
||||||
|
Row("TotalConImpuestos") = (Row("Total").ToString().ToDecimal() - Row("Descuento").ToString().ToDecimal() + Row("ImporteIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
|
||||||
Row("Serie") = Serie
|
Row("Serie") = Serie
|
||||||
Row("TiempoEntrega") = TiempoEntrega
|
Row("TiempoEntrega") = TiempoEntrega
|
||||||
@@ -37299,7 +37373,7 @@ Partial Class Ventas
|
|||||||
If HdnDescPS.Value.ToEntero() > 0 Then
|
If HdnDescPS.Value.ToEntero() > 0 Then
|
||||||
Dim RowUpdate As DataRow = TmpDT.Select($"Consec = {HdnConsecPS.Value}").FirstOrDefault()
|
Dim RowUpdate As DataRow = TmpDT.Select($"Consec = {HdnConsecPS.Value}").FirstOrDefault()
|
||||||
If RowUpdate IsNot Nothing Then
|
If RowUpdate IsNot Nothing Then
|
||||||
If HdnDescPS.Value.ToDecimal().RoundSQL(2) < RowUpdate("Total").ToString().ToDecimal() Then
|
If HdnDescPS.Value.ToDecimal().RoundSQL(2) <= RowUpdate("Total").ToString().ToDecimal() Then
|
||||||
RowUpdate("Descuento") = HdnDescPS.Value.ToDecimal().RoundSQL(2)
|
RowUpdate("Descuento") = HdnDescPS.Value.ToDecimal().RoundSQL(2)
|
||||||
|
|
||||||
Dim TotalCalculableImpuestos = (RowUpdate("Cantidad").ToString().ToDecimal * RowUpdate("PU").ToString().ToDecimal) - RowUpdate("Descuento").ToString().ToDecimal()
|
Dim TotalCalculableImpuestos = (RowUpdate("Cantidad").ToString().ToDecimal * RowUpdate("PU").ToString().ToDecimal) - RowUpdate("Descuento").ToString().ToDecimal()
|
||||||
@@ -37312,7 +37386,7 @@ Partial Class Ventas
|
|||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
RegistraScript("$('#ModalDescPS').modal('hide');")
|
RegistraScript("$('#ModalDescPS').modal('hide');")
|
||||||
Else
|
Else
|
||||||
Alert("El descuento no puede ser mayor o igual al total.", TipoMensaje.MsgAdvertencia)
|
Alert("El descuento no puede ser mayor al total.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -37357,11 +37431,65 @@ Partial Class Ventas
|
|||||||
DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
|
DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
|
||||||
|
|
||||||
divAmortizacionTipoRelacion.Visible = False
|
divAmortizacionTipoRelacion.Visible = False
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||||
|
If DdlTipoAmortizacionAnticipo.Items.FindByValue("1") IsNot Nothing Then
|
||||||
|
DdlTipoAmortizacionAnticipo.Items.Remove(DdlTipoAmortizacionAnticipo.Items.FindByValue("1"))
|
||||||
|
End If
|
||||||
|
If DdlTipoAmortizacionAnticipo.Items.FindByValue("2") IsNot Nothing Then
|
||||||
|
DdlTipoAmortizacionAnticipo.Items.Remove(DdlTipoAmortizacionAnticipo.Items.FindByValue("2"))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If DdlTipoAmortizacionAnticipo.Items.FindByValue("1") Is Nothing Then
|
||||||
|
DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo en descuento", "1"))
|
||||||
|
End If
|
||||||
|
If DdlTipoAmortizacionAnticipo.Items.FindByValue("2") Is Nothing Then
|
||||||
|
DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo con nota de crédito", "2"))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpAnticipos.Update()
|
UpAnticipos.Update()
|
||||||
|
|
||||||
RegistraScript("MuestraAnticipos();", "AE")
|
RegistraScript("MuestraAnticipos();", "AE")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RecalculaPrecios()
|
||||||
|
If TmpDT IsNot Nothing Then
|
||||||
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
|
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
||||||
|
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero
|
||||||
|
Dim CvePS As Integer = Row("CvePS").ToString().ToEntero
|
||||||
|
|
||||||
|
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
||||||
|
If ObjPrecioSugerido.PrecioSugerido > 0 Then
|
||||||
|
Dim PU As Decimal = ObjPrecioSugerido.PrecioSugerido.RoundSQL(6)
|
||||||
|
|
||||||
|
Dim ObjDescuento As Modelos.VentaDescuentos = CalcularDescuentos(CvePS, Cantidad, PU)
|
||||||
|
If ObjDescuento.EsPUModificado Then
|
||||||
|
PU = ObjDescuento.PU
|
||||||
|
End If
|
||||||
|
|
||||||
|
Row("PU") = PU
|
||||||
|
|
||||||
|
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento))
|
||||||
|
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||||
|
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + Row("PorcentajeIEPS").ToString().ToDecimal)
|
||||||
|
|
||||||
|
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
|
||||||
|
|
||||||
|
Row("Descuento") = (ObjDescuento.ImporteDescuento).RoundSQL(NumeroDecimales)
|
||||||
|
Row("Total") = (Cantidad * PU)
|
||||||
|
Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||||
|
Row("TotalConImpuestos") = (Row("Total").ToString().ToDecimal() - Row("Descuento").ToString().ToDecimal() + Row("ImporteIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Me.CalculaTotalesVenta()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user