This commit is contained in:
@@ -109,15 +109,13 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="Widthall" style="text-align: right!important; margin-top: 2px!important; margin-bottom: 2px!important">
|
<div class="Widthall" style="text-align: right!important;"">
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin: 5px">
|
<div class="row" style="margin: 5px">
|
||||||
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -125,7 +123,7 @@
|
|||||||
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveFolioGarantia,FolioGarantia,CveEstatus,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite"
|
DataKeyNames="CveFolioGarantia,FolioGarantia,CveEstatus,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite"
|
||||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Folios de Garantía"
|
EmptyDataText="No se encontraron registros" ToolTip="Listado de Folios de Garantía"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
||||||
data-sort="true"
|
data-sort="true"
|
||||||
data-freezerows="1"
|
data-freezerows="1"
|
||||||
GridLines="None">
|
GridLines="None">
|
||||||
@@ -162,8 +160,12 @@
|
|||||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Total">
|
||||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="lblTotal" runat="server" Text='<%# Eval("NumRegistros") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Usuario">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -370,20 +372,12 @@
|
|||||||
<asp:Label Text="Ver Ajustes de garantía" runat="server" />
|
<asp:Label Text="Ver Ajustes de garantía" runat="server" />
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>Folio Garantia:</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label ID="LblFolio" Text="" Font-Bold="true" runat="server" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">Folio Garantia:<asp:Label ID="LblFolio" Text="" Font-Bold="true" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
|
<div class="Widthall" style="text-align: right!important; ">
|
||||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvGarantiasDetalle.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvGarantiasDetalle.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
@@ -395,21 +389,21 @@
|
|||||||
<asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall"
|
<asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall"
|
||||||
OnRowDataBound="GvGarantiasDetalle_RowDataBound" DataKeyNames="Consecutivo,CodigoCliente,CodigoSucursal,Codigo,CodigoProducto2,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None">
|
OnRowDataBound="GvGarantiasDetalle_RowDataBound" DataKeyNames="Consecutivo,CodigoCliente,CodigoSucursal,Codigo,CodigoProducto2,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Consecutivo" HeaderText="Consecutivo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="Consecutivo" HeaderText="Consec" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField DataField="FolioRemision" HeaderText="Remisión" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
<asp:BoundField DataField="FolioRemision" HeaderText="Remisión" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
|
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
|
||||||
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
<asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||||
<asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField DataField="CodigoEnsamble" HeaderText="Código Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="CodigoEnsamble" HeaderText="C. Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField DataField="CodigoLinea" HeaderText="Código Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="CodigoLinea" HeaderText="C. Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField DataField="CodigoInspeccion" HeaderText="Código Inspeccion" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="CodigoInspeccion" HeaderText="C. Inspección" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField DataField="TipoComprobanteTexto" HeaderText="Tipo Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="TipoComprobanteTexto" HeaderText="Tipo Comp." ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField DataField="Comprobante" HeaderText="Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="Comprobante" HeaderText="Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField DataField="FechaAjuste" HeaderText="Fecha Ajuste" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
<asp:BoundField DataField="FechaAjuste" HeaderText="Fecha Ajuste" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||||
<asp:TemplateField HeaderText="Descargar PDF" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px">
|
<asp:TemplateField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HlDescargarPDF" runat="server" Text="<i class='fa fa-file-pdf-o' style='font-size:15px; font-weight:bold; color:dimgray;'></i>" Target="_blank" />
|
<asp:HyperLink ID="HlDescargarPDF" runat="server" Text="<i class='fa fa-file-pdf-o' style='font-size:15px; font-weight:bold; color:dimgray;'></i>" Target="_blank" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -425,6 +419,7 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button ID="BtnGenerarTxt" Text="Generar Archivo" CssClass="btn btn-primary" runat="server" OnClick="BtnGenerarTxt_Click" />
|
<asp:Button ID="BtnGenerarTxt" Text="Generar Archivo" CssClass="btn btn-primary" runat="server" OnClick="BtnGenerarTxt_Click" />
|
||||||
<asp:Button ID="BtnExportarExcel" Text="Generar Excel" CssClass="btn btn-success" runat="server" OnClick="BtnExportarExcel_Click" />
|
<asp:Button ID="BtnExportarExcel" Text="Generar Excel" CssClass="btn btn-success" runat="server" OnClick="BtnExportarExcel_Click" />
|
||||||
|
<asp:HyperLink ID="HplGenerarSalida" Text="Generar Salida" CssClass="btn btn-warning " runat="server" />
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
|||||||
|
|
||||||
Dim objAcum As New ClsAcumuladores
|
Dim objAcum As New ClsAcumuladores
|
||||||
|
|
||||||
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor, Area:=-1, CveSubProyecto:=DdlSubProyectoFiltro.SelectedValue.ToEntero()) Then
|
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor, Area:=-1, CveSubProyecto:=DdlSubProyectoFiltro.SelectedValue.ToEntero()) Then
|
||||||
GvFolioGarantia.DataSource = objAcum.DtResultados
|
GvFolioGarantia.DataSource = objAcum.DtResultados
|
||||||
Else
|
Else
|
||||||
GvFolioGarantia.DataSource = Nothing
|
GvFolioGarantia.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -124,7 +124,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
|||||||
'TxtCompra.Text = ""
|
'TxtCompra.Text = ""
|
||||||
'TxtPuntos.Text = ""
|
'TxtPuntos.Text = ""
|
||||||
|
|
||||||
CargadatosGvFolioGarantia(-1, "-1")
|
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, "-1")
|
||||||
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||||
UpGral.Update()
|
UpGral.Update()
|
||||||
@@ -144,7 +144,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
|||||||
'TxtCompra.Text = ""
|
'TxtCompra.Text = ""
|
||||||
'TxtPuntos.Text = ""
|
'TxtPuntos.Text = ""
|
||||||
|
|
||||||
CargadatosGvFolioGarantia(-1, "-1")
|
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, "-1")
|
||||||
UpModalFolioGarantia.Update()
|
UpModalFolioGarantia.Update()
|
||||||
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||||
@@ -176,7 +176,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
|||||||
End If
|
End If
|
||||||
objAcum.Dispose()
|
objAcum.Dispose()
|
||||||
|
|
||||||
CargadatosGvFolioGarantia(-1, "-1")
|
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, "-1")
|
||||||
|
|
||||||
CveFolioGarantia = -1
|
CveFolioGarantia = -1
|
||||||
End Sub
|
End Sub
|
||||||
@@ -189,8 +189,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
|||||||
LtlTituloModalFolioGarantia.Text = "Editar Folio Garantía"
|
LtlTituloModalFolioGarantia.Text = "Editar Folio Garantía"
|
||||||
Actualizar = True
|
Actualizar = True
|
||||||
|
|
||||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
|
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
|
||||||
|
|
||||||
TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia")
|
TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia")
|
||||||
DdlEstatusEditar.SelectedValueExist(GvRow.DataKey("CveEstatus"))
|
DdlEstatusEditar.SelectedValueExist(GvRow.DataKey("CveEstatus"))
|
||||||
TxtLimite.Text = GvRow.DataKey("Limite")
|
TxtLimite.Text = GvRow.DataKey("Limite")
|
||||||
@@ -225,6 +225,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
|||||||
Using ObjAcum As New ClsAcumuladores
|
Using ObjAcum As New ClsAcumuladores
|
||||||
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
|
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
|
||||||
GvGarantiasDetalle.DataSource = ObjAcum.DtResultados
|
GvGarantiasDetalle.DataSource = ObjAcum.DtResultados
|
||||||
|
HplGenerarSalida.NavigateUrl = "/Inventarios/TraspasoAlmacen.aspx?CveFolioGarantia=" & CveFolioGarantia
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
GvGarantiasDetalle.DataBind()
|
GvGarantiasDetalle.DataBind()
|
||||||
@@ -307,4 +309,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
|||||||
e.Row.FCHyperLink("HlDescargarPDF").NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=AJUSTE&CveGarantiaDetalle={e.Row.DBCampo("CveGarantiaDetalle")}")}"
|
e.Row.FCHyperLink("HlDescargarPDF").NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=AJUSTE&CveGarantiaDetalle={e.Row.DBCampo("CveGarantiaDetalle")}")}"
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnGenerarSalida_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -5514,13 +5514,23 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "Camiones"
|
#Region "Camiones"
|
||||||
Public Function GetCamiones(CveCamion As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetCamiones(CveCamion As Integer, CveEmpresa As Integer, Optional CveTipoCamion As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_CamionesGet")
|
DataAdapter("PA_Inv_CamionesGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveTipoCamion", SqlDbType.Int).Value = CveTipoCamion
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -5623,6 +5633,13 @@ Public Class ClsInventarios
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function GetExistenciasMedRin(CvePS As Integer, CveEmpresa As Integer, CveRinTamaño As Integer, CveMedida As Integer) As Boolean
|
Public Function GetExistenciasMedRin(CvePS As Integer, CveEmpresa As Integer, CveRinTamaño As Integer, CveMedida As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_ExistenciaMedRinGet")
|
DataAdapter("PA_Inv_ExistenciaMedRinGet")
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
If Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then
|
If Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then
|
||||||
|
|
||||||
Dim dr = DirectCast(Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha = '{0}'", Fecha))
|
Dim dr = DirectCast(Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha <= '{0}'", Fecha), Orderby:="Fecha DESC")
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
fluctuacion.TCFluctuacion = dr("TCFluctuacion").ToString().ToDecimal()
|
fluctuacion.TCFluctuacion = dr("TCFluctuacion").ToString().ToDecimal()
|
||||||
fluctuacion.FechaFluctuacion = dr("FechaFluctuacion").ToString().ToDateTime()
|
fluctuacion.FechaFluctuacion = dr("FechaFluctuacion").ToString().ToDateTime()
|
||||||
@@ -7131,13 +7131,16 @@ Public Class ClsPaginas
|
|||||||
Dim VendedorMail As String = ""
|
Dim VendedorMail As String = ""
|
||||||
Dim VendedorTelefono As String = ""
|
Dim VendedorTelefono As String = ""
|
||||||
Dim VendedorCelular As String = ""
|
Dim VendedorCelular As String = ""
|
||||||
|
|
||||||
Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
|
Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
|
||||||
|
|
||||||
If Not IsNothing(RowVendedor) Then
|
If Not IsNothing(RowVendedor) Then
|
||||||
VendedorNombre = RowVendedor("Vendedor").ToString
|
VendedorNombre = RowVendedor("Vendedor").ToString
|
||||||
VendedorMail = RowVendedor("Correo").ToString
|
VendedorMail = RowVendedor("Correo").ToString
|
||||||
VendedorTelefono = RowVendedor("Telefono").ToString
|
VendedorTelefono = RowVendedor("Telefono").ToString
|
||||||
VendedorCelular = RowVendedor("Celular").ToString
|
VendedorCelular = RowVendedor("Celular").ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
params.Add(New ReportParameter("VendedorNombre", VendedorNombre))
|
params.Add(New ReportParameter("VendedorNombre", VendedorNombre))
|
||||||
params.Add(New ReportParameter("VendedorMail", VendedorMail))
|
params.Add(New ReportParameter("VendedorMail", VendedorMail))
|
||||||
params.Add(New ReportParameter("VendedorTelefono", VendedorTelefono))
|
params.Add(New ReportParameter("VendedorTelefono", VendedorTelefono))
|
||||||
|
|||||||
@@ -5270,14 +5270,15 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Optional CveEstatus As Integer = -1) As Boolean
|
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_AutorizacionLimitesGet")
|
DataAdapter("PA_Vta_AutorizacionLimitesGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -4820,24 +4820,55 @@ Namespace Modelos
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Vigencia.Estado.ToUpper().Contains("CANCELADO") Then
|
If Vigencia.Estado.ToUpper().Contains("CANCELADO") Then
|
||||||
ContinuarCancelacion = False
|
ContinuarCancelacion = False
|
||||||
ObtenerAcuse = True
|
ObtenerAcuse = True
|
||||||
Dim solicitud = New WSGF.Service1SoapClient()
|
RequiereAceptacion = False
|
||||||
Dim acuse = solicitud.GetAcuse(UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx", "rene2018", FolioFiscal)
|
|
||||||
|
|
||||||
If acuse.Estado = 0 Then
|
'VERIFICA EN EL SERVICIO SI SE CANCELO
|
||||||
Dim xmlAcuse = New System.Xml.XmlDocument()
|
Try
|
||||||
xmlAcuse.LoadXml(DecodeBase64(acuse.CfdiB64))
|
Dim solicitud = New WSGF.Service1SoapClient()
|
||||||
CancelacionAcuse = xmlAcuse.GetElementsByTagName("SignatureValue")(0).InnerText
|
Dim acuse = solicitud.GetAcuse(UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx", "rene2018", FolioFiscal)
|
||||||
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate()
|
|
||||||
CveEstatus = 5
|
If acuse.Estado = 0 Then
|
||||||
Else
|
Dim xmlAcuse = New System.Xml.XmlDocument()
|
||||||
|
xmlAcuse.LoadXml(DecodeBase64(acuse.CfdiB64))
|
||||||
|
CancelacionAcuse = xmlAcuse.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||||
|
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate()
|
||||||
|
CveEstatus = 5
|
||||||
|
Else
|
||||||
|
CancelacionFecha = Now.Date
|
||||||
|
CancelacionAcuse = ""
|
||||||
|
CveEstatus = 5
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
GuardaLog(ex.ToString())
|
||||||
CancelacionFecha = Now.Date
|
CancelacionFecha = Now.Date
|
||||||
CancelacionAcuse = ""
|
CancelacionAcuse = ""
|
||||||
CveEstatus = 5
|
End Try
|
||||||
|
|
||||||
|
'SI NO SE PUDO OBTENER DEL SERVICIO, UTILIZA EL METODO DE CANCELACION PARA OBTENER EL ACUSE
|
||||||
|
If CancelacionAcuse = "" Then
|
||||||
|
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, TotalT, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion, FolioSustitucion:=FolioSustitucion) Then
|
||||||
|
'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN
|
||||||
|
If RequiereAceptacion Then
|
||||||
|
CancelacionFecha = Now.Date
|
||||||
|
CveEstatus = 20
|
||||||
|
Else
|
||||||
|
CancelacionFecha = ObjCancelacion.CancelacionFecha
|
||||||
|
CveEstatus = 5
|
||||||
|
End If
|
||||||
|
CancelacionAcuse = ObjCancelacion.CancelacionAcuse
|
||||||
|
Else
|
||||||
|
Retorno.Mensaje = "Los servicios de cancelación del SAT no se encuentran disponibles o presentan time out. Intente de nuevo en unos minutos.<br/>Origen del error: WebService www.sat.gob.mx"
|
||||||
|
Retorno.TipoMensaje = TipoMensaje.MsgError
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
ElseIf Vigencia.Estado.ToUpper().Contains("VIGENTE") Then
|
ElseIf Vigencia.Estado.ToUpper().Contains("VIGENTE") Then
|
||||||
|
|
||||||
If Vigencia.EstatusCancelacion.ToUpper() = "EN PROCESO" Then
|
If Vigencia.EstatusCancelacion.ToUpper() = "EN PROCESO" Then
|
||||||
@@ -9304,21 +9335,28 @@ Namespace Modelos
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
|
||||||
|
|
||||||
Property GlobalDTContaConceptosContables(CvePlantillaPoliza As Integer) As DataTable
|
|
||||||
Get
|
Get
|
||||||
If CvePlantillaPoliza <> -1 Then
|
Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
|
||||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "", DataViewRowState.CurrentRows)
|
'sino existe, recarga los datos
|
||||||
|
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||||
|
Using ObjContabilidad As New ClsContabilidad
|
||||||
|
If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
|
||||||
|
End Using
|
||||||
|
|
||||||
|
End If
|
||||||
|
If CveConceptoContable <> -1 Then
|
||||||
|
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
|
||||||
GlobalDTContaConceptosContables = Dv.ToTable
|
GlobalDTContaConceptosContables = Dv.ToTable
|
||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
Else
|
Else
|
||||||
GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable)
|
GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
HttpContext.Current.Application("GlobalDTContaConceptosContables") = value
|
Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -133,6 +133,10 @@ Public Class Timbrado
|
|||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Dim MsgCancelacion As New StringBuilder
|
Dim MsgCancelacion As New StringBuilder
|
||||||
|
|
||||||
|
If CvePACCancelacion = 3 Then
|
||||||
|
ValidaFactura = False
|
||||||
|
End If
|
||||||
|
|
||||||
If Not (Empresa.Funcionalidad(529) = "1") Then
|
If Not (Empresa.Funcionalidad(529) = "1") Then
|
||||||
If ValidaFactura Then
|
If ValidaFactura Then
|
||||||
Dim Vigencia = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
Dim Vigencia = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||||
@@ -448,28 +452,42 @@ Public Class Timbrado
|
|||||||
Dim resp As Profact.TimbraCFDI.ResultadoConsulta
|
Dim resp As Profact.TimbraCFDI.ResultadoConsulta
|
||||||
resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal)
|
resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal)
|
||||||
MsgCancelacion.AppendFormat("-3.3")
|
MsgCancelacion.AppendFormat("-3.3")
|
||||||
If resultadoCancelacion.Exitoso Then
|
|
||||||
|
'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE
|
||||||
|
If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError = "202" Then
|
||||||
MsgCancelacion.AppendFormat("-3.4")
|
MsgCancelacion.AppendFormat("-3.4")
|
||||||
CancelacionMensaje = resultadoCancelacion.Descripcion
|
CancelacionMensaje = resultadoCancelacion.Descripcion
|
||||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||||
|
|
||||||
|
MsgCancelacion.AppendFormat("-3.4.1")
|
||||||
Try
|
Try
|
||||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)))
|
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
xmlDoc.LoadXml(resp.Xml)
|
If resp.NumeroError.ToEntero() > 0 Then
|
||||||
|
CancelacionMensaje = resp.Descripcion
|
||||||
|
Else
|
||||||
|
Try
|
||||||
|
xmlDoc.LoadXml(resp.Xml)
|
||||||
|
Catch ex2 As Exception
|
||||||
|
Me.OnError("Ocurrió un error al leer el xml", ex)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
MsgCancelacion.AppendFormat("-3.4.1")
|
If xmlDoc.HasChildNodes Then
|
||||||
|
Dim xpath As String = "Acuse/Folios"
|
||||||
|
Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||||
|
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||||
|
MsgCancelacion.AppendFormat("-3.4.2")
|
||||||
|
xpath = "Acuse/Signature"
|
||||||
|
nodes = xmlDoc.SelectNodes(xpath)
|
||||||
|
MsgCancelacion.AppendFormat("-3.4.3")
|
||||||
|
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||||
|
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
||||||
|
Else
|
||||||
|
CancelacionFecha = Now
|
||||||
|
End If
|
||||||
|
|
||||||
Dim xpath As String = "Acuse/Folios"
|
|
||||||
Dim nodes = xmlDoc.SelectNodes(xpath)
|
|
||||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
|
||||||
MsgCancelacion.AppendFormat("-3.4.2")
|
|
||||||
xpath = "Acuse/Signature"
|
|
||||||
nodes = xmlDoc.SelectNodes(xpath)
|
|
||||||
MsgCancelacion.AppendFormat("-3.4.3")
|
|
||||||
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
|
||||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Else
|
Else
|
||||||
MsgCancelacion.AppendFormat("-3.5")
|
MsgCancelacion.AppendFormat("-3.5")
|
||||||
|
|||||||
@@ -204,7 +204,6 @@ Partial Class Bancos_RepEgresosSinComprobante
|
|||||||
Try
|
Try
|
||||||
For Each gr As GridViewRow In GvESC.Rows
|
For Each gr As GridViewRow In GvESC.Rows
|
||||||
If gr.FCCheckBox("Chk").Checked Then
|
If gr.FCCheckBox("Chk").Checked Then
|
||||||
Dim CveCuenta As Integer = 0
|
|
||||||
Dim IdCtaContable As Integer = 0
|
Dim IdCtaContable As Integer = 0
|
||||||
Dim TipoMovtoOtIngresos As Boolean = True
|
Dim TipoMovtoOtIngresos As Boolean = True
|
||||||
Dim TipoMovtoConcepto As Boolean = False
|
Dim TipoMovtoConcepto As Boolean = False
|
||||||
@@ -231,24 +230,18 @@ Partial Class Bancos_RepEgresosSinComprobante
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjConta.GetCuentaDobleConta(IdCtaContable, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
|
||||||
CveCuenta = ObjConta.DtResultados.Rows(0)("CveCuenta").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
|
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
|
||||||
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
|
||||||
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
|
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
|
||||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
ImporteMX:=gr.DataKey("Saldo").ToDecimal) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
|
||||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero, CveCuenta:=CveCuenta) Then
|
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -292,7 +285,6 @@ Partial Class Bancos_RepEgresosSinComprobante
|
|||||||
Try
|
Try
|
||||||
For Each gr As GridViewRow In GvPersonal.Rows
|
For Each gr As GridViewRow In GvPersonal.Rows
|
||||||
If gr.FCCheckBox("Chk").Checked Then
|
If gr.FCCheckBox("Chk").Checked Then
|
||||||
Dim CveCuenta As Integer = 0
|
|
||||||
Dim IdCtaContPersonal As Integer = 0
|
Dim IdCtaContPersonal As Integer = 0
|
||||||
Dim CveConceptoContable As Integer
|
Dim CveConceptoContable As Integer
|
||||||
Dim TipoMovtoOtIngresos As Boolean = True
|
Dim TipoMovtoOtIngresos As Boolean = True
|
||||||
@@ -319,24 +311,18 @@ Partial Class Bancos_RepEgresosSinComprobante
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjConta.GetCuentaDobleConta(IdCtaContPersonal, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
|
||||||
CveCuenta = ObjConta.DtResultados.Rows(0)("CveCuenta").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
|
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
|
||||||
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
|
||||||
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
|
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
|
||||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=-1) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
|
||||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=-1) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
@@ -3989,7 +3989,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim TotalRealDevolucion As Decimal = 0
|
||||||
|
|
||||||
Dim EstatusCredito As Integer = 0
|
Dim EstatusCredito As Integer = 0
|
||||||
Dim CveSubProyecto As Integer = 0
|
Dim CveSubProyecto As Integer = 0
|
||||||
@@ -4689,6 +4689,8 @@ Partial Class Compras_Compras
|
|||||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||||
Devolucion = guardardevolucion(ObjInventario, ObjCompras.CveCompra, TxtSubTotal.Text.ToDecimal, TxtFecha.Text.Trim.ToDate)
|
Devolucion = guardardevolucion(ObjInventario, ObjCompras.CveCompra, TxtSubTotal.Text.ToDecimal, TxtFecha.Text.Trim.ToDate)
|
||||||
|
|
||||||
|
TotalRealDevolucion = Devolucion.Total
|
||||||
|
|
||||||
TieneError = Devolucion.TieneError
|
TieneError = Devolucion.TieneError
|
||||||
End If
|
End If
|
||||||
Dim ErrorDetalles As Boolean = False
|
Dim ErrorDetalles As Boolean = False
|
||||||
@@ -6856,12 +6858,29 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
|
||||||
|
Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion
|
||||||
|
|
||||||
|
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
Dim CveSubProyecto69 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0 ").ToEntero
|
||||||
|
Dim CveClasificacion69 As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacion69}").ToString.ToEntero
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaDevolucion, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable69, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69, CveClasificacion:=CveClasificacion69) Then
|
||||||
|
ErrorPrepoliza = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=TotalRealDevolucion, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -7268,17 +7287,17 @@ Partial Class Compras_Compras
|
|||||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
||||||
For Each Gvr As GridViewRow In GvFacturaNC.Rows
|
For Each Gvr As GridViewRow In GvFacturaNC.Rows
|
||||||
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then
|
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then
|
||||||
Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
|
'Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
|
||||||
Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
|
Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
|
||||||
Dim importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
|
Dim importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
|
||||||
If ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then
|
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
|
'ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -9887,6 +9906,8 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
'---------------------------------------------------------------------------------------------------
|
||||||
''EMPIEZA: SI USA AC
|
''EMPIEZA: SI USA AC
|
||||||
If UsuarioActual.Empresa.UsaAC AndAlso IdPoliza > 0 Then
|
If UsuarioActual.Empresa.UsaAC AndAlso IdPoliza > 0 Then
|
||||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
@@ -10209,7 +10230,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
''TERMINA: SI USA AC
|
''TERMINA: SI USA AC
|
||||||
|
|
||||||
|
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
If Not ErrorAC Then
|
If Not ErrorAC Then
|
||||||
Dim Cont As Integer = 0
|
Dim Cont As Integer = 0
|
||||||
@@ -10710,6 +10731,7 @@ Partial Class Compras_Compras
|
|||||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
|
Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia)
|
||||||
GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -14262,6 +14284,11 @@ Partial Class Compras_Compras
|
|||||||
'*se envia true si hubo un error*'
|
'*se envia true si hubo un error*'
|
||||||
|
|
||||||
Private Function guardardevolucion(ObjInventario As ClsInventarios, CveCompra As Integer, subtotal As Decimal, Fecha As Date) As MMensajeDevolucion
|
Private Function guardardevolucion(ObjInventario As ClsInventarios, CveCompra As Integer, subtotal As Decimal, Fecha As Date) As MMensajeDevolucion
|
||||||
|
|
||||||
|
|
||||||
|
Dim TotalSumaPU As Decimal = 0.0D
|
||||||
|
|
||||||
|
|
||||||
Dim ErrorMovInv As Boolean = False
|
Dim ErrorMovInv As Boolean = False
|
||||||
Dim CveAlmacen As Integer = DdlAlmacenDevolucion.SelectedValue.ToEntero()
|
Dim CveAlmacen As Integer = DdlAlmacenDevolucion.SelectedValue.ToEntero()
|
||||||
Dim subtotaldevolucion As Double = 0
|
Dim subtotaldevolucion As Double = 0
|
||||||
@@ -14271,6 +14298,7 @@ Partial Class Compras_Compras
|
|||||||
Dim cantidad As Double = 0.0
|
Dim cantidad As Double = 0.0
|
||||||
Dim TotalAlmacen As Decimal = 0
|
Dim TotalAlmacen As Decimal = 0
|
||||||
|
|
||||||
|
|
||||||
For Each Dr As GridViewRow In GVDevolucion.Rows
|
For Each Dr As GridViewRow In GVDevolucion.Rows
|
||||||
'CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero
|
'CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero
|
||||||
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
|
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
|
||||||
@@ -14309,6 +14337,7 @@ Partial Class Compras_Compras
|
|||||||
PU = (((Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)) + dif) / Dr.FCTextBox("TxtCantidad").Text.ToDecimal
|
PU = (((Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)) + dif) / Dr.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr.FCTextBox("TxtCantidad").Text.ToDouble, Dr.DataKey("CveUM").ToString.ToEntero, Dr.DataKey("CvePS").ToString.ToEntero, PU, -1, CveMovimientoDetalleEntrada:=Dr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr.FCTextBox("TxtCantidad").Text.ToDouble, Dr.DataKey("CveUM").ToString.ToEntero, Dr.DataKey("CvePS").ToString.ToEntero, PU, -1, CveMovimientoDetalleEntrada:=Dr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -14323,12 +14352,26 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||||
|
|
||||||
|
For Each drow As DataRow In ObjInventario.DtResultados.Rows
|
||||||
|
TotalSumaPU = TotalSumaPU + drow("Total").ToString.ToDecimal
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Return New MMensajeDevolucion() With
|
Return New MMensajeDevolucion() With
|
||||||
{
|
{
|
||||||
.CveMovimiento = CveMovimientoEntrada,
|
.CveMovimiento = CveMovimientoEntrada,
|
||||||
.DebeRealizarDevolucion = realizadevolucion,
|
.DebeRealizarDevolucion = realizadevolucion,
|
||||||
.TieneError = ErrorMovInv
|
.TieneError = ErrorMovInv,
|
||||||
|
.Total = TotalSumaPU
|
||||||
}
|
}
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub cargaddldevoluciones(CveProveedor As Integer, SubTotal As Double)
|
Private Sub cargaddldevoluciones(CveProveedor As Integer, SubTotal As Double)
|
||||||
@@ -21032,4 +21075,5 @@ Public Class MMensajeDevolucion
|
|||||||
Public Property CveMovimiento As Integer
|
Public Property CveMovimiento As Integer
|
||||||
Public Property TieneError As Boolean
|
Public Property TieneError As Boolean
|
||||||
Public Property DebeRealizarDevolucion As Boolean
|
Public Property DebeRealizarDevolucion As Boolean
|
||||||
|
Public Property Total As Decimal
|
||||||
End Class
|
End Class
|
||||||
@@ -320,6 +320,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim lrds As New List(Of ReportDataSource)
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
@@ -4266,19 +4267,24 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
ObjAcum.Dispose()
|
ObjAcum.Dispose()
|
||||||
|
|
||||||
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
|
'Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
|
||||||
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
|
'Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
|
||||||
|
|
||||||
Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
|
'Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
params.Add(New ReportParameter("Direccion", Almacen))
|
params.Add(New ReportParameter("Direccion", Almacen))
|
||||||
params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
|
params.Add(New ReportParameter("FechaConFormato", Now.ToString("dd/MM/yyyy")))
|
||||||
'params.Add(New ReportParameter("FechaInicial", Fecha))
|
'params.Add(New ReportParameter("FechaInicial", Fecha))
|
||||||
'params.Add(New ReportParameter("FechaFinal", Today.ToString("dd/MM/yyyy")))
|
'params.Add(New ReportParameter("FechaFinal", Today.ToString("dd/MM/yyyy")))
|
||||||
params.Add(New ReportParameter("Sucursal", "Sucursal"))
|
params.Add(New ReportParameter("Sucursal", "Sucursal"))
|
||||||
params.Add(New ReportParameter("Cliente", NombreCliente))
|
params.Add(New ReportParameter("Cliente", NombreCliente))
|
||||||
|
params.Add(New ReportParameter("Folio", Folio))
|
||||||
|
params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy hh:mm tt")))
|
||||||
|
params.Add(New ReportParameter("Recibio", Recibio))
|
||||||
|
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||||
|
'params.Add(New ReportParameter("Observaciones", "Observaciones con un tamaño mas grande para ver como se ve en el ticket chico."))
|
||||||
|
|
||||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/UsadosEntradas.rdlc", UsuarioActual.CveEmpresa), DtMovimientos, params, "Reporte entrada usados", "PDF", "DsInventarios")
|
ImprimirPDF(String.Format("Empresas/{0}/Formatos/UsadosEntradas.rdlc", UsuarioActual.CveEmpresa), DtMovimientos, params, "Reporte entrada usados", "PDF", "DsInventarios")
|
||||||
Case 7
|
Case 7
|
||||||
|
|||||||
@@ -347,7 +347,7 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:CheckBox ID="ChkAnticipos" runat="server" Text="Incluye Anticipos" TextAlign="Left" Visible="false" />
|
<asp:CheckBox ID="ChkAnticipos" runat="server" Text="Incluye Anticipos" TextAlign="Left" Checked="true" Visible="false" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,7 +15,10 @@
|
|||||||
<Width>2.19837cm</Width>
|
<Width>2.19837cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>8.85259cm</Width>
|
<Width>6.04844cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>2.80415cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>1.41521cm</Width>
|
<Width>1.41521cm</Width>
|
||||||
@@ -196,6 +199,48 @@
|
|||||||
</Textbox>
|
</Textbox>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox8">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Serie</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</BottomBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Textbox13">
|
<Textbox Name="Textbox13">
|
||||||
@@ -420,6 +465,39 @@
|
|||||||
</Textbox>
|
</Textbox>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Serie">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Serie.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Left</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Serie</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<VerticalAlign>Bottom</VerticalAlign>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="PU">
|
<Textbox Name="PU">
|
||||||
@@ -500,6 +578,7 @@
|
|||||||
<TablixMember />
|
<TablixMember />
|
||||||
<TablixMember />
|
<TablixMember />
|
||||||
<TablixMember />
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
</TablixMembers>
|
</TablixMembers>
|
||||||
</TablixColumnHierarchy>
|
</TablixColumnHierarchy>
|
||||||
<TablixRowHierarchy>
|
<TablixRowHierarchy>
|
||||||
@@ -611,7 +690,7 @@
|
|||||||
<Height>0.72418in</Height>
|
<Height>0.72418in</Height>
|
||||||
<Style />
|
<Style />
|
||||||
</Body>
|
</Body>
|
||||||
<Width>7.72259in</Width>
|
<Width>7.70923in</Width>
|
||||||
<Page>
|
<Page>
|
||||||
<PageHeader>
|
<PageHeader>
|
||||||
<Height>5.08094cm</Height>
|
<Height>5.08094cm</Height>
|
||||||
@@ -639,7 +718,7 @@
|
|||||||
<Top>0.03803cm</Top>
|
<Top>0.03803cm</Top>
|
||||||
<Left>4.37423cm</Left>
|
<Left>4.37423cm</Left>
|
||||||
<Height>2.04667cm</Height>
|
<Height>2.04667cm</Height>
|
||||||
<Width>12.55984cm</Width>
|
<Width>12.37463cm</Width>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
@@ -733,9 +812,9 @@
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||||
<Top>0.63803cm</Top>
|
<Top>0.63803cm</Top>
|
||||||
<Left>17.07518cm</Left>
|
<Left>16.74886cm</Left>
|
||||||
<Height>0.6cm</Height>
|
<Height>0.6cm</Height>
|
||||||
<Width>1.2347cm</Width>
|
<Width>2.82632cm</Width>
|
||||||
<ZIndex>3</ZIndex>
|
<ZIndex>3</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -757,15 +836,15 @@
|
|||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style>
|
<Style>
|
||||||
<TextAlign>Right</TextAlign>
|
<TextAlign>Left</TextAlign>
|
||||||
</Style>
|
</Style>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||||
<Top>0.03803cm</Top>
|
<Top>0.03803cm</Top>
|
||||||
<Left>17.07518cm</Left>
|
<Left>16.74886cm</Left>
|
||||||
<Height>0.6cm</Height>
|
<Height>0.6cm</Height>
|
||||||
<Width>1.18203cm</Width>
|
<Width>1.50835cm</Width>
|
||||||
<ZIndex>4</ZIndex>
|
<ZIndex>4</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -923,9 +1002,9 @@
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||||
<Top>1.94386cm</Top>
|
<Top>1.94386cm</Top>
|
||||||
<Left>17.07518cm</Left>
|
<Left>16.74886cm</Left>
|
||||||
<Height>0.6cm</Height>
|
<Height>0.6cm</Height>
|
||||||
<Width>1.2347cm</Width>
|
<Width>1.56102cm</Width>
|
||||||
<ZIndex>9</ZIndex>
|
<ZIndex>9</ZIndex>
|
||||||
<Visibility>
|
<Visibility>
|
||||||
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
|
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
|
||||||
@@ -958,9 +1037,9 @@
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||||
<Top>1.34386cm</Top>
|
<Top>1.34386cm</Top>
|
||||||
<Left>17.07518cm</Left>
|
<Left>16.74886cm</Left>
|
||||||
<Height>0.6cm</Height>
|
<Height>0.6cm</Height>
|
||||||
<Width>2.07667cm</Width>
|
<Width>2.40299cm</Width>
|
||||||
<ZIndex>10</ZIndex>
|
<ZIndex>10</ZIndex>
|
||||||
<Visibility>
|
<Visibility>
|
||||||
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
|
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
|
||||||
@@ -1627,6 +1706,10 @@
|
|||||||
<DataField>Clasificacion</DataField>
|
<DataField>Clasificacion</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
</Field>
|
</Field>
|
||||||
|
<Field Name="Serie">
|
||||||
|
<DataField>Serie</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
</Fields>
|
</Fields>
|
||||||
<rd:DataSetInfo>
|
<rd:DataSetInfo>
|
||||||
<rd:DataSetName>DsInventarios</rd:DataSetName>
|
<rd:DataSetName>DsInventarios</rd:DataSetName>
|
||||||
|
|||||||
1273
Empresas/140/Formatos/UsadosEntradas.rdlc
Normal file
1273
Empresas/140/Formatos/UsadosEntradas.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -29,8 +29,8 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CveCompuesto,Compuesto,Estatus" CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Compuestos Activos">
|
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CveCompuesto,Compuesto,Estatus" CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Compuestos Activos">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Compuesto" ItemStyle-Width="20%" HeaderText="Conductor" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Compuesto" ItemStyle-Width="20%" HeaderText="Compuesto" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Vencimiento Licencia" ItemStyle-HorizontalAlign="center" />
|
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="center" />
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
|
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
|
||||||
|
|||||||
@@ -1137,8 +1137,7 @@
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2" style="text-align: left">
|
<div class="col-md-2" style="text-align: left">
|
||||||
|
<asp:LinkButton ID="LbDescargarExcelConceptos" OnClick="LbDescargarExcelConceptos_Click" runat="server" CssClass="btn btn-warning" Text="Descargar Plantilla" />
|
||||||
<asp:LinkButton ID="LbDescargarExcelConceptos" runat="server" CssClass="btn btn-warning" Text="Descargar Plantilla" />
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10" style="text-align: center">
|
<div class="col-md-10" style="text-align: center">
|
||||||
|
|||||||
@@ -4934,6 +4934,41 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LbDescargarExcelConceptos_Click(sender As Object, e As EventArgs)
|
||||||
|
DescargarFormato()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub DescargarFormato()
|
||||||
|
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoRecepcionAlmacen.xlsx"
|
||||||
|
Dim dtt As New DataTable
|
||||||
|
dtt = DtInv.Copy()
|
||||||
|
dtt.Columns.Remove("Cantidad")
|
||||||
|
dtt.Columns("CantidadF").ColumnName = "Cantidad"
|
||||||
|
dtt.Columns("PS").ColumnName = "Producto"
|
||||||
|
dtt.Columns("Codigo").ColumnName = "Código"
|
||||||
|
|
||||||
|
Dim existingcol As New List(Of String) '= {"Cantidad", "Producto", "Código"}
|
||||||
|
|
||||||
|
For Each col As DataColumn In dtt.Columns
|
||||||
|
If Not col.ColumnName.Contiene("Cantidad", "Producto", "Código") Then
|
||||||
|
existingcol.Add(col.ColumnName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each colName As String In existingcol
|
||||||
|
dtt.Columns.Remove(colName)
|
||||||
|
Next
|
||||||
|
|
||||||
|
dtt.Columns("Cantidad").SetOrdinal(0)
|
||||||
|
dtt.Columns("Código").SetOrdinal(1)
|
||||||
|
dtt.Columns("Producto").SetOrdinal(2)
|
||||||
|
|
||||||
|
dtt.Columns.Add("Serie", GetType(String))
|
||||||
|
dtt.ExportToExcel("FormatoRecepcionAlmacen.xlsx")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
'Protected Sub BtnGuardarDocumento_Click(sender As Object, e As EventArgs)
|
'Protected Sub BtnGuardarDocumento_Click(sender As Object, e As EventArgs)
|
||||||
@@ -5041,4 +5076,5 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -568,7 +568,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" ValidationGroup="GrpAjuste" />
|
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" />
|
||||||
<asp:Button ID="BtnAgregarProductoAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnAgregarProductoAjuste_Click" runat="server" Text="Agregar" ValidationGroup="GrpAjuste" />
|
<asp:Button ID="BtnAgregarProductoAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnAgregarProductoAjuste_Click" runat="server" Text="Agregar" ValidationGroup="GrpAjuste" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -570,11 +570,13 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
DdlMoneda.DataSource = GlobalDTMonedas
|
DdlMoneda.DataSource = GlobalDTMonedas
|
||||||
DdlMoneda.DataBind()
|
DdlMoneda.DataBind()
|
||||||
|
|
||||||
'Llenar el dropdownlist de almacén
|
Dim dtt As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
'Llenar el dropdownlist de almacén
|
||||||
DdlAlmacen.SelectedValue = "-1"
|
DdlAlmacen.DataSource = dtt
|
||||||
|
|
||||||
|
'DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
'DdlAlmacen.SelectedValue = "-1"
|
||||||
DdlAlmacen.DataBind()
|
DdlAlmacen.DataBind()
|
||||||
|
|
||||||
If IsNothing(Request("CveMovimiento")) Then
|
If IsNothing(Request("CveMovimiento")) Then
|
||||||
@@ -2916,6 +2918,11 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
'CvePrecioLista = CvePrecioListaPS
|
'CvePrecioLista = CvePrecioListaPS
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DdlTipoUso.Items.Clear()
|
||||||
|
DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca)
|
||||||
|
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
DdlTipoUso.DataBind()
|
||||||
|
|
||||||
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
|
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
|
||||||
If MarcaPorcentaje IsNot Nothing Then
|
If MarcaPorcentaje IsNot Nothing Then
|
||||||
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
|
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
|
||||||
@@ -3278,6 +3285,11 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlMarcaPSAjuste_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlMarcaPSAjuste_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
If DdlAlmacen.SelectedValue.ToEntero() <= 0 Then
|
||||||
|
Alert("Debe selecionar un almacen", TipoMensaje.MsgAdvertencia)
|
||||||
|
UpAjuste.Update()
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
CargaPSAjuste(-1, DdlPSAjuste, CveMarca:=DdlMarcaPSAjuste.SelectedValue.ToEntero())
|
CargaPSAjuste(-1, DdlPSAjuste, CveMarca:=DdlMarcaPSAjuste.SelectedValue.ToEntero())
|
||||||
UpAjuste.Update()
|
UpAjuste.Update()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -3290,7 +3302,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Objeto.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
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"))
|
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||||
Else
|
Else
|
||||||
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}")
|
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero()}")
|
||||||
|
|
||||||
Objeto.Attributes.Add("data-cvesubproyecto", CveSubProyecto)
|
Objeto.Attributes.Add("data-cvesubproyecto", CveSubProyecto)
|
||||||
'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
|
'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
|
||||||
@@ -3318,8 +3330,8 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
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 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 DtDatos As New DataTable
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
|
|||||||
@@ -339,13 +339,15 @@ Partial Class Inventarios_RepAnomalias
|
|||||||
ImgExcelProdcutosCoinciden.Visible = False
|
ImgExcelProdcutosCoinciden.Visible = False
|
||||||
LnkDescarExcelGrupos.Visible = True
|
LnkDescarExcelGrupos.Visible = True
|
||||||
|
|
||||||
GvGrupos.DataSource = dt.FiltraParametros("CvePS > 0")
|
If dt IsNot Nothing Then
|
||||||
GvGrupos.DataBind()
|
GvGrupos.DataSource = dt.FiltraParametros("CvePS > 0")
|
||||||
|
LtlGrupos1.Text = dt.FiltraParametros("Orden = 1 and CvePS > 0").Rows.Count.ToString
|
||||||
LtlGrupos1.Text = dt.FiltraParametros("Orden = 1 and CvePS > 0").Rows.Count.ToString
|
LtlGrupos2.Text = dt.FiltraParametros("Orden = 2 and CvePS > 0").Rows.Count.ToString
|
||||||
LtlGrupos2.Text = dt.FiltraParametros("Orden = 2 and CvePS > 0").Rows.Count.ToString
|
LtlGrupos3.Text = dt.FiltraParametros("Orden = 3 and CvePS > 0").Rows.Count.ToString
|
||||||
LtlGrupos3.Text = dt.FiltraParametros("Orden = 3 and CvePS > 0").Rows.Count.ToString
|
|
||||||
|
End If
|
||||||
|
GvGrupos.DataBind()
|
||||||
|
|
||||||
If DdlGPO.SelectedValue.ToEntero = 1 Then
|
If DdlGPO.SelectedValue.ToEntero = 1 Then
|
||||||
PSIguales()
|
PSIguales()
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -460,7 +460,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div style="max-height: 300px; overflow-y: auto;">
|
<div style="max-height: 300px; overflow-y: auto;">
|
||||||
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Cantidad" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Lote,FechaCaducidad,Cantidad" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
|
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
|
||||||
<asp:TemplateField ItemStyle-Width="93px" ItemStyle-HorizontalAlign ="Right">
|
<asp:TemplateField ItemStyle-Width="93px" ItemStyle-HorizontalAlign ="Right">
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Private Property CveAlmacenTransitorio As Integer
|
Private Property CveAlmacenTransitorio As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("CveAlmacenTransitorio"), Integer)
|
Return CType(ViewState("CveAlmacenTransitorio"), Integer)
|
||||||
@@ -198,6 +197,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
CargaMovimiento(Request("CveEntrada").ToString.ToEntero)
|
CargaMovimiento(Request("CveEntrada").ToString.ToEntero)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Request("CveFolioGarantia") IsNot Nothing AndAlso Request("CveFolioGarantia").ToString.ToEntero > 0 Then
|
||||||
|
CargaMovimientoGarantia(Request("CveFolioGarantia").ToString.ToEntero)
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
||||||
DivCodigoSeriePS.Visible = True
|
DivCodigoSeriePS.Visible = True
|
||||||
Else
|
Else
|
||||||
@@ -221,7 +224,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
CantidadTotal = 0
|
CantidadTotal = 0
|
||||||
CvePS = 0
|
CvePS = 0
|
||||||
TipoSeccionAlmacen = 0
|
TipoSeccionAlmacen = 0
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
|
||||||
@@ -358,6 +361,59 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
UpMov.Update()
|
UpMov.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaMovimientoGarantia(CveFolioGarantia As Integer)
|
||||||
|
Using ObjAcum As New ClsAcumuladores
|
||||||
|
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
|
||||||
|
''carga
|
||||||
|
Dim dra As DataRow = ObjAcum.DtResultados(0)
|
||||||
|
DivMov.Visible = True
|
||||||
|
ltlFolio.Text = dra("FolioGarantia").ToString
|
||||||
|
Dim CveSub As Integer = dra("CveSubProyecto").ToString.ToEntero
|
||||||
|
lblCompraRef.Visible = False
|
||||||
|
hplRef.Visible = False
|
||||||
|
TxtObservaciones.Text = "Folio Garantia: " & dra("FolioGarantia").ToString
|
||||||
|
|
||||||
|
'If Mov.CveCompra > 0 Then
|
||||||
|
' hplRef.NavigateUrl = $"/Compras/Compras.aspx?CveCompra={Mov.CveCompra}"
|
||||||
|
' lblCompraRef.Visible = True
|
||||||
|
' hplRef.Visible = True
|
||||||
|
'Else
|
||||||
|
' hplRef.Visible = False
|
||||||
|
' lblCompraRef.Visible = False
|
||||||
|
'End If
|
||||||
|
ChkTransitorio.Enabled = False
|
||||||
|
DdlAlmacenOrigen.Enabled = True
|
||||||
|
DdlAlmacenOrigen.Items.Clear()
|
||||||
|
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6).FiltraParametros(String.Format("CveSubProyecto={0}", CveSub))
|
||||||
|
DdlAlmacenOrigen.DataBind()
|
||||||
|
|
||||||
|
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 21).FiltraParametros(String.Format("CveSubProyecto={0}", CveSub))
|
||||||
|
DdlAlmacenDestino.DataBind()
|
||||||
|
|
||||||
|
CargadoDeMov = True
|
||||||
|
|
||||||
|
Dim dtt As DataTable = ObjAcum.DtResultados.FiltraParametros("", DistinctColumns:={"CvePS", "PS", "CveUM", "UnidadMedida", "Codigo"})
|
||||||
|
|
||||||
|
For Each drr As DataRow In dtt.Rows
|
||||||
|
Dim dr As DataRow = DtMovimientos.NewRow
|
||||||
|
dr("CvePS") = drr("CvePS")
|
||||||
|
dr("PS") = String.Format("{0} - {1}", drr("Codigo"), drr("PS"))
|
||||||
|
dr("CveUM") = drr("CveUM")
|
||||||
|
dr("UnidadMedida") = drr("UnidadMedida")
|
||||||
|
dr("Cantidad") = ObjAcum.DtResultados.COUNT("CvePS", "CvePS = " & drr("CvePS").ToString)
|
||||||
|
DtMovimientos.Rows.Add(dr)
|
||||||
|
Next
|
||||||
|
|
||||||
|
CargaGvDatos()
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
UpMov.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub AlmacenTransitorioDefaults()
|
Private Sub AlmacenTransitorioDefaults()
|
||||||
ChkTransitorio.Checked = UsuarioActual.Empresa.Funcionalidad(154).ToString.ToEntero > 0
|
ChkTransitorio.Checked = UsuarioActual.Empresa.Funcionalidad(154).ToString.ToEntero > 0
|
||||||
ChkTransitorio.Enabled = Not UsuarioActual.Empresa.Funcionalidad(154).ToString.ToEntero > 0
|
ChkTransitorio.Enabled = Not UsuarioActual.Empresa.Funcionalidad(154).ToString.ToEntero > 0
|
||||||
@@ -898,16 +954,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim tLote As String = If(Lote <> "-1", String.Format("AND Lote = '{0}' ", Lote), "")
|
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 tFechaCaducidad As String = If(FechaCaducidad > MinFecha, String.Format("AND FechaCaducidad = '{0}' ", FechaCaducidad), "")
|
||||||
|
|
||||||
'If UsuarioActual.CveEmpresa = 140 Then
|
|
||||||
' Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").ToEntero
|
|
||||||
|
|
||||||
' If Not CveSubProyecto.Contiene(11791, 11793, 11993, 11994, 11794, 11797, 11795, 12010, 12011) Then
|
|
||||||
' Serie = "-1"
|
|
||||||
' End If
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim ExistenciaEspecificada As Decimal = 0
|
Dim ExistenciaEspecificada As Decimal = 0
|
||||||
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))
|
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))
|
||||||
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||||
@@ -945,7 +991,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
||||||
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
|
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
|
||||||
|
|
||||||
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||||
End If
|
End If
|
||||||
@@ -1249,12 +1295,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveMovimiento={0}',800,620);", CveMovimientoSalida))
|
RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveMovimiento={0}',800,620);", CveMovimientoSalida))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
'If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||||
Dim Correo As String = "jorgegonzalez@compuproveedores.com"
|
' Dim Correo As String = "jorgegonzalez@compuproveedores.com"
|
||||||
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").ToEntero = 16 Then
|
' If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").ToEntero = 16 Then
|
||||||
MandaCorreo(CveMovimientoSalida, Correo)
|
' MandaCorreo(CveMovimientoSalida, Correo)
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
LimpiaMovimiento()
|
LimpiaMovimiento()
|
||||||
|
|
||||||
@@ -1769,7 +1815,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(132) = "1" OrElse UsuarioActual.CveEmpresa = 140 Then
|
||||||
DivCodigoSeriePSRecepcion.Visible = True
|
DivCodigoSeriePSRecepcion.Visible = True
|
||||||
Else
|
Else
|
||||||
DivCodigoSeriePSRecepcion.Visible = False
|
DivCodigoSeriePSRecepcion.Visible = False
|
||||||
@@ -3330,7 +3376,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
If SATClaveUnidadMedida.Length = 0 Then SBMensaje.AppendLine("-Producto sin unidad de medida SAT asignada. ")
|
If SATClaveUnidadMedida.Length = 0 Then SBMensaje.AppendLine("-Producto sin unidad de medida SAT asignada. ")
|
||||||
|
|
||||||
SBMensaje.AppendLine($"<br><br> <strong><a class='texto' target='_blank' href='../Ventas/ProductosServicios.aspx?CvePS={DrPS("CvePS").ToString}' > Corregir Producto </a></strong>")
|
SBMensaje.AppendLine($"<br><strong><a class='texto' target='_blank' href='/Ventas/ProductosServicios.aspx?CvePS={DrPS("CvePS").ToString}' > Editar Producto </a></strong>")
|
||||||
|
|
||||||
Alert(SBMensaje.ToString, TipoMensaje.MsgAdvertencia)
|
Alert(SBMensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
<asp:BoundField DataField="TipoAutorizacionTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
<asp:BoundField DataField="TipoAutorizacionTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="Dias Vencidos" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="Dias Vencidos" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||||
|
<asp:HyperLinkField DataTextField="FacturaAplicada" Target="_blank" HeaderText="Factura" DataNavigateUrlFields="CveVentaAplicada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
|||||||
UpModal.Update()
|
UpModal.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim CveCliente As Integer = -1
|
Dim CveCliente As Integer = -1
|
||||||
If DdlClienteFiltro.SelectedValue.ToEntero() <= 0 Then
|
If DdlClienteFiltro.SelectedValue.ToEntero() <= 0 Then
|
||||||
CveCliente = -1
|
CveCliente = -1
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -568,12 +568,12 @@ Partial Class PV
|
|||||||
ViewState("Modalidad") = value
|
ViewState("Modalidad") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property Index As Integer
|
Private Property GvPSRowIndexEdit As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("Index").ToString.ToEntero
|
Return ViewState("GvPSRowIndexEdit").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("Index") = value
|
ViewState("GvPSRowIndexEdit") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property CveVentaDetalle As Integer
|
Private Property CveVentaDetalle As Integer
|
||||||
@@ -1095,7 +1095,7 @@ Partial Class PV
|
|||||||
DtPUFacturas = New DataTable
|
DtPUFacturas = New DataTable
|
||||||
|
|
||||||
Modalidad = ""
|
Modalidad = ""
|
||||||
Index = -1
|
GvPSRowIndexEdit = -1
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
ChkAjuste.Visible = True
|
ChkAjuste.Visible = True
|
||||||
@@ -3793,7 +3793,7 @@ Partial Class PV
|
|||||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
Timbre.Comprobante.SubTotal = Obj.SubTotal
|
||||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||||
@@ -4008,20 +4008,20 @@ Partial Class PV
|
|||||||
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||||
|
|
||||||
'SUGIERE PRECIO
|
'SUGIERE PRECIO
|
||||||
Dim PrecioSugerido = 0.0
|
Dim PrecioSugerido As Decimal = 0
|
||||||
PrecioSugerido = drPS("Precio").ToString.ToDouble
|
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
||||||
If UsuarioActual.CveEmpresa.Contiene(80, 119) Then
|
If UsuarioActual.CveEmpresa.Contiene(80, 119) Then
|
||||||
Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
||||||
If CvePrecioListaPS > 0 Then
|
If CvePrecioListaPS > 0 Then
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||||
|
|
||||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||||
If PrecioSugerido = 0 Then
|
If PrecioSugerido = 0 Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
Dim PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
Dim PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||||
End If
|
End If
|
||||||
@@ -4034,7 +4034,7 @@ Partial Class PV
|
|||||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||||
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
Dim PrecioAplicado As Decimal = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDecimal
|
||||||
If PrecioAplicado > 0 Then
|
If PrecioAplicado > 0 Then
|
||||||
PrecioSugerido = PrecioAplicado
|
PrecioSugerido = PrecioAplicado
|
||||||
End If
|
End If
|
||||||
@@ -4046,7 +4046,7 @@ Partial Class PV
|
|||||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||||
' si es 10. primero el cliente
|
' si es 10. primero el cliente
|
||||||
Dim CvePrecioListaPS As Integer
|
Dim CvePrecioListaPS As Integer
|
||||||
Dim PorcentajePrecio As Double = 0
|
Dim PorcentajePrecio As Decimal = 0
|
||||||
|
|
||||||
If TipoPrecioLista = 10 Then
|
If TipoPrecioLista = 10 Then
|
||||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||||
@@ -4063,15 +4063,15 @@ Partial Class PV
|
|||||||
If CvePrecioListaPS > 0 Then
|
If CvePrecioListaPS > 0 Then
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||||
End If
|
End If
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If PrecioSugerido = 0 Then
|
If PrecioSugerido = 0 Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
Dim CostoPS As Decimal = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
@@ -4124,9 +4124,13 @@ Partial Class PV
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
'Descuento por clasificación
|
'Descuento por clasificación
|
||||||
If drPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
Dim ObjDescuento As New Descuentos
|
||||||
TxtDescuento.Text = (PrecioSugerido * ClasificacionesDescuentos(drPS("CveClasificacion").ToString.ToEntero)).ToString("F2")
|
|
||||||
|
ObjDescuento = CalcularDescuentos(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, PrecioSugerido)
|
||||||
|
If ObjDescuento.EsPUModificado Then
|
||||||
|
PrecioSugerido = ObjDescuento.PU
|
||||||
End If
|
End If
|
||||||
|
TxtDescuento.Text = ObjDescuento.ImporteDescuento.ToString("N2")
|
||||||
|
|
||||||
HdnDescuentoOriginal.Value = TxtDescuento.Text.ToDecimal().ToString()
|
HdnDescuentoOriginal.Value = TxtDescuento.Text.ToDecimal().ToString()
|
||||||
LblDescuentoIncluido.Text = TxtDescuento.Text.ToDecimal().FormatoNumero(2)
|
LblDescuentoIncluido.Text = TxtDescuento.Text.ToDecimal().FormatoNumero(2)
|
||||||
@@ -4317,6 +4321,15 @@ Partial Class PV
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||||
|
Descuento = PU * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
''condicion final, si es cambio de Vigencia, no aplica descuento
|
||||||
|
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20637) Then
|
||||||
|
Descuento = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjDescuento.ImporteDescuento = Descuento
|
ObjDescuento.ImporteDescuento = Descuento
|
||||||
@@ -4785,13 +4798,7 @@ Partial Class PV
|
|||||||
ElseIf Modalidad = "U" Then
|
ElseIf Modalidad = "U" Then
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
If CveVentaDetalle <= 0 Then
|
If CveVentaDetalle <= 0 Then
|
||||||
For Each Dr As DataRow In TmpDT.Rows
|
Row = TmpDT.Rows(GvPSRowIndexEdit)
|
||||||
If Dr("Consec").ToString.ToEntero = Index Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Contador = Contador + 1
|
|
||||||
Next
|
|
||||||
Row = TmpDT.Rows(Contador)
|
|
||||||
Else
|
Else
|
||||||
Row = TmpDT.Select($"CveVentaDetalle={CveVentaDetalle}")(0)
|
Row = TmpDT.Select($"CveVentaDetalle={CveVentaDetalle}")(0)
|
||||||
End If
|
End If
|
||||||
@@ -4859,9 +4866,9 @@ Partial Class PV
|
|||||||
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
||||||
|
|
||||||
If Modalidad = "A" Then
|
If Modalidad = "A" Then
|
||||||
Row("Consec") = TmpDT.Rows.Count + 1
|
Row("Consec") = TmpDT.MAX("Consec").ToEntero() + 1
|
||||||
If Not EsCargo Then
|
If Not EsCargo Then
|
||||||
ConsecutivoVenta = TmpDT.Rows.Count + 1
|
ConsecutivoVenta = TmpDT.MAX("Consec").ToEntero() + 1
|
||||||
End If
|
End If
|
||||||
ElseIf Modalidad = "U" Then
|
ElseIf Modalidad = "U" Then
|
||||||
If Not EsCargo Then
|
If Not EsCargo Then
|
||||||
@@ -5201,10 +5208,10 @@ Partial Class PV
|
|||||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
Modalidad = "U"
|
Modalidad = "U"
|
||||||
Index = GvRow.DataKey("Consec").ToEntero
|
GvPSRowIndexEdit = GvRow.RowIndex
|
||||||
ConsecutivoVenta = GvRow.DataKey("Consec").ToEntero
|
ConsecutivoVenta = GvRow.DataKey("Consec").ToEntero
|
||||||
CveVentaDetalle = GvRow.DataKey("CveVentaDetalle").ToEntero
|
CveVentaDetalle = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||||
|
Dim EsCargo = CBool(GvRow.DataKey("EsCargo"))
|
||||||
LnkAgregarPS.Text = "Actualizar"
|
LnkAgregarPS.Text = "Actualizar"
|
||||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero, DdlPS)
|
CargaPS(DdlClasificacion.SelectedValue.ToEntero, DdlPS)
|
||||||
@@ -5249,7 +5256,27 @@ Partial Class PV
|
|||||||
Ajuste()
|
Ajuste()
|
||||||
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
||||||
|
|
||||||
|
'BUSCA EN TMPDT LOS DATOS DE USADOS
|
||||||
|
If TmpDT.Rows.Count > 0 AndAlso TmpDTRecepcionUsados IsNot Nothing AndAlso TmpDTRecepcionUsados.Rows.Count > 0 Then
|
||||||
|
If Not EsCargo Then
|
||||||
|
Dim RowUsado As DataRow = TmpDTRecepcionUsados.Select($"ConsecRelacionado={ConsecutivoVenta}").FirstOrDefault()
|
||||||
|
If RowUsado IsNot Nothing Then
|
||||||
|
DdlRecepcionUsados.SelectedValueExist(RowUsado("CvePS"))
|
||||||
|
DdlRecepcionUsados_SelectedIndexChanged(DdlRecepcionUsados, EventArgs.Empty)
|
||||||
|
|
||||||
|
DdlBCIUsado.SelectedValueExist(RowUsado("CveBCIUsado"))
|
||||||
|
DdlModeloAuto.SelectedValueExist(RowUsado("CveModeloAuto"))
|
||||||
|
|
||||||
|
TxtAnioVehiculo.Text = RowUsado("AnioVehiculo").ToString()
|
||||||
|
TxtFechaVigencia.Text = RowUsado("FechaUsado").ToString().ToDate().ToString("dd/MM/yyyy")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
UpVenta.Update()
|
UpVenta.Update()
|
||||||
|
UpAddVenta.Update()
|
||||||
|
|
||||||
RegistraScript("$('#DivAddVenta').modal({backdrop: 'static', keyboard: false});", "EdicionVenta")
|
RegistraScript("$('#DivAddVenta').modal({backdrop: 'static', keyboard: false});", "EdicionVenta")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkAgregarPS_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAgregarPS_Click(sender As Object, e As EventArgs)
|
||||||
@@ -6906,7 +6933,7 @@ Partial Class PV
|
|||||||
Dim Contador As Integer = 1
|
Dim Contador As Integer = 1
|
||||||
Dim PUFactura As Decimal = 0
|
Dim PUFactura As Decimal = 0
|
||||||
For Each Dr As DataRow In DtPUFacturas.Rows
|
For Each Dr As DataRow In DtPUFacturas.Rows
|
||||||
If Index = Contador Then
|
If GvPSRowIndexEdit = Contador Then
|
||||||
PUFactura = Dr("PU").ToString.ToDecimal
|
PUFactura = Dr("PU").ToString.ToDecimal
|
||||||
End If
|
End If
|
||||||
Contador += 1
|
Contador += 1
|
||||||
@@ -7337,7 +7364,7 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
If Elimino Then
|
If Elimino Then
|
||||||
TmpDTRecepcionUsados.AcceptChanges()
|
TmpDTPolizaVirtual.AcceptChanges()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -7424,12 +7451,15 @@ Partial Class PV
|
|||||||
TmpDTRecepcionUsados = New DataTable
|
TmpDTRecepcionUsados = New DataTable
|
||||||
TmpDTRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("CvePSRelacionado", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CvePSRelacionado", GetType(Integer))
|
||||||
|
TmpDTRecepcionUsados.Columns.Add("ConsecRelacionado", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("Cantidad", GetType(Decimal))
|
TmpDTRecepcionUsados.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
|
TmpDTRecepcionUsados.Columns.Add("AnioVehiculo", GetType(String))
|
||||||
TmpDTRecepcionUsados.Columns.Add("CveUM", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CveUM", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("CveVentaDetalle", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("PU", GetType(Double))
|
TmpDTRecepcionUsados.Columns.Add("PU", GetType(Double))
|
||||||
TmpDTRecepcionUsados.Columns.Add("CveBCIUsado", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CveBCIUsado", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
|
||||||
|
TmpDTRecepcionUsados.Columns.Add("FechaUsado", GetType(DateTime))
|
||||||
TmpDTRecepcionUsados.Columns.Add("EliminarDB", GetType(Boolean))
|
TmpDTRecepcionUsados.Columns.Add("EliminarDB", GetType(Boolean))
|
||||||
TmpDTRecepcionUsados.Columns("EliminarDB").DefaultValue = False
|
TmpDTRecepcionUsados.Columns("EliminarDB").DefaultValue = False
|
||||||
End Sub
|
End Sub
|
||||||
@@ -7503,6 +7533,10 @@ Partial Class PV
|
|||||||
Row("PU") = DrTamanio("Cargo").ToString().ToDecimal
|
Row("PU") = DrTamanio("Cargo").ToString().ToDecimal
|
||||||
Row("CveBCIUsado") = DdlBCIUsado.SelectedValue.ToEntero
|
Row("CveBCIUsado") = DdlBCIUsado.SelectedValue.ToEntero
|
||||||
Row("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero
|
Row("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero
|
||||||
|
Row("ConsecRelacionado") = ConsecPSPadre
|
||||||
|
Row("FechaUsado") = TxtFechaVigencia.Text.ToDateTime()
|
||||||
|
Row("AnioVehiculo") = TxtAnioVehiculo.Text
|
||||||
|
|
||||||
TmpDTRecepcionUsados.Rows.Add(Row)
|
TmpDTRecepcionUsados.Rows.Add(Row)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -105,18 +105,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="portlet-body form">
|
<div class="portlet-body form">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||||
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
|
||||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Número de Parte / Código:</label>
|
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Número de Parte / Código:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||||
<asp:TextBox ID="TxtCodigoBarras" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtCodigoBarras" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
|
||||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigoBarras.ClientID.ToString()%>">Código Barras:</label>
|
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigoBarras.ClientID.ToString()%>">Código Barras:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divCodigo2" runat="server" visible ="false">
|
<div class="form-group form-md-line-input input-iconright col-xs-4" id="divCodigo2" runat="server" visible ="false">
|
||||||
<asp:TextBox ID="TxtCodigo2" CssClass="form-control " runat="server" MaxLength="50" ></asp:TextBox>
|
<asp:TextBox ID="TxtCodigo2" CssClass="form-control " runat="server" MaxLength="50" ></asp:TextBox>
|
||||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo2.ClientID.ToString()%>">Código CPK:</label>
|
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo2.ClientID.ToString()%>">Código CPK:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
@@ -263,6 +263,12 @@
|
|||||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtVentaMinima.ClientID.ToString()%>">Venta Mínima:</label>
|
<label class="truncate" style="padding-left: 16px;" for="<%= TxtVentaMinima.ClientID.ToString()%>">Venta Mínima:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divLitraje" visible="false" runat="server">
|
||||||
|
<asp:TextBox ID="TxtLitraje" CssClass="form-control " runat="server" ReadOnly="true"></asp:TextBox>
|
||||||
|
<%--<ajax:FilteredTextBoxExtender ID="FTBETVentaMinima" TargetControlID="TxtVentaMinima" FilterType="Numbers" runat="server" ValidChars=".," />--%>
|
||||||
|
<label class="truncate" style="padding-left: 16px;" for="<%= TxtLitraje.ClientID.ToString()%>">Litraje:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -245,6 +245,8 @@ Partial Class ProductosyServicios
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
DivPSAdicionalVigencia.Visible = True
|
DivPSAdicionalVigencia.Visible = True
|
||||||
divCodigo2.Visible = True
|
divCodigo2.Visible = True
|
||||||
|
divLitraje.Visible = True
|
||||||
|
|
||||||
CargaPSAdicionalesVigencias()
|
CargaPSAdicionalesVigencias()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -846,6 +848,7 @@ Partial Class ProductosyServicios
|
|||||||
TxtCodigo2.Text = ObjProductosServicios.Codigo2
|
TxtCodigo2.Text = ObjProductosServicios.Codigo2
|
||||||
TxtCodigoBarras.Text = ObjProductosServicios.CodigoBarras
|
TxtCodigoBarras.Text = ObjProductosServicios.CodigoBarras
|
||||||
CodigoBarrasCargado = ObjProductosServicios.CodigoBarras
|
CodigoBarrasCargado = ObjProductosServicios.CodigoBarras
|
||||||
|
TxtLitraje.Text = ObjProductosServicios.DtResultados.Rows(0)("Litraje").ToString
|
||||||
|
|
||||||
TxtPS.Text = ObjProductosServicios.PS
|
TxtPS.Text = ObjProductosServicios.PS
|
||||||
TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma
|
TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma
|
||||||
|
|||||||
@@ -319,6 +319,16 @@
|
|||||||
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
|
||||||
|
Garantía?:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2" id="divgarantia2" runat="server" visible="false">
|
||||||
|
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||||
|
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||||
|
</asp:Dropdownlist>
|
||||||
|
</div>
|
||||||
<label class="col-md-1 truncate">Lectura administrativa:</label>
|
<label class="col-md-1 truncate">Lectura administrativa:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
|
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
|
||||||
LblLitraje.Visible = True
|
LblLitraje.Visible = True
|
||||||
DvLitraje.Visible = True
|
DvLitraje.Visible = True
|
||||||
|
'garantia
|
||||||
|
divgarantia1.Visible = True
|
||||||
|
divgarantia2.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -275,7 +278,7 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
|
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
|
||||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
||||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
|
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
|
||||||
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
|
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
DtVentas = ObjVentas.DtResultados
|
DtVentas = ObjVentas.DtResultados
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
|
|
||||||
CveCliente = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente").ToEntero() > 0, Request("CveCliente").ToEntero(), -1).ToString.ToEntero
|
CveCliente = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente").ToEntero() > 0, Request("CveCliente").ToEntero(), -1).ToString.ToEntero
|
||||||
CveSubProyectoEjecucion = If(Request("CveSubProyectoEjecucion") IsNot Nothing AndAlso Request("CveSubProyectoEjecucion").ToEntero() > 0, Request("CveSubProyectoEjecucion").ToEntero(), -1).ToString
|
CveSubProyectoEjecucion = If(Request("CveSubProyectoEjecucion") IsNot Nothing AndAlso Request("CveSubProyectoEjecucion").ToEntero() > 0, Request("CveSubProyectoEjecucion").ToEntero(), -1).ToString
|
||||||
CveVendedor = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor").ToEntero() > 0, Request("CveVendedor").ToEntero(), -1).ToString.ToEntero
|
CveVendedor = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor").ToEntero() >= 0, Request("CveVendedor").ToEntero(), -1).ToString.ToEntero
|
||||||
CveEstatus = If(Request("CveEstatus") IsNot Nothing AndAlso Request("CveEstatus").ToEntero() > 0, Request("CveEstatus").ToEntero(), -1).ToString
|
CveEstatus = If(Request("CveEstatus") IsNot Nothing AndAlso Request("CveEstatus").ToEntero() > 0, Request("CveEstatus").ToEntero(), -1).ToString
|
||||||
CveUsuario = If(Request("CveUsuario") IsNot Nothing AndAlso Request("CveUsuario").ToEntero() > 0, Request("CveUsuario").ToEntero(), -1).ToString
|
CveUsuario = If(Request("CveUsuario") IsNot Nothing AndAlso Request("CveUsuario").ToEntero() > 0, Request("CveUsuario").ToEntero(), -1).ToString
|
||||||
TipoDocto = If(Request("TipoDocto") IsNot Nothing AndAlso Request("TipoDocto").ToString() <> "-1", Request("TipoDocto").ToString(), "-1").ToString
|
TipoDocto = If(Request("TipoDocto") IsNot Nothing AndAlso Request("TipoDocto").ToString() <> "-1", Request("TipoDocto").ToString(), "-1").ToString
|
||||||
@@ -421,6 +421,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
|
|
||||||
'DdlClientes.SelectedValueExist(CveCliente)
|
'DdlClientes.SelectedValueExist(CveCliente)
|
||||||
DdlSubProyectoEjecucion.SelectedValueExist(CveSubProyectoEjecucion)
|
DdlSubProyectoEjecucion.SelectedValueExist(CveSubProyectoEjecucion)
|
||||||
|
If CveVendedor = 0 Then DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||||
DdlVendedor.SelectedValueExist(CveVendedor)
|
DdlVendedor.SelectedValueExist(CveVendedor)
|
||||||
DdlUsuario.SelectedValueExist(CveUsuario)
|
DdlUsuario.SelectedValueExist(CveUsuario)
|
||||||
DdlTipoComprobante.SelectedValuesIfExistM(TipoDocto)
|
DdlTipoComprobante.SelectedValuesIfExistM(TipoDocto)
|
||||||
|
|||||||
@@ -179,7 +179,7 @@
|
|||||||
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
|
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
|
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
|
||||||
Garantía:
|
Garantía?:
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" id="divgarantia2" runat="server" visible="false">
|
<div class="col-md-2" id="divgarantia2" runat="server" visible="false">
|
||||||
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
|
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||||
|
|||||||
@@ -6427,17 +6427,20 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVNCPS" runat="server" InitialValue="-1" ControlToValidate="DdlNCPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalAplicarNC"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVNCPS" runat="server" InitialValue="-1" ControlToValidate="DdlNCPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalAplicarNC"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCENCPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPS" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCENCPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPS" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-3">
|
||||||
<asp:Label ID="LblNCSaldoAnticipo" runat="server" Text=""></asp:Label>
|
<asp:Label ID="LblNCSaldoAnticipo" runat="server" Text=""></asp:Label>
|
||||||
<asp:CheckBox ID="ChkAplicaNCAnticipo" runat="server" Text="Aplicar a Anticipo" Visible="false" />
|
<asp:CheckBox ID="ChkAplicaNCAnticipo" runat="server" Text="Aplicar a Anticipo" Visible="false" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3" id="DivBtnRemNC" runat="server" visible="false" >
|
||||||
|
<asp:Button ID="BtnModalAplicarRemisionesNC" Text="Aplicar Remisiones" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row form-group">
|
<div class="row form-group">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
Observaciones:
|
Observaciones:
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<asp:TextBox ID="TxtNCObservaciones" Text="" Rows="3" TextMode="MultiLine" CssClass="Widthall form-control input-sm" runat="server" />
|
<asp:TextBox ID="TxtNCObservaciones" Text="" Rows="2" TextMode="MultiLine" CssClass="Widthall form-control input-sm" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row form-group">
|
<div class="row form-group">
|
||||||
@@ -6488,22 +6491,12 @@
|
|||||||
<asp:RangeValidator ID="RVNCPorcentaje" runat="server" Type="Double" MinimumValue="0.01" MaximumValue="100.00" ErrorMessage="El campo <b>''Porcentaje''</b> debe estar entre 1 y el porcentaje máximo de la factura(Saldo)." ControlToValidate="TxtNCPorcentaje" Display="None" ValidationGroup="GrpModalAplicarNC"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVNCPorcentaje" runat="server" Type="Double" MinimumValue="0.01" MaximumValue="100.00" ErrorMessage="El campo <b>''Porcentaje''</b> debe estar entre 1 y el porcentaje máximo de la factura(Saldo)." ControlToValidate="TxtNCPorcentaje" Display="None" ValidationGroup="GrpModalAplicarNC"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCENCPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RVNCPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCENCPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RVNCPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="DivBtnRemNC" runat="server" visible="false" class="row form-group">
|
<div class="row" style="margin-right: 10px; margin-top: 5px;" align="right">
|
||||||
<div class="col-md-2">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<asp:Button ID="BtnModalAplicarRemisionesNC" Text="Aplicar Remisiones" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" />
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
|
||||||
<input type="text" id="TxtBusqueda10" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda10','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda10" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda10','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda10','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda10','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" id="DivGvCxC" style="max-height: 10px" runat="server" visible="false">
|
<div class="row" id="DivGvCxC" style="max-height: 5px" runat="server" visible="false">
|
||||||
<br />
|
|
||||||
<div class="col-md-12" style="height: 440px; overflow: auto">
|
<div class="col-md-12" style="height: 440px; overflow: auto">
|
||||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvCxC_RowDataBound"
|
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvCxC_RowDataBound"
|
||||||
DataKeyNames="CveVenta,CveMetodoPago33,CveFormaPago33" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
DataKeyNames="CveVenta,CveMetodoPago33,CveFormaPago33" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
||||||
|
|||||||
@@ -6614,7 +6614,7 @@ Partial Class Ventas
|
|||||||
'RMF. validacion temporal
|
'RMF. validacion temporal
|
||||||
'verifica si tiene autorizaciones de Nota de crédito autorizadas
|
'verifica si tiene autorizaciones de Nota de crédito autorizadas
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, CveEstatus:=1) Then
|
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, "Ing", CveEstatus:=1) Then
|
||||||
Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="TipoAutorizacion")
|
Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="TipoAutorizacion")
|
||||||
If RowAutorizacion IsNot Nothing Then
|
If RowAutorizacion IsNot Nothing Then
|
||||||
DdlTipoComprobante.SelectedValueExistInsert("Egs", "Egresos")
|
DdlTipoComprobante.SelectedValueExistInsert("Egs", "Egresos")
|
||||||
@@ -7957,7 +7957,7 @@ Partial Class Ventas
|
|||||||
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero()
|
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero()
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
Try
|
Try
|
||||||
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, CveEstatus:=1) Then
|
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, DdlTipoDocto.SelectedValue, CveEstatus:=1) Then
|
||||||
Dim RowAutorizacion As DataRow = Nothing
|
Dim RowAutorizacion As DataRow = Nothing
|
||||||
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||||
If TieneDiasVencidos Then
|
If TieneDiasVencidos Then
|
||||||
@@ -8312,11 +8312,11 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ValidaPagosContado() Then
|
If ValidaPagosContado(TipoDoctoViejo:=TipoDoctoViejo) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CreaObjetosVenta()
|
CreaObjetosVenta(TipoDoctoViejo:=TipoDoctoViejo)
|
||||||
|
|
||||||
'Verifica versión 3.3.()
|
'Verifica versión 3.3.()
|
||||||
If ObjFactura.Version = "3.3" AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then
|
If ObjFactura.Version = "3.3" AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then
|
||||||
@@ -9733,6 +9733,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If NCDescuento Then
|
If NCDescuento Then
|
||||||
|
|
||||||
|
factura.Num3 = 1000 ' MARCADA PARA AUMENTAR EL FOLIO
|
||||||
|
|
||||||
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
||||||
DtVentasNC.Rows(IndexNC)("Importe") = factura.Total
|
DtVentasNC.Rows(IndexNC)("Importe") = factura.Total
|
||||||
DtVentasNC.Rows(IndexNC)("TC") = factura.TipoCambio
|
DtVentasNC.Rows(IndexNC)("TC") = factura.TipoCambio
|
||||||
@@ -9893,7 +9895,7 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False)
|
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False, Optional TipoDoctoViejo As String = "")
|
||||||
|
|
||||||
If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
|
If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
|
||||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion)
|
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion)
|
||||||
@@ -9923,6 +9925,11 @@ Partial Class Ventas
|
|||||||
'si es cancelacion, debe de conservar el folio actual
|
'si es cancelacion, debe de conservar el folio actual
|
||||||
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
|
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
|
||||||
|
|
||||||
|
'SI ES FACTURACION DE REMISION O COTIZACION NO TOMAR EL FOLIO QUE SE MUESTRA
|
||||||
|
If Not EsCancelacion AndAlso ObjFactura.Folio > 0 AndAlso TipoDoctoViejo.Contiene("Rem", "Cot") Then
|
||||||
|
ObjFactura.Folio = -1
|
||||||
|
End If
|
||||||
|
|
||||||
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1)
|
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1)
|
||||||
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
|
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
|
||||||
|
|
||||||
@@ -10712,6 +10719,7 @@ Partial Class Ventas
|
|||||||
ObjFacturaDevolucion.Num1 = TxtNum1.Text.Trim.ToDouble
|
ObjFacturaDevolucion.Num1 = TxtNum1.Text.Trim.ToDouble
|
||||||
ObjFacturaDevolucion.Num2 = TxtNum2.Text.Trim.ToDouble
|
ObjFacturaDevolucion.Num2 = TxtNum2.Text.Trim.ToDouble
|
||||||
ObjFacturaDevolucion.Num3 = If(ObjFacturaDevolucion.TipoDocto = "OP", DdlOrdenPago.SelectedValue.ToDouble, TxtNum3.Text.Trim.ToDouble)
|
ObjFacturaDevolucion.Num3 = If(ObjFacturaDevolucion.TipoDocto = "OP", DdlOrdenPago.SelectedValue.ToDouble, TxtNum3.Text.Trim.ToDouble)
|
||||||
|
|
||||||
ObjFacturaDevolucion.FechaPago = TxtFechaPago.Text.ToDate
|
ObjFacturaDevolucion.FechaPago = TxtFechaPago.Text.ToDate
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveCorte = CveCorte
|
ObjFacturaDevolucion.CveCorte = CveCorte
|
||||||
@@ -11764,15 +11772,15 @@ Partial Class Ventas
|
|||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
'VERIFICAR QUE EL DESCUENTO NO PASE EL 40%
|
'VERIFICAR QUE EL DESCUENTO NO PASE EL 40%
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Row("CveClasificacion").ToString().ToEntero() <> 20519 AndAlso (Not Row("Obs").ToString().Contains("Descuento por garantía")) Then
|
'If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Row("CveClasificacion").ToString().ToEntero() <> 20519 AndAlso (Not Row("Obs").ToString().Contains("Descuento por garantía")) Then
|
||||||
Dim TotalDetalle = Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6)
|
' Dim TotalDetalle = Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6)
|
||||||
Dim DescuentoDetalle = Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1))
|
' Dim DescuentoDetalle = Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1))
|
||||||
Dim PorcentajeDescuento As Double = (DescuentoDetalle / TotalDetalle) * 100D
|
' Dim PorcentajeDescuento As Double = (DescuentoDetalle / TotalDetalle) * 100D
|
||||||
If PorcentajeDescuento > 40 Then
|
' If PorcentajeDescuento > 40 Then
|
||||||
ErrorList.Add(String.Format("El descuento del producto/servicio {0} no puede ser mayor al 40%. Porcentaje Actual: {1}%", Row("CodigoPS"), PorcentajeDescuento.RoundSQL(2)))
|
' ErrorList.Add(String.Format("El descuento del producto/servicio {0} no puede ser mayor al 40%. Porcentaje Actual: {1}%", Row("CodigoPS"), PorcentajeDescuento.RoundSQL(2)))
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
'Agregamos el gasto de contrato
|
'Agregamos el gasto de contrato
|
||||||
If CveContrato > 0 AndAlso factura.TipoDocto = "Rem" AndAlso AplicaGastoContrato Then
|
If CveContrato > 0 AndAlso factura.TipoDocto = "Rem" AndAlso AplicaGastoContrato Then
|
||||||
|
|
||||||
@@ -21614,7 +21622,7 @@ Partial Class Ventas
|
|||||||
Private Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged
|
Private Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged
|
||||||
LimpiaEscondeContado()
|
LimpiaEscondeContado()
|
||||||
End Sub
|
End Sub
|
||||||
Private Function ValidaPagosContado(Optional MostrarAlertas As Boolean = True) As Boolean
|
Private Function ValidaPagosContado(Optional MostrarAlertas As Boolean = True, Optional TipoDoctoViejo As String = "") As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
Dim AmortizacionNC As Decimal = 0
|
Dim AmortizacionNC As Decimal = 0
|
||||||
@@ -21657,7 +21665,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso RBLPago.SelectedValue = "2" AndAlso CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
|
'VALIDA PAGOS EN FACTURAS DE ING,ANT NUEVAS O FACTURACION DE REM O COTIZACIONES
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso RBLPago.SelectedValue = "2" AndAlso ((CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant")) OrElse TipoDoctoViejo.Contiene("Rem", "Cot")) Then
|
||||||
|
|
||||||
If Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
If Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||||
If MostrarAlertas Then
|
If MostrarAlertas Then
|
||||||
@@ -26930,15 +26939,47 @@ Partial Class Ventas
|
|||||||
Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs)
|
||||||
'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
|
'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then
|
|
||||||
If ClienteEsDistribuidor AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then
|
Dim Verificacion As Boolean = False
|
||||||
Alert("No se puede generar una nota de crédito para devolución de efectivo si el cliente es distribuidor.", TipoMensaje.MsgAdvertencia)
|
|
||||||
|
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then ' si hay opciones seleccionadas, se activa el generar las NCs
|
||||||
|
Verificacion = True
|
||||||
|
Else
|
||||||
|
If UsuarioActual.TienePermisoProceso(175) Then ' si es una nc, que se va a generar directa, el permiso de generar NC directas
|
||||||
|
Verificacion = True
|
||||||
Else
|
Else
|
||||||
Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
'verificar autorizaciones
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, "Egs", CveEstatus:=1) Then
|
||||||
|
Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL ", Orderby:="TipoAutorizacion")
|
||||||
|
If RowAutorizacion IsNot Nothing Then
|
||||||
|
Verificacion = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
' si es una nc, que se va a generar directa, debe de revisar que tenga una autorización, o el permiso de generar NC directas
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then
|
||||||
|
If Verificacion Then
|
||||||
|
If ClienteEsDistribuidor AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then
|
||||||
|
Alert("No se puede generar una nota de crédito para devolución de efectivo si el cliente es distribuidor.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("No se puede Generar notas de crédito directas", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
AplicarNotaCreditoDesdeVenta()
|
' si viene de remisiones, puede seguir adelante
|
||||||
|
If Verificacion Then
|
||||||
|
AplicarNotaCreditoDesdeVenta()
|
||||||
|
Else
|
||||||
|
Alert("No se puede Generar notas de crédito directas", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
AplicarNotaCreditoDesdeVenta()
|
AplicarNotaCreditoDesdeVenta()
|
||||||
@@ -31534,6 +31575,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ListaRemisionesNC.Add(RemNC)
|
ListaRemisionesNC.Add(RemNC)
|
||||||
|
BtnAplicarNC.Enabled = True
|
||||||
|
|
||||||
If TerminarCiclo Then
|
If TerminarCiclo Then
|
||||||
Exit For
|
Exit For
|
||||||
@@ -31577,6 +31619,10 @@ Partial Class Ventas
|
|||||||
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
|
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
|
||||||
'TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero
|
'TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero
|
||||||
|
|
||||||
|
If ListaRemisionesNC.Count > 0 Then ' si hay opciones seleccionadas, se activa el generar las NCs
|
||||||
|
BtnAplicarNC.Enabled = True
|
||||||
|
End If
|
||||||
|
|
||||||
UpModalRemisionesNC.Update()
|
UpModalRemisionesNC.Update()
|
||||||
UpAplicarNC.Update()
|
UpAplicarNC.Update()
|
||||||
|
|
||||||
@@ -32043,7 +32089,7 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
||||||
Try
|
Try
|
||||||
If UsuarioActual.CveUsuario.Contiene(3033, 3491) Then
|
If UsuarioActual.CveUsuario.Contiene(3491) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user