This commit is contained in:
HECTOR RODRIGUEZ
2021-03-23 16:18:05 -07:00
27 changed files with 1049 additions and 683 deletions

View File

@@ -2225,6 +2225,7 @@ Namespace Modelos
Select Case ConceptoContable Select Case ConceptoContable
Case 1 'Cliente Case 1 'Cliente
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then
If ObjFactura.CveMoneda > 1 Then ConceptoContable = 291
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago FechaMovimiento = ObjFactura.FechaPago
@@ -3801,13 +3802,19 @@ Namespace Modelos
If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then
Dim CveMovimientoSalida As Integer = GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenServicioDomicilio, 8, factura.CveMoneda, factura.CveVenta, "Modelos/SD1") Dim CveMovimientoSalida As Integer = GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenServicioDomicilio, 8, factura.CveMoneda, factura.CveVenta, "Modelos/SD1")
If CveMovimientoSalida > 0 Then If CveMovimientoSalida > 0 Then
If Not (GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenTraspasoDestino, 9, factura.CveMoneda, factura.CveVenta, "Modelos/SD1", CveMovimientoRelacionado:=CveMovimientoSalida) > 0) Then If Not (GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenTraspasoDestino, 9, factura.CveMoneda, factura.CveVenta, "Modelos/SD1", CveMovimientoRelacionado:=CveMovimientoSalida) > 0) Then
OcurrioError = True OcurrioError = True
End If End If
Else Else
OcurrioError = True OcurrioError = True
End If End If
If Not OcurrioError Then
If Not ObjInventario.ActualizarEsDevolucionVenta(factura.CveVenta, 2) Then
OcurrioError = True
End If
End If
End If End If
End If End If
@@ -4080,6 +4087,19 @@ Namespace Modelos
If CveMovimientoInventario <= 0 Then If CveMovimientoInventario <= 0 Then
OcurrioError = True OcurrioError = True
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico") ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Else
If CveMovimientoRelacionado > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
OcurrioError = True
ErrorList.Add("Ocurrió un Error al guardar los movimientos de entrada")
Exit For
End If
Next
End If
Else Else
Dim Mensaje As String = "" Dim Mensaje As String = ""
Dim i As Integer = 0 Dim i As Integer = 0
@@ -4140,6 +4160,7 @@ Namespace Modelos
i = i + 1 i = i + 1
Next Next
End If
'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN
If MovimientoPrePoliza AndAlso Not OcurrioError Then If MovimientoPrePoliza AndAlso Not OcurrioError Then

View File

@@ -2935,9 +2935,11 @@ Public Class Timbrado
comprobante.SubTotal = ObjCFDITimbre.Comprobante.Subtotal comprobante.SubTotal = ObjCFDITimbre.Comprobante.Subtotal
If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
If ObjCFDITimbre.Comprobante.Descuentos > 0 Then
comprobante.DescuentoSpecified = True comprobante.DescuentoSpecified = True
comprobante.Descuento = ObjCFDITimbre.Comprobante.Descuentos comprobante.Descuento = ObjCFDITimbre.Comprobante.Descuentos
End If End If
End If
comprobante.Moneda = ObjCFDITimbre.Comprobante.Moneda comprobante.Moneda = ObjCFDITimbre.Comprobante.Moneda
comprobante.TipoCambio = ObjCFDITimbre.Comprobante.TipoCambio.ToDecimal comprobante.TipoCambio = ObjCFDITimbre.Comprobante.TipoCambio.ToDecimal
comprobante.TipoCambioSpecified = If(ObjCFDITimbre.Comprobante.Moneda <> "XXX", True, False) comprobante.TipoCambioSpecified = If(ObjCFDITimbre.Comprobante.Moneda <> "XXX", True, False)
@@ -3876,23 +3878,21 @@ Public Class Timbrado
Else Else
If String.IsNullOrEmpty(resultadoTimbre.Detalle) Then
Dim Resultados = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle) Dim Resultados = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle)
If Resultados.Count > 0 Then If Resultados.Count > 0 Then
If resultadoTimbre.Descripcion.Contains("RFC del receptor no existe") Then If resultadoTimbre.Descripcion.Contains("RFC del receptor no existe") Then
Retorno = $"El RFC { Resultados(0)("Value").ToString() } no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente" Retorno = $"El RFC { Resultados(0)("Value").ToString() } no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente"
MensajeErrorCFDI = $"El RFC { Resultados(0)("Value").ToString() } no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente" MensajeErrorCFDI = $"El RFC { Resultados(0)("Value").ToString() } no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente"
Else Else
Retorno = Resultados(0)("Value").ToString() Retorno = Resultados(0)("Value").ToString()
MensajeErrorCFDI = Resultados(0)("Value").ToString() MensajeErrorCFDI = Resultados(0)("Value").ToString()
End If End If
Else
Retorno = resultadoTimbre.Detalle
MensajeErrorCFDI = resultadoTimbre.Detalle
End If
Else Else
Retorno = resultadoTimbre.Detalle Retorno = resultadoTimbre.Detalle
MensajeErrorCFDI = resultadoTimbre.Detalle MensajeErrorCFDI = resultadoTimbre.Detalle

View File

@@ -63,6 +63,8 @@ Public Class Usuario
Public Property isLoginseted As Boolean = False Public Property isLoginseted As Boolean = False
Public Property SesionBloqueada As Boolean = False Public Property SesionBloqueada As Boolean = False
Public Property ErrorDesbloqueo As Boolean = False
Public Property MsgErrorDesbloqueo As String = ""
Public ReadOnly Property FechaActualCliente As DateTime Public ReadOnly Property FechaActualCliente As DateTime
Get Get

View File

@@ -409,7 +409,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
'VALIDA PROMOCIONES Y EXISTENCIAS 'VALIDA PROMOCIONES Y EXISTENCIAS
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, ObjFactura.CveCliente, ObjFactura.CveVendedor, UsuarioActual.CveEmpresa) Then If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, ObjFactura.CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then
ObjFactura.DtPromociones = ObjVentas.DtResultados.Copy() ObjFactura.DtPromociones = ObjVentas.DtResultados.Copy()
End If End If

View File

@@ -6960,8 +6960,31 @@ Partial Class Compras_Compras
Dim DTDistinct = DT.Copy Dim DTDistinct = DT.Copy
If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
For Each drowdis As DataRow In DTDistinct.Rows
If drowdis("CveTipoGasto").ToString = "" Then
drowdis("CveTipoGasto") = 0
End If
If drowdis("TipoGasto").ToString.Trim = "" Then
drowdis("TipoGasto") = "ND"
End If
Next
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF, 0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF, 0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
Else Else
For Each drowdis As DataRow In DTDistinct.Rows
If drowdis("CveTipoGasto").ToString = "" Then
drowdis("CveTipoGasto") = 0
End If
If drowdis("TipoGasto").ToString.Trim = "" Then
drowdis("TipoGasto") = "ND"
End If
Next
DTDistinct.AcceptChanges()
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
End If End If
'RMF, si es concepto relacionado a flete o importacion, no debe de afectar al gasto 'RMF, si es concepto relacionado a flete o importacion, no debe de afectar al gasto
@@ -9802,7 +9825,7 @@ Partial Class Compras_Compras
Dim ObjInventario As New ClsInventarios(ObjCompra.IniciaTransacSQL) Dim ObjInventario As New ClsInventarios(ObjCompra.IniciaTransacSQL)
Dim ObjContabilidad As New ClsContabilidad(ObjCompra.IniciaTransacSQL) Dim ObjContabilidad As New ClsContabilidad(ObjCompra.IniciaTransacSQL)
Dim ObjAF As New ClsAF(ObjCompra.IniciaTransacSQL) Dim ObjAF As New ClsAF(ObjCompra.IniciaTransacSQL)
Dim ObjContaAC As ClsContPAQi = New ClsContPAQi(UsuarioActual.Empresa) Dim ObjContaAC As ClsContPAQi '= New ClsContPAQi(UsuarioActual.Empresa)
Dim Retorno As Boolean = True Dim Retorno As Boolean = True
Dim CveEstatusFactura As Integer = HdnCveEstatusFactura.Value.ToEntero Dim CveEstatusFactura As Integer = HdnCveEstatusFactura.Value.ToEntero
@@ -17816,6 +17839,8 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2 Then If UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2 Then
DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto")) DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto"))
Else
DdlProyecto.SelectedValueExist("-1")
End If End If

View File

@@ -4575,6 +4575,7 @@ Partial Class PopUpVerFactura
Dim ModeloAuto As String = RowAjuste("ModeloAuto").ToString Dim ModeloAuto As String = RowAjuste("ModeloAuto").ToString
Dim MarcaAuto As String = RowAjuste("MarcaAuto").ToString Dim MarcaAuto As String = RowAjuste("MarcaAuto").ToString
Dim CodigoTD As String = RowAjuste("CodigoTD").ToString
Dim MarcaPS As String = "" Dim MarcaPS As String = ""
Dim CveMarca As Integer = -1 Dim CveMarca As Integer = -1
@@ -4687,6 +4688,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Anio", Año)) params.Add(New ReportParameter("Anio", Año))
params.Add(New ReportParameter("Comprobante", Comprobante)) params.Add(New ReportParameter("Comprobante", Comprobante))
params.Add(New ReportParameter("CodigoTD", CodigoTD))
If Imagen.Exists Then If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri)) params.Add(New ReportParameter("LogoPath", logouri))

View File

@@ -712,7 +712,7 @@ Partial Class Compras_ReembolsosComprobaciones
If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119)) Then If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119)) Then
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29 'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, DDlCheques.SelectedValue.ToEntero, -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
MsgError = "Detalle" MsgError = "Detalle"
End If End If
End If End If

View File

@@ -197,7 +197,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
TipoPlantilla = 0 TipoPlantilla = -1
If IfNull(Request("Tipo"), "").ToString = "Ing" Then If IfNull(Request("Tipo"), "").ToString = "Ing" Then
TipoPlantilla = 1 TipoPlantilla = 1
LblEncabezado.Text = "Otros Ingresos" LblEncabezado.Text = "Otros Ingresos"

View File

@@ -8,8 +8,8 @@
width:100%; width:100%;
} }
.txtimporte{ .txtimporte{
background: transparent; /*background: transparent;*/
border: none; /*border: none;*/
} }
.txtcant,.txtimporte, .txtcant,.txtimporte,
@@ -183,14 +183,22 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad"> <asp:TemplateField HeaderText="Cantidad">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox> <asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Importe"> <asp:TemplateField HeaderText="Importe">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server"></asp:TextBox> <asp:TextBox ID="TxtImporte" Text="" CssClass="txtimporte" data-cve='<%# Eval("CveContratoDetalle") %>' type="number" step="any" Width="90" runat="server"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Procentaje">
<ItemTemplate>
<asp:TextBox ID="TxtPorcentaje" Text="" CssClass="txtporcentaje" data-cve='<%# Eval("CveContratoDetalle") %>' type="number" step="any" Width="90" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText=" "> <asp:TemplateField HeaderText=" ">
<ItemTemplate> <ItemTemplate>
@@ -254,115 +262,6 @@
<%-- <ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
<ajax:TabPanel ID="TabAvance" runat="server" HeaderText="Avance">
<ContentTemplate>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabEstimación" runat="server" HeaderText="Estimación" visible ="false">
<ContentTemplate>
<asp:UpdatePanel runat="server" ID="UpEstimaciones" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultarEstimaciones" runat="server" Text="Consultar" class="btn btn-default" />
</div>
<div class="titlefiltros caption" style="position: relative;">
<asp:UpdatePanel class="row" ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<label class="col-md-1 truncate">Contrato:</label>
<div class="col-md-6 col-lg-4">
<div class="ddls">
<asp:DropDownList ID="DDlContratosEstimaciones" runat="server" AutoPostBack="true" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
</asp:DropDownList>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
DataKeyNames="CveContratoAvance,CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<span><%# Eval("Cantidad", "{0:N2}")%></span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<span><%# Eval("Importe", "{0:N2}")%></span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="text-center">
<asp:Button id="BtnGuardarEstimacion" CssClass="btn btn-primary" runat="server" Text="Generar Estimacion" Visible="false"/>
<asp:Button id="BtnDescargarGenerado" CssClass="btn btn-primary" runat="server" Text="Descarga Generador" Visible="false"/>
</div>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="BtnDescargarGenerado" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>--%>
@@ -473,6 +372,7 @@
}); });
}); });
}); });
function showmodalFile(obj) { function showmodalFile(obj) {
$('#' + obj).data("append", 'my-dropzone');<% Dim url = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, "")%> $('#' + obj).data("append", 'my-dropzone');<% Dim url = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, "")%>
$('#' + obj).data("urlup", '<%= url%>/Ashx/SIGWeb.ashx?Metodo=Uploadfile'); $('#' + obj).data("urlup", '<%= url%>/Ashx/SIGWeb.ashx?Metodo=Uploadfile');
@@ -481,38 +381,92 @@
ADDropzone(obj); ADDropzone(obj);
$('#dropmodal').modal(); $('#dropmodal').modal();
} }
function ValidateCant(variable) { function ValidateCant(opcion, cve) {
var txt = $(variable); var txtimporte = $('.txtimporte[data-cve="' + cve + '"]');
var max = txt.data('cantidad'); var txtPorcentaje = $('.txtporcentaje[data-cve="' + cve + '"]');
var value = parseInt(txt.val()); var txtCantidad = $('.txtcant[data-cve="' + cve + '"]');
if (value > max) {
txt.val(max); var max = parseFloat(txtCantidad.data('cantidad'));
var pu = parseFloat(txtCantidad.data('pu'));
var cantidad = parseFloat(txtCantidad.val());
if (!Math.round10) {
Math.round10 = function (value, exp) {
return decimalAdjust('round', value, exp);
};
} }
if (value < 0) {
txt.val(0);
}
var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]');
importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu'))); if (opcion == 2) {
//FormatoMoneda2(importe); if (txtimporte.val().toString().length > 0) {
//if (parseInt(txt.val()) > 0) { var importe = parseFloat(txtimporte.val());
cantidad = parseFloat(importe / pu);
txtCantidad.val(cantidad);
// $($(txt.parent()).parent()).find(".linkfile").removeClass("hidden"); }else{
cantidad = 0.0
//} else { txtCantidad.val('');
// var ocultar = $($(txt.parent()).parent()).find(".linkfile");
// if (!ocultar.hasClass("hidden")) {
// ocultar.addClass("hidden");
// }
//}
} }
//); }
if (opcion == 3) {
if (txtPorcentaje.val().toString().length > 0) {
var porcentaje = parseFloat(txtPorcentaje.val());
cantidad = (porcentaje * max / 100);
txtCantidad.val(cantidad);
} else {
cantidad = 0;
txtCantidad.val('');
}
}
if (cantidad > max) {
txtCantidad.val(max);
cantidad = max;
}
if (cantidad < 0) {
txtCantidad.val(0);
}
if (cantidad > 0) {
txtimporte.val(cantidad * pu);
txtPorcentaje.val(Math.round10(cantidad * 100 / max, -2));
} else {
txtimporte.val('');
txtPorcentaje.val('');
}
}
function decimalAdjust(type, value, exp) {
// Si el exp no está definido o es cero...
if (typeof exp === 'undefined' || +exp === 0) {
return Math[type](value);
}
value = +value;
exp = +exp;
// Si el valor no es un número o el exp no es un entero...
if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
return NaN;
}
// Shift
value = value.toString().split('e');
value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
// Shift back
value = value.toString().split('e');
return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
}
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -138,8 +138,6 @@ Partial Class Contratos_ContratoAvance
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}")) DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
DdlContratos.DataBind() DdlContratos.DataBind()
'DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
'DDlContratosEstimaciones.DataBind()
End Sub End Sub
@@ -190,7 +188,15 @@ Partial Class Contratos_ContratoAvance
e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "") e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "")
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
e.Row.FCTextBox("TxtCantidad").Visible = False e.Row.FCTextBox("TxtCantidad").Visible = False
e.Row.FCTextBox("TxtImporte").Visible = False
e.Row.FCTextBox("TxtPorcentaje").Visible = False
'txtimporte
e.Row.FCLinkButton("LnkAnexo").Visible = False e.Row.FCLinkButton("LnkAnexo").Visible = False
If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then
@@ -221,9 +227,17 @@ Partial Class Contratos_ContratoAvance
LnkGuardarAvance.Visible = True LnkGuardarAvance.Visible = True
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"ValidateCant(1,{e.Row.DataKey("CveContratoDetalle")})")
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"ValidateCant(2,{e.Row.DataKey("CveContratoDetalle")})")
e.Row.FCTextBox("TxtPorcentaje").Attributes.Add("onkeyup", $"ValidateCant(3,{e.Row.DataKey("CveContratoDetalle")})")
If e.Row.DataKey("CantidadMax").ToDouble = 0 Then If e.Row.DataKey("CantidadMax").ToDouble = 0 Then
LnkAnexo.Visible = False LnkAnexo.Visible = False
e.Row.FCTextBox("TxtCantidad").Visible = False e.Row.FCTextBox("TxtCantidad").Visible = False
e.Row.FCTextBox("TxtImporte").Visible = False
e.Row.FCTextBox("TxtPorcentaje").Visible = False
LnkGuardarAvance.Visible = False LnkGuardarAvance.Visible = False
End If End If

View File

@@ -740,7 +740,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal> <asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
</ItemTemplate> </ItemTemplate>
@@ -962,7 +962,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal> <asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
</ItemTemplate> </ItemTemplate>

View File

@@ -953,6 +953,13 @@ Partial Class Contratos_ContratoObra
Exit Sub Exit Sub
End If End If
If TxtPorAmortizacionAnticipo.Text.ToDecimal < TxtPorAnticipo.Text.ToDecimal Then
Alert("El porcentaje de amortización no debe de ser menor al porcentaje de anticipo.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim TieneError = False Dim TieneError = False
Dim Modificado = False Dim Modificado = False
' Dim Extension = Session("FileExtension").ToString ' Dim Extension = Session("FileExtension").ToString

View File

@@ -902,7 +902,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName> <rd:DefaultName>Textbox2</rd:DefaultName>
<Top>1.78486in</Top> <Top>1.98486in</Top>
<Left>0.38625in</Left> <Left>0.38625in</Left>
<Height>0.17014in</Height> <Height>0.17014in</Height>
<Width>3.4167in</Width> <Width>3.4167in</Width>
@@ -941,7 +941,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>1.955in</Top> <Top>2.155in</Top>
<Left>0.38622in</Left> <Left>0.38622in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>1.00005in</Width> <Width>1.00005in</Width>
@@ -989,7 +989,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>1.955in</Top> <Top>2.155in</Top>
<Left>2.56338in</Left> <Left>2.56338in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>1.23952in</Width> <Width>1.23952in</Width>
@@ -1037,7 +1037,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>1.955in</Top> <Top>2.155in</Top>
<Left>1.37238in</Left> <Left>1.37238in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>1.19096in</Width> <Width>1.19096in</Width>
@@ -1074,7 +1074,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.28139in</Top> <Top>2.48139in</Top>
<Left>0.38623in</Left> <Left>0.38623in</Left>
<Height>0.19445in</Height> <Height>0.19445in</Height>
<Width>1.00004in</Width> <Width>1.00004in</Width>
@@ -1113,7 +1113,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.28139in</Top> <Top>2.48139in</Top>
<Left>2.56332in</Left> <Left>2.56332in</Left>
<Height>0.19445in</Height> <Height>0.19445in</Height>
<Width>1.23961in</Width> <Width>1.23961in</Width>
@@ -1152,7 +1152,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.28139in</Top> <Top>2.48139in</Top>
<Left>1.38627in</Left> <Left>1.38627in</Left>
<Height>0.18056in</Height> <Height>0.18056in</Height>
<Width>1.17707in</Width> <Width>1.17707in</Width>
@@ -1186,7 +1186,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.46611in</Top> <Top>2.66611in</Top>
<Left>0.38623in</Left> <Left>0.38623in</Left>
<Height>0.16667in</Height> <Height>0.16667in</Height>
<Width>1.39934in</Width> <Width>1.39934in</Width>
@@ -1226,7 +1226,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.46611in</Top> <Top>2.66611in</Top>
<Left>2.76123in</Left> <Left>2.76123in</Left>
<Height>0.16667in</Height> <Height>0.16667in</Height>
<Width>1.04174in</Width> <Width>1.04174in</Width>
@@ -1270,7 +1270,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.46611in</Top> <Top>2.66611in</Top>
<Left>1.78557in</Left> <Left>1.78557in</Left>
<Height>0.16667in</Height> <Height>0.16667in</Height>
<Width>0.97566in</Width> <Width>0.97566in</Width>
@@ -1310,7 +1310,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName> <rd:DefaultName>Textbox2</rd:DefaultName>
<Top>2.63278in</Top> <Top>2.83278in</Top>
<Left>0.38627in</Left> <Left>0.38627in</Left>
<Height>0.17014in</Height> <Height>0.17014in</Height>
<Width>3.41668in</Width> <Width>3.41668in</Width>
@@ -1345,7 +1345,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName> <rd:DefaultName>Textbox2</rd:DefaultName>
<Top>2.80292in</Top> <Top>3.00292in</Top>
<Left>0.38627in</Left> <Left>0.38627in</Left>
<Height>0.17014in</Height> <Height>0.17014in</Height>
<Width>3.41668in</Width> <Width>3.41668in</Width>
@@ -1384,7 +1384,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.97306in</Top> <Top>3.17306in</Top>
<Left>0.38623in</Left> <Left>0.38623in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>1.00004in</Width> <Width>1.00004in</Width>
@@ -1432,7 +1432,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.97306in</Top> <Top>3.17306in</Top>
<Left>2.56334in</Left> <Left>2.56334in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>1.23959in</Width> <Width>1.23959in</Width>
@@ -1480,7 +1480,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.97306in</Top> <Top>3.17306in</Top>
<Left>1.37238in</Left> <Left>1.37238in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>1.19096in</Width> <Width>1.19096in</Width>
@@ -1520,7 +1520,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName> <rd:DefaultName>Textbox2</rd:DefaultName>
<Top>3.12445in</Top> <Top>3.32445in</Top>
<Left>0.3862in</Left> <Left>0.3862in</Left>
<Height>0.17014in</Height> <Height>0.17014in</Height>
<Width>3.4167in</Width> <Width>3.4167in</Width>
@@ -1559,7 +1559,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>3.29598in</Top> <Top>3.49598in</Top>
<Left>0.3862in</Left> <Left>0.3862in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>3.41668in</Width> <Width>3.41668in</Width>
@@ -1606,7 +1606,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>3.45987in</Top> <Top>3.65987in</Top>
<Left>0.38618in</Left> <Left>0.38618in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>3.41668in</Width> <Width>3.41668in</Width>
@@ -1653,7 +1653,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>3.62376in</Top> <Top>3.82376in</Top>
<Left>0.38616in</Left> <Left>0.38616in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>2.17718in</Width> <Width>2.17718in</Width>
@@ -1701,7 +1701,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>3.62376in</Top> <Top>3.82376in</Top>
<Left>2.56338in</Left> <Left>2.56338in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>1.23948in</Width> <Width>1.23948in</Width>
@@ -1742,7 +1742,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox43</rd:DefaultName> <rd:DefaultName>Textbox43</rd:DefaultName>
<Top>3.78765in</Top> <Top>3.98765in</Top>
<Left>0.38627in</Left> <Left>0.38627in</Left>
<Height>1.11934in</Height> <Height>1.11934in</Height>
<Width>3.4167in</Width> <Width>3.4167in</Width>
@@ -1784,7 +1784,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox45</rd:DefaultName> <rd:DefaultName>Textbox45</rd:DefaultName>
<Top>3.84321in</Top> <Top>4.04321in</Top>
<Left>0.79462in</Left> <Left>0.79462in</Left>
<Height>0.38542in</Height> <Height>0.38542in</Height>
<Width>2.70151in</Width> <Width>2.70151in</Width>
@@ -1800,7 +1800,7 @@
</Style> </Style>
</Textbox> </Textbox>
<Line Name="Line1"> <Line Name="Line1">
<Top>4.64324in</Top> <Top>4.84324in</Top>
<Left>0.65712in</Left> <Left>0.65712in</Left>
<Height>0in</Height> <Height>0in</Height>
<Width>1.26042in</Width> <Width>1.26042in</Width>
@@ -1812,7 +1812,7 @@
</Style> </Style>
</Line> </Line>
<Line Name="Line2"> <Line Name="Line2">
<Top>4.64324in</Top> <Top>4.84324in</Top>
<Left>2.24046in</Left> <Left>2.24046in</Left>
<Height>0in</Height> <Height>0in</Height>
<Width>1.25567in</Width> <Width>1.25567in</Width>
@@ -1840,7 +1840,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox46</rd:DefaultName> <rd:DefaultName>Textbox46</rd:DefaultName>
<Top>4.65851in</Top> <Top>4.85851in</Top>
<Left>1.11409in</Left> <Left>1.11409in</Left>
<Height>0.16667in</Height> <Height>0.16667in</Height>
<Width>0.34028in</Width> <Width>0.34028in</Width>
@@ -1872,7 +1872,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox46</rd:DefaultName> <rd:DefaultName>Textbox46</rd:DefaultName>
<Top>4.67102in</Top> <Top>4.87102in</Top>
<Left>2.34254in</Left> <Left>2.34254in</Left>
<Height>0.16667in</Height> <Height>0.16667in</Height>
<Width>1.03692in</Width> <Width>1.03692in</Width>
@@ -1907,7 +1907,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox46</rd:DefaultName> <rd:DefaultName>Textbox46</rd:DefaultName>
<Top>4.47171in</Top> <Top>4.67171in</Top>
<Left>0.65712in</Left> <Left>0.65712in</Left>
<Height>0.15625in</Height> <Height>0.15625in</Height>
<Width>1.26042in</Width> <Width>1.26042in</Width>
@@ -1944,7 +1944,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>2.12028in</Top> <Top>2.32028in</Top>
<Left>0.38616in</Left> <Left>0.38616in</Left>
<Height>0.16389in</Height> <Height>0.16389in</Height>
<Width>3.4167in</Width> <Width>3.4167in</Width>
@@ -1975,8 +1975,52 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Textbox Name="Textbox44">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Código Defecto:</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!CodigoTD.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>1.81541in</Top>
<Left>0.38629in</Left>
<Height>0.16389in</Height>
<Width>3.41657in</Width>
<ZIndex>48</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<LeftBorder>
<Style>Solid</Style>
</LeftBorder>
<RightBorder>
<Style>Solid</Style>
</RightBorder>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems> </ReportItems>
<Height>5.0181in</Height> <Height>5.21602in</Height>
<Style /> <Style />
</Body> </Body>
<Width>4.09251in</Width> <Width>4.09251in</Width>
@@ -2203,6 +2247,12 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="CodigoTD">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<Language>Es-MX</Language> <Language>Es-MX</Language>
<rd:ReportUnitType>Inch</rd:ReportUnitType> <rd:ReportUnitType>Inch</rd:ReportUnitType>

View File

@@ -216,7 +216,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim Concepto As String = "Ajuste Sección" Dim Concepto As String = "Ajuste Sección"
Dim IdCtaContableOrigen As Integer = 0 Dim IdCtaContableOrigen As Integer = 0
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL Dim importe As Decimal = resultado.SUMD("Total").RoundAD
Dim contabilizable As Boolean = False Dim contabilizable As Boolean = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then
ErrorMovInv = True ErrorMovInv = True
@@ -543,7 +543,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim Concepto As String = "Ajuste Sección" Dim Concepto As String = "Ajuste Sección"
Dim IdCtaContableOrigen As Integer = 0 Dim IdCtaContableOrigen As Integer = 0
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Now, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Now, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL Dim importe As Decimal = resultado.SUMD("Total").RoundAD
Dim contabilizable As Boolean = False Dim contabilizable As Boolean = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Now, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Now, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then
ErrorMovInv = True ErrorMovInv = True

View File

@@ -192,7 +192,7 @@ Partial Class Inventarios_PrestamosdeProveedor
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal > 0 Then If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal > 0 Then
CveMovimientoDetalleEntrada = gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero CveMovimientoDetalleEntrada = gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero
CvePS = gvr.DataKey("CvePS").ToString.ToEntero CvePS = gvr.DataKey("CvePS").ToString.ToEntero
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.FCTextBox("TxtLote").ToString, FechaCaducidad:=gvr.FCTextBox("TxtFechaCaducidad").ToString.ToDate) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.FCTextBox("TxtLote").Text, FechaCaducidad:=gvr.FCTextBox("TxtFechaCaducidad").Text.ToDate) Then
ErrorMovInv = True ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida" TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For Exit For

View File

@@ -28,6 +28,15 @@ Partial Class Inventarios_RecepcionAlmacen
ViewState("EstatusFinalOK") = value ViewState("EstatusFinalOK") = value
End Set End Set
End Property End Property
Private Property ValidaLoteCaducidad As Boolean
Get
Return CType(ViewState("ValidaLoteCaducidad"), Boolean)
End Get
Set(value As Boolean)
ViewState("ValidaLoteCaducidad") = value
End Set
End Property
Private Property DtInv As DataTable Private Property DtInv As DataTable
Get Get
If ViewState("DtInv") Is Nothing Then If ViewState("DtInv") Is Nothing Then
@@ -966,6 +975,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim DtRecepcion As DataTable = Nothing Dim DtRecepcion As DataTable = Nothing
Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero() Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero()
Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero() Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero()
Dim CveSubProyecto As Integer
'SI LA COMPRA TIENE PRODUCTOS Y USADOS SOLO MOSTRAR LOS PRODUCTOS 'SI LA COMPRA TIENE PRODUCTOS Y USADOS SOLO MOSTRAR LOS PRODUCTOS
If NumProductos > 0 AndAlso NumUsados > 0 Then If NumProductos > 0 AndAlso NumUsados > 0 Then
@@ -994,6 +1004,11 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
CveSubProyecto = DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero
If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyecto = 10276 Then
ValidaLoteCaducidad = True
End If
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
'SI ES MOTOBATERIA NO GENERA MOVIMIENTO VIRTUAL 'SI ES MOTOBATERIA NO GENERA MOVIMIENTO VIRTUAL
@@ -1439,6 +1454,7 @@ Partial Class Inventarios_RecepcionAlmacen
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
End If End If
If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
e.Row.FCTextBox("TxtCaducidad").Visible = True e.Row.FCTextBox("TxtCaducidad").Visible = True
e.Row.FCLinkButton("LnkCaducidad").Visible = True e.Row.FCLinkButton("LnkCaducidad").Visible = True
@@ -1455,6 +1471,9 @@ Partial Class Inventarios_RecepcionAlmacen
e.Row.FCTextBox("TxtLote").Visible = False e.Row.FCTextBox("TxtLote").Visible = False
End If End If
End If
e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID)) e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString
e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("CantidadF"), e.Row.FCButton("BtnDividir").ClientID)) e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("CantidadF"), e.Row.FCButton("BtnDividir").ClientID))
@@ -2162,6 +2181,13 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
Index += 1 Index += 1
Next Next
If (Not ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
ValidaSeccion = False
ValidaCaducidad = False
ValidaLote = False
End If
If ValidaSeccion Then If ValidaSeccion Then
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia) Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
Return False Return False

View File

@@ -337,25 +337,39 @@
</div> </div>
</div> </div>
<div id="DivAjuste" runat="server" visible="false" class="col-md-6"> <div id="DivAjuste" runat="server" visible="false" class="col-md-6">
<div id="DivAjusteFormulario" runat="server" class="portlet light xspadding bordered"> <asp:UpdatePanel ID="UpAjuste" runat="server" class="portlet light xspadding bordered" UpdateMode="Conditional">
<asp:UpdatePanel ID="UpAjuste" runat="server" class="portlet-body form" UpdateMode="Conditional"> <Triggers>
<asp:PostBackTrigger ControlID="BtnPDFHistorial" />
</Triggers>
<ContentTemplate> <ContentTemplate>
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Ajuste</span> <span class="caption-subject bold uppercase">Ajuste</span>
</div> </div>
<div class="tools">
<asp:LinkButton ID="BtnPDFHistorial" OnClick="BtnPDFHistorial_Click" runat="server" data-toggle="tooltip" Title="PDF"><i class="fa fa-file-pdf-o" style="font-size:15px; font-weight:bold; color:dimgray;"></i></asp:LinkButton>
<a href="javascript;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body form">
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMarcaPSAjuste" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%" OnSelectedIndexChanged="DdlMarcaPSAjuste_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Seleccione la Marca (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlMarcaPSAjuste.ClientID.ToString()%>">Marca:</label>
</div>
</div>
</div> </div>
<div class="portlet-body">
<div class="row"> <div class="row">
<div class="col-md-9"> <div class="col-md-9">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm ddlps" data-metodo="getps" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" causesvalidation="true" DataTextField="pscodigo" DataValueField="cveps" Onselectedindexchange="ddlpsajuste_selectedindexchange"></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm ddlps" data-metodo="getps" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" causesvalidation="true" DataTextField="pscodigo" DataValueField="cveps" Onselectedindexchange="ddlpsajuste_selectedindexchange"></ADS:Dropdownlost>
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" /> <asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
<asp:HiddenField ID="HdnPSAjusteClasificacion" ClientIDMode="Static" runat="server" Value="-1" /> <asp:HiddenField ID="HdnPSAjusteClasificacion" ClientIDMode="Static" runat="server" Value="-1" />
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">producto/servicio a recibir:</label> <label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
@@ -470,7 +484,7 @@
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoDefecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoDefecto" DataValueField="CveTipoDefecto" Width="100%" AutoPostBack="true"> <asp:DropDownList ID="DdlTipoDefecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoDefecto" DataValueField="CveTipoDefecto" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoDefecto_SelectedIndexChanged">
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoDefecto" runat="server" ControlToValidate="DdlTipoDefecto" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Defecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoDefecto" runat="server" ControlToValidate="DdlTipoDefecto" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Defecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoDefecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoDefecto"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCETipoDefecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoDefecto"></ajax:ValidatorCalloutExtender>
@@ -523,7 +537,6 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<%--INVENTARIO INICIAL--%> <%--INVENTARIO INICIAL--%>

View File

@@ -392,6 +392,7 @@ Partial Class Inventarios_RecepcionUsados
End If End If
CargaTamaños() CargaTamaños()
CargaMarcasFiltro()
'DdlProducto2.setEsWebService(True) 'DdlProducto2.setEsWebService(True)
'DdlProducto2.Attributes.Add("data-metodo", "getpsusados") 'DdlProducto2.Attributes.Add("data-metodo", "getpsusados")
End Sub End Sub
@@ -3102,6 +3103,164 @@ Partial Class Inventarios_RecepcionUsados
InicializaClientes(ChkClientesTodos.Checked) InicializaClientes(ChkClientesTodos.Checked)
End Sub End Sub
Protected Sub DdlTipoDefecto_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlTipoDefecto.SelectedIndexChanged
If DdlTipoDefecto.SelectedValue.ToEntero = 17 Then
DivCodigoTD.Visible = True
DdlTipoDefecto.Width = New Unit(140%)
Else
DivCodigoTD.Visible = False
DdlTipoDefecto.Width = New Unit(200%)
End If
End Sub
Protected Sub DdlMarcaPSAjuste_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaPSAjuste(-1, DdlPSAjuste, CveMarca:=DdlMarcaPSAjuste.SelectedValue.ToEntero())
UpAjuste.Update()
End Sub
Private Sub CargaPSAjuste(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost, Optional AplicaAlmacen As Boolean = True, Optional CveMarca As Integer = -1)
Objeto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141).ToString = "1")
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
Objeto.ddl.Items.Clear()
Objeto.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, Estatus:=1, AplicaParaVenta:=1)
Objeto.ddl.DataBind()
Objeto.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
Else
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}")
Objeto.Attributes.Add("data-cvesubproyecto", CveSubProyecto)
'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1")
If AplicaAlmacen Then
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
Else
Objeto.ddlWS.Attributes.Add("data-pagina", "-1")
End If
Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1")
Objeto.ddlWS.Attributes.Add("data-cvemarca", CveMarca.ToString)
Objeto.ddlWS.Attributes.Add("data-Estatus", "1")
End If
End Sub
Protected Sub BtnPDFHistorial_Click(sender As Object, e As EventArgs)
Dim ObjPS As New ClsProductosServicios
Dim MarcaPS As String = ""
If ObjPS.GetPS(DdlPSAjuste.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
MarcaPS = ObjPS.DtResultados.FiltroPrimeroValor("Marca", String.Format("CvePS = {0}", DdlPSAjuste.SelectedValue.ToEntero))
End If
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim DtDatos As New DataTable
Dim params As New List(Of ReportParameter)
'Informacion Distribuidor
If (DdlClientes.SelectedValue.ToEntero > 0) Then
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlClientes.SelectedValue))
Dim CiudadEstado As String = ""
Dim Telefono As String = ""
Dim Nombre As String = ""
If DatosClienteSeleccionado IsNot Nothing Then
CiudadEstado = String.Format("{0}, {1}", DatosClienteSeleccionado("Ciudad"), DatosClienteSeleccionado("Estado"))
Telefono = DatosClienteSeleccionado("Telefono").ToString
Nombre = DatosClienteSeleccionado("Nombre").ToString
End If
params.Add(New ReportParameter("NombreDistribuidor", Nombre))
params.Add(New ReportParameter("CiudadEstado", CiudadEstado))
params.Add(New ReportParameter("TelCliente", Telefono))
End If
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Consec", TxtConsecutivoAjuste.Text.Trim))
params.Add(New ReportParameter("FolioAcuse", If(DdlFolioGarantia.SelectedValue.ToEntero = -1, "", DdlFolioGarantia.SelectedItem.Text)))
'Informacion de Garantia o ajuste
params.Add(New ReportParameter("FechaInst", TxtFechaAjuste.Text.Trim))
params.Add(New ReportParameter("Fecha", Now.ToShortDateString))
params.Add(New ReportParameter("Defecto", If(DdlTipoDefecto.SelectedValue.ToEntero = -1, "", DdlTipoDefecto.SelectedItem.Text)))
params.Add(New ReportParameter("MesesUso", TxtMesesUso.Text.Trim))
params.Add(New ReportParameter("PorcentajeAjuste", TxtPorcentajeAjuste.Text.Trim))
'Informacion Acumulador
params.Add(New ReportParameter("CodEnsamble", TxtCodEnsamble.Text.Trim))
params.Add(New ReportParameter("CodLinea", TxtCodLinea.Text.Trim))
params.Add(New ReportParameter("CodInspeccion", TxtCodInspeccion.Text.Trim))
params.Add(New ReportParameter("Tipo", DdlBCIAjuste.SelectedItem.Text))
params.Add(New ReportParameter("Marca", MarcaPS))
params.Add(New ReportParameter("Etiqueta", TxtEtiqueta.Text))
'Informacion Vehiculo
params.Add(New ReportParameter("MarcaAuto", ""))
params.Add(New ReportParameter("TipoAuto", ""))
'Informacion Consumidor
'Informacion Distribuidor
'If (CveCliente > 0) Then
' Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlDistribuidor.SelectedValue.ToEntero))
' Dim Nombre As String = ""
' Dim Ciudad As String = ""
' Dim Estado As String = ""
' Dim Direccion As String = ""
' Dim Telefono As String = ""
' If DatosClienteSeleccionado IsNot Nothing Then
' Nombre = DatosClienteSeleccionado("Nombre").ToString
' Ciudad = DatosClienteSeleccionado("Ciudad").ToString
' Estado = DatosClienteSeleccionado("Estado").ToString
' Direccion = DatosClienteSeleccionado("Direccion").ToString
' Telefono = DatosClienteSeleccionado("Telefono").ToString
' End If
' params.Add(New ReportParameter("NombreCliente", Nombre))
' params.Add(New ReportParameter("Direccion", Direccion))
' params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad, Estado)))
' params.Add(New ReportParameter("TelConsumidor", Telefono))
'End If
params.Add(New ReportParameter("NombreCliente", ""))
params.Add(New ReportParameter("Direccion", ""))
params.Add(New ReportParameter("CiudadEstadoConsumidor", ""))
params.Add(New ReportParameter("TelConsumidor", ""))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
params.Add(New ReportParameter("Anio", ""))
params.Add(New ReportParameter("Comprobante", TxtPoliza.Text))
params.Add(New ReportParameter("CodigoTD", TxtCodigoTD.Text))
ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF")
End Sub
Private Sub CargaMarcasFiltro()
Using ObjMarcas As New ClsProductosServicios
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
DdlMarcaPSAjuste.DataSource = ObjMarcas.DtResultados
End If
End Using
DdlMarcaPSAjuste.DataBind()
DdlMarcaPSAjuste.Items.Insert(0, New ListItem("Todas", "-1"))
UpAjuste.Update()
End Sub
Partial Class MFolioGarantiaMensaje Partial Class MFolioGarantiaMensaje
Public Property CvePS As Integer Public Property CvePS As Integer
Public Property CveClasificacionPS As Integer Public Property CveClasificacionPS As Integer

View File

@@ -285,10 +285,10 @@
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###,###.##}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###,###.##}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" /> <asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Sección" DataField="SeccionAlmacen" ItemStyle-Width="10%" Visible="false"/>
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" Visible="false" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" Visible="false" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="10%" Visible="false" /> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="10%" Visible="false" />
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="10%" Visible="false" /> <asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="10%" Visible="false" />
<asp:BoundField HeaderText="Sección" DataField="SeccionAlmacen" ItemStyle-Width="10%" Visible="false"/>
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
<%--<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false"> <%--<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
<ItemTemplate> <ItemTemplate>

View File

@@ -832,9 +832,11 @@ Partial Class Inventarios_TraspasoAlmacen
Serie = If(dr("Serie").ToString = "", "-1", dr("Serie").ToString) Serie = If(dr("Serie").ToString = "", "-1", dr("Serie").ToString)
Lote = If(dr("Lote").ToString = "", "-1", dr("Lote").ToString) Lote = If(dr("Lote").ToString = "", "-1", dr("Lote").ToString)
FechaCaducidad = If(dr("FechaCaducidad").ToString = "", MinFecha, dr("FechaCaducidad").ToString.ToDate) FechaCaducidad = If(dr("FechaCaducidad").ToString = "", MinFecha, dr("FechaCaducidad").ToString.ToDate)
Dim tLote As String = If(Lote <> "-1", String.Format("AND Lote = '{0}' ", Lote), "")
Dim tFechaCaducidad As String = If(FechaCaducidad > MinFecha, String.Format("AND FechaCaducidad = '{0}' ", FechaCaducidad), "")
Dim ExistenciaEspecificada As Decimal = 0 Dim ExistenciaEspecificada As Decimal = 0
CantidadenGrid = DtMovimientos.SUMD("Cantidad", $"CvePS = {dr("CvePS").ToString.ToEntero} AND CveUM = {dr("CveUM").ToString.ToEntero} {If(dr("Serie").ToString <> "-1", $" AND Serie = '{dr("Serie").ToString}'", "")}") CantidadenGrid = DtMovimientos.SUMD("Cantidad", String.Format("CvePS = {0} AND CveUM = {1} {2} {3} {4} ", dr("CvePS"), dr("CveUM"), If(Not dr("Serie").ToString.Contiene("-1", ""), $" AND Serie = '{dr("Serie")}'", ""), tLote, tFechaCaducidad))
Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1) Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
Existencia -= CantidadenGrid Existencia -= CantidadenGrid
'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero)) 'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero))
@@ -2798,6 +2800,8 @@ Partial Class Inventarios_TraspasoAlmacen
DtExcel.Columns.Add(New DataColumn("Codigo", GetType(String))) DtExcel.Columns.Add(New DataColumn("Codigo", GetType(String)))
DtExcel.Columns.Add(New DataColumn("Producto", GetType(String))) DtExcel.Columns.Add(New DataColumn("Producto", GetType(String)))
DtExcel.Columns.Add(New DataColumn("Serie", GetType(String))) DtExcel.Columns.Add(New DataColumn("Serie", GetType(String)))
DtExcel.Columns.Add(New DataColumn("Lote", GetType(String)))
DtExcel.Columns.Add(New DataColumn("FechaCaducidad", GetType(Date)))
DtExcel.Columns.Add(New DataColumn("Observaciones", GetType(String))) DtExcel.Columns.Add(New DataColumn("Observaciones", GetType(String)))
DtExcel.TableName = "Traspaso" DtExcel.TableName = "Traspaso"
@@ -2856,7 +2860,15 @@ Partial Class Inventarios_TraspasoAlmacen
Alert("El nombre de la cuarta columna debe ser 'Serie'. Favor de corregirlo", TipoMensaje.MsgError) Alert("El nombre de la cuarta columna debe ser 'Serie'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub Exit Sub
End If End If
If Not dt.Columns(4).ColumnName = "Observaciones" Then If Not dt.Columns(4).ColumnName = "Lote" Then
Alert("El nombre de la cuarta columna debe ser 'Lote'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
If Not dt.Columns(5).ColumnName = "FechaCaducidad" Then
Alert("El nombre de la cuarta columna debe ser 'Fecha Caducidad'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
If Not dt.Columns(6).ColumnName = "Observaciones" Then
Alert("El nombre de la quinta columna debe ser 'Observaciones'. Favor de corregirlo", TipoMensaje.MsgError) Alert("El nombre de la quinta columna debe ser 'Observaciones'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub Exit Sub
End If End If
@@ -2879,9 +2891,9 @@ Partial Class Inventarios_TraspasoAlmacen
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal() Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
Dim Serie As String = RowExcel("Serie").ToString() Dim Serie As String = RowExcel("Serie").ToString()
Dim Lote As String = If(RowExcel("Lote").ToString() = "", "-1", RowExcel("Lote").ToString())
Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString <> "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
Dim Observaciones As String = RowExcel("Observaciones").ToString() Dim Observaciones As String = RowExcel("Observaciones").ToString()
Dim FechaCaducidad As Date = MinFecha
Dim Lote As String = "-1"
If CveProducto > 0 Then If CveProducto > 0 Then
@@ -2911,7 +2923,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If End If
If Valido Then If Valido Then
AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Limpia:=False) AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False)
RowsCargados = RowsCargados + 1 RowsCargados = RowsCargados + 1
Else Else
RowsNoCargados = RowsNoCargados + 1 RowsNoCargados = RowsNoCargados + 1

View File

@@ -39,8 +39,8 @@
<label class="col-md-1 truncate">Estatus:</label> <label class="col-md-1 truncate">Estatus:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Activo" Value="1"></asp:ListItem> <asp:ListItem Text="Activo" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem> <asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>

View File

@@ -837,11 +837,11 @@
<td></td> <td></td>
</tr> </tr>
<tr align="right"> <tr align="right">
<td><b>Total:</b></td> <td><b style="font-size:18px">Total:</b></td>
<td> <td>
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">
<ContentTemplate> <ContentTemplate>
<asp:TextBox ID="TxtTotal" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right; font-weight: bold" Text="0.00" Width="78px" ReadOnly="true"></asp:TextBox> <asp:TextBox ID="TxtTotal" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right; font-weight: bold; font-size:18px" Text="0.00" Width="78px" ReadOnly="true"></asp:TextBox>
<asp:HiddenField ID="HdnVentaSaldo" runat="server" ClientIDMode="Static" Value="0" /> <asp:HiddenField ID="HdnVentaSaldo" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnTotalVenta" runat="server" ClientIDMode="Static" Value="0" /> <asp:HiddenField ID="HdnTotalVenta" runat="server" ClientIDMode="Static" Value="0" />
</ContentTemplate> </ContentTemplate>
@@ -2878,6 +2878,7 @@
<a href="javascript;" class="collapse" data-original-title="" title=""></a> <a href="javascript;" class="collapse" data-original-title="" title=""></a>
</div> </div>
</div> </div>
<div class="portlet-body">
<div class="row" style="display: none;"> <div class="row" style="display: none;">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -2899,7 +2900,7 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMarcaPSAjuste" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%" OnSelectedIndexChanged="DdlMarcaPS_SelectedIndexChanged" AutoPostBack="true"> <asp:DropDownList ID="DdlMarcaPSAjuste" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Width="100%" OnSelectedIndexChanged="DdlMarcaPSAjuste_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Seleccione la Marca (Todas)" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione la Marca (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlMarcaPSAjuste.ClientID.ToString()%>">Marca:</label> <label for="<%= DdlMarcaPSAjuste.ClientID.ToString()%>">Marca:</label>
@@ -3089,6 +3090,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>

View File

@@ -1008,14 +1008,27 @@ Partial Class PV
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
'VERIFICAR SI LA SESION SE ENCUENTRA BLOQUEADA
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
Dim DrUsuario As DataRow = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0) Dim DrUsuario As DataRow = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)
If DrUsuario("CodigoAcceso").ToString() <> "" Then If DrUsuario("CodigoAcceso").ToString() <> "" Then
If UsuarioActual.SesionBloqueada Then If UsuarioActual.SesionBloqueada Then
DivBloqueo.Visible = False DivBloqueo.Visible = False
TxtCodigoAcceso.Focus() Dim strScript As New StringBuilder
RegistraScript("window.onload = function MuestraBloqueo() { document.getElementById(""C_BtnShowBloqueo"").click(); setTimeout(function(){ $('#C_TxtCodigoAcceso').focus(); }, 1000); }") strScript.Append("window.onload = function MuestraBloqueo() { document.getElementById(""C_BtnShowBloqueo"").click(); setTimeout(function(){ $('#C_TxtCodigoAcceso').focus(); ")
'If UsuarioActual.ErrorDesbloqueo Then
'strScript.AppendFormat("alert('{0}');", UsuarioActual.MsgErrorDesbloqueo)
'End If
strScript.Append("}, 500); }")
RegistraScript(strScript.ToString())
UsuarioActual.SesionBloqueada = True
'UsuarioActual.ErrorDesbloqueo = False
'UsuarioActual.MsgErrorDesbloqueo = ""
BtnEmitirImprimir.Visible = False
Exit Sub
Else Else
DivBloqueo.Visible = True DivBloqueo.Visible = True
End If End If
@@ -7328,14 +7341,24 @@ Partial Class PV
If (CveCliente > 0) Then If (CveCliente > 0) Then
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlDistribuidor.SelectedValue.ToEntero)) Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlDistribuidor.SelectedValue.ToEntero))
Dim Ciudad As String = DatosClienteSeleccionado.Item("Ciudad").ToString Dim Nombre As String = ""
Dim Estado As String = DatosClienteSeleccionado.Item("Estado").ToString Dim Ciudad As String = ""
Dim Estado As String = ""
Dim Direccion As String = ""
Dim Telefono As String = ""
params.Add(New ReportParameter("NombreCliente", LtlCliente.Text)) If DatosClienteSeleccionado IsNot Nothing Then
params.Add(New ReportParameter("Direccion", LblDireccion.Text)) Nombre = DatosClienteSeleccionado("Nombre").ToString
params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad.Trim, Estado))) Ciudad = DatosClienteSeleccionado("Ciudad").ToString
params.Add(New ReportParameter("TelConsumidor", DatosClienteSeleccionado.Item("Telefono").ToString)) Estado = DatosClienteSeleccionado("Estado").ToString
Direccion = DatosClienteSeleccionado("Direccion").ToString
Telefono = DatosClienteSeleccionado("Telefono").ToString
End If
params.Add(New ReportParameter("NombreCliente", Nombre))
params.Add(New ReportParameter("Direccion", Direccion))
params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad, Estado)))
params.Add(New ReportParameter("TelConsumidor", Telefono))
End If End If
If Imagen.Exists Then If Imagen.Exists Then
@@ -7346,7 +7369,7 @@ Partial Class PV
params.Add(New ReportParameter("Anio", TxtAnioVehiculo.Text)) params.Add(New ReportParameter("Anio", TxtAnioVehiculo.Text))
params.Add(New ReportParameter("Comprobante", TxtComprobante.Text)) params.Add(New ReportParameter("Comprobante", TxtComprobante.Text))
params.Add(New ReportParameter("CodigoTD", TxtCodigoTD.Text))
ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF") ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF")
@@ -7421,11 +7444,20 @@ Partial Class PV
End Sub End Sub
Protected Sub DdlMarcaPSAjuste_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlMarcaPSAjuste_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), DdlPSAjuste, CveMarca:=DdlMarcaPSAjuste.SelectedValue.ToEntero()) CargaPS(DdlClasificacion.SelectedValue.ToEntero(), DdlPSAjuste, CveMarca:=DdlMarcaPSAjuste.SelectedValue.ToEntero())
UpModalVenta.Update()
UpAjuste.Update() UpAjuste.Update()
End Sub End Sub
Protected Sub BtnCambiar_Click(sender As Object, e As EventArgs) Protected Sub BtnCambiar_Click(sender As Object, e As EventArgs)
'UsuarioActual.ErrorDesbloqueo = False
'UsuarioActual.MsgErrorDesbloqueo = ""
If String.IsNullOrEmpty(TxtCodigoAcceso.Text.Trim) Then If String.IsNullOrEmpty(TxtCodigoAcceso.Text.Trim) Then
Alert("Es necesario un código de acceso", TipoMensaje.MsgAdvertencia) UsuarioActual.SesionBloqueada = True
'UsuarioActual.ErrorDesbloqueo = True
'UsuarioActual.MsgErrorDesbloqueo = "Es necesario un código de acceso"
Response.Redirect($"~/Ventas/PV.aspx")
Exit Sub Exit Sub
End If End If
@@ -7494,7 +7526,11 @@ Partial Class PV
Response.Redirect($"~/Ventas/PV.aspx") Response.Redirect($"~/Ventas/PV.aspx")
Else Else
Alert("No existe el código de acceso", TipoMensaje.MsgAdvertencia) UsuarioActual.SesionBloqueada = True
'UsuarioActual.ErrorDesbloqueo = True
'UsuarioActual.MsgErrorDesbloqueo = "El código de acceso no es correcto"
Response.Redirect($"~/Ventas/PV.aspx")
End If End If

View File

@@ -2923,7 +2923,7 @@ Partial Class ProductosyServicios
Else Else
If ObjPS.GetPS(-1, -1, CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then If ObjPS.GetPS(-1, -1, CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS").ToEntero() Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero()
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, txtcodigo2.text.trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, txtcodigo2.text.trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,

View File

@@ -183,6 +183,7 @@
<%--<asp:BoundField HeaderText="Producto / Servicio" DataField="PS" ItemStyle-Width="30%" />--%> <%--<asp:BoundField HeaderText="Producto / Servicio" DataField="PS" ItemStyle-Width="30%" />--%>
<asp:BoundField HeaderText="P.U. Actual" DataField="PUAnterior" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="P.U. Actual" DataField="PUAnterior" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Tipo Promoción" DataField="TipoPromocion" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" /> <asp:BoundField HeaderText="Tipo Promoción" DataField="TipoPromocion" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Cant. Mínima" DataField="CantidadMinima" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Promoción" DataField="Promocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="Promoción" DataField="Promocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="P.U. Promoción" DataField="PUPromocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="P.U. Promoción" DataField="PUPromocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Condiciones" ItemStyle-HorizontalAlign="Center" DataField="AplicaRestriccionTexto" ItemStyle-Width="15%" /> <asp:BoundField HeaderText="Condiciones" ItemStyle-HorizontalAlign="Center" DataField="AplicaRestriccionTexto" ItemStyle-Width="15%" />

View File

@@ -2738,7 +2738,7 @@ Partial Class Ventas
divProyectoPyME.Visible = DdlProyecto.Visible divProyectoPyME.Visible = DdlProyecto.Visible
'MOSTRAR LA OPCION DE AGREGAR PS EN BDH 'MOSTRAR LA OPCION DE AGREGAR PS EN BDH
If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveVenta <= 0 Then
ImgOtrosConceptos.Visible = False ImgOtrosConceptos.Visible = False
TrFormaEntrega.Visible = False TrFormaEntrega.Visible = False
TabDetalleVentas.Visible = False TabDetalleVentas.Visible = False
@@ -2855,6 +2855,19 @@ Partial Class Ventas
End If End If
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveVenta:{0}}});""> <i class=""fa fa-plus""></i> Tarea</a>", CveVenta) LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveVenta:{0}}});""> <i class=""fa fa-plus""></i> Tarea</a>", CveVenta)
'SI ESTA CARGANDO UNA REFACTURACION. VALIDAR QUE LA FACTURA ANTERIOR ESTE CANCELADA
If Me.ObjFacturaNC IsNot Nothing Then
If Me.CveDevolucion > 0 AndAlso Me.NuevaFactura = 1 Then
Dim TipoEstatus As Integer = GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {Me.ObjFacturaNC.CveEstatusFactura}").ToEntero()
If TipoEstatus <> 5 Then
Alert($"El documento de tipo '{Me.ObjFacturaNC.TipodeComprobante}' a refacturar no ha sido cancelado. Favor de verificar el documento", TipoMensaje.MsgAdvertencia)
BtnEmitirImprimir.Visible = False
UpFacturar.Update()
End If
End If
End If
End If End If
''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ??? ''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ???
@@ -2893,7 +2906,8 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
BtnModalAddPS.Enabled = False BtnModalAddPS.Enabled = False
End If End If
MostrarOpcioensPaqueteria() MostrarOpcionesPaqueteria()
End Sub End Sub
Private Sub BloqueaClasificaciones() Private Sub BloqueaClasificaciones()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
@@ -5331,6 +5345,7 @@ Partial Class Ventas
UPCondicionesPago.Visible = True UPCondicionesPago.Visible = True
UpCliente.Visible = False UpCliente.Visible = False
UpEmpresaCRM.Visible = True UpEmpresaCRM.Visible = True
End If End If
DdlVendedor.SelectedValueExist(ObjCRM.DtResultados.Rows(0)("CveVendedorAsignado").ToString()) DdlVendedor.SelectedValueExist(ObjCRM.DtResultados.Rows(0)("CveVendedorAsignado").ToString())
@@ -6436,6 +6451,7 @@ Partial Class Ventas
DdlNCFactura.SelectedValueExist(pCveVenta) DdlNCFactura.SelectedValueExist(pCveVenta)
DdlNCFactura.Enabled = False DdlNCFactura.Enabled = False
End If End If
Else Else
@@ -12976,18 +12992,16 @@ Partial Class Ventas
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
DtCostos = ObjInventario.DtResultados DtCostos = ObjInventario.DtResultados
TotalCosto = DtCostos.SUMD("Total").RoundAD TotalCosto = DtCostos.SUMD("Total").RoundSQL
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0 Dim CveCuenta As Integer = 0
Dim TotalCostoAcumulado As Decimal = 0
If tmpCostos.Rows.Count > 0 Then If tmpCostos.Rows.Count > 0 Then
Dim TotalCostoAcumulado As Decimal = 0
Dim cont As Integer = 1 Dim cont As Integer = 1
'Se agrega movimiento separado por la cuenta de ventas (ER) 'Se agrega movimiento separado por la cuenta de ventas (ER)
For Each RowInv As DataRow In tmpCostos.Rows For Each RowInv As DataRow In tmpCostos.Rows
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundAD ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL
TotalCostoAcumulado += ValorInventario TotalCostoAcumulado += ValorInventario
'cuando es el último movimiento y hay diferencias en los importes 'cuando es el último movimiento y hay diferencias en los importes
@@ -13007,12 +13021,6 @@ Partial Class Ventas
cont += 1 cont += 1
Next Next
End If End If
'AJUSTA EL TOTAL
If Math.Abs(TotalCostoAcumulado - TotalCosto) = 0.01 Then
TotalCosto = TotalCostoAcumulado
End If
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
'If TotalCosto <> 0 Then 'If TotalCosto <> 0 Then
@@ -15131,7 +15139,7 @@ Partial Class Ventas
Dim ValorInventario As Decimal = 0 Dim ValorInventario As Decimal = 0
For Each RowInv As DataRow In tmpCostos.Rows For Each RowInv As DataRow In tmpCostos.Rows
ValorInventario = DTMovimientosDetalles.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD() ValorInventario = DTMovimientosDetalles.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL()
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
@@ -15155,7 +15163,7 @@ Partial Class Ventas
End If End If
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {ddlAlmacen.SelectedValue}").ToEntero() IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {ddlAlmacen.SelectedValue}").ToEntero()
ValorInventario = DTMovimientosDetalles.SUMD("Total", $"CveMovimiento = {Mov("CveMovimiento")}").RoundAD() ValorInventario = DTMovimientosDetalles.SUMD("Total", $"CveMovimiento = {Mov("CveMovimiento")}").RoundSQL()
If ValorInventario <> 0 Then If ValorInventario <> 0 Then
'Entrada 'Entrada
@@ -15771,15 +15779,21 @@ Partial Class Ventas
If LblCliente.Text <> "Cliente" And Not EstatusCliente Then If LblCliente.Text <> "Cliente" And Not EstatusCliente Then
Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia) Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia)
End If End If
If Not CveEmpresaCRM > 0 Then
BtnEmitirImprimir.Visible = EstatusCliente BtnEmitirImprimir.Visible = EstatusCliente
TrVistaPrevia.Visible = EstatusCliente TrVistaPrevia.Visible = EstatusCliente
Else
BtnEmitirImprimir.Visible = True
TrVistaPrevia.Visible = True
End If
End If End If
If DdlTipoComprobante.SelectedValue = "Ing" Then If DdlTipoComprobante.SelectedValue = "Ing" Then
ImgAntiPend.Visible = True ImgAntiPend.Visible = True
End If End If
MostrarOpcioensPaqueteria() MostrarOpcionesPaqueteria()
TrAtencionA.Visible = True TrAtencionA.Visible = True
tdVigencia.Visible = DdlTipoComprobante.SelectedValue.Contiene("Cot") tdVigencia.Visible = DdlTipoComprobante.SelectedValue.Contiene("Cot")
@@ -15975,9 +15989,22 @@ Partial Class Ventas
TxtFolio.Text = DT.Rows(0)("FActual").ToString() TxtFolio.Text = DT.Rows(0)("FActual").ToString()
If Not FacturarDocumentoNuevo Then If Not FacturarDocumentoNuevo Then
If Not CveEmpresaCRM > 0 Then
BtnCrearApartirDe.Enabled = EstatusCliente BtnCrearApartirDe.Enabled = EstatusCliente
BtnEmitirImprimir.Visible = EstatusCliente BtnEmitirImprimir.Visible = EstatusCliente
TrVistaPrevia.Visible = EstatusCliente TrVistaPrevia.Visible = EstatusCliente
Else
If TipoDoctoConsulta.Contiene("Ing", "Egs", "Ant", "Dev") Then
BtnCrearApartirDe.Enabled = EstatusCliente
BtnEmitirImprimir.Visible = EstatusCliente
TrVistaPrevia.Visible = EstatusCliente
Else
BtnCrearApartirDe.Enabled = True
BtnEmitirImprimir.Visible = True
TrVistaPrevia.Visible = True
End If
End If
End If End If
UpFacturar.Update() UpFacturar.Update()
@@ -16333,6 +16360,11 @@ Partial Class Ventas
Dim TipoAplicacion As Integer = 1 ' 1 - descuento, 2 en PU Dim TipoAplicacion As Integer = 1 ' 1 - descuento, 2 en PU
Dim ObjDescuento As New Descuentos Dim ObjDescuento As New Descuentos
If DdlSubProyectoDatos.SelectedValue = "11842" Then '' E141, el subproyecto: Franquicia, no proceden las promociones
Return ObjDescuento
End If
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DrPS IsNot Nothing Then If DrPS IsNot Nothing Then
@@ -16348,11 +16380,11 @@ Partial Class Ventas
Dim dr As DataRow = Nothing Dim dr As DataRow = Nothing
If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then
dr = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL)", CvePS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS)) dr = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL) AND (TipoPromocion <> 3 OR (TipoPromocion = 3 AND CantidadMinima <= {3} ))", CvePS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, TxtCantidad.Text), Orderby:="CantidadMinima desc ")
If dr Is Nothing Then If dr Is Nothing Then
'verifica marca, si tiene asignada la promocion 'verifica marca, si tiene asignada la promocion
dr = DtPromociones.FiltroPrimero(String.Format("CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL)", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS)) dr = DtPromociones.FiltroPrimero(String.Format("CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {3} OR CveRinTamaño IS NULL) AND (TipoPromocion <> 3 OR (TipoPromocion = 3 AND CantidadMinima <= {4} )) ", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, TxtCantidad.Text), Orderby:="CantidadMinima desc")
End If End If
End If End If
@@ -18033,6 +18065,7 @@ Partial Class Ventas
Dim DtMovimientosDetalles As DataTable Dim DtMovimientosDetalles As DataTable
DtRemConceptosSurtidos = Nothing DtRemConceptosSurtidos = Nothing
Dim TieneMovimientosServicioDomicilio As Boolean = False
Dim TieneMovimientosSinCosto As Boolean = False Dim TieneMovimientosSinCosto As Boolean = False
Dim TieneMovimientosContrato As Boolean = False Dim TieneMovimientosContrato As Boolean = False
@@ -18070,6 +18103,8 @@ Partial Class Ventas
If DtMovimientos.Rows.Count > 0 Then If DtMovimientos.Rows.Count > 0 Then
Dim GeneroMovimientoAlmacen As Boolean = False Dim GeneroMovimientoAlmacen As Boolean = False
TieneMovimientosServicioDomicilio = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=29") > 0
TieneMovimientosSinCosto = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=26") > 0 TieneMovimientosSinCosto = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=26") > 0
TieneMovimientosContrato = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen IN (11)") > 0 TieneMovimientosContrato = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen IN (11)") > 0
@@ -18093,7 +18128,7 @@ Partial Class Ventas
If RemisionesLista.Count > 0 Then If RemisionesLista.Count > 0 Then
AplicaMovimientoDetalleEntrada = True AplicaMovimientoDetalleEntrada = True
If TieneMovimientosSinCosto Then If TieneMovimientosSinCosto OrElse TieneMovimientosServicioDomicilio Then
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}") MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
Else Else
If TieneMovimientosContrato Then If TieneMovimientosContrato Then
@@ -18378,10 +18413,10 @@ Partial Class Ventas
Dim ValorInventario As Decimal Dim ValorInventario As Decimal
Dim TotalCostoAcumulado As Decimal = 0D Dim TotalCostoAcumulado As Decimal = 0D
Dim Cont As Integer = 1 Dim Cont As Integer = 1
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
For Each RowInv As DataRow In DtCostosDistinct.Rows For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
TotalCostoAcumulado += ValorInventario TotalCostoAcumulado += ValorInventario
@@ -18461,7 +18496,7 @@ Partial Class Ventas
Return Not OcurrioError Return Not OcurrioError
End If End If
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
If CvePrePoliza <= 0 Then If CvePrePoliza <= 0 Then
GenerarPrePolizaNueva = True GenerarPrePolizaNueva = True
@@ -18474,7 +18509,7 @@ Partial Class Ventas
End If End If
For Each RowInv As DataRow In DtCostosDistinct.Rows For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
TotalCostoAcumulado += ValorInventario TotalCostoAcumulado += ValorInventario
@@ -18615,10 +18650,10 @@ Partial Class Ventas
Dim ValorInventario As Decimal Dim ValorInventario As Decimal
Dim TotalCostoAcumulado As Decimal = 0D Dim TotalCostoAcumulado As Decimal = 0D
Dim Cont As Integer = 1 Dim Cont As Integer = 1
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
For Each RowInv As DataRow In DtCostosDistinct.Rows For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
TotalCostoAcumulado += ValorInventario TotalCostoAcumulado += ValorInventario
@@ -18732,10 +18767,10 @@ Partial Class Ventas
Dim ValorInventario As Decimal Dim ValorInventario As Decimal
Dim TotalCostoAcumulado As Decimal = 0D Dim TotalCostoAcumulado As Decimal = 0D
Dim Cont As Integer = 1 Dim Cont As Integer = 1
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
For Each RowInv As DataRow In DtCostosDistinct.Rows For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
TotalCostoAcumulado += ValorInventario TotalCostoAcumulado += ValorInventario
@@ -19267,6 +19302,7 @@ Partial Class Ventas
End If End If
Else Else
sb.Append("<b>No encontrado</b> <br/>") sb.Append("<b>No encontrado</b> <br/>")
script = "BtnRefacturacionConfirmarAceptacion();"
End If End If
Else Else
sb.Append("¿Desea realizar la refacturación?<br/>") sb.Append("¿Desea realizar la refacturación?<br/>")
@@ -21758,6 +21794,9 @@ Partial Class Ventas
Alert($"Los servicios de cancelación del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastAdventencia, "") Alert($"Los servicios de cancelación del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastAdventencia, "")
End If End If
If resp.HuboError Then
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();")
Else
If resp.CveEstatus = 5 AndAlso Not EsRefacturacion Then If resp.CveEstatus = 5 AndAlso Not EsRefacturacion Then
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnEnviarMailCancelacion();", TextoConfirmacion:="&nbsp;&nbsp;&nbsp;&nbsp;Si&nbsp;&nbsp;&nbsp;&nbsp;", TextoCancelacion:="&nbsp;&nbsp;&nbsp;&nbsp;<a onclick='Recargar()'>No</>&nbsp;&nbsp;&nbsp;&nbsp;") Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnEnviarMailCancelacion();", TextoConfirmacion:="&nbsp;&nbsp;&nbsp;&nbsp;Si&nbsp;&nbsp;&nbsp;&nbsp;", TextoCancelacion:="&nbsp;&nbsp;&nbsp;&nbsp;<a onclick='Recargar()'>No</>&nbsp;&nbsp;&nbsp;&nbsp;")
Else Else
@@ -21773,6 +21812,9 @@ Partial Class Ventas
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();") Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();")
End If End If
End If End If
End If
Else Else
Alert("Ocurrió un error al generar la cancelación", TipoMensaje.MsgError) Alert("Ocurrió un error al generar la cancelación", TipoMensaje.MsgError)
End If End If
@@ -29285,7 +29327,7 @@ Partial Class Ventas
CargaEventoBitacora() CargaEventoBitacora()
End Sub End Sub
Private Sub MostrarOpcioensPaqueteria() Private Sub MostrarOpcionesPaqueteria()
Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") And UsuarioActual.Empresa.Funcionalidad(280) = "1" Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") And UsuarioActual.Empresa.Funcionalidad(280) = "1"
trPaqueteriaOpciones.Visible = mostrarOpcionesPaq trPaqueteriaOpciones.Visible = mostrarOpcionesPaq
trPaqueteriOpcionesLabel.Visible = mostrarOpcionesPaq trPaqueteriOpcionesLabel.Visible = mostrarOpcionesPaq

View File

@@ -1052,7 +1052,7 @@ Public Class WSApp
'VALIDA PROMOCIONES Y EXISTENCIAS 'VALIDA PROMOCIONES Y EXISTENCIAS
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, CveCliente, ObjFactura.CveVendedor, UsuarioActual.CveEmpresa) Then If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then
ObjFactura.DtPromociones = ObjVentas.DtResultados ObjFactura.DtPromociones = ObjVentas.DtResultados
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()