This commit is contained in:
Rakcsle Supertramp
2020-09-22 16:01:33 -07:00
17 changed files with 2889 additions and 2739 deletions

View File

@@ -1863,6 +1863,7 @@ Public Class ClsInventarios
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente

View File

@@ -1188,13 +1188,12 @@ Public Class ClsMovimientos
Return Retorno
End Function
Public Function GetCxPDetalle(FechaI As String, FechaF As String, CveProveedor As Integer, CveProveedorClasificacion As Integer,
CveProveedorSucursal As Integer, CveUsuario As Integer,
CveUsuarioResponsable As Integer,
Anio As Integer, Mes As Integer, AnioMes As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEstatusFactura As Integer,
Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1,
Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing,
Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1, Optional Comprobaciones As Integer = -1) As Boolean
Public Function GetCxPDetalle(FechaI As String, FechaF As String, CveProveedor As Integer, CveProveedorClasificacion As Integer, CveProveedorSucursal As Integer, CveUsuario As Integer,
CveUsuarioResponsable As Integer, Anio As Integer, Mes As Integer, AnioMes As String, CveMoneda As Integer, CveSubProyecto As Integer,
CveEstatusFactura As Integer, Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer,
TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1",
Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1,
Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1) As Boolean
Dim Retorno As Boolean = False
If FechaCorte = Nothing Then FechaCorte = Now
@@ -1227,6 +1226,7 @@ Public Class ClsMovimientos
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
.Add("@Comprobaciones", SqlDbType.Int).Value = Comprobaciones
.Add("@AplicaNC", SqlDbType.Int).Value = AplicaNC
End With
Try

View File

@@ -2696,6 +2696,8 @@ Partial Class Bancos_IE
MsgError = "No se pudo insertar la póliza de saldo inicial."
End If
End If
Dim UsaComplementariaBancos As Boolean = False
If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaBancos = True
If MsgError = "" Then
@@ -2887,14 +2889,18 @@ Partial Class Bancos_IE
importeMovimiento = TxtImporte.Text.ToDecimal
importeMX = importeMovimiento
If tCveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
If tCveMoneda > 1 AndAlso UsaComplementariaBancos Then
'Agregamos complementaria
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
Else
If tCveMoneda > 1 Then
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
importeMX = (importeMovimiento * TC).RoundSQL
End If
End If
End Select

View File

@@ -77,7 +77,8 @@
<asp:UpdatePanel ID="UpDevolucionAlmacen" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li id="LiDevolucionAlmacen" runat="server" visible="false">
<asp:LinkButton Text="Solicitar Devolución" OnClick="LBDevolucionAlmacen_Click" ID="LBDevolucionAlmacen" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de solicitar la Devolución de Almacén?" data-btn-ok-label="si" />
<%--<asp:LinkButton Text="Solicitar Devolución" OnClick="LBDevolucionAlmacen_Click" ID="LBDevolucionAlmacen" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de solicitar la Devolución de Almacén?" data-btn-ok-label="si" />--%>
<asp:LinkButton ID="HplDevv" OnClick="LBDevolucionAlmacen_Click" runat="server"><i class='fa fa-plus'></i> Solicitar Devolución</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
@@ -4966,6 +4967,44 @@
</div>
</div>
<div id="DivDevolucion" class="modal fade">
<div class="modal-dialog">
<asp:UpdatePanel ID="UPPSolDev" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<h4>
Productos a devolver
</h4>
</div>
<div class="modal-body">
<div class="row">
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:GridView ID="GvSolDev" runat="server" AutoGenerateColumns="false" GridLines="none" BorderWidth="0" DataKeyNames="CveCompraDetalle,CvePS" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
<Columns>
<asp:TemplateField ItemStyle-Width="55px" HeaderText="Cant">
<ItemTemplate>
<asp:TextBox ID="TxtCant" runat="server" Text='<%#Eval("Cantidad") %>' Width="50px" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="UM" headertext="UM" />
<asp:BoundField DataField="CodigoPS" headertext="Producto" />
</Columns>
</asp:GridView>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnDevolucion" runat="server" Text="Solicitar Devolución" OnClick="BtnDevolucion_Click" ClientIDMode="Static" CssClass="btn btn-success" />
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<%-- MODAL FLETES E IMPORTACIONES --%>
<div id="ModalFletesImportaciones" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalFletesImportaciones" UpdateMode="Conditional">

View File

@@ -7580,7 +7580,7 @@ Partial Class Compras_Compras
End If
End If
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) AndAlso UsuarioActual.CveEmpresa <> 72 Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
ErrorPrepolizaDescuadre = True
@@ -10513,7 +10513,7 @@ Partial Class Compras_Compras
If UsuarioActual.CveEmpresa.Contiene(119, 7) Then
node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
If ValorXML(node, "TipoRelacion").ToString.Contiene("04", "07") Then
If ValorXML(node, "TipoRelacion").ToString.Contiene("07") Then
Dim nodeDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionado", Prefijo), namespaces)
For Each documento As XmlNode In nodeDocumentosRelacionados
If documento.Attributes("UUID").Value <> "" Then
@@ -16961,6 +16961,8 @@ Partial Class Compras_Compras
CargaRetIVAConcepto()
CargaRetISRConcepto()
Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ")
If NumNoDed > 0 Then GvPS.Columns(10).Visible = True 'visualiza columnas de nodeducibles
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
InicializaAplicaNCFact()
@@ -18464,30 +18466,69 @@ Partial Class Compras_Compras
End If
If EstatusAlmacen = 1 Then
LBDevolucionAlmacen.Text = "<i class='fa fa-pencil'></i> Cancelar Devolución Almacén"
LBDevolucionAlmacen.ToolTip = "¿Está seguro de Cancelar la Devolución de Almacén?"
HplDevv.Text = "<i class='fa fa-pencil'></i> Cancelar Devolución Almacén"
HplDevv.ToolTip = "¿Está seguro de Cancelar la Devolución de Almacén?"
Else
LBDevolucionAlmacen.Text = "<i class='fa fa-pencil'></i> Solicitar Devolución Almacén"
LBDevolucionAlmacen.ToolTip = "¿Está seguro de Solicitar la Devolución de Almacén?"
HplDevv.Text = "<i class='fa fa-pencil'></i> Solicitar Devolución Almacén"
HplDevv.ToolTip = "¿Está seguro de Solicitar la Devolución de Almacén?"
End If
End If
'UpInvDev.Update()
End Sub
Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
GvSolDev.DataSource = TmpDT
GvSolDev.DataBind()
RegistraScript("$('#DivDevolucion').modal('show');", "DivDevolucion")
UPPSolDev.Update()
End Sub
Protected Sub BtnDevolucion_Click(sender As Object, e As EventArgs)
Dim ObjCompras As New ClsCompras
Dim TieneError As Boolean = False
ObjCompras.IniciaTransacSQL()
If EstatusAlmacen = 0 Then
For Each gvr As GridViewRow In GvSolDev.Rows
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
'actualiza el estatus del detalle
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0)
Else
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1)
End If
Next
End If
If ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1)) Then
EstatusAlmacen = If(EstatusAlmacen = 1, 0, 1)
Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente."))
End If
If Not TieneError Then
ObjCompras.Commit()
Else
ObjCompras.RollBack()
End If
ObjCompras.Dispose()
InicializaDevolucionAlmacen()
End Sub
'Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
' Dim ObjCompras As New ClsCompras
' If ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1)) Then
' EstatusAlmacen = If(EstatusAlmacen = 1, 0, 1)
' Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente."))
' End If
' ObjCompras.Dispose()
' InicializaDevolucionAlmacen()
'End Sub
Private Sub HabilitaNCInv()
If Not UsuarioActual.CveUsuario = 100 Then
@@ -19999,6 +20040,8 @@ Partial Class Compras_Compras
End If
End Sub
End Class
Public Class MMensajeDevolucion

View File

@@ -826,7 +826,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Chofer", Chofer))
params.Add(New ReportParameter("Placa", Placa))
params.Add(New ReportParameter("Recibio", Recibio))
params.Add(New ReportParameter("FechaEntrega", FechaEntrega))
params.Add(New ReportParameter("FechaEntrega", FechaEntrega.ToString()))
params.Add(New ReportParameter("EspecifUnidad", EspecifUnidad))
params.Add(New ReportParameter("DireccionOrigen", SBDireccionO.ToString))
params.Add(New ReportParameter("DireccionDestino", SBDireccionD.ToString))

View File

@@ -222,7 +222,7 @@
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1"><span>Comprobación:</span></div>
<div class="col-md-1" style="margin-left:20px"><span>Comprobación:</span></div>
<div class="col-md-1">
<asp:DropDownList ID="DdlComprobacion" runat="server" CssClass="select2me" AppendDataBoundItems="true" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
@@ -230,6 +230,14 @@
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" style="margin-left:20px"><span>Aplica NC:</span></div>
<div class="col-md-1">
<asp:DropDownList ID="DdlAplicaNC" runat="server" CssClass="select2me" AppendDataBoundItems="true" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -379,7 +379,7 @@ Partial Class RepCxPDetalle
DdlUsuarioResponsable.SelectedValue.ToEntero, Anio, Mes, AnioMes, CveMoneda, CveSubProyecto, DdlEstatusCompra.SelectedValue.ToEntero,
Fecha, DdlGrupo.SelectedValue.ToEntero, Opcion, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero,
TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=IIf(CveTipoProveedor = 3,
-1, CveTipoProveedor), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero) Then
-1, CveTipoProveedor), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero, AplicaNC:=DdlAplicaNC.SelectedValue.ToEntero()) Then
Dim TMP_DTDatos As New DataTable

View File

@@ -769,10 +769,11 @@
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!FechaEntrega.Value</Value>
<Value>=Left(Parameters!FechaEntrega.Value,10)</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
@@ -1869,7 +1870,7 @@
<Height>8.91698in</Height>
<Style />
</Body>
<Width>7.657in</Width>
<Width>7.66009in</Width>
<Page>
<PageHeader>
<Height>3.39287cm</Height>

View File

@@ -4204,7 +4204,7 @@ Partial Class Inventarios_EntradasSalidas
TxtnSerie.Text = ""
TxtnLote.Text = ""
TxtnFechaCaducidad.Text = ""
DdlSeccionAlmacen.SelectedValue = "-1"
'DdlSeccionAlmacen.SelectedValue = "-1"
NumAgregados = NumAgregados + 1
End If

View File

@@ -725,7 +725,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim DtPendientes As New DataTable
If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa.Contiene(119, 140), "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')")
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa.Contiene(119, 140, 1, 72, 80), "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')")
DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}")
Else
DtPendientes = Nothing
@@ -1115,6 +1115,7 @@ Partial Class Inventarios_RecepcionAlmacen
CveFleteSurtir = pCveImportacion
CveFleteOrdenCompra = ObjInventario.DtResultados.Rows(0)("CveOC").ToString.ToEntero
CveFleteCompra = ObjInventario.DtResultados.Rows(0)("CveCompra").ToString.ToEntero
CveImportacionCompra = CveFleteCompra ' se iguala para que al guardar el movimiento, se toma esta variable
LbProveedor.Text = ObjInventario.DtResultados.Rows(0)("RazonSocial").ToString
HLFolio.Text = ObjInventario.DtResultados.Rows(0)("Folio").ToString
If UsuarioActual.TienePermisoProceso(201) Then

View File

@@ -308,7 +308,7 @@
<%--<asp:BoundField HeaderText="Direccion Envio" HeaderStyle-HorizontalAlign="Left" DataField="DireccionEnvio" ItemStyle-Width="20%" />--%>
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Precio" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Right" DataField="Precio" Visible="false" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Serie" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" DataField="Serie" Visible="false" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Serie" DataField="Serie" Visible="false" ItemStyle-Width="5%" />
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="Si" />

View File

@@ -158,7 +158,7 @@ Partial Class Inventarios_TrasladoSolicitud
LbFolio.Text = ObjInventarios.DtResultados.Rows(0)("FolioTraspaso").ToString
TxtObservaciones.Text = ObjInventarios.DtResultados.Rows(0)("ObservacionesTraspaso").ToString
TempDT = ObjInventarios.DtResultados
GvDatos.DataSource = ObjInventarios.DtResultados
GvDatos.DataBind()
@@ -269,6 +269,7 @@ Partial Class Inventarios_TrasladoSolicitud
LblEstatusAutorizo.Text = If(EstatusAlmacen = 2, "Aceptado", "Rechazado")
LblUsaurioAutorizo.Text = ObjInventarios.DtResultados.Rows(0)("NombreAutoriza").ToString()
LblFechaAutoriza.Text = ObjInventarios.DtResultados.Rows(0)("FechaAutorizacion").ToString().ToDate().ToString("dd/MM/yyyy")
GvDatos.Columns(6).Visible = False ' se oculta la columna de eliminar
End If

View File

@@ -174,7 +174,7 @@
<label class="col-md-2">Chofer:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<label class="col-md-2">F. Entrega:</label>
@@ -198,20 +198,20 @@
</div>
<div class="col-md-2">
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="Placa"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div id="divPlacaEspecificacion" runat="server">
<label class="col-md-2">Placa:</label>
<div class="col-md-2">
<asp:TextBox runat="server" Text="" ID="TxtPlaca" CssClass="form-control" />
<asp:RequiredFieldValidator ID="RfvTxtPlaca" runat="server" ControlToValidate="TxtPlaca" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RfvTxtPlaca" runat="server" Enabled="false" ControlToValidate="TxtPlaca" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceTxtPlaca" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtPlaca" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<label class="col-md-2">Especificación de la Unidad:</label>
<div class="col-md-2">
<asp:TextBox runat="server" Text="" ID="TxtEspecifUnidad" CssClass="form-control" />
<asp:RequiredFieldValidator ID="RfvTxtEspecifUnidad" runat="server" ControlToValidate="TxtEspecifUnidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Especificación Unidad''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RfvTxtEspecifUnidad" runat="server" Enabled="false" ControlToValidate="TxtEspecifUnidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Especificación Unidad''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceTxtEspecifUnidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtEspecifUnidad" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>

View File

@@ -210,6 +210,13 @@ Partial Class Inventarios_TraspasoAlmacen
DivEmitirTimbrado.Visible = True
LblEmitirTimbrado.Visible = True
ChkEmitirTimbrado.Checked = True
Dim HabilitarValidators As Boolean = UsuarioActual.CveEmpresa.Contiene(119)
RfvDdlChofer.Enabled = HabilitarValidators
RfvDdlUnidadCamion.Enabled = HabilitarValidators
RfvTxtPlaca.Enabled = HabilitarValidators
RfvTxtEspecifUnidad.Enabled = HabilitarValidators
End If
CantidadTotal = 0

View File

@@ -119,7 +119,7 @@ Partial Class Ventas_RepRecuperacion
End If
If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero,
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero,
EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjMovtos.DtResultados
DtDatos = ObjMovtos.DtResultados

View File

@@ -21048,7 +21048,7 @@ Partial Class Ventas
If CveMovimientoEntradaGeneral > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=-3, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
Return False
End If
Next
@@ -22843,12 +22843,55 @@ Partial Class Ventas
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
Dim difTmp As Decimal = Importe - importeNC
'el ajuste procede si no tiene iva,ni ieps, con iva sin ieps,
If Math.Abs(difTmp) > 0.00D Then
'asusto la diferencia en el último concepto
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + difTmp
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado
'filtro si hay renglon sin impuestos.
Dim drDIF As DataRow() = DtImpuestosLocal.Select("ImporteIVA = 0 AND ImporteIEPS = 0")
If drDIF IsNot Nothing AndAlso drDIF.Length > 0 Then
Dim ImporteAjustado0 As Decimal = drDIF(0)("ImporteTotal").ToString().ToDecimal + difTmp
drDIF(0)("ImporteTotal") = ImporteAjustado0
drDIF(0)("ImportePU") = ImporteAjustado0
Else
'filtro si hay renglon sin impuestos.
Dim drDIF2 As DataRow() = DtImpuestosLocal.Select("ImporteIVA > 0 AND ImporteIEPS = 0")
If drDIF2 IsNot Nothing AndAlso drDIF2.Length > 0 Then
Dim PorIVA As Decimal = drDIF2(0)("PorcentajeIVA").ToString().ToDecimal
Dim ImporteAjustado1 As Decimal = drDIF2(0)("ImporteTotal").ToString().ToDecimal + (difTmp / (1 + PorIVA)) 'saco el PU sin iva
drDIF2(0)("ImportePU") = ImporteAjustado1
drDIF2(0)("ImporteTotal") = ImporteAjustado1
drDIF2(0)("ImporteIVA") = (ImporteAjustado1) * drDIF2(0)("PorcentajeIVA").ToString().ToDecimal
Else
' ajustar cuando tiene ieps y no iva
Dim drDIF3 As DataRow() = DtImpuestosLocal.Select("ImporteIVA = 0 AND ImporteIEPS > 0")
If drDIF3 IsNot Nothing AndAlso drDIF3.Length > 0 Then
Dim PorIEPS As Decimal = drDIF3(0)("PorcentajeIEPS").ToString().ToDecimal
Dim ImporteAjustado1 As Decimal = drDIF3(0)("ImporteTotal").ToString().ToDecimal + (difTmp / (1 + PorIEPS)) 'saco el PU sin iva
drDIF3(0)("ImportePU") = ImporteAjustado1
drDIF3(0)("ImporteTotal") = ImporteAjustado1
drDIF3(0)("ImporteIEPS") = (ImporteAjustado1) * drDIF3(0)("PorcentajeIEPS").ToString().ToDecimal
Else
' ajustar cuando tiene ieps e iva
Dim drDIF4 As DataRow() = DtImpuestosLocal.Select("ImporteIVA > 0 AND ImporteIEPS > 0")
If drDIF4 IsNot Nothing AndAlso drDIF4.Length > 0 Then
Dim PorIEPS As Decimal = drDIF4(0)("PorcentajeIEPS").ToString().ToDecimal
Dim PorIVA As Decimal = drDIF4(0)("PorcentajeIVA").ToString().ToDecimal
Dim ImporteAntesIVA As Decimal = (difTmp / (1 + PorIVA))
Dim ImporteAjustado1 As Decimal = drDIF4(0)("ImporteTotal").ToString().ToDecimal + +(ImporteAntesIVA / (1 + PorIEPS)) 'saco el PU sin iva
drDIF4(0)("ImportePU") = ImporteAjustado1
drDIF4(0)("ImporteTotal") = ImporteAjustado1
drDIF4(0)("ImporteIEPS") = (ImporteAjustado1) * drDIF4(0)("PorcentajeIEPS").ToString().ToDecimal
drDIF4(0)("ImporteIVA") = (ImporteAjustado1 + drDIF4(0)("ImporteIEPS").ToString.ToDecimal) * drDIF4(0)("PorcentajeIVA").ToString().ToDecimal
End If
End If
End If
End If
End If
If Not NCDescuento Then