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)
|
||||
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (4)")
|
||||
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()
|
||||
|
||||
End Sub
|
||||
@@ -220,9 +220,9 @@ Partial Class Acumuladores_RepRecolecciones
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim Fecha As DateTime = NowADS()
|
||||
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 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
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, HdnCantidadRecoleccion.Value.ToDecimal, CveUM, HdnPSRecoleccion.Value.ToEntero, 0) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
@@ -1776,7 +1776,7 @@ Public Class ClsContabilidad
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
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
|
||||
|
||||
Return Retorno
|
||||
@@ -1893,7 +1893,7 @@ Public Class ClsContabilidad
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
DataAdapter("PA_Gral_MarcasAdd")
|
||||
@@ -1555,6 +1555,7 @@ Public Class ClsProductosServicios
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@ActualizarFranquicias", SqlDbType.Bit).Value = ActualizarFranquicias
|
||||
End With
|
||||
|
||||
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
|
||||
|
||||
DataAdapter("PA_Gral_MarcasUpdate")
|
||||
@@ -1605,6 +1606,8 @@ Public Class ClsProductosServicios
|
||||
.Add("@Marca", SqlDbType.VarChar).Value = Marca
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@ActualizarFranquicias", SqlDbType.Bit).Value = ActualizarFranquicias
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -2303,7 +2303,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
'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
|
||||
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(),
|
||||
|
||||
@@ -2693,7 +2693,7 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
||||
For Each docp As CFDIComplementoPago In ObjCFDITimbre.ComplementoPagos20.ComplementoPagos
|
||||
|
||||
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()
|
||||
If MonDiferente > 0 Then cfdi.ContieneVariasMonedas = True 'consideración adicional Rev. B
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ Partial Class Bancos_RepCortes
|
||||
DtCortesVentas = Vent.DtResultados
|
||||
divDetalle.Visible = True
|
||||
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
|
||||
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)))
|
||||
|
||||
@@ -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="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" />
|
||||
</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 class="col-md-6 ">
|
||||
|
||||
@@ -714,6 +714,18 @@ Partial Class Compras_Compras
|
||||
ViewState("CveMetodoPago") = value
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
Return ViewState("TipoCambio").ToString.ToDecimal
|
||||
@@ -1018,6 +1030,20 @@ Partial Class Compras_Compras
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
Return ViewState("FechaCompraOriginal").ToString.ToDate
|
||||
@@ -3967,6 +3993,11 @@ Partial Class Compras_Compras
|
||||
|
||||
'------------------ 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()
|
||||
|
||||
If Not CveSubProyectoPrincipal > 0 Then
|
||||
@@ -6475,9 +6506,15 @@ Partial Class Compras_Compras
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
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
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
For Each Gvr As GridViewRow In GvFacturaNC.Rows
|
||||
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then ' recorro la seleccion y tomo el TC de cada aplicación
|
||||
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
|
||||
@@ -13650,6 +13687,7 @@ Partial Class Compras_Compras
|
||||
CargaOC()
|
||||
End Sub
|
||||
Private Sub CargaOC()
|
||||
MetodoPagoOC = -1
|
||||
Dim EntregaDirecta As Integer = 0
|
||||
DivOCSolicitudAnticipo.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)
|
||||
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)
|
||||
MetodoPagoOC = OC.DtResultados.Rows(0)("EntregaDirecta").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -13703,6 +13742,7 @@ Partial Class Compras_Compras
|
||||
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)
|
||||
EntregaDirecta += If(OC.DtResultados.Rows(0)("EntregaDirecta").ToString = "True", 1, 0)
|
||||
MetodoPagoOC = OC.DtResultados.Rows(0)("EntregaDirecta").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -13745,7 +13785,9 @@ Partial Class Compras_Compras
|
||||
Protected Sub BtnVOC_Click(sender As Object, e As EventArgs)
|
||||
VinculaOC()
|
||||
End Sub
|
||||
|
||||
Private Sub VinculaOC()
|
||||
CveIEAnticipo = -1
|
||||
If TxtOC.Text <> "" Then
|
||||
|
||||
'VARIABLES
|
||||
@@ -13792,6 +13834,7 @@ Partial Class Compras_Compras
|
||||
If ObjOC.DtResultados.Rows(0)("CveIEAnticipo").ToString.ToEntero > 0 Then
|
||||
FoliosOCAnticipo += $"{ObjOC.DtResultados.Rows(0)("FolioOC").ToString},"
|
||||
FoliosOCAnticipoIE += $"{ObjOC.DtResultados.Rows(0)("FolioIEAnticipo").ToString},"
|
||||
CveIEAnticipo = ObjOC.DtResultados.Rows(0)("CveIEAnticipo").ToString.ToEntero
|
||||
DivOCSolicitudAnticipo.Visible = True
|
||||
DivOCSolicitudAnticipoModal.Visible = True
|
||||
End If
|
||||
@@ -13883,6 +13926,9 @@ Partial Class Compras_Compras
|
||||
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"
|
||||
LtSolicitudAnticipoFoliosIE.Text = $" {FoliosOCAnticipoIE.Substring(0, FoliosOCAnticipoIE.Length - 1)}"
|
||||
|
||||
DVAtencionOCAnticipo.Visible = True
|
||||
UpDVAtencionOCAnticipo.Update()
|
||||
End If
|
||||
|
||||
'PROMOCIONES
|
||||
@@ -14430,13 +14476,39 @@ Partial Class Compras_Compras
|
||||
|
||||
'ANTICIPO OC
|
||||
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("
|
||||
setTimeout(function() {
|
||||
" & scripsSeccion & "
|
||||
}, 200)
|
||||
")
|
||||
UpAnticipos.Update()
|
||||
|
||||
End If
|
||||
|
||||
CalculaTotales()
|
||||
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
|
||||
|
||||
Private Sub VinculacionAsync(Optional VinculacionCompleta As Boolean = False)
|
||||
|
||||
@@ -10,6 +10,7 @@ Imports iText.Barcodes.Dmcode
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Modelos
|
||||
Imports Stimulsoft.Base.Context
|
||||
Imports ZXing
|
||||
|
||||
|
||||
Partial Class PopUpVerFactura
|
||||
@@ -6039,6 +6040,13 @@ Partial Class PopUpVerFactura
|
||||
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"
|
||||
@@ -6153,4 +6161,94 @@ Partial Class PopUpVerFactura
|
||||
|
||||
#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
|
||||
|
||||
@@ -153,7 +153,7 @@ Partial Class RegPoliza
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Response.Redirect("/Contabilidad2/RegPrePolizaS.aspx")
|
||||
Response.Redirect("/Contabilidad/RegPrePolizaS.aspx")
|
||||
End If
|
||||
|
||||
ViewState("Orden0") = ""
|
||||
|
||||
@@ -497,6 +497,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
Alert("El traspaso de movimientos en la cuenta tuvo un error.", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
ObjConta.Dispose()
|
||||
|
||||
@@ -180,7 +180,7 @@ Partial Class Contabilidad2_RepLibroDiario
|
||||
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
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 Region
|
||||
End Class
|
||||
|
||||
@@ -2321,7 +2321,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Importe.Value</Value>
|
||||
<Value>=IIf(Fields!Importe.Value = 0.01 ,0.00,Fields!Importe.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
@@ -4108,7 +4108,7 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Body>
|
||||
<Width>21.0638cm</Width>
|
||||
<Width>21.06381cm</Width>
|
||||
<Page>
|
||||
<PageFooter>
|
||||
<Height>0.5327cm</Height>
|
||||
|
||||
@@ -1677,7 +1677,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Importe.Value</Value>
|
||||
<Value>=IIf(Fields!Importe.Value = 0.01 ,0.00,Fields!Importe.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
|
||||
@@ -62,23 +62,42 @@ Partial Class General_CatMarcas
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
Dim CveMarca = gvRow.DataKey("CveMarca").ToEntero
|
||||
If ObjPS.RemoveMarca(CveMarca) Then
|
||||
Alert("Se borró correctamente de la base de Datos.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("La marca esta siendo utilizada por un Producto", TipoMensaje.MsgError)
|
||||
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()")
|
||||
Alert("Se borró correctamente de la base de Datos.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("La marca esta siendo utilizada por un Producto", TipoMensaje.MsgError)
|
||||
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()")
|
||||
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
|
||||
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
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
|
||||
@@ -781,7 +781,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ObjTimbres.Timbrar() Then
|
||||
If ObjTimbres.Timbrar(4) Then
|
||||
|
||||
Try
|
||||
PdfFactura(ObjTimbres.ObjFactura)
|
||||
|
||||
@@ -4398,7 +4398,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If Valido Then
|
||||
Dim CveClasificacion As Integer
|
||||
Dim CveUM As Double
|
||||
Dim CveUM As Integer
|
||||
Dim CodigoPS As String = ""
|
||||
Dim PS As String = ""
|
||||
|
||||
@@ -4415,6 +4415,14 @@ Partial Class Inventarios_EntradasSalidas
|
||||
PS = dr("PS").ToString.ToString
|
||||
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
|
||||
registro.Item("Cantidad") = Cantidad
|
||||
registro.Item("CveUM") = CveUM
|
||||
|
||||
@@ -2519,7 +2519,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (dconr != null)
|
||||
{
|
||||
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
|
||||
{
|
||||
|
||||
109
OC/OC.aspx
109
OC/OC.aspx
@@ -455,7 +455,7 @@
|
||||
<tr id="TrMetodoPago" runat="server" visible="false">
|
||||
<td><b>Método de pago:</b></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="Contado" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
|
||||
@@ -1563,6 +1563,89 @@
|
||||
|
||||
<br />
|
||||
<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="portlet light xspadding bordered">
|
||||
@@ -2912,10 +2995,34 @@
|
||||
$('#<%= 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();
|
||||
|
||||
});
|
||||
|
||||
|
||||
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) {
|
||||
$('#<%=TxtMotivoEliminacion.ClientID%>').val("");
|
||||
$('#divEliminarCotizacion').modal();
|
||||
|
||||
103
OC/OC.aspx.vb
103
OC/OC.aspx.vb
@@ -2,6 +2,7 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
@@ -2820,6 +2821,15 @@ Partial Class OC_OC
|
||||
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 Conta IsNot Nothing Then Conta.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
|
||||
If Not TieneError Then
|
||||
'If MonedaTexto <> DdlMoneda.SelectedItem.Text Then
|
||||
@@ -3258,6 +3277,9 @@ Partial Class OC_OC
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'TERMINA TODO POR SI OCURRIÓ ALGO RARO
|
||||
If TieneError Then
|
||||
If OC IsNot Nothing Then OC.RollBack()
|
||||
@@ -5379,7 +5401,12 @@ Partial Class OC_OC
|
||||
End Sub
|
||||
Private Sub EnviaCorreoSolicitudAnticipo(CveEvento As Integer)
|
||||
Dim Param As New List(Of String)
|
||||
|
||||
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("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))
|
||||
@@ -8846,4 +8873,80 @@ Partial Class OC_OC
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -3037,16 +3037,16 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
|
||||
Select Case DdlTipoVenta.SelectedValue.ToEntero
|
||||
Case 1, 2
|
||||
Case 1, 2 ' *Fuera de liena *pago directo
|
||||
Opcion = 1
|
||||
Exit Select
|
||||
Case 3 ' por el momento ya no se usa
|
||||
Opcion = 2
|
||||
Exit Select
|
||||
Case 5
|
||||
Case 5 ' consignacion uso
|
||||
Opcion = 3
|
||||
Exit Select
|
||||
Case 6
|
||||
Case 6 ' a vista uso de material
|
||||
Opcion = 4
|
||||
Exit Select
|
||||
Case Else
|
||||
|
||||
@@ -93,7 +93,7 @@ Partial Class CatSubProyectos
|
||||
End If
|
||||
BtnGuardar.OnClientClick = $"ValidaGuardar();"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404) = "20" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(404).Contiene("10", "20") Then
|
||||
DVModalPrecioLista.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<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>
|
||||
</li>
|
||||
<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>
|
||||
</li>
|
||||
<%--<li>Fecha Inicio:
|
||||
@@ -73,25 +73,24 @@
|
||||
<ajax:ValidatorCalloutExtender ID="CvcTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="CvTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>--%>
|
||||
<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>
|
||||
</li>
|
||||
<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>
|
||||
</li>
|
||||
<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>Lista Asistencia
|
||||
<asp:RadioButton ID="RdbAsistencia" runat="server" GroupName="Checador" />
|
||||
<asp:RadioButton ID="RdbAsistencia" runat="server" GroupName="Checador" TextAlign="Right" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" Enabled="false" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -106,9 +105,9 @@
|
||||
<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">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Numero" ItemStyle-HorizontalAlign="Left" >
|
||||
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Personal" ItemStyle-HorizontalAlign="Left">
|
||||
|
||||
@@ -154,7 +154,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
objNom.Dispose()
|
||||
|
||||
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.DataBind()
|
||||
@@ -327,7 +327,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Resultados.Columns.Add("CvePersonal")
|
||||
Resultados.Columns.Add("NombreCompleto")
|
||||
'Resultados.Columns.Add("Codigo")
|
||||
Resultados.Columns.Add("Codigo")
|
||||
Resultados.Columns.Add("CveSubProyecto")
|
||||
Resultados.Columns.Add("SalarioDiario")
|
||||
Resultados.Columns.Add("CveAsistenciasInasistencias")
|
||||
@@ -349,7 +349,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Resultados.Columns.Add("TipoCorto")
|
||||
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 filtroturno = If(DdlTurno.SelectedValue = "-1", "", $"AND CveTurno = { DdlTurno.SelectedValue}")
|
||||
@@ -359,7 +359,19 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } {filtroturno} "
|
||||
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
|
||||
DTHorarios = objRH.DtResultados
|
||||
@@ -422,6 +434,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ContadorFaltas As Integer = 0
|
||||
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
|
||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & registrosPersonal(0)("CveHorario").ToString() & "")
|
||||
Retardos = 0
|
||||
@@ -431,7 +447,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||
@@ -458,7 +474,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
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 HorarioEntrada As TimeSpan = TimeSpan.Parse(Horario(0)(1).ToString())
|
||||
@@ -615,7 +631,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
|
||||
@@ -651,7 +667,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
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())
|
||||
|
||||
If Not DiaLaboral Then
|
||||
@@ -705,6 +721,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ContadorFaltas As Integer = 0
|
||||
Dim registrosPersonal As DataTable = DTAsistenciasInasistenciasReg.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
|
||||
Dim Codigo As String = dRow("Codigo").ToString
|
||||
If registrosPersonal.Rows.Count > 0 Then
|
||||
|
||||
For x As Integer = 1 To (DiasPeriodo)
|
||||
@@ -712,7 +730,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
|
||||
@@ -765,7 +783,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
ReRow("PorcentajePago") = "0"
|
||||
ReRow("Asistio") = "False"
|
||||
@@ -802,8 +820,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DtResultados = Resultados
|
||||
|
||||
dt.Columns.Add("CvePersonal")
|
||||
dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("NombreCompleto")
|
||||
'dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("Fecha1")
|
||||
dt.Columns.Add("Fecha2")
|
||||
dt.Columns.Add("Fecha3")
|
||||
@@ -836,6 +854,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
dt.Columns.Add("Fecha30")
|
||||
dt.Columns.Add("Fecha31")
|
||||
|
||||
|
||||
Dim DTFechas As DataTable
|
||||
Dim DTUPersonal As DataTable
|
||||
|
||||
@@ -845,7 +864,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
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).Visible = False
|
||||
Next
|
||||
@@ -866,9 +885,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim RRow As DataRow = dt.NewRow
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
'RRow("Codigo") = pRow("Codigo")
|
||||
RRow("Codigo") = pRow("Codigo")
|
||||
|
||||
ColumN = 2
|
||||
ColumN = 3
|
||||
|
||||
Dim ResumenDia As New DataTable
|
||||
Dim DTTempAsistencias As New DataTable
|
||||
@@ -970,170 +989,231 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Sub
|
||||
|
||||
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
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
Dim dt As New DataTable
|
||||
Dim DtPersonal As New DataTable
|
||||
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}"))
|
||||
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 objRH As New ClsRH
|
||||
|
||||
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"})
|
||||
If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
|
||||
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
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
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()
|
||||
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
|
||||
|
||||
ColumN = 3
|
||||
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
|
||||
'DtPersonal = FilasFiltradas.CopyToDataTable()
|
||||
|
||||
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
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
'RRow("Codigo") = pRow("Codigo")
|
||||
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")
|
||||
|
||||
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
|
||||
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() & "' "
|
||||
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
For Each pRow As DataRow In DtPersonal.Rows
|
||||
|
||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
Dim TipoCorto As String = ""
|
||||
Dim RRow As DataRow = dt.NewRow
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
'RRow("Codigo") = pRow("Codigo")
|
||||
|
||||
If DTTempAsistencias.Rows.Count > 1 Then
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
End If
|
||||
ColumN = 2
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
|
||||
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
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
Dim TipoCorto As String = ""
|
||||
|
||||
If DTTempAsistencias.Rows.Count > 1 Then
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
End If
|
||||
|
||||
If TipoCorto = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
If TipoCorto <> "" Then
|
||||
|
||||
If TipoCorto = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
End If
|
||||
|
||||
If TipoCorto = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
If TipoCorto = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
Else
|
||||
|
||||
If TipoCorto = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
If TipoCorto = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
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
|
||||
|
||||
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
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN" & "|" & filtro
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN" & "|" & filtro
|
||||
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "IND" & "|" & filtro
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
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
|
||||
|
||||
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
|
||||
@@ -1141,62 +1221,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
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
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
dt.Rows.Add(RRow)
|
||||
Next
|
||||
dt.Rows.Add(RRow)
|
||||
Next
|
||||
Dim stopp As Integer = 0
|
||||
DtDatosTabla = dt
|
||||
Dim stopp As Integer = 0
|
||||
DtDatosTabla = dt
|
||||
|
||||
End If
|
||||
|
||||
|
||||
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
|
||||
respuesta.Columns.Add("TRABAJO", System.Type.GetType("System.Boolean"))
|
||||
|
||||
@@ -1212,9 +1251,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
|
||||
DiaDescanso = If(DiaDescanso > -1, DiaDescanso, 0)
|
||||
|
||||
Select Case diaSemana
|
||||
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(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntradaComida").ToString()))
|
||||
@@ -1222,42 +1264,48 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Exit Select
|
||||
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(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesSalidaComida").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()))
|
||||
Exit Select
|
||||
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(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesSalidaComida").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()))
|
||||
Exit Select
|
||||
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(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesSalidaComida").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()))
|
||||
Exit Select
|
||||
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(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesSalidaComida").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()))
|
||||
Exit Select
|
||||
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(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesSalidaComida").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()))
|
||||
Exit Select
|
||||
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(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoSalidaComida").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
|
||||
|
||||
ObjVentas.Dispose()
|
||||
GlobalDTTipoVenta(-1) = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProductosServicios()
|
||||
|
||||
@@ -414,7 +414,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<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 class="actions">
|
||||
<div class="btn-group">
|
||||
@@ -464,20 +464,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<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 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" />
|
||||
@@ -495,7 +481,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<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 class="actions">
|
||||
<div class="btn-group">
|
||||
@@ -528,20 +514,33 @@
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<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-6 ">
|
||||
<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>
|
||||
<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="col-md-3">
|
||||
<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>
|
||||
<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 class="row">
|
||||
|
||||
@@ -546,7 +546,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<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 class="actions">
|
||||
<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>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBESendMailPort" runat="server" TargetControlID="TxtSendMailPort" FilterType="Numbers" />
|
||||
</td>
|
||||
</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>
|
||||
@@ -606,7 +597,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<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 class="actions">
|
||||
<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>
|
||||
</td>
|
||||
</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>
|
||||
<td>Puerto:</td>
|
||||
<td>
|
||||
|
||||
@@ -277,6 +277,7 @@ Partial Class Sistemas_Empresa
|
||||
TxtMailSoporte.Text = .Soporte_Mail
|
||||
TxtServidorSoporte.Text = .Soporte_Server
|
||||
TxtPuertoSoporte.Text = .Soporte_Puerto.ToString
|
||||
DdlProtocolo.Text = .Buzon_Tipo
|
||||
ChkSSLSoporte.Checked = .Soporte_SSL
|
||||
TxtUsuarioSoporte.Text = .Soporte_USR
|
||||
DdlProtocoloSoporte.SelectedValue = .Soporte_Tipo
|
||||
@@ -311,7 +312,7 @@ Partial Class Sistemas_Empresa
|
||||
|
||||
'NUEVOS
|
||||
TxtAreaGeografica.Text = .AreaGeografica
|
||||
DdlProtocolo.Text = .Buzon_Tipo
|
||||
|
||||
|
||||
'Fiel
|
||||
LblPfx.Text = .FielPFX
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports ADSNetLibrary.Helpers
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class RepContratoDetalle
|
||||
|
||||
@@ -146,6 +146,7 @@ Partial Class ListadoContratos
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
End Sub
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
UpTitulos.Update()
|
||||
|
||||
@@ -91,7 +91,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
LblModalidad.Visible = True
|
||||
DivModalidad.Visible = True
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(189, 190, 192) Then
|
||||
LblModalidad.Visible = True
|
||||
DivModalidad.Visible = True
|
||||
End If
|
||||
@@ -425,7 +425,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
.Precio = row.FCTextBox("TxtPrecio").Text.ToDecimal()
|
||||
}).QueryToDataTable(True)
|
||||
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
|
||||
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">
|
||||
<Columns>
|
||||
<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>
|
||||
<asp:Label ID="LblPred" runat="server" Text='<%#If(Eval("Predeterminada").ToString = "True", "Si", "") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</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:TemplateField HeaderText="Estatus" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
||||
<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 drg As DataRow = dtt.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
|
||||
If drg IsNot Nothing Then
|
||||
|
||||
TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString
|
||||
Dim PorcentajeAjuste As Decimal = drg("Valor").ToString.ToDecimal
|
||||
TxtPorcentajeAjuste.Text = (PorcentajeAjuste / 100).ToString
|
||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
|
||||
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 CargoGarantia As Decimal = 0
|
||||
Dim CargoGarantia As Decimal = 0
|
||||
Dim CveTamaño As Integer = 0
|
||||
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
CargoGarantia = Dr("Cargo").ToString.ToDecimal
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
CargoGarantia = Dr("Cargo").ToString.ToDecimal
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
CveTamaño = Dr("CveTamaño").ToString.ToEntero
|
||||
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
CveTamaño = Dr("CveTamaño").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}")
|
||||
If DrCargo IsNot Nothing Then
|
||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}")
|
||||
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
|
||||
If (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))) < 0 Then
|
||||
'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
|
||||
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
CargoGarantia = CargoVendido
|
||||
ImportePagarCliente = 0
|
||||
End If
|
||||
ImportePagarCliente = (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))).ToDecimal
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
CargoGarantia = CargoVendido
|
||||
ImportePagarCliente = 0
|
||||
End If
|
||||
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.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
|
||||
'TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero
|
||||
Else
|
||||
Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia)
|
||||
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
|
||||
'TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero
|
||||
Else
|
||||
Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia)
|
||||
'cuando no está registrada, no da ajuste
|
||||
TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo"
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
|
||||
@@ -292,9 +292,9 @@
|
||||
<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"
|
||||
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>
|
||||
<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="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
|
||||
<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">
|
||||
<div class="row">
|
||||
<div class="note note-success">
|
||||
<b>Nombre:
|
||||
</b>
|
||||
<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>
|
||||
<div class="row">
|
||||
<div class="col-md-1"><b>Nombre:</b></div>
|
||||
<div class="col-md-3"> <label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label> </div>
|
||||
|
||||
|
||||
<b>
|
||||
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal>
|
||||
</b>
|
||||
<asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox>
|
||||
<div class="col-md-1"><b><asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal></b></div>
|
||||
<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>
|
||||
<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>
|
||||
</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>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="REVCaja" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</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>
|
||||
|
||||
@@ -93,7 +93,7 @@ Partial Class Ventas_PVCobranza
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
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
|
||||
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||
Else
|
||||
@@ -244,7 +244,7 @@ Partial Class Ventas_PVCobranza
|
||||
TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||
HdnTotal.Value = GvRow.DataKey("Saldo")
|
||||
TxtImporteEfectivo.Focus()
|
||||
LtlNombre.Text = GvRow.DataKey("DescripcionVenta")
|
||||
LtlNombre.Text = GvRow.DataKey("AtencionA")
|
||||
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
@@ -340,6 +340,10 @@ Partial Class Ventas_PVCobranza
|
||||
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then
|
||||
MsgError = "Error al aplicar el corte"
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgError = "Error al registrar prepólizas"
|
||||
End If
|
||||
@@ -503,7 +507,7 @@ Partial Class Ventas_PVCobranza
|
||||
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||
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
|
||||
LblTurno.Text = NowADS().ToShortDateString
|
||||
UpTurno.Visible = True
|
||||
@@ -561,4 +565,15 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
@@ -64,6 +64,9 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server">
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID ="LnkGenerarEtiqueta"/>
|
||||
</Triggers>
|
||||
<ContentTemplate>
|
||||
<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>
|
||||
@@ -74,6 +77,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LBBitacoraEcommerce" OnClick="LBBitacoraEcommerce_Click" Visible="false" runat="server"><i class="fa fa-stack-overflow"></i> Bitacora Ecommerce</asp:LinkButton>
|
||||
</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>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -5,6 +5,7 @@ Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports ZXing
|
||||
|
||||
Partial Class ProductosyServicios
|
||||
@@ -1083,6 +1084,10 @@ Partial Class ProductosyServicios
|
||||
LnkUnificar.Visible = True
|
||||
ChkPrecioLibre.Checked = ObjProductosServicios.PrecioLibre
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
LnkGenerarEtiqueta.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then
|
||||
|
||||
TxtRegistroRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("RegistroRSCO").ToString
|
||||
@@ -2203,7 +2208,7 @@ Partial Class ProductosyServicios
|
||||
#Region "Codigo Barras"
|
||||
|
||||
'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 opciones As New ZXing.Common.EncodingOptions
|
||||
@@ -2213,7 +2218,7 @@ Partial Class ProductosyServicios
|
||||
opciones.Height = Alto
|
||||
opciones.Width = Largo
|
||||
opciones.Margin = Margen
|
||||
|
||||
opciones.PureBarcode = PureBacode
|
||||
barcodeWriter.Options = opciones
|
||||
|
||||
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
|
||||
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,
|
||||
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,
|
||||
TxtDatosFormulador.Text.Trim, TxtDatosMaquilador.Text.Trim, TxtUsoAutorizado.Text, DdlTipoMateria.SelectedValue.ToEntero) Then
|
||||
Respuesta = False
|
||||
End If
|
||||
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,
|
||||
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
|
||||
Respuesta = False
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
If File.Exists(Archivo) Then
|
||||
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)
|
||||
If File.Exists(Archivo) Then
|
||||
archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml")
|
||||
|
||||
@@ -1386,7 +1386,7 @@
|
||||
<%--16--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<%--17--%>
|
||||
@@ -9840,7 +9840,7 @@
|
||||
console.log("evento descuento");
|
||||
if ($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");
|
||||
$get("TxtPorPS").value = "0";
|
||||
recalcularUtilidad(0);
|
||||
|
||||
@@ -2695,6 +2695,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 Then
|
||||
ViewState("CveCliente") = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
HdnCveCliente.Value = UsuarioActual.Empresa.Funcionalidad(714)
|
||||
RBLPago.SelectedValue = "2"
|
||||
CargaCliente(CveCliente)
|
||||
End If
|
||||
End If
|
||||
@@ -3435,7 +3436,7 @@ Partial Class Ventas
|
||||
HlAgregarExcel.Visible = True
|
||||
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
|
||||
ImgAntiPend.Visible = False
|
||||
UpPS.Update()
|
||||
@@ -3583,7 +3584,7 @@ Partial Class Ventas
|
||||
DivBloqueoAcceso.Visible = False
|
||||
End If
|
||||
Else
|
||||
DivBloqueoacceso.Visible = False
|
||||
DivBloqueoAcceso.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -3655,7 +3656,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
Usuario.Empresa = ObjEmpresa.Empresa
|
||||
ADSSession.ADSSessionConfig.sessionUser.CveEmpresa = 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()
|
||||
Case "Ing"
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TxtAtencionA.Text = DbRowVenta("AtencionA").ToString()
|
||||
End If
|
||||
|
||||
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"))
|
||||
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()
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
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
|
||||
|
||||
|
||||
@@ -7171,6 +7182,8 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||
' Using ObjVentas As New ClsVentas
|
||||
' 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)("Total") = (Cantidad * PU)
|
||||
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)("ImporteIEPS") = (TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString().ToDecimal * 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)("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
|
||||
If UsuarioActual.CveEmpresa.Contiene(7, 122) Then
|
||||
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
|
||||
If concepto.Impuestos.Count = 0 AndAlso concepto.ObjetoImpuesto = "02" AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(2) = 0.00D Then
|
||||
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
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
@@ -14949,10 +14972,17 @@ Partial Class Ventas
|
||||
CveVentaAplicar = CveDevolucion
|
||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
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"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
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
|
||||
@@ -16620,6 +16650,7 @@ Partial Class Ventas
|
||||
dr("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
dr("PorcentajeRetIVA") = ClienteRetIVA
|
||||
dr("PorcentajeRetISR") = ClienteRetISR
|
||||
dr("TotalConImpuestos") = (dr("Total").ToString().ToDecimal() - dr("Descuento").ToString().ToDecimal() + dr("ImporteIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
|
||||
Next
|
||||
|
||||
@@ -17315,6 +17346,15 @@ Partial Class Ventas
|
||||
Alert("No hay una lista de precios predeterminada", TipoMensaje.MsgAdvertencia)
|
||||
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
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
@@ -17569,6 +17609,10 @@ Partial Class Ventas
|
||||
ImgAntiPend.Visible = False
|
||||
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
|
||||
|
||||
@@ -17600,6 +17644,10 @@ Partial Class Ventas
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
|
||||
MostrarOpcionesPaqueteria()
|
||||
|
||||
TrAtencionA.Visible = True
|
||||
@@ -18084,15 +18132,30 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
' 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
|
||||
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 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)
|
||||
|
||||
'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("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)
|
||||
|
||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||
|
||||
@@ -19054,6 +19119,7 @@ Partial Class Ventas
|
||||
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
|
||||
DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU)
|
||||
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("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida")
|
||||
DrPoliza("CveActivoFijo") = -1
|
||||
@@ -19191,6 +19257,8 @@ Partial Class Ventas
|
||||
'USO PARA COMERCIO EXTERIOR
|
||||
TmpDT.Columns.Add("CantidadConversion", GetType(Decimal))
|
||||
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||
|
||||
TmpDT.Columns.Add("TotalConImpuestos", GetType(Decimal))
|
||||
End Sub
|
||||
Private Sub CreaDTmpC()
|
||||
DTmpC = New DataTable
|
||||
@@ -23222,6 +23290,9 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Private Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged
|
||||
LimpiaEscondeContado()
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
RecalculaPrecios()
|
||||
End If
|
||||
End Sub
|
||||
Private Function ValidaPagosContado(Optional MostrarAlertas As Boolean = True, Optional TipoDoctoViejo As String = "") As Boolean
|
||||
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
|
||||
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 MostrarAlertas Then
|
||||
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 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 MostrarAlertas Then
|
||||
@@ -23308,10 +23384,7 @@ Partial Class Ventas
|
||||
Return Retorno
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'SI TIENE SALDO PENDIENTE VALIDA SI TIENE PAGOS
|
||||
@@ -29701,7 +29774,7 @@ Partial Class Ventas
|
||||
Row("Descuento") = Math.Round(Descuento, NumeroDecimales)
|
||||
Row("Total") = 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("TiempoEntrega") = TiempoEntrega
|
||||
@@ -30621,7 +30694,7 @@ Partial Class Ventas
|
||||
divAnticipoMsg.Visible = False
|
||||
|
||||
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' ", "")}")
|
||||
divAmortizacionTipoRelacion.Visible = False
|
||||
GVAnticipos.DataSource = DtMovtos
|
||||
@@ -34669,6 +34742,7 @@ Partial Class Ventas
|
||||
Row("Descuento") = Math.Round(Descuento, 2)
|
||||
Row("Total") = 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("TiempoEntrega") = TiempoEntrega
|
||||
@@ -37299,7 +37373,7 @@ Partial Class Ventas
|
||||
If HdnDescPS.Value.ToEntero() > 0 Then
|
||||
Dim RowUpdate As DataRow = TmpDT.Select($"Consec = {HdnConsecPS.Value}").FirstOrDefault()
|
||||
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)
|
||||
|
||||
Dim TotalCalculableImpuestos = (RowUpdate("Cantidad").ToString().ToDecimal * RowUpdate("PU").ToString().ToDecimal) - RowUpdate("Descuento").ToString().ToDecimal()
|
||||
@@ -37312,7 +37386,7 @@ Partial Class Ventas
|
||||
CalculaTotalesVenta()
|
||||
RegistraScript("$('#ModalDescPS').modal('hide');")
|
||||
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
|
||||
@@ -37357,11 +37431,65 @@ Partial Class Ventas
|
||||
DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
|
||||
|
||||
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
|
||||
|
||||
UpAnticipos.Update()
|
||||
|
||||
RegistraScript("MuestraAnticipos();", "AE")
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user