Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -261,7 +261,7 @@ Public Class ClsClientes
|
|||||||
End Sub
|
End Sub
|
||||||
Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer,
|
Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer,
|
||||||
CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1,
|
CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1,
|
||||||
Optional TipoCliente As Integer = 1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1) As Boolean
|
Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_ClientesGet")
|
DataAdapter("PA_ClientesGet")
|
||||||
|
|||||||
@@ -3228,10 +3228,24 @@ Public Class Timbrado
|
|||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Dim Resultados = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle)
|
Dim Resultados = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle)
|
||||||
|
|
||||||
If Resultados.Count > 0 Then
|
If Resultados.Count > 0 Then
|
||||||
Retorno = Resultados(0)("Value").ToString()
|
|
||||||
MensajeErrorCFDI = Resultados(0)("Value").ToString()
|
If resultadoTimbre.Descripcion.Contains("RFC del receptor no existe") Then
|
||||||
|
|
||||||
|
Retorno = $"El RFC { Resultados(0)("Value").ToString() } no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente"
|
||||||
|
MensajeErrorCFDI = $"El RFC { Resultados(0)("Value").ToString() } no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente"
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
Retorno = Resultados(0)("Value").ToString()
|
||||||
|
MensajeErrorCFDI = Resultados(0)("Value").ToString()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Retorno = resultadoTimbre.Detalle
|
Retorno = resultadoTimbre.Detalle
|
||||||
MensajeErrorCFDI = resultadoTimbre.Detalle
|
MensajeErrorCFDI = resultadoTimbre.Detalle
|
||||||
|
|||||||
1823
Bancos/IE.aspx.vb
1823
Bancos/IE.aspx.vb
File diff suppressed because it is too large
Load Diff
2585
Empresas/72/Formatos/OrdenServicio.rdlc
Normal file
2585
Empresas/72/Formatos/OrdenServicio.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -18,14 +18,15 @@
|
|||||||
.pac-container.pac-logo {
|
.pac-container.pac-logo {
|
||||||
z-index: 100000;
|
z-index: 100000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modalPopup {
|
.modalPopup {
|
||||||
top:132px !important;
|
top: 132px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ContentPlaceHolderID="H" ID="Content9" runat="server">
|
<asp:Content ContentPlaceHolderID="H" ID="Content9" runat="server">
|
||||||
<li>
|
<li>
|
||||||
<a ID="BtnDir" OnClick="$('#dvConsulta').modal({ backdrop: 'static', keyboard: false });">
|
<a id="BtnDir" onclick="$('#dvConsulta').modal({ backdrop: 'static', keyboard: false });">
|
||||||
<i class='fa fa-search'></i><span>Ver Remisiones</span>
|
<i class='fa fa-search'></i><span>Ver Remisiones</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -42,7 +43,7 @@
|
|||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
<h4 class="modal-title" id="myModalLabel2" runat="server"><i class="fa fa-bell-o"></i> Remisiones Activas</h4>
|
<h4 class="modal-title" id="myModalLabel2" runat="server"><i class="fa fa-bell-o"></i>Remisiones Activas</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" style="padding: 0px 10px 0px 10px !important">
|
<div class="modal-body" style="padding: 0px 10px 0px 10px !important">
|
||||||
<asp:UpdatePanel runat="server" UpdateMode="conditional" ID="UpCuentasComunicacion">
|
<asp:UpdatePanel runat="server" UpdateMode="conditional" ID="UpCuentasComunicacion">
|
||||||
@@ -93,7 +94,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<h4 class="modal-title" id="H1" runat="server"><i class="fa fa-bell-o"></i>Historial Remision: </h4>
|
<h4 class="modal-title" id="H1" runat="server"><i class="fa fa-bell-o"></i>Historial Remision: </h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" >
|
<div class="modal-body">
|
||||||
<asp:UpdatePanel runat="server" UpdateMode="conditional" ID="UpdatePanel3">
|
<asp:UpdatePanel runat="server" UpdateMode="conditional" ID="UpdatePanel3">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||||
@@ -102,12 +103,12 @@
|
|||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvRemisiones.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}')", GvRemisiones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<asp:GridView ID="GVHistorico" runat="server" GridLines="None" DataKeyNames="FolioRemision, NoEconomico, CveEstatus" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-heightfijo="100" data-height="100" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
<asp:GridView ID="GVHistorico" runat="server" GridLines="None" DataKeyNames="FolioRemision, NoEconomico, CveEstatus" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-heightfijo="100" data-height="100" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="FolioRemision" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="center" HeaderText="Folio" ItemStyle-HorizontalAlign="left" />
|
<asp:BoundField DataField="FolioRemision" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="center" HeaderText="Folio" ItemStyle-HorizontalAlign="left" />
|
||||||
<asp:BoundField DataField="NoEconomico" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="center" HeaderText="No. Económico" ItemStyle-HorizontalAlign="left" />
|
<asp:BoundField DataField="NoEconomico" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="center" HeaderText="No. Económico" ItemStyle-HorizontalAlign="left" />
|
||||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" HeaderStyle-HorizontalAlign="center" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="left" />
|
<asp:BoundField DataField="Estatus" HeaderText="Estatus" HeaderStyle-HorizontalAlign="center" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="left" />
|
||||||
<asp:HyperLinkField DataNavigateUrlFields="Lat,Lon" HeaderStyle-HorizontalAlign="center" Target="_blank" Text="Ir" HeaderText="Google Maps" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="left" DataNavigateUrlFormatString="https://www.google.com/maps/search/{0},{1}/"/>
|
<asp:HyperLinkField DataNavigateUrlFields="Lat,Lon" HeaderStyle-HorizontalAlign="center" Target="_blank" Text="Ir" HeaderText="Google Maps" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="left" DataNavigateUrlFormatString="https://www.google.com/maps/search/{0},{1}/" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -126,41 +127,34 @@
|
|||||||
<asp:Button ID="BtnMostrarContrato" runat="server" Style="visibility: hidden; display: none;" />
|
<asp:Button ID="BtnMostrarContrato" runat="server" Style="visibility: hidden; display: none;" />
|
||||||
<asp:Button ID="BtnCerrarContrato" runat="server" CssClass="btn btn-danger" Style="visibility: hidden; display: none;" />
|
<asp:Button ID="BtnCerrarContrato" runat="server" CssClass="btn btn-danger" Style="visibility: hidden; display: none;" />
|
||||||
|
|
||||||
<Ajax:ModalPopupExtender ID="MPContrato" runat="server" PopupControlID="PanelContrato" TargetControlID="BtnMostrarContrato"
|
<ajax:ModalPopupExtender ID="MPContrato" runat="server" PopupControlID="PanelContrato" TargetControlID="BtnMostrarContrato"
|
||||||
CancelControlID="BtnCerrarContrato" BackgroundCssClass="modalBackground">
|
CancelControlID="BtnCerrarContrato" BackgroundCssClass="modalBackground">
|
||||||
</Ajax:ModalPopupExtender>
|
</ajax:ModalPopupExtender>
|
||||||
<asp:Panel ID="PanelContrato" runat="server" CssClass="modalPopup" align="center" Style="display: none; padding: 10px;">
|
<asp:Panel ID="PanelContrato" runat="server" CssClass="modalPopup" align="center" Style="display: none; padding: 10px;">
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpContratos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpContratos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div id="AccionContrato" runat="server" style="background-color: white;width:280px;border-color: black;border-width: 1.7px;border-style: solid;">
|
<div id="AccionContrato" runat="server" style="background-color: white; width: 280px; border-color: black; border-width: 1.7px; border-style: solid;">
|
||||||
<h5> <b> Actualizar Remisión </b></h5>
|
<h5><b>Actualizar Remisión </b></h5>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group form-md-line-input input-iconright" style="width:50%">
|
<div class="form-group form-md-line-input input-iconright" style="width: 50%">
|
||||||
<asp:TextBox ID="TxtTracking" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtTracking" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||||
<label for="<%= TxtTracking.ClientID.ToString()%>">Tracking Number:</label>
|
<label for="<%= TxtTracking.ClientID.ToString()%>">Tracking Number:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" style="width:50%">
|
<div class="form-group form-md-line-input input-iconright" style="width: 50%">
|
||||||
<asp:TextBox ID="TxtNoRemolque" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtNoRemolque" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||||
<label for="<%= TxtNoRemolque.ClientID.ToString()%>">Número remolque:</label>
|
<label for="<%= TxtNoRemolque.ClientID.ToString()%>">Número remolque:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<asp:Label style=" top: 0;margin-bottom: 0;font-size: 13px;color: #888888; opacity: 1;" runat="server" Text="Estatus"></asp:Label>
|
<asp:Label Style="top: 0; margin-bottom: 0; font-size: 13px; color: #888888; opacity: 1;" runat="server" Text="Estatus"></asp:Label>
|
||||||
<br />
|
<br />
|
||||||
<asp:DropDownList ID="DdlEstatus" DataValueField="CveEstatus" DataTextField="Estatus" runat="server" CssClass="form-control" Width="80%">
|
<asp:DropDownList ID="DdlEstatus" DataValueField="CveEstatus" DataTextField="Estatus" runat="server" CssClass="form-control" Width="80%">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%--<asp:RadioButtonList ID="RblOpcionContrato" runat="server" CssClass="rbl" RepeatDirection="Horizontal" RepeatLayout="Table">
|
|
||||||
<asp:ListItem Text="Si" Value="2"></asp:ListItem>
|
|
||||||
<asp:ListItem Text="No" Value="1"></asp:ListItem>
|
|
||||||
</asp:RadioButtonList>--%>
|
|
||||||
<br />
|
<br />
|
||||||
|
<asp:LinkButton ID="BtnActualizarEstatus" OnClick="BtnActualizarEstatus_Click" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
||||||
<asp:LinkButton ID="BtnActualizarEstatus" onclick="BtnActualizarEstatus_Click" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
<asp:LinkButton ID="BtnCancelar" OnClick="BtnCancelar_Click" runat="server" CssClass="btn btn-danger" Text="Cancelar" />
|
||||||
<asp:LinkButton ID="BtnCancelar" onclick="BtnCancelar_Click" runat="server" CssClass="btn btn-danger" Text="Cancelar" />
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -42,14 +42,12 @@ Partial Class GPS_CatRemisionesVehiculos
|
|||||||
Dim ObjTSoft As New ClsTSoft
|
Dim ObjTSoft As New ClsTSoft
|
||||||
If ObjTSoft.GetRemisiones(UsuarioActual.CveCliente) Then
|
If ObjTSoft.GetRemisiones(UsuarioActual.CveCliente) Then
|
||||||
GvRemisiones.DataSource = ObjTSoft.DtResultados
|
GvRemisiones.DataSource = ObjTSoft.DtResultados
|
||||||
Else
|
|
||||||
GvRemisiones.DataSource = Nothing
|
|
||||||
End If
|
End If
|
||||||
If ObjTSoft.GetEstatusRemisiones() Then
|
If ObjTSoft.GetEstatusRemisiones() Then
|
||||||
DdlEstatus.DataSource = ObjTSoft.DtResultados
|
DdlEstatus.DataSource = ObjTSoft.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjTSoft.Dispose()
|
ObjTSoft.Dispose()
|
||||||
|
|
||||||
DdlEstatus.DataBind()
|
DdlEstatus.DataBind()
|
||||||
GvRemisiones.DataBind()
|
GvRemisiones.DataBind()
|
||||||
UPConsulta.Update()
|
UPConsulta.Update()
|
||||||
@@ -91,16 +89,16 @@ Partial Class GPS_CatRemisionesVehiculos
|
|||||||
UpContratos.Update()
|
UpContratos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnActualizarEstatus_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnActualizarEstatus_Click(sender As Object, e As EventArgs)
|
||||||
Dim ObjSoft As New ClsTSoft
|
|
||||||
Dim TrackingNo As String = If(TxtTracking.Text <> "", TxtTracking.Text, "-1")
|
Dim TrackingNo As String = If(TxtTracking.Text <> "", TxtTracking.Text, "-1")
|
||||||
Dim NumRemolque As String = If(TxtNoRemolque.Text <> "", TxtNoRemolque.Text, "-1")
|
Dim NumRemolque As String = If(TxtNoRemolque.Text <> "", TxtNoRemolque.Text, "-1")
|
||||||
|
Dim ObjSoft As New ClsTSoft
|
||||||
If ObjSoft.UpdateEstatusRemisiones(CveRemision, DdlEstatus.SelectedValue.ToEntero, TrackingNo, NumRemolque) Then
|
If ObjSoft.UpdateEstatusRemisiones(CveRemision, DdlEstatus.SelectedValue.ToEntero, TrackingNo, NumRemolque) Then
|
||||||
Alert("El estatus se actualizó correctamente")
|
Alert("El estatus se actualizó correctamente")
|
||||||
End If
|
End If
|
||||||
|
ObjSoft.Dispose()
|
||||||
TxtNoRemolque.Text = ""
|
TxtNoRemolque.Text = ""
|
||||||
TxtTracking.Text = ""
|
TxtTracking.Text = ""
|
||||||
ObjSoft.Dispose()
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
RegistraScript("$('#C_BtnCerrarContrato').click();")
|
RegistraScript("$('#C_BtnCerrarContrato').click();")
|
||||||
End Sub
|
End Sub
|
||||||
@@ -108,17 +106,19 @@ Partial Class GPS_CatRemisionesVehiculos
|
|||||||
RegistraScript("$('#C_BtnCerrarContrato').click();")
|
RegistraScript("$('#C_BtnCerrarContrato').click();")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub imgHistorial_Click(sender As Object, e As EventArgs)
|
Protected Sub imgHistorial_Click(sender As Object, e As EventArgs)
|
||||||
Dim ObjSoft As New ClsTSoft
|
|
||||||
Dim Boton = CType(sender, LinkButton)
|
Dim Boton = CType(sender, LinkButton)
|
||||||
Dim GvRow As GridViewRow = DirectCast(Boton.NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(Boton.NamingContainer, GridViewRow)
|
||||||
CveRemision = Boton.CommandArgument.ToEntero
|
CveRemision = Boton.CommandArgument.ToEntero
|
||||||
|
|
||||||
|
Dim ObjSoft As New ClsTSoft
|
||||||
If ObjSoft.GETRemisionesHistorial(GvRow.DataKey("FolioRemision").ToString, GvRow.DataKey("NoEconomico").ToString) Then
|
If ObjSoft.GETRemisionesHistorial(GvRow.DataKey("FolioRemision").ToString, GvRow.DataKey("NoEconomico").ToString) Then
|
||||||
GVHistorico.DataSource = ObjSoft.DtResultados
|
GVHistorico.DataSource = ObjSoft.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjSoft.Dispose()
|
ObjSoft.Dispose()
|
||||||
|
|
||||||
H1.InnerText = $"Histórico Remisión: {GvRow.DataKey("FolioRemision").ToString} "
|
H1.InnerText = $"Histórico Remisión: {GvRow.DataKey("FolioRemision").ToString} "
|
||||||
GVHistorico.DataBind()
|
GVHistorico.DataBind()
|
||||||
UpHistorico.Update()
|
UpHistorico.Update()
|
||||||
RegistraScript("$('#dvHistorico').modal();")
|
RegistraScript("$('#dvHistorico').modal('show');")
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -68,6 +69,7 @@ Partial Class General_SaldosIniciales
|
|||||||
'End Try
|
'End Try
|
||||||
'Conexion.Close()
|
'Conexion.Close()
|
||||||
If Not ErrorArchivo Then
|
If Not ErrorArchivo Then
|
||||||
|
|
||||||
If RblFormato.SelectedValue = "1" Or RblFormato.SelectedValue = "2" Then
|
If RblFormato.SelectedValue = "1" Or RblFormato.SelectedValue = "2" Then
|
||||||
If Not dt.Columns(0).ColumnName = "Codigo" Then
|
If Not dt.Columns(0).ColumnName = "Codigo" Then
|
||||||
Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
@@ -121,12 +123,97 @@ Partial Class General_SaldosIniciales
|
|||||||
Alert("El nombre de la treceava columna debe ser 'Limite Credito'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la treceava columna debe ser 'Limite Credito'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(13).ColumnName = "Plazo Cobranza" Then
|
||||||
|
Alert("El nombre de la catorceava columna debe ser 'Plazo Cobranza'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If Not dt.Columns(14).ColumnName = "Pais" Then
|
||||||
|
' Alert("El nombre de la quinceava columna debe ser 'Plazo Cobranza'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
' Exit Sub
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If Not dt.Columns(14).ColumnName.ToUpper = "BANCO" Then
|
||||||
|
Alert("El nombre de la quinceava columna debe ser 'Banco'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(15).ColumnName.ToUpper = "N° CUENTA" Then
|
||||||
|
Alert("El nombre de la dieciseisava columna debe ser 'N° Cuenta'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(16).ColumnName.ToUpper = "CLABE INTER" Then
|
||||||
|
Alert("El nombre de la diecisieteava columna debe ser 'Clabe Inter'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ElseIf RblFormato.SelectedValue = "2" Then
|
||||||
|
|
||||||
|
If Not dt.Columns(0).ColumnName = "Codigo" Then
|
||||||
|
Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(1).ColumnName = "RazonSocial" Then
|
||||||
|
Alert("El nombre de la segunda columna debe ser 'Fecha'.Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(2).ColumnName = "RFC" Then
|
||||||
|
Alert("El nombre de la tercera columna debe ser 'RFC'.Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(3).ColumnName = "Calle" Then
|
||||||
|
Alert("El nombre de la cuarta columna debe ser 'Calle'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(4).ColumnName = "Número exterior" Then
|
||||||
|
Alert("El nombre de la quinta columna debe ser 'Número exterior' .Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(5).ColumnName = "Colonia" Then
|
||||||
|
Alert("El nombre de la sexta columna debe ser 'Colonia'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(6).ColumnName = "Código postal" Then
|
||||||
|
Alert("El nombre de la séptima columna debe ser 'Código postal'.Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(7).ColumnName = "Población" Then
|
||||||
|
Alert("El nombre de la octava columna debe ser 'Población'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(8).ColumnName = "Estado" Then
|
||||||
|
Alert("El nombre de la novena columna debe ser 'Estado'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(9).ColumnName = "Teléfono" Then
|
||||||
|
Alert("El nombre de la décima columna debe ser 'Teléfono'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(10).ColumnName = "Contacto" Then
|
||||||
|
Alert("El nombre de la onceava columna debe ser 'Contacto'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(11).ColumnName = "Celular Contacto" Then
|
||||||
|
Alert("El nombre de la doceava columna debe ser 'Celular Contacto'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(12).ColumnName = "Limite Credito" Then
|
||||||
|
Alert("El nombre de la treceava columna debe ser 'Limite Credito'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
If Not dt.Columns(13).ColumnName = "Plazo Cobranza" Then
|
If Not dt.Columns(13).ColumnName = "Plazo Cobranza" Then
|
||||||
Alert("El nombre de la treceava columna debe ser 'Plazo Cobranza'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la treceava columna debe ser 'Plazo Cobranza'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
If RblFormato.SelectedValue = "1" Then
|
|
||||||
If Not dt.Columns(14).ColumnName = "Vendedor" Then
|
|
||||||
|
If Not dt.Columns(14).ColumnName = "Vendedor" Then
|
||||||
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -134,12 +221,13 @@ Partial Class General_SaldosIniciales
|
|||||||
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
If Not dt.Columns(16).ColumnName = "Es distribuidor" Then
|
If Not dt.Columns(16).ColumnName = "Es distribuidor" Then
|
||||||
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Then
|
ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Then
|
||||||
If Not dt.Columns(0).ColumnName = "Sucursal" Then
|
If Not dt.Columns(0).ColumnName = "Sucursal" Then
|
||||||
Alert("El nombre de la primera columna debe ser 'Sucursal'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la primera columna debe ser 'Sucursal'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
@@ -518,6 +606,7 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
'P R O D U C T O S / S E R V I C I O S
|
'P R O D U C T O S / S E R V I C I O S
|
||||||
If RblFormato.SelectedValue = "5" Then
|
If RblFormato.SelectedValue = "5" Then
|
||||||
|
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
Dim ObjGral As New ClsGenerales(ObjPS.IniciaTransacSQL())
|
Dim ObjGral As New ClsGenerales(ObjPS.IniciaTransacSQL())
|
||||||
Dim ObjClas As New ClsClasificaciones(ObjPS.IniciaTransacSQL())
|
Dim ObjClas As New ClsClasificaciones(ObjPS.IniciaTransacSQL())
|
||||||
@@ -655,9 +744,13 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then
|
If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then
|
||||||
Dim CveCategoria As Integer
|
Dim CveCategoria As Integer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ObjGral.GetCategorias(UsuarioActual.CveEmpresa, 4) Then
|
If ObjGral.GetCategorias(UsuarioActual.CveEmpresa, 4) Then
|
||||||
CveCategoria = ObjGral.DtResultados.FiltroPrimeroValor("CveCategoria", "").ToEntero
|
CveCategoria = ObjGral.DtResultados.FiltroPrimeroValor("CveCategoria", "").ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not CveCategoria > 0 Then
|
If Not CveCategoria > 0 Then
|
||||||
If ObjGral.AddCategorias(Clasificacion2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 4) Then
|
If ObjGral.AddCategorias(Clasificacion2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 4) Then
|
||||||
|
|
||||||
@@ -666,11 +759,26 @@ Partial Class General_SaldosIniciales
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If ObjClas.AddClasificaciones(Clasificacion2, "", -1, "-1", -1, "-1", -1, "-1", CveCategoria, UsuarioActual.CveUsuario,
|
|
||||||
UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjClas.GetClasificaciones(Tipo:=4) Then Application("GlobalDTClasificaciones2") = ObjClas.DtResultados
|
If ObjClas.GetClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||||
CveClasificacion2 = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString.ToEntero
|
CveClasificacion2 = ObjClas.DtResultados.FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{ Clasificacion2.Trim }'").ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If CveClasificacion2 = 0 Then
|
||||||
|
|
||||||
|
If ObjClas.AddClasificaciones(Clasificacion2, "", -1, "-1", -1, "-1", -1, "-1", CveCategoria, UsuarioActual.CveUsuario,
|
||||||
|
UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjClas.GetClasificaciones(Tipo:=4) Then Application("GlobalDTClasificaciones2") = ObjClas.DtResultados
|
||||||
|
CveClasificacion2 = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then Alert("No se encontró la Clasificación: " + Clasificacion, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then Alert("No se encontró la Clasificación: " + Clasificacion, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
||||||
@@ -680,7 +788,7 @@ Partial Class General_SaldosIniciales
|
|||||||
If Not CveMedida > 0 AndAlso Medida <> "" Then Alert("No se encontró la Media: " + Medida, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
If Not CveMedida > 0 AndAlso Medida <> "" Then Alert("No se encontró la Media: " + Medida, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
||||||
If Not CveRinTamaño > 0 AndAlso RinTamaño <> "" Then Alert("No se encontró el Tamaño: " + RinTamaño, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
If Not CveRinTamaño > 0 AndAlso RinTamaño <> "" Then Alert("No se encontró el Tamaño: " + RinTamaño, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
||||||
If Not CveModelo > 0 AndAlso Modelo <> "" Then Alert("No se encontró el Modelo: " + Modelo, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
If Not CveModelo > 0 AndAlso Modelo <> "" Then Alert("No se encontró el Modelo: " + Modelo, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
||||||
If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then Alert("No se encontró la Serie: " + Clasificacion2, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
'If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then Alert("No se encontró la Serie: " + Clasificacion2, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
||||||
|
|
||||||
If CvePS > 0 Then
|
If CvePS > 0 Then
|
||||||
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
||||||
@@ -740,42 +848,105 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
ObjProv.IniciaTransacSQL()
|
ObjProv.IniciaTransacSQL()
|
||||||
For Each Row As DataRow In dt.Rows
|
For Each Row As DataRow In dt.Rows
|
||||||
|
|
||||||
Dim Codigo As String = Row("Codigo").ToString
|
Dim Codigo As String = Row("Codigo").ToString
|
||||||
Dim RazonSocial As String = Row("RazonSocial").ToString
|
Dim RazonSocial As String = Row("RazonSocial").ToString
|
||||||
Dim RFC As String = Row("RFC").ToString.Trim
|
Dim RFC As String = Row("RFC").ToString.Trim
|
||||||
Dim Calle As String = Row("Calle").ToString
|
|
||||||
Dim NumExt As Decimal = Row("Número exterior").ToString.ToDecimal
|
Dim Dirrecion As String = $"{ Row("Población").ToString}, { Row("Estado").ToString} , Colonia { Row("Colonia").ToString}, {Row("Calle").ToString} #{Row("Número exterior").ToString}"
|
||||||
Dim Colonia As String = Row("Colonia").ToString
|
|
||||||
Dim CodigoPostal As Decimal = Row("Código Postal").ToString.ToDecimal
|
'Dim NumExt As String = Row("Número exterior").ToString
|
||||||
Dim Poblacion As String = Row("Población").ToString
|
|
||||||
Dim Estado As String = Row("Estado").ToString
|
|
||||||
|
' Dim Colonia As String = Row("Colonia").ToString
|
||||||
|
Dim CodigoPostal As Integer = Row("Código Postal").ToString.ToEntero
|
||||||
|
|
||||||
|
' Dim Poblacion As String = Row("Población").ToString
|
||||||
|
|
||||||
|
'Dim Estado As String = Row("Estado").ToString
|
||||||
Dim Telefono As String = Row("Teléfono").ToString
|
Dim Telefono As String = Row("Teléfono").ToString
|
||||||
Dim Contacto As String = Row("Contacto").ToString
|
Dim ContactoMail As String = Row("Contacto").ToString
|
||||||
Dim CelularContacto As String = Row("Celular Contacto").ToString
|
Dim CelularContacto As String = Row("Celular Contacto").ToString
|
||||||
Dim LimiteCredito As Double = Row("Limite Credito").ToString.ToDouble
|
Dim LimiteCredito As Double = Row("Limite Credito").ToString.ToDouble
|
||||||
Dim PlazoCobranza As Integer = Row("Plazo Cobranza").ToString.ToEntero
|
Dim PlazoCobranza As Integer = Row("Plazo Cobranza").ToString.ToEntero
|
||||||
|
|
||||||
|
Dim Banco As String = Row("Banco").ToString
|
||||||
|
Dim NumeroCuenta As String = Row("N° CUENTA").ToString.Replace("-", "").Replace(" ", "")
|
||||||
|
Dim ClabeInter As String = Row("Clabe Inter").ToString.Replace("-", "").Replace(" ", "")
|
||||||
|
|
||||||
Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero
|
Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero
|
||||||
Dim CveProveedor2 As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"RazonSocial = '{RazonSocial}'").ToString.ToEntero
|
Dim CveProveedor2 As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"RazonSocial = '{RazonSocial}'").ToString.ToEntero
|
||||||
Dim CveProveedor3 As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"Codigo = '{Codigo}'").ToString.ToEntero
|
Dim CveProveedor3 As Integer = 0
|
||||||
|
|
||||||
|
If Codigo.Trim.Length > 0 Then
|
||||||
|
CveProveedor3 = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"Codigo = '{Codigo}'").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
' If CveProveedor > 0 Or CveProveedor2 > 0 Or CveProveedor3 > 0 Then
|
||||||
If CveProveedor > 0 Or CveProveedor2 > 0 Or CveProveedor3 > 0 Then
|
If CveProveedor > 0 Or CveProveedor2 > 0 Or CveProveedor3 > 0 Then
|
||||||
Contador = Contador + 1
|
Contador = Contador + 1
|
||||||
|
|
||||||
'If Not ObjProv.UpdateProveedor(Codigo, RazonSocial, RazonSocial, RazonSocial, RFC, Calle, Telefono,
|
'If Not ObjProv.UpdateProveedor(Codigo, RazonSocial, RazonSocial, RazonSocial, RFC, Calle, Telefono,
|
||||||
' Contacto, "", Telefono, LimiteCredito, PlazoCobranza, "", 0, 0, 0, -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "",
|
' Contacto, "", Telefono, LimiteCredito, PlazoCobranza, "", 0, 0, 0, -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "",
|
||||||
' -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, -1, True, "", "", False, CveProveedor) Then
|
' -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, -1, True, "", "", False, CveProveedor) Then
|
||||||
' ErrorProv = True
|
' ErrorProv = True
|
||||||
' Exit For
|
' Exit For
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If Not ObjProv.AddProveedor(Codigo, RazonSocial, RazonSocial, RazonSocial, RFC, Calle, Telefono,
|
|
||||||
Contacto, "", Telefono, LimiteCredito, PlazoCobranza, "", 0, 0, 0, -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "",
|
Telefono = Telefono.Replace("-", "").Replace("(", "").Replace(")", "").Trim
|
||||||
-1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, -1, "", "", False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
CelularContacto = CelularContacto.Replace("-", "").Replace("(", "").Replace(")", "").Trim
|
||||||
|
|
||||||
|
Telefono = If(Telefono.Length > 10, "", Telefono)
|
||||||
|
CelularContacto = If(CelularContacto.Length > 10, "", Telefono)
|
||||||
|
|
||||||
|
If Not ObjProv.AddProveedor(Codigo, RazonSocial, RazonSocial, RazonSocial, RFC, Dirrecion, Telefono,
|
||||||
|
"", ContactoMail, CelularContacto, LimiteCredito, PlazoCobranza, "", 0, 0, 0, -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "",
|
||||||
|
-1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, -1, "", "", False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CP:=CodigoPostal) Then
|
||||||
ErrorProv = True
|
ErrorProv = True
|
||||||
Exit For
|
Exit For
|
||||||
|
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
Dim ErrorCuentaDeposito As Boolean = False
|
||||||
|
'RESTRICCIONES GENERALES
|
||||||
|
'QUE TENGA ALGUN DATO DE TIPO DE CUENTA
|
||||||
|
If NumeroCuenta.Trim.Length = 0 AndAlso ClabeInter.Trim.Length = 0 Then
|
||||||
|
ErrorCuentaDeposito = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
|
||||||
|
If ClabeInter.Trim.Length <> 0 AndAlso ClabeInter.Trim.Length <> 18 Then
|
||||||
|
ErrorCuentaDeposito = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorCuentaDeposito Then
|
||||||
|
Dim ObjGrales As New ClsGenerales(ObjProv.IniciaTransacSQL)
|
||||||
|
If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, CveProveedor:=ObjProv.CveProveedor) Then
|
||||||
|
'ErrorProv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorProv Then
|
If Not ErrorProv Then
|
||||||
ObjProv.Commit()
|
ObjProv.Commit()
|
||||||
If ObjProv.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, -1) Then Application("GlobalDTCompProveedores") = ObjProv.DtResultados
|
If ObjProv.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, -1) Then Application("GlobalDTCompProveedores") = ObjProv.DtResultados
|
||||||
@@ -1773,9 +1944,11 @@ Partial Class General_SaldosIniciales
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
|
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
|
||||||
|
|
||||||
Dim Directorio As String = ""
|
Dim Directorio As String = ""
|
||||||
|
|
||||||
If RblFormato.SelectedValue = "1" Then
|
If RblFormato.SelectedValue = "1" Then
|
||||||
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoClientes.xlsx"
|
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoProveedor.xlsx"
|
||||||
ElseIf RblFormato.SelectedValue = "2" Then
|
ElseIf RblFormato.SelectedValue = "2" Then
|
||||||
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoClientes.xlsx"
|
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoClientes.xlsx"
|
||||||
ElseIf RblFormato.SelectedValue = "3" Then
|
ElseIf RblFormato.SelectedValue = "3" Then
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
<div class="row" id="DivFactura" runat="server" visible="false">
|
<div class="row" id="DivFactura" runat="server" visible="false">
|
||||||
<label class="col-md-1 truncate" style="width: 110px">Factura:</label>
|
<label class="col-md-1 truncate" style="width: 110px">Factura:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlFactura" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="SerieFolio" DataValueField="CveVenta">
|
<asp:DropDownList ID="DdlFactura" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="SerieFolio" DataValueField="CveVenta" OnSelectedIndexChanged="DdlFactura_SelectedIndexChanged">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -557,9 +557,6 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div style="width: 70%" align="right">
|
<div style="width: 70%" align="right">
|
||||||
<asp:Label ID="LbTotalMovimientos" Text="Total de Movimientos: 0" runat="server" />
|
<asp:Label ID="LbTotalMovimientos" Text="Total de Movimientos: 0" runat="server" />
|
||||||
@@ -567,15 +564,12 @@
|
|||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.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}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
||||||
|
|
||||||
<asp:GridView ID="GvM" runat="server" GridLines="none" Width="70%"
|
<asp:GridView ID="GvM" runat="server" GridLines="none" Width="70%"
|
||||||
CssClass="table table-hover ADScroller btn-xs" ShowHeader="True"
|
CssClass="table table-hover ADScroller btn-xs" ShowHeader="True"
|
||||||
EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle"
|
EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CvePS,PU,Cantidad"
|
||||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||||
@@ -597,12 +591,16 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="73px"></ItemStyle>
|
<ItemStyle Width="73px"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Observaciones">
|
<asp:TemplateField HeaderText="Observaciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lblObservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Literal>
|
<asp:Literal ID="lblObservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="PU">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="lbPU" runat="server" Text='<%# Eval("PU", "{0:#,##0.######}")%>'> </asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="43px"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -612,13 +610,22 @@
|
|||||||
<ItemStyle Width="140px"></ItemStyle>
|
<ItemStyle Width="140px"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div id="DivTotal" runat="server" visible="false">
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-addon">$</span>
|
||||||
|
<asp:TextBox ID="TxtTotal" ClientIDMode="Static" Text="0.00" CssClass="form-control input-sm" runat="server" Enabled="false" />
|
||||||
|
</div>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTIRNC" runat="server" TargetControlID="TxtTotal" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8"></div>
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div style="width: 100%; text-align: center;">
|
<div style="width: 100%; text-align: center;">
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -628,10 +635,8 @@
|
|||||||
<asp:Button ID="BtnContabilizar" runat="server" ValidationGroup="" Text="Contabilizar" Visible="False" CssClass="btn btn-primary" />
|
<asp:Button ID="BtnContabilizar" runat="server" ValidationGroup="" Text="Contabilizar" Visible="False" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="BtnNuevo" runat="server" ValidationGroup="" Text="Nuevo" CssClass="btn btn-success" />
|
<asp:Button ID="BtnNuevo" runat="server" ValidationGroup="" Text="Nuevo" CssClass="btn btn-success" />
|
||||||
<asp:Button ID="BtnGeneraPrepoliza" runat="server" Visible="false" ValidationGroup="" Text="GeneraPrePoliza" CssClass="btn btn-success" />
|
<asp:Button ID="BtnGeneraPrepoliza" runat="server" Visible="false" ValidationGroup="" Text="GeneraPrePoliza" CssClass="btn btn-success" />
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div runat="server" id="DivMensaje" visible="false">
|
<div runat="server" id="DivMensaje" visible="false">
|
||||||
<p>
|
<p>
|
||||||
<code>
|
<code>
|
||||||
@@ -642,14 +647,9 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
<%-- EMPIEZA: BITACORA --%>
|
<%-- EMPIEZA: BITACORA --%>
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -691,9 +691,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div id="ModalBitacora" class="modal ADS fade" role="dialog">
|
<div id="ModalBitacora" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@@ -732,7 +730,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<%-- TERMINA: BITACORA --%>
|
<%-- TERMINA: BITACORA --%>
|
||||||
@@ -741,7 +738,6 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:Panel runat="server" DefaultButton="BtnGuardarCantidadEspecial">
|
<asp:Panel runat="server" DefaultButton="BtnGuardarCantidadEspecial">
|
||||||
<div id="ModalCantidad" class="modal ADS fade" role="dialog">
|
<div id="ModalCantidad" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
@@ -758,7 +754,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5" style="text-align: right;">
|
<div class="col-md-5" style="text-align: right;">
|
||||||
Cantidad
|
Cantidad
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
||||||
@@ -779,13 +774,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="DivModalAgregar" class="modal ADS fade" role="dialog">
|
<div id="DivModalAgregar" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<asp:UpdatePanel ID="UpModalAgregar" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpModalAgregar" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
@@ -857,10 +848,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<asp:Button ID="BtnGenerarRNC" runat="server" ClientIDMode="Static" Text="RNC" Style="display: none;" />
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function GenerarRNC() {
|
||||||
|
$('#BtnGenerarRNC').click();
|
||||||
|
}
|
||||||
|
|
||||||
function CargaActivoFijo(CveAF, Codigo) {
|
function CargaActivoFijo(CveAF, Codigo) {
|
||||||
$get("HdnCveActivoFijo").value = CveAF;
|
$get("HdnCveActivoFijo").value = CveAF;
|
||||||
$get("HdnCodigoAF").value = Codigo;
|
$get("HdnCodigoAF").value = Codigo;
|
||||||
|
|||||||
@@ -23,6 +23,14 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ViewState("DtMovimientos") = value
|
ViewState("DtMovimientos") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Public Property DtTamaños() As DataTable
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("DtTamaños"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtTamaños") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property DtMovimientosEntradaInvFisico() As DataTable
|
Public Property DtMovimientosEntradaInvFisico() As DataTable
|
||||||
|
|
||||||
@@ -261,6 +269,22 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ViewState("FolioCorreo") = value
|
ViewState("FolioCorreo") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property ObjRemisionNC As Modelos.Factura
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("ObjRemisionNC"), Modelos.Factura)
|
||||||
|
End Get
|
||||||
|
Set(value As Modelos.Factura)
|
||||||
|
ViewState("ObjRemisionNC") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property ObjFactura As Modelos.Factura
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("ObjFactura"), Modelos.Factura)
|
||||||
|
End Get
|
||||||
|
Set(value As Modelos.Factura)
|
||||||
|
ViewState("ObjFactura") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -337,6 +361,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
PermisoVerImportes()
|
PermisoVerImportes()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CargaTamaños()
|
||||||
'DdlProducto2.setEsWebService(True)
|
'DdlProducto2.setEsWebService(True)
|
||||||
'DdlProducto2.Attributes.Add("data-metodo", "getpsusados")
|
'DdlProducto2.Attributes.Add("data-metodo", "getpsusados")
|
||||||
|
|
||||||
@@ -854,6 +879,29 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
If Valido And AgregarUsado Then
|
If Valido And AgregarUsado Then
|
||||||
|
|
||||||
|
If ObjFactura IsNot Nothing AndAlso Not EsDistribuidor Then
|
||||||
|
Dim RowDetalle As DataRow = ObjFactura.DtDetalle.FiltroPrimero($"CvePS={CvePS}")
|
||||||
|
|
||||||
|
If RowDetalle IsNot Nothing Then
|
||||||
|
|
||||||
|
'If RowDetalle("PU").ToString.ToDecimal().RoundSQL <> PU.RoundSQL Then
|
||||||
|
' Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia)
|
||||||
|
' Exit Sub
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Dim Puntos As Decimal = DtTamaños.FiltroPrimeroValor("Puntos", $"CvePSCargo={CvePS}").ToDecimal()
|
||||||
|
Dim CantidadPermitida As Double = Math.Ceiling(RowDetalle("Cantidad").ToString.ToDecimal() * Puntos)
|
||||||
|
|
||||||
|
If Cantidad > CantidadPermitida Then
|
||||||
|
Alert($"La cantidad es mayor a la permitida", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert($"El producto no se encuentra en la factura", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
|
'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
|
||||||
If SerieLote <> "" And (SerieLote.ToUpper = dr("Codigo").ToString.ToUpper Or SerieLote.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then
|
If SerieLote <> "" And (SerieLote.ToUpper = dr("Codigo").ToString.ToUpper Or SerieLote.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then
|
||||||
@@ -931,10 +979,25 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
|
||||||
If GvM.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
'Dim CveMovimiento As Integer
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||||
|
If ObjRemisionNC IsNot Nothing Then
|
||||||
|
Dim sb As New StringBuilder()
|
||||||
|
sb.Append($"Se va a generar un documento de tipo 'Remisión de nota de crédito'.<br> Serie-Folio:<b>{ObjRemisionNC.SerieFolio}</b>.<br> ¿Esta seguro que desea guardar?:<br/>")
|
||||||
|
|
||||||
|
Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, JSBtnAceptar:="GenerarRNC();", TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||||
|
Else
|
||||||
|
Guardar()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Sub BtnGenerarRNC_Click(sender As Object, e As EventArgs) Handles BtnGenerarRNC.Click
|
||||||
|
Guardar(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub Guardar(Optional GenerarRNC As Boolean = False)
|
||||||
|
If GvM.Rows.Count > 0 Then
|
||||||
|
Dim Msg As New StringBuilder()
|
||||||
|
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
Dim ObjAcum As New ClsAcumuladores(ObjInventario.IniciaTransacSQL())
|
Dim ObjAcum As New ClsAcumuladores(ObjInventario.IniciaTransacSQL())
|
||||||
Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL())
|
Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL())
|
||||||
@@ -955,7 +1018,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Dim CveCliente As Integer = CInt(IIf((DdlClientes.SelectedValue.ToEntero <= 0), -1, DdlClientes.SelectedValue.ToEntero))
|
Dim CveCliente As Integer = CInt(IIf((DdlClientes.SelectedValue.ToEntero <= 0), -1, DdlClientes.SelectedValue.ToEntero))
|
||||||
Dim CveClienteSucursal As Integer = CInt(IIf((DdlClientesSucursales.SelectedValue.ToEntero <= 0), -1, DdlClientesSucursales.SelectedValue.ToEntero))
|
Dim CveClienteSucursal As Integer = CInt(IIf((DdlClientesSucursales.SelectedValue.ToEntero <= 0), -1, DdlClientesSucursales.SelectedValue.ToEntero))
|
||||||
|
|
||||||
|
|
||||||
'cuando es APH
|
'cuando es APH
|
||||||
Dim tFolio As Integer = -1
|
Dim tFolio As Integer = -1
|
||||||
If UsuarioActual.CveEmpresa = 48 And EsConsumoInterno = False Then tFolio = TxtFolio.Text.ToEntero
|
If UsuarioActual.CveEmpresa = 48 And EsConsumoInterno = False Then tFolio = TxtFolio.Text.ToEntero
|
||||||
@@ -968,11 +1030,10 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
If CveRemisionRecibida > 0 Then
|
If CveRemisionRecibida > 0 Then
|
||||||
CveVenta = CveRemisionRecibida
|
CveVenta = CveRemisionRecibida
|
||||||
ElseIf EsDistribuidor AndAlso DdlFactura.SelectedValue.ToEntero() > 0 Then
|
ElseIf DdlFactura.SelectedValue.ToEntero() > 0 Then
|
||||||
CveVenta = DdlFactura.SelectedValue.ToEntero()
|
CveVenta = DdlFactura.SelectedValue.ToEntero()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.ToDate, $" {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
|
||||||
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, CveConcepto, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta,
|
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, CveConcepto, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta,
|
||||||
CveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero,
|
CveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero,
|
||||||
Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text,
|
Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text,
|
||||||
@@ -1010,9 +1071,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
If EsDistribuidor Then
|
If EsDistribuidor Then
|
||||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
||||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||||
'CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
|
||||||
'CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String
|
|
||||||
|
|
||||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -1023,17 +1081,13 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
|
|
||||||
Dim Msg As New StringBuilder
|
|
||||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
|
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
|
||||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||||
|
|
||||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.AjustaPoliza(IDPoliza)
|
|
||||||
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
||||||
|
|
||||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||||
'If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
|
|
||||||
|
|
||||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
|
||||||
|
|
||||||
'Limpia Valores cuando inserta de campos especiales
|
'Limpia Valores cuando inserta de campos especiales
|
||||||
If UsuarioActual.CveEmpresa = 66 Then
|
If UsuarioActual.CveEmpresa = 66 Then
|
||||||
@@ -1042,38 +1096,49 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
EnvioCorreo()
|
EnvioCorreo()
|
||||||
|
|
||||||
|
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
LimpiarMovimiento()
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjInventario.RollBack() 'deshace lo insertado
|
ObjInventario.RollBack() 'deshace lo insertado
|
||||||
CveMovimiento = 0
|
CveMovimiento = 0
|
||||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
|
||||||
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
|
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
|
||||||
' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ObjInventario.RollBack() 'deshace lo insertado
|
ObjInventario.RollBack() 'deshace lo insertado
|
||||||
CveMovimiento = 0
|
CveMovimiento = 0
|
||||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
|
||||||
Alert("Ocurrió un Error inesperado en el registro" & ex.Message, TipoMensaje.MsgError)
|
Alert("Ocurrió un Error inesperado en el registro" & ex.Message, TipoMensaje.MsgError)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
ObjInventario.Dispose() 'elimino la instancia
|
ObjInventario.Dispose()
|
||||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
ObjAcum.Dispose()
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If Not ErrorMovInv AndAlso GenerarRNC AndAlso ObjRemisionNC IsNot Nothing Then
|
||||||
|
|
||||||
|
CargaDTDetalleRNC()
|
||||||
|
|
||||||
|
Dim Resp = ObjRemisionNC.EmitirFactura(False)
|
||||||
|
For Each mensaje As String In Resp.Mensajes
|
||||||
|
Msg.AppendFormat("<br>{0}", mensaje)
|
||||||
|
Next
|
||||||
|
Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia))
|
||||||
|
|
||||||
|
ElseIf Not ErrorMovInv Then
|
||||||
|
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
LimpiarMovimiento()
|
||||||
|
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -1183,17 +1248,13 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
|
|
||||||
Private Sub VisualizaPU(Opcion As Boolean)
|
Private Sub VisualizaPU(Opcion As Boolean)
|
||||||
|
|
||||||
|
|
||||||
txtPrecio.Visible = Opcion
|
txtPrecio.Visible = Opcion
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub VisualizaPUExtranjero(Opcion As Boolean)
|
Private Sub VisualizaPUExtranjero(Opcion As Boolean)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub VisualizaAF(Opcion As Boolean)
|
Private Sub VisualizaAF(Opcion As Boolean)
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub SiguienteFolio()
|
Private Sub SiguienteFolio()
|
||||||
Dim Inv As New ClsInventarios
|
Dim Inv As New ClsInventarios
|
||||||
@@ -1205,50 +1266,24 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlProducto2_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlProducto2_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
ElProductoChange()
|
CambiarProducto()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub ElProductoChange()
|
Private Sub CambiarProducto()
|
||||||
|
|
||||||
|
|
||||||
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||||
|
|
||||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
|
||||||
Dim MetodoInventario As Integer = GlobalDTPS(UsuarioActual.CveEmpresa, DdlProducto2.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario", "").ToEntero ' ("Inv_CveMetodoInventario = 6", "PS")
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
DdlUnidad.Items.Clear()
|
DdlUnidad.Items.Clear()
|
||||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1)
|
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1)
|
||||||
DdlUnidad.DataBind()
|
DdlUnidad.DataBind()
|
||||||
|
|
||||||
|
HdnCveTamaño.Value = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTamaño", $"CvePS = { DdlProducto2.SelectedValue.ToEntero }")
|
||||||
|
|
||||||
Dim ObjAcum As New ClsAcumuladores
|
Dim ObjAcum As New ClsAcumuladores
|
||||||
Dim CveTamaño As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTamaño", $"CvePS = { DdlProducto2.SelectedValue.ToEntero }").ToEntero
|
|
||||||
HdnCveTamaño.Value = CveTamaño.ToString
|
|
||||||
|
|
||||||
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||||
Dim DtTamaños As DataTable = ObjAcum.DtResultados
|
HdnCveTamaño.Value = ObjAcum.DtResultados.FiltroPrimeroValor("CveTamaño", $"CvePSCargo = { DdlProducto2.SelectedValue }")
|
||||||
|
|
||||||
HdnCveTamaño.Value = DtTamaños.FiltroPrimeroValor("CveTamaño", $"CvePSCargo = { DdlProducto2.SelectedValue }")
|
|
||||||
|
|
||||||
'LblMoldalCveTamanio.Text = DtTamaños.FiltroPrimeroValor("CveTamaño", $"CvePSCargo = { DdlProducto2.SelectedValue }")
|
|
||||||
'LblMoldalTamanio.Text = DtTamaños.FiltroPrimeroValor("Tamaño", $"CvePSCargo = { DdlProducto2.SelectedValue }")
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'123123123
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'If ObjAcum.TamañoGet(CveTamaño, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
ObjAcum.Dispose()
|
ObjAcum.Dispose()
|
||||||
UPDatos.Update()
|
|
||||||
|
|
||||||
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -1261,9 +1296,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||||
|
|
||||||
|
'Dim TienePermisoImportes = UsuarioActual.TienePermisoProceso(201)
|
||||||
Dim TienePermisoImportes = UsuarioActual.TienePermisoProceso(201)
|
|
||||||
|
|
||||||
|
|
||||||
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
||||||
If DtTemp.MAX("SerieLote").ToString <> "" Then
|
If DtTemp.MAX("SerieLote").ToString <> "" Then
|
||||||
@@ -1280,6 +1313,10 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
If DtTemp.SUM("CostoIndirecto") > 0 Then
|
If DtTemp.SUM("CostoIndirecto") > 0 Then
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim Total = DtTemp.SUM("Total")
|
||||||
|
|
||||||
|
TxtTotal.Text = Total.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1643,9 +1680,8 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
#Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED"
|
#Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED"
|
||||||
Private Sub InicializaClientes()
|
Private Sub InicializaClientes()
|
||||||
|
|
||||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros("EsDistribuidor = 1")
|
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) '.FiltraParametros("EsDistribuidor = 1")
|
||||||
DdlClientes.DataBind()
|
DdlClientes.DataBind()
|
||||||
|
|
||||||
DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlClientes.SelectedValue = "-1"
|
DdlClientes.SelectedValue = "-1"
|
||||||
|
|
||||||
@@ -1666,6 +1702,9 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Private Sub CambiaCliente()
|
Private Sub CambiaCliente()
|
||||||
DivClienteSucursal.Visible = False
|
DivClienteSucursal.Visible = False
|
||||||
DdlClientesSucursales.Items.Clear()
|
DdlClientesSucursales.Items.Clear()
|
||||||
|
|
||||||
|
Me.EsDistribuidor = CBool(GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("EsDistribuidor", $"CveCliente = {DdlClientes.SelectedValue.ToEntero()}"))
|
||||||
|
|
||||||
CargaSucursalesCliente()
|
CargaSucursalesCliente()
|
||||||
CargaFacturasCliente()
|
CargaFacturasCliente()
|
||||||
|
|
||||||
@@ -1675,11 +1714,10 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
DivFactura.Visible = True
|
DivFactura.Visible = True
|
||||||
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
|
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
Me.EsDistribuidor = True
|
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "Ing", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||||
DdlFactura.DataSource = ObjVentas.DtResultados.Copy()
|
DdlFactura.DataSource = ObjVentas.DtResultados.FiltraParametros("", "", {"CveVenta", "SerieFolio"})
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
@@ -1842,7 +1880,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
'DdlClasificacion.SelectedValueExist(DtMovimientos.Rows(GvRow.RowIndex)("CveClasificacion").ToString)
|
'DdlClasificacion.SelectedValueExist(DtMovimientos.Rows(GvRow.RowIndex)("CveClasificacion").ToString)
|
||||||
DdlProducto2.SelectedValueExist(DtMovimientos.Rows(GvRow.RowIndex)("CvePS").ToString)
|
DdlProducto2.SelectedValueExist(DtMovimientos.Rows(GvRow.RowIndex)("CvePS").ToString)
|
||||||
|
|
||||||
ElProductoChange()
|
CambiarProducto()
|
||||||
|
|
||||||
'LblMoldalTamanio.Text = DtMovimientos.Rows(GvRow.RowIndex)("Tamaño").ToString
|
'LblMoldalTamanio.Text = DtMovimientos.Rows(GvRow.RowIndex)("Tamaño").ToString
|
||||||
DdlUnidad.SelectedValueExist(DtMovimientos.Rows(GvRow.RowIndex)("UnidadMedida").ToString)
|
DdlUnidad.SelectedValueExist(DtMovimientos.Rows(GvRow.RowIndex)("UnidadMedida").ToString)
|
||||||
@@ -1944,4 +1982,433 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
UpGenerales.Update()
|
UpGenerales.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlFactura_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If Not EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then
|
||||||
|
|
||||||
|
If ObjRemisionNC IsNot Nothing Then
|
||||||
|
ObjRemisionNC.Dispose()
|
||||||
|
ObjRemisionNC = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjFactura IsNot Nothing Then
|
||||||
|
ObjFactura.Dispose()
|
||||||
|
ObjFactura = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveVenta As Integer = DdlFactura.SelectedValue.ToEntero()
|
||||||
|
|
||||||
|
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, DirectorioServidor:=Server.MapPath("/"))
|
||||||
|
|
||||||
|
If ObjFactura IsNot Nothing Then
|
||||||
|
CreaRemisionNC(ObjFactura.CveCliente, ObjFactura.CveSubProyecto, ObjFactura.CveMoneda)
|
||||||
|
DivTotal.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
UPDatos.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CreaRemisionNC(CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer)
|
||||||
|
ObjRemisionNC = New Modelos.Factura(UsuarioActual)
|
||||||
|
|
||||||
|
Dim Folio As String = ""
|
||||||
|
Dim Serie As String = ""
|
||||||
|
|
||||||
|
Dim ObjFolios As New ClsGralFolios()
|
||||||
|
If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' AND CveSubProyecto = {0}", CveSubProyecto))
|
||||||
|
If DT.Rows.Count > 0 Then
|
||||||
|
Serie = DT.Rows(0)("Serie").ToString()
|
||||||
|
Folio = DT.Rows(0)("FActual").ToString()
|
||||||
|
End If
|
||||||
|
DT.Dispose()
|
||||||
|
End If
|
||||||
|
ObjFolios.Dispose()
|
||||||
|
|
||||||
|
ObjRemisionNC.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML
|
||||||
|
ObjRemisionNC.Serie = Serie
|
||||||
|
ObjRemisionNC.Folio = Folio.ToEntero()
|
||||||
|
ObjRemisionNC.Version = "3.3"
|
||||||
|
ObjRemisionNC.FolioFiscal = ""
|
||||||
|
ObjRemisionNC.CveUsuario = UsuarioActual.CveUsuario
|
||||||
|
ObjRemisionNC.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
|
ObjRemisionNC.TipoCambio = 1
|
||||||
|
ObjRemisionNC.ConvertirPesos = False
|
||||||
|
ObjRemisionNC.CveMoneda = CveMoneda
|
||||||
|
ObjRemisionNC.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda))
|
||||||
|
ObjRemisionNC.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
|
||||||
|
ObjRemisionNC.TipoDocto = "RNC"
|
||||||
|
ObjRemisionNC.RefDocto = ""
|
||||||
|
ObjRemisionNC.CveMesa = -1
|
||||||
|
ObjRemisionNC.Fecha = Now
|
||||||
|
ObjRemisionNC.CvePrePoliza = -1
|
||||||
|
ObjRemisionNC.FechaPago = Now
|
||||||
|
ObjRemisionNC.MotivoDescuento = ""
|
||||||
|
ObjRemisionNC.FechaEjecucion = Now
|
||||||
|
ObjRemisionNC.UsuarioCreo = UsuarioActual.Usuario
|
||||||
|
ObjRemisionNC.CveCondicionEntrega = -1
|
||||||
|
ObjRemisionNC.CondicionEntrega = ""
|
||||||
|
ObjRemisionNC.NumeroCuenta = ""
|
||||||
|
ObjRemisionNC.CondicionesPago = 0
|
||||||
|
ObjRemisionNC.FormaPago = 0
|
||||||
|
ObjRemisionNC.PedidoContrato = ""
|
||||||
|
ObjRemisionNC.NumeroContrato = ""
|
||||||
|
ObjRemisionNC.DescripcionContrato = ""
|
||||||
|
ObjRemisionNC.CveCorte = -1
|
||||||
|
ObjRemisionNC.TipoDocumento = "Remisión"
|
||||||
|
ObjRemisionNC.Alfa1 = ""
|
||||||
|
ObjRemisionNC.Alfa2 = ""
|
||||||
|
ObjRemisionNC.Alfa3 = ""
|
||||||
|
ObjRemisionNC.CveContrato = -1
|
||||||
|
ObjRemisionNC.ConvertirPesos = False
|
||||||
|
ObjRemisionNC.CveSubProyecto = CveSubProyecto
|
||||||
|
ObjRemisionNC.CveSubProyectoCobranza = CveSubProyecto
|
||||||
|
ObjRemisionNC.CveSubProyectoEjecucion = CveSubProyecto
|
||||||
|
ObjRemisionNC.SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto)))
|
||||||
|
ObjRemisionNC.SubProyectoMatriz = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1"))
|
||||||
|
|
||||||
|
'CLIENTE
|
||||||
|
ObjRemisionNC.CveCliente = CveCliente
|
||||||
|
ObjRemisionNC.SetCliente()
|
||||||
|
ObjRemisionNC.CveAlmacen = -1
|
||||||
|
|
||||||
|
Dim ObjCliente As New ClsClientes
|
||||||
|
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
ObjRemisionNC.CveFormaPago33 = ObjCliente.CveFormaPago33
|
||||||
|
ObjRemisionNC.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
|
||||||
|
ObjRemisionNC.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
|
||||||
|
|
||||||
|
ObjRemisionNC.CveMetodoPago33 = ObjCliente.CveMetodoPago33
|
||||||
|
ObjRemisionNC.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
|
||||||
|
ObjRemisionNC.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
|
||||||
|
|
||||||
|
ObjRemisionNC.CveUsoCFDI = ObjCliente.CveUsoCFDI
|
||||||
|
ObjRemisionNC.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||||
|
ObjRemisionNC.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||||
|
|
||||||
|
ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago
|
||||||
|
|
||||||
|
If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then
|
||||||
|
ObjRemisionNC.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString
|
||||||
|
Else
|
||||||
|
ObjRemisionNC.CveMetodoPago = 1
|
||||||
|
ObjRemisionNC.MetodoPago = "Efectivo"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjCliente.GetSucursales(CveCliente) Then
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
ObjRemisionNC.CveClienteSucursal = If(String.IsNullOrEmpty(ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'")), -1, ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'").ToEntero())
|
||||||
|
Else
|
||||||
|
ObjRemisionNC.CveClienteSucursal = -1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
|
'DETALLES
|
||||||
|
ObjRemisionNC.DtDetalle = CreaDTDetalleRNC()
|
||||||
|
|
||||||
|
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, ObjRemisionNC.CveCliente, ObjRemisionNC.CveVendedor, UsuarioActual.CveEmpresa) Then
|
||||||
|
ObjRemisionNC.DtPromociones = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
ObjRemisionNC.Observaciones = ""
|
||||||
|
ObjRemisionNC.OrdenCompra = ""
|
||||||
|
ObjRemisionNC.PedidoContrato = ""
|
||||||
|
ObjRemisionNC.ObservacionesAlmacen = ""
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function AddPSRNC(ByRef TmpDT As DataTable, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
||||||
|
PU As Decimal, Descuento As Decimal,
|
||||||
|
CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
|
||||||
|
Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
|
||||||
|
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||||
|
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
|
||||||
|
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False, Optional PorcentajeIVA As Decimal = 0D) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
If Not CvePS > 0 Then
|
||||||
|
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If (Obs.Length + PS.Length > 1000) Then
|
||||||
|
Alert(String.Format("El Nombre y observación del producto tiene longitud de {0} caracteres y excede los 1000 caracteres permitidos.", Obs.Length + PS.Length), TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim Row As DataRow = Nothing
|
||||||
|
Dim TotalCalculableImpuestos As Decimal = 0
|
||||||
|
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||||
|
|
||||||
|
Row = TmpDT.NewRow()
|
||||||
|
Row("CveProyecto") = CveProyecto
|
||||||
|
Row("Proyecto") = Proyecto
|
||||||
|
Row("CveSubProyecto") = CveSubProyecto
|
||||||
|
Row("SubProyecto") = SubProyecto
|
||||||
|
Row("SerieLote") = SerieLote
|
||||||
|
Row("TiempoEntrega") = TiempoEntrega
|
||||||
|
Row("Orden") = TmpDT.Rows.Count + 1
|
||||||
|
Row("Cantidad") = Cantidad
|
||||||
|
Row("CveUM") = CveUM
|
||||||
|
Row("UM") = UM
|
||||||
|
Row("CveClasificacion") = CveClasificacion
|
||||||
|
Row("Clasificacion") = Clasificacion
|
||||||
|
Row("CvePS") = CvePS
|
||||||
|
Row("Obs") = Obs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim DrPS As DataRow = Nothing
|
||||||
|
|
||||||
|
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||||
|
|
||||||
|
If DrPS Is Nothing Then
|
||||||
|
Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
DrPS("IEPSPorcentaje") = 0
|
||||||
|
|
||||||
|
'verifica si tiene ventaminima
|
||||||
|
If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString.ToDecimal > 0 Then
|
||||||
|
'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15...
|
||||||
|
If Cantidad Mod DrPS("VentaMinima").ToString.ToDecimal <> 0 Then
|
||||||
|
Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString))
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
||||||
|
|
||||||
|
Row("PU") = PU
|
||||||
|
Row("Codigo") = DrPS("Codigo")
|
||||||
|
Row("NoIdentificacion") = DrPS("Codigo")
|
||||||
|
Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria")
|
||||||
|
Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
|
||||||
|
Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
|
||||||
|
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
||||||
|
Row("Consec") = TmpDT.Rows.Count + 1
|
||||||
|
|
||||||
|
Row("PS") = DrPS("PS")
|
||||||
|
Row("CodigoPS") = DrPS("PSCodigo").ToString
|
||||||
|
Row("CveTipoPS") = DrPS("CveTipoPS")
|
||||||
|
Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
|
||||||
|
Row("CveTamaño") = DrPS("CveTamaño")
|
||||||
|
|
||||||
|
If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
|
||||||
|
If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
|
||||||
|
|
||||||
|
Row("PorcentajeIVA") = PorcentajeIVA
|
||||||
|
|
||||||
|
Row("IVA") = Row("PorcentajeIVA")
|
||||||
|
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, 2)
|
||||||
|
|
||||||
|
|
||||||
|
Row("ImporteRetIVA") = 0
|
||||||
|
Row("ImporteRetISR") = 0
|
||||||
|
Row("PorcentajeRetIVA") = 0
|
||||||
|
Row("PorcentajeRetISR") = 0
|
||||||
|
Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje")
|
||||||
|
Row("ImporteIEPS") = Math.Round(DrPS("IEPSPorcentaje").ToString.ToDecimal * TotalCalculableImpuestos, 2)
|
||||||
|
Row("IEPS") = Row("ImporteIEPS")
|
||||||
|
Row("Descuento") = Math.Round(Descuento, 2)
|
||||||
|
Row("TipoDescuento") = 0
|
||||||
|
Row("Total") = (Cantidad * PU)
|
||||||
|
Row("TotalImporte") = Math.Round(Cantidad * PU, 2)
|
||||||
|
'Row("AsientoContableVentas") = DrPS("AsientoContableVentas")
|
||||||
|
' Row("IdCtaContVentas") = IdCtaContable
|
||||||
|
' Row("AplicaParaConcepto") = AplicaParaConcepto
|
||||||
|
|
||||||
|
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||||
|
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||||
|
|
||||||
|
|
||||||
|
Row("EntregaDirecta") = EntregaDirecta
|
||||||
|
'Contratos
|
||||||
|
Row("CveContratoDetalle") = CveContratoDetalle
|
||||||
|
Row("CveVentaDetalle") = CveVentaDetalle
|
||||||
|
Row("CveMovimientoDetallePedido") = CveVentaDetalle
|
||||||
|
Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
|
||||||
|
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
|
||||||
|
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
||||||
|
Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
|
||||||
|
Row("CuentaPredial") = CuentaPredial
|
||||||
|
Row("EsCargo") = EsCargo
|
||||||
|
|
||||||
|
'RECARGAR GV
|
||||||
|
TmpDT.Rows.Add(Row)
|
||||||
|
TmpDT.AcceptChanges()
|
||||||
|
Retorno = True
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Protected Function CreaDTDetalleRNC() As DataTable
|
||||||
|
Dim TmpDT = New DataTable
|
||||||
|
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Consec", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("Codigo", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveUM", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("UM", GetType(String))
|
||||||
|
TmpDT.Columns.Add("SATClaveUM", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveClasificacion", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Clasificacion", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CvePS", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("PS", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CodigoPS", GetType(String))
|
||||||
|
TmpDT.Columns.Add("SATClaveProdServ", GetType(String))
|
||||||
|
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("SerieLote", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CuentaPredial", GetType(String))
|
||||||
|
TmpDT.Columns.Add("Obs", GetType(String))
|
||||||
|
TmpDT.Columns.Add("TiempoEntrega", GetType(String))
|
||||||
|
TmpDT.Columns.Add("PU", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("IVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("ImporteIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("IEPS", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("Descuento", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||||
|
'Para uso del módulo contable
|
||||||
|
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
||||||
|
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Proyecto", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("SubProyecto", GetType(String))
|
||||||
|
TmpDT.Columns.Add("CveVentaDetallePadre", GetType(Integer))
|
||||||
|
|
||||||
|
'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto
|
||||||
|
TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer))
|
||||||
|
'Contratos
|
||||||
|
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||||
|
'Remisiones a Facturas
|
||||||
|
TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer))
|
||||||
|
|
||||||
|
'Pedido2 a Facturas
|
||||||
|
TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("Origen", GetType(Integer))
|
||||||
|
'Ordenes Servicio
|
||||||
|
TmpDT.Columns.Add("CveOS", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveOSDetalle", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("SeFacturara", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Folio", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("Estatus", GetType(String))
|
||||||
|
'Ordenamiento
|
||||||
|
TmpDT.Columns.Add("Orden", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("TipoDocto", GetType(String))
|
||||||
|
'OC
|
||||||
|
TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("CantidadFacturadaPed2", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("CantidadInventario", GetType(Decimal))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String))
|
||||||
|
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
|
||||||
|
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
|
||||||
|
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
|
|
||||||
|
Return TmpDT
|
||||||
|
End Function
|
||||||
|
Protected Sub CargaDTDetalleRNC()
|
||||||
|
|
||||||
|
For Each Row As GridViewRow In GvM.Rows
|
||||||
|
If Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero()
|
||||||
|
Dim Cantidad As Decimal = Row.DataKey("Cantidad").ToDecimal()
|
||||||
|
Dim PU As Decimal = Row.DataKey("PU").ToDecimal()
|
||||||
|
Dim SubTotal As Decimal = Cantidad * PU
|
||||||
|
|
||||||
|
Dim CveUnidadMedida As Integer = 0
|
||||||
|
Dim CveClasificacion As Integer = 0
|
||||||
|
Dim UnidadMedida As String = ""
|
||||||
|
Dim Clasificacion As String = ""
|
||||||
|
Dim PS As String = ""
|
||||||
|
Dim PorcentajeIVA As Decimal = 0D
|
||||||
|
Dim IVA As Decimal = 0D
|
||||||
|
If CvePS > 0 Then
|
||||||
|
If SubTotal > 0 Then
|
||||||
|
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).Rows(0)
|
||||||
|
If Dr IsNot Nothing Then
|
||||||
|
CveUnidadMedida = Dr("CveUnidadMedida").ToString.ToEntero
|
||||||
|
CveClasificacion = Dr("CveClasificacion").ToString.ToEntero
|
||||||
|
PS = Dr("PSCodigo").ToString
|
||||||
|
UnidadMedida = Dr("UnidadMedida").ToString
|
||||||
|
Clasificacion = Dr("Clasificacion").ToString
|
||||||
|
End If
|
||||||
|
PorcentajeIVA = 0.16D
|
||||||
|
IVA = SubTotal * PorcentajeIVA
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "Inv/RecepcionUsados", SubTotal, 0, -1, "",
|
||||||
|
ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim TotalImporte As Decimal = ObjRemisionNC.DtDetalle.SUM("TotalImporte").ToDecimal()
|
||||||
|
Dim ImporteIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteIVA").ToDecimal()
|
||||||
|
Dim ImporteRetIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetIVA").ToDecimal()
|
||||||
|
Dim ImporteRetISR As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetISR").ToDecimal()
|
||||||
|
Dim ImporteIEPS As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteIEPS").ToDecimal()
|
||||||
|
Dim Descuento As Decimal = ObjRemisionNC.DtDetalle.SUM("Descuento").ToDecimal()
|
||||||
|
Dim Amortizacion As Decimal = 0
|
||||||
|
|
||||||
|
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
|
||||||
|
|
||||||
|
'DETALLES
|
||||||
|
ObjRemisionNC.SubTotal = TotalImporte
|
||||||
|
ObjRemisionNC.Descuento = Descuento
|
||||||
|
ObjRemisionNC.Amortizacion = Amortizacion
|
||||||
|
ObjRemisionNC.IVA = ImporteIVA
|
||||||
|
ObjRemisionNC.RetIVA = ImporteRetIVA
|
||||||
|
ObjRemisionNC.RetISR = ImporteRetISR
|
||||||
|
ObjRemisionNC.IEPS = ImporteIEPS
|
||||||
|
ObjRemisionNC.Total = Total
|
||||||
|
ObjRemisionNC.TotalOtrosConceptos = 0
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub CargaTamaños()
|
||||||
|
Dim objAcum As New ClsAcumuladores
|
||||||
|
If objAcum.TamañoGet(-1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||||
|
DtTamaños = objAcum.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
objAcum.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
287
OC/OC.aspx
287
OC/OC.aspx
@@ -274,6 +274,7 @@
|
|||||||
<label class="col-md-2">Cancelacion:</label>
|
<label class="col-md-2">Cancelacion:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<asp:TextBox ID="TxtMotivoCancelacion" CssClass="form-control input-sm" runat="server" Enabled="false" Width="365px" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
<asp:TextBox ID="TxtMotivoCancelacion" CssClass="form-control input-sm" runat="server" Enabled="false" Width="365px" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -586,14 +587,16 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1" style="max-width: 60px;">
|
<div class="col-md-1" style="max-width: 60px;">
|
||||||
Cliente:
|
Cliente:
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="Ddlcliente" OnSelectedIndexChanged="Ddlcliente_SelectedIndexChanged" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" Width="100%" DataTextField="Nombre" DataValueField="CveCliente" runat="server"></asp:DropDownList>
|
<asp:DropDownList ID="Ddlcliente" OnSelectedIndexChanged="Ddlcliente_SelectedIndexChanged" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" Width="100%" DataTextField="Nombre" DataValueField="CveCliente" runat="server"></asp:DropDownList>
|
||||||
<%-- <asp:RangeValidator ID="RVCliente" CssClass="form-control" runat="server" ControlToValidate="Ddlcliente" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
<%-- <asp:RangeValidator ID="RVCliente" CssClass="form-control" runat="server" ControlToValidate="Ddlcliente" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RVCliente" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
<ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RVCliente" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1" style="max-width: 75px;">
|
<div class="col-md-1" style="max-width: 75px;">
|
||||||
Vendedor:
|
Vendedor:
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div style="width: 90% !important; float: left;">
|
<div style="width: 90% !important; float: left;">
|
||||||
@@ -608,6 +611,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div runat="server" id="DivLugarEntregaDirecta1" visible="false" class="col-md-2" style="max-width: 120px;">
|
<div runat="server" id="DivLugarEntregaDirecta1" visible="false" class="col-md-2" style="max-width: 120px;">
|
||||||
Lugar Entrega:
|
Lugar Entrega:
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div runat="server" id="DivLugarEntregaDirecta2" visible="false" class="col-md-2">
|
<div runat="server" id="DivLugarEntregaDirecta2" visible="false" class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlDireccionEnvio" CssClass="select2me" runat="server" Width="300px" Visible="false" DataTextField="DireccionEnvio" DataValueField="CveDireccionEnvio"></asp:DropDownList>
|
<asp:DropDownList ID="DdlDireccionEnvio" CssClass="select2me" runat="server" Width="300px" Visible="false" DataTextField="DireccionEnvio" DataValueField="CveDireccionEnvio"></asp:DropDownList>
|
||||||
@@ -722,6 +726,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Cantidad</th>
|
<th scope="col">Cantidad</th>
|
||||||
<th scope="col" id="ThComercializadora" runat="server" visible="false">Tipo OC
|
<th scope="col" id="ThComercializadora" runat="server" visible="false">Tipo OC
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
</th>
|
</th>
|
||||||
@@ -795,8 +800,8 @@
|
|||||||
<asp:HiddenField ID="HdnCodigoAF" Value="-1" runat="server" ClientIDMode="Static" />
|
<asp:HiddenField ID="HdnCodigoAF" Value="-1" runat="server" ClientIDMode="Static" />
|
||||||
|
|
||||||
<asp:TextBox ID="LblCodigo" runat="server" Text="" onkeyup="EnterAF(event);" onblur="AFBlur();" ClientIDMode="Static" Width="40px" ValidationGroup="GrpDetalleGuardar"></asp:TextBox>
|
<asp:TextBox ID="LblCodigo" runat="server" Text="" onkeyup="EnterAF(event);" onblur="AFBlur();" ClientIDMode="Static" Width="40px" ValidationGroup="GrpDetalleGuardar"></asp:TextBox>
|
||||||
<%--<asp:RequiredFieldValidator Enabled="false" ID="RFVcodigo" runat="server" ControlToValidate="LblCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Activo Fijo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>--%>
|
<asp:RequiredFieldValidator Enabled="false" ID="RFVcodigo" runat="server" ControlToValidate="LblCodigo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Activo Fijo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
||||||
<%--<ajax:ValidatorCalloutExtender ID="VCEcodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVcodigo" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
<ajax:ValidatorCalloutExtender ID="VCEcodigo" runat="server" HighlightCssClass="vco" TargetControlID="RFVcodigo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<asp:HyperLink ID="HplMaq" runat="server" ClientIDMode="Static"><img alt="Activo Fijo" width="20px" height="20px" src="/Imagenes/Maquinaria.jpg" style="cursor:pointer;" onclick="$('#ajaxidmodal #myFrame').css({ width: 900 }); $('#ajaxidmodal ').css({ width: 900 });AbrirVentana('/AF/PopUpBuscarAF.aspx?OPCION=OC',1000,600,'N');"/></asp:HyperLink>
|
<asp:HyperLink ID="HplMaq" runat="server" ClientIDMode="Static"><img alt="Activo Fijo" width="20px" height="20px" src="/Imagenes/Maquinaria.jpg" style="cursor:pointer;" onclick="$('#ajaxidmodal #myFrame').css({ width: 900 }); $('#ajaxidmodal ').css({ width: 900 });AbrirVentana('/AF/PopUpBuscarAF.aspx?OPCION=OC',1000,600,'N');"/></asp:HyperLink>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -810,6 +815,7 @@
|
|||||||
<asp:HiddenField ID="HdnCveCuentaComprometido" runat="server" ClientIDMode="Static" />
|
<asp:HiddenField ID="HdnCveCuentaComprometido" runat="server" ClientIDMode="Static" />
|
||||||
<img alt="POA" width="15px" height="15px" src="/Imagenes/Money_add.png" style="cursor: pointer;" onclick="$get('divPOA').style.display='';PosicionaObjeto('HplMaq','divPOA');" />
|
<img alt="POA" width="15px" height="15px" src="/Imagenes/Money_add.png" style="cursor: pointer;" onclick="$get('divPOA').style.display='';PosicionaObjeto('HplMaq','divPOA');" />
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -862,7 +868,7 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCECant" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantEdit" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCECant" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantEdit" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.######}")%>' style="width:100%"></asp:Label>
|
<asp:Label ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.######}")%>' Style="width: 100%"></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -1045,91 +1051,134 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpIvas" runat="server" class="text-right" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpIvas" runat="server" class="text-right" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div style="display: inline-block;">
|
<div class="row">
|
||||||
<table border="0" rules="none" class="TextTab well ">
|
<div class="col-md-6">
|
||||||
<tr class="text-right">
|
<div class="row" id="RowCotizaciones" runat="server" visible="false">
|
||||||
<td width="120px"><b>Subtotal:</b></td>
|
<div class="col-md-12 ">
|
||||||
<td width="100px" style="text-align: right;">
|
<div class="portlet light xspadding bordered">
|
||||||
<asp:Label ID="LblSubTotal" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right;" Text="0.00"></asp:Label>
|
<div class="portlet-title">
|
||||||
</td>
|
<div class="caption font-green">
|
||||||
<td width="80px"></td>
|
<%--<i class="fa fa-users font-green"></i>--%>
|
||||||
</tr>
|
<span class="caption-subject bold uppercase">Cotizaciones Rapidas</span>
|
||||||
<tr runat="server" id="TrDescuento" class="text-right" visible="false">
|
</div>
|
||||||
<td><b>Descuento:</b></td>
|
<div class="actions">
|
||||||
<td>
|
<div class="btn-group">
|
||||||
<asp:TextBox ID="TxtDescuento" ClientIDMode="Static" onkeyup="FormatoMoneda(this);ValidaDescuento();" onblur="AplicaDescuentoGeneral();" Width="100px" Font-Size="10.5" BackColor="#f7f7f7" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||||
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnLimpiarDescuento" OnClick="BtnLimpiarDescuento_Click" runat="server" />
|
<ContentTemplate>
|
||||||
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarDescuento" OnClick="BtnAplicarDescuento_Click" runat="server" />
|
<asp:LinkButton ID="LnkAddCotEva" CssClass="caption-subject bold" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:LinkButton><br />
|
||||||
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnDescuento" />
|
</ContentTemplate>
|
||||||
</td>
|
</asp:UpdatePanel>
|
||||||
</tr>
|
</div>
|
||||||
<tr class="text-right">
|
</div>
|
||||||
<td width="120px"><b>Subtotal 2:</b></td>
|
</div>
|
||||||
<td width="100px" style="text-align: right;">
|
<div class="portlet-body">
|
||||||
<asp:Label ID="LblSubTotal2" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right;" Text="0.00"></asp:Label>
|
<asp:UpdatePanel ID="UpBitacoraEva" runat="server" UpdateMode="Conditional">
|
||||||
</td>
|
<ContentTemplate>
|
||||||
<td width="80px"></td>
|
<asp:GridView ID="GvBitacoraEva" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado cotizaciones rapidas" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||||
</tr>
|
<Columns>
|
||||||
<tr align="right">
|
<asp:BoundField HeaderText="Descripción" DataField="Descripcion" ItemStyle-HorizontalAlign="Left" />
|
||||||
<td><b>IVA:</b></td>
|
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="175px" ItemStyle-HorizontalAlign="Center" />
|
||||||
<td style="text-align: right;">
|
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:TextBox ID="TxtIVA" ClientIDMode="Static" Visible="false" onkeyup="FormatoMoneda(this);SumaTotal();" onblur="$('#BtnAplicarIVA').click();" Width="100px" Font-Size="10.5" BackColor="#eeeeee" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
<asp:TemplateField HeaderText="Archivo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
||||||
<asp:Label ID="LblIVA" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00"></asp:Label>
|
<ItemTemplate>
|
||||||
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarIVA" OnClick="BtnAplicarIVA_Click" runat="server" />
|
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" Text="<i class='fa fa-download' aria-hidden='true'></i>" OnClick="DownloadFile"></asp:LinkButton>
|
||||||
</td>
|
</ItemTemplate>
|
||||||
<td align="left">
|
</asp:TemplateField>
|
||||||
<asp:ImageButton ID="ImgAplicaRetenciones" OnClick="ImgAplicaRetenciones_Click" data-toggle="tooltip" title="Aplica Retenciones/IEPS" ImageUrl="/Metronic/assets/global/img/portlet-collapse-icon.png" Visible="false" runat="server" />
|
</Columns>
|
||||||
</td>
|
</asp:GridView>
|
||||||
</tr>
|
</ContentTemplate>
|
||||||
<tr runat="server" id="TrIEPS" class="text-right" visible="false">
|
</asp:UpdatePanel>
|
||||||
<td><b>IEPS:</b></td>
|
|
||||||
<td>
|
</div>
|
||||||
<asp:TextBox ID="TxtIEPS" Enabled="false" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" Font-Size="10.5" BackColor="#eeeeee" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
</div>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr runat="server" id="TrRetIVA" class="text-right" visible="false">
|
</div>
|
||||||
<td><b>Ret IVA:</b></td>
|
<div class="col-md-6">
|
||||||
<td>
|
<div style="display: inline-block;">
|
||||||
<asp:TextBox ID="TxtRetIVA" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" onblur="AplicaRetIVAGeneral();" Font-Size="10.5" BackColor="#f7f7f7" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
<table border="0" rules="none" class="TextTab well ">
|
||||||
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnLimpiarRetIVA" OnClick="BtnLimpiarRetIVA_Click" runat="server" />
|
<tr class="text-right">
|
||||||
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarRetIVA" OnClick="BtnAplicarRetIVA_Click" runat="server" />
|
<td width="120px"><b>Subtotal:</b></td>
|
||||||
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnRetIVA" />
|
<td width="100px" style="text-align: right;">
|
||||||
</td>
|
<asp:Label ID="LblSubTotal" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right;" Text="0.00"></asp:Label>
|
||||||
</tr>
|
</td>
|
||||||
<tr runat="server" id="TrRetISR" class="text-right" visible="false">
|
<td width="80px"></td>
|
||||||
<td><b>Ret ISR:</b></td>
|
</tr>
|
||||||
<td>
|
<tr runat="server" id="TrDescuento" class="text-right" visible="false">
|
||||||
<asp:TextBox ID="TxtRetISR" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" onblur="AplicaRetISRGeneral();" Font-Size="10.5" BackColor="#f7f7f7" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
<td><b>Descuento:</b></td>
|
||||||
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarRetISR" OnClick="BtnAplicarRetISR_Click" runat="server" />
|
<td>
|
||||||
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnRetISR" />
|
<asp:TextBox ID="TxtDescuento" ClientIDMode="Static" onkeyup="FormatoMoneda(this);ValidaDescuento();" onblur="AplicaDescuentoGeneral();" Width="100px" Font-Size="10.5" BackColor="#f7f7f7" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
||||||
</td>
|
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnLimpiarDescuento" OnClick="BtnLimpiarDescuento_Click" runat="server" />
|
||||||
</tr>
|
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarDescuento" OnClick="BtnAplicarDescuento_Click" runat="server" />
|
||||||
<tr align="right">
|
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnDescuento" />
|
||||||
<td><b>Total:</b></td>
|
</td>
|
||||||
<td style="text-align: right;">
|
</tr>
|
||||||
<asp:UpdatePanel runat="server">
|
<tr class="text-right">
|
||||||
<ContentTemplate>
|
<td width="120px"><b>Subtotal 2:</b></td>
|
||||||
<asp:TextBox ID="LblTotal" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Width="100px" Font-Size="10.5" BackColor="#eeeeee" Text="0.00"></asp:TextBox>
|
<td width="100px" style="text-align: right;">
|
||||||
</ContentTemplate>
|
<asp:Label ID="LblSubTotal2" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right;" Text="0.00"></asp:Label>
|
||||||
</asp:UpdatePanel>
|
</td>
|
||||||
</td>
|
<td width="80px"></td>
|
||||||
<td>
|
</tr>
|
||||||
<asp:DropDownList ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" Width="70px" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
<tr align="right">
|
||||||
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<td><b>IVA:</b></td>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
|
<td style="text-align: right;">
|
||||||
<asp:Label ID="LblMoneda" runat="server" Text="" Visible="false"></asp:Label>
|
<asp:TextBox ID="TxtIVA" ClientIDMode="Static" Visible="false" onkeyup="FormatoMoneda(this);SumaTotal();" onblur="$('#BtnAplicarIVA').click();" Width="100px" Font-Size="10.5" BackColor="#eeeeee" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
||||||
</td>
|
<asp:Label ID="LblIVA" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00"></asp:Label>
|
||||||
</tr>
|
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarIVA" OnClick="BtnAplicarIVA_Click" runat="server" />
|
||||||
</table>
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
<asp:ImageButton ID="ImgAplicaRetenciones" OnClick="ImgAplicaRetenciones_Click" data-toggle="tooltip" title="Aplica Retenciones/IEPS" ImageUrl="/Metronic/assets/global/img/portlet-collapse-icon.png" Visible="false" runat="server" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr runat="server" id="TrIEPS" class="text-right" visible="false">
|
||||||
|
<td><b>IEPS:</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtIEPS" Enabled="false" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" Font-Size="10.5" BackColor="#eeeeee" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr runat="server" id="TrRetIVA" class="text-right" visible="false">
|
||||||
|
<td><b>Ret IVA:</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtRetIVA" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" onblur="AplicaRetIVAGeneral();" Font-Size="10.5" BackColor="#f7f7f7" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
||||||
|
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnLimpiarRetIVA" OnClick="BtnLimpiarRetIVA_Click" runat="server" />
|
||||||
|
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarRetIVA" OnClick="BtnAplicarRetIVA_Click" runat="server" />
|
||||||
|
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnRetIVA" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr runat="server" id="TrRetISR" class="text-right" visible="false">
|
||||||
|
<td><b>Ret ISR:</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtRetISR" ClientIDMode="Static" onkeyup="FormatoMoneda(this);SumaTotal();" Width="100px" onblur="AplicaRetISRGeneral();" Font-Size="10.5" BackColor="#f7f7f7" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" />
|
||||||
|
<asp:Button Text="" Style="display: none" ClientIDMode="Static" ID="BtnAplicarRetISR" OnClick="BtnAplicarRetISR_Click" runat="server" />
|
||||||
|
<asp:HiddenField ClientIDMode="Static" Value="0" runat="server" ID="HdnRetISR" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr align="right">
|
||||||
|
<td><b>Total:</b></td>
|
||||||
|
<td style="text-align: right;">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:TextBox ID="LblTotal" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Width="100px" Font-Size="10.5" BackColor="#eeeeee" Text="0.00"></asp:TextBox>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<asp:DropDownList ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" Width="70px" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<asp:Label ID="LblMoneda" runat="server" Text="" Visible="false"></asp:Label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<asp:HiddenField ID="HdnEditCveActivoFijo" runat="server" ClientIDMode="Static" />
|
<asp:HiddenField ID="HdnEditCveActivoFijo" runat="server" ClientIDMode="Static" />
|
||||||
<asp:HiddenField ID="HdnEditCodigo" runat="server" ClientIDMode="Static" />
|
<asp:HiddenField ID="HdnEditCodigo" runat="server" ClientIDMode="Static" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:AsyncPostBackTrigger ControlID="LbAgregar" EventName="Click" />
|
<asp:AsyncPostBackTrigger ControlID="LbAgregar" EventName="Click" />
|
||||||
@@ -1151,6 +1200,7 @@
|
|||||||
|
|
||||||
<asp:HyperLink ID="hplAgregarCotizacion" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-plus'></i> Agregar Cotizacion" Style="cursor: pointer;" ToolTip="Agregar Cotizacion"></asp:HyperLink>
|
<asp:HyperLink ID="hplAgregarCotizacion" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-plus'></i> Agregar Cotizacion" Style="cursor: pointer;" ToolTip="Agregar Cotizacion"></asp:HyperLink>
|
||||||
|
|
||||||
|
|
||||||
<asp:HyperLink ID="hplEnviarCorreo" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-envelope'></i> Enviar cotización por correo" Style="cursor: pointer;" ToolTip="Enviar cotización por correo"></asp:HyperLink>
|
<asp:HyperLink ID="hplEnviarCorreo" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-envelope'></i> Enviar cotización por correo" Style="cursor: pointer;" ToolTip="Enviar cotización por correo"></asp:HyperLink>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -1424,6 +1474,7 @@
|
|||||||
<td style="text-align: center;">
|
<td style="text-align: center;">
|
||||||
<asp:Panel runat="server" ID="PnlUsuarioAsignado" Visible="False">
|
<asp:Panel runat="server" ID="PnlUsuarioAsignado" Visible="False">
|
||||||
Asignar a:
|
Asignar a:
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlUsuariosAsignado" CssClass="select2me" Width="200px" DataTextField="Nombre" DataValueField="CveUsuario" runat="server"></asp:DropDownList>
|
<asp:DropDownList ID="DdlUsuariosAsignado" CssClass="select2me" Width="200px" DataTextField="Nombre" DataValueField="CveUsuario" runat="server"></asp:DropDownList>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary" Style="margin-top: 5px;" runat="server" Text="Guardar" Width="170px" ValidationGroup="GrpGuardar" />
|
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary" Style="margin-top: 5px;" runat="server" Text="Guardar" Width="170px" ValidationGroup="GrpGuardar" />
|
||||||
@@ -1462,28 +1513,25 @@
|
|||||||
|
|
||||||
|
|
||||||
<a name="pie_de_pagina"></a>
|
<a name="pie_de_pagina"></a>
|
||||||
<div class="row" id="RowBitacora">
|
<div class="row">
|
||||||
<div class="col-md-12 ">
|
<div class="col-md-12 ">
|
||||||
<div class="portlet light xspadding bordered">
|
<div class="portlet light xspadding bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<%--<i class="fa fa-users font-green"></i>--%>
|
|
||||||
<span class="caption-subject bold uppercase">Bitácora</span>
|
<span class="caption-subject bold uppercase">Bitácora</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<asp:UpdatePanel ID="UpAccionesBitacora" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpAccionesBitacora" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
<asp:LinkButton ID="ImgAddObs" CssClass="caption-subject bold" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:LinkButton><br />
|
||||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' >Agendar</i>" Visible="false" Style="cursor: pointer;" ToolTip="Agendar"></asp:HyperLink>
|
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' >Agendar</i>" Visible="false" Style="cursor: pointer;" ToolTip="Agendar"></asp:HyperLink>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
<asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||||
@@ -1495,16 +1543,13 @@
|
|||||||
<asp:BoundField HeaderText="Prioridad" DataField="Prioridad" ItemStyle-Width="100px" />
|
<asp:BoundField HeaderText="Prioridad" DataField="Prioridad" ItemStyle-Width="100px" />
|
||||||
<asp:TemplateField HeaderText="Archivo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
<asp:TemplateField HeaderText="Archivo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" CssClass="Texto" OnClick="DownloadFile">
|
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" Text="<i class='fa fa-download' aria-hidden='true'></i>" OnClick="DownloadFile"></asp:LinkButton>
|
||||||
<asp:Image ImageUrl="/Imagenes/Abajo.png" ID="ImgArchivo" runat="server" />
|
|
||||||
</asp:LinkButton>
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1538,20 +1583,20 @@
|
|||||||
|
|
||||||
<div id="ModalBitacora" class="modal ADS fade" role="dialog">
|
<div id="ModalBitacora" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header ">
|
<asp:UpdatePanel runat="server" ID="UpTituloBitacora" UpdateMode="Conditional" class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<ContentTemplate>
|
||||||
<h4 class="modal-title">Bitácora</h4>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
<h4 class="modal-title" runat="server" id="HBitacora">Bitácora</h4>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<label>Bitácora/Observaciones</label>
|
<label runat="server" id="LblBitacora">Bitácora/Observaciones</label>
|
||||||
<br />
|
<br />
|
||||||
<asp:TextBox CssClass="form-control" ID="TxtEventoDescripcion" class="Widthall" runat="server" TextMode="MultiLine" Columns="60" Rows="4"></asp:TextBox>
|
<asp:TextBox CssClass="form-control" ID="TxtEventoDescripcion" class="Widthall" runat="server" TextMode="MultiLine" Columns="60" Rows="4"></asp:TextBox>
|
||||||
<br />
|
<br />
|
||||||
@@ -1562,35 +1607,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
<asp:HiddenField runat="server" ID="HdnEsCotizacion" Value="0" />
|
||||||
</div>
|
</div>
|
||||||
<%-- <table>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="100px">Subir Archivo:</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:Literal ID="LtSubirArchivoInfo" Text="" runat="server" />
|
|
||||||
<asp:HiddenField ID="HdnArchivoEstatus" runat="server" ClientIDMode="Static" Value="" />
|
|
||||||
<asp:TextBox runat="server" ID="TxtArchivo" Width="300px" Visible="false" />
|
|
||||||
<ajax:AsyncFileUpload ID="AFU" runat="server" OnClientUploadComplete="uploadComplete" OnClientUploadError="uploadError" Width="300px" UploaderStyle="Modern" UploadingBackColor="#CCFFFF" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>--%>
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
@@ -1654,6 +1672,7 @@
|
|||||||
<tr class="Titulos">
|
<tr class="Titulos">
|
||||||
<td style="width: 760px;">Programa Operativo</td>
|
<td style="width: 760px;">Programa Operativo</td>
|
||||||
<td style="float: right; padding-right: 3px;">Importe:
|
<td style="float: right; padding-right: 3px;">Importe:
|
||||||
|
|
||||||
<asp:TextBox ID="TxtImporte" ClientIDMode="Static" runat="server" Width="50px" CssClass="alineanum" Enabled="false"></asp:TextBox>
|
<asp:TextBox ID="TxtImporte" ClientIDMode="Static" runat="server" Width="50px" CssClass="alineanum" Enabled="false"></asp:TextBox>
|
||||||
</td>
|
</td>
|
||||||
<td style="padding-right: 4px;" valign="top">
|
<td style="padding-right: 4px;" valign="top">
|
||||||
@@ -1664,16 +1683,20 @@
|
|||||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||||
<tr style="height: 30px;">
|
<tr style="height: 30px;">
|
||||||
<td style="float: left;">Fuente F:
|
<td style="float: left;">Fuente F:
|
||||||
<asp:DropDownList ID="CboFuenteFinanciamiento" runat="server" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="100px"></asp:DropDownList>
|
|
||||||
|
<asp:DropDownList ID="CboFuenteFinanciamiento" runat="server" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="100px"></asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td style="float: left;">Unidad Admtiva:
|
<td style="float: left;">Unidad Admtiva:
|
||||||
<asp:DropDownList ID="CboUnidadAdministrativa" runat="server" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="100px"></asp:DropDownList>
|
|
||||||
|
<asp:DropDownList ID="CboUnidadAdministrativa" runat="server" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="100px"></asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td style="float: left;">Tipo Gasto:
|
<td style="float: left;">Tipo Gasto:
|
||||||
<asp:DropDownList ID="CboTipoGasto" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100px"></asp:DropDownList>
|
|
||||||
|
<asp:DropDownList ID="CboTipoGasto" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100px"></asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td style="float: left;">Clasificador:
|
<td style="float: left;">Clasificador:
|
||||||
<asp:DropDownList ID="CboClasificacionOG" runat="server" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="100px"></asp:DropDownList>
|
|
||||||
|
<asp:DropDownList ID="CboClasificacionOG" runat="server" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="100px"></asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td style="float: right;">
|
<td style="float: right;">
|
||||||
<asp:Button ID="Button1" runat="server" Text="Consultar" Width="100px" OnClick="consultarAC_Click" />
|
<asp:Button ID="Button1" runat="server" Text="Consultar" Width="100px" OnClick="consultarAC_Click" />
|
||||||
@@ -2357,6 +2380,7 @@
|
|||||||
<div id="AccionContrato" runat="server">
|
<div id="AccionContrato" runat="server">
|
||||||
<p>
|
<p>
|
||||||
Tipo de Clasificación:
|
Tipo de Clasificación:
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<asp:RadioButtonList ID="RblOpcionClasificacion" runat="server" CssClass="rbl" RepeatDirection="Vertical" RepeatLayout="Table">
|
<asp:RadioButtonList ID="RblOpcionClasificacion" runat="server" CssClass="rbl" RepeatDirection="Vertical" RepeatLayout="Table">
|
||||||
<asp:ListItem Text="Compra de Material para Venta" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Compra de Material para Venta" Value="1"></asp:ListItem>
|
||||||
@@ -2365,6 +2389,7 @@
|
|||||||
|
|
||||||
<asp:LinkButton ID="BtnIniciarContrato" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
<asp:LinkButton ID="BtnIniciarContrato" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -174,6 +174,14 @@ Partial Class OC
|
|||||||
ViewState("NumCotizacionesGanadoras") = value
|
ViewState("NumCotizacionesGanadoras") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property NumCotizacionesEvaluar As Integer
|
||||||
|
Get
|
||||||
|
NumCotizacionesEvaluar = IfNull(ViewState("NumCotizacionesEvaluar"), "-1", ViewState("NumCotizacionesEvaluar")).ToString().ToEntero()
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("NumCotizacionesEvaluar") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property ProveedoresCotizacion As ArrayList
|
Private Property ProveedoresCotizacion As ArrayList
|
||||||
Get
|
Get
|
||||||
ProveedoresCotizacion = DirectCast(ViewState("ProveedoresCotizacion"), ArrayList)
|
ProveedoresCotizacion = DirectCast(ViewState("ProveedoresCotizacion"), ArrayList)
|
||||||
@@ -964,7 +972,7 @@ Partial Class OC
|
|||||||
DtDetalle.Columns.Add("CveContratoDetalle", GetType(Integer))
|
DtDetalle.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||||
DtDetalle.Columns.Add("CantidadNoEditable", GetType(Double))
|
DtDetalle.Columns.Add("CantidadNoEditable", GetType(Double))
|
||||||
|
|
||||||
DtDetalle.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
'DtDetalle.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
||||||
|
|
||||||
' DtDetalle.Columns.Add("ClasificacionOG", GetType(String))
|
' DtDetalle.Columns.Add("ClasificacionOG", GetType(String))
|
||||||
|
|
||||||
@@ -1223,9 +1231,11 @@ Partial Class OC
|
|||||||
|
|
||||||
DdlPrioridad.SelectedValueExist(objOC.Prioridad.ToString)
|
DdlPrioridad.SelectedValueExist(objOC.Prioridad.ToString)
|
||||||
ChkCotizacion.Checked = objOC.RequiereCotizacion
|
ChkCotizacion.Checked = objOC.RequiereCotizacion
|
||||||
|
|
||||||
If ChkCotizacion.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
|
If ChkCotizacion.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
|
||||||
ChkCotizacion.Enabled = False
|
ChkCotizacion.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
tabCotizaciones.Enabled = objOC.RequiereCotizacion
|
tabCotizaciones.Enabled = objOC.RequiereCotizacion
|
||||||
tabCotizaciones.UpdatePanelID = uppOpciones.ID
|
tabCotizaciones.UpdatePanelID = uppOpciones.ID
|
||||||
TxtGuia.Text = objOC.Guia
|
TxtGuia.Text = objOC.Guia
|
||||||
@@ -1576,6 +1586,11 @@ Partial Class OC
|
|||||||
'CARGA MOVTOS DE ALMACEN
|
'CARGA MOVTOS DE ALMACEN
|
||||||
InicializaMovtosAlmacen()
|
InicializaMovtosAlmacen()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And pCveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
|
||||||
|
RowCotizaciones.Visible = True
|
||||||
|
UpIvas.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
uppEstatus.Update()
|
uppEstatus.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2058,6 +2073,12 @@ Partial Class OC
|
|||||||
Private Function ValidaGuardar() As Boolean
|
Private Function ValidaGuardar() As Boolean
|
||||||
Dim TieneError = False
|
Dim TieneError = False
|
||||||
|
|
||||||
|
'Entrega Directa requiere Cliente y Vendedor
|
||||||
|
If ChkEntregaDirecta.Checked And Ddlcliente.SelectedValue.ToEntero <= 0 Then
|
||||||
|
Alert("Al ser una Entrega Directa es necesario seleccionar un cliente, por favor seleccione uno.")
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
'VALIDA QUE TENGA REGISTROS
|
'VALIDA QUE TENGA REGISTROS
|
||||||
If Not GvD.Rows.Count > 0 Then
|
If Not GvD.Rows.Count > 0 Then
|
||||||
Alert(String.Format("La {0} debe de tener registros", TipoLargo), TipoMensaje.MsgAdvertencia)
|
Alert(String.Format("La {0} debe de tener registros", TipoLargo), TipoMensaje.MsgAdvertencia)
|
||||||
@@ -2196,14 +2217,22 @@ Partial Class OC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'VALIDA QUE TENGA LAS COTIZACIONES QUE DEBEN TENER
|
'VALIDA QUE TENGA LAS COTIZACIONES QUE DEBEN TENER
|
||||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" AndAlso CveConfianzaProveedor > 0 AndAlso (TipoOC.ToUpper = "REQ" And CveEstatusFinalOK = CboE.SelectedValue.ToEntero) Then
|
If UsuarioActual.Empresa.Funcionalidad(565) = "1" AndAlso (TipoOC.ToUpper = "REQ" And CveEstatusFinalOK = CboE.SelectedValue.ToEntero) Then
|
||||||
If CveConfianzaProveedor > 0 Then
|
If CveConfianzaProveedor > 0 Then
|
||||||
|
'SUMA EL TOTAL DE COTIZACIONES
|
||||||
|
For Each GvRow As GridViewRow In GvBitacoraEva.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
Me.NumCotizacionesEvaluar += 1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
If CveConfianzaProveedor = 1 AndAlso Me.NumCotizaciones < 1 Then
|
Me.NumCotizacionesEvaluar += Me.NumCotizaciones
|
||||||
Alert("Para el proveedor seleccionado es necesario terner al menos 1 cotización.", TipoMensaje.MsgAdvertencia)
|
|
||||||
|
If CveConfianzaProveedor = 1 AndAlso Me.NumCotizacionesEvaluar < 1 Then
|
||||||
|
Alert("Para el proveedor seleccionado es necesario tener al menos 1 cotización.", TipoMensaje.MsgAdvertencia)
|
||||||
TieneError = True
|
TieneError = True
|
||||||
ElseIf CveConfianzaProveedor = 2 AndAlso Me.NumCotizaciones < 2 Then
|
ElseIf CveConfianzaProveedor = 2 AndAlso Me.NumCotizacionesEvaluar < 2 Then
|
||||||
Alert("Para el proveedor seleccionado es necesario terner al menos 2 cotizaciones", TipoMensaje.MsgAdvertencia)
|
Alert("Para el proveedor seleccionado es necesario tener al menos 2 cotizaciones", TipoMensaje.MsgAdvertencia)
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2222,12 +2251,6 @@ Partial Class OC
|
|||||||
End Function
|
End Function
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
'Entrega Directa requiere Cliente y Vendedor
|
|
||||||
If ChkEntregaDirecta.Checked And Ddlcliente.SelectedValue.ToEntero <= 0 Then
|
|
||||||
Alert("Al ser una Entrega Directa es necesario seleccionar un cliente, por favor seleccione uno.")
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
'VALIDACIONES PARA GUARDAR
|
'VALIDACIONES PARA GUARDAR
|
||||||
If ValidaGuardar() Then Exit Sub
|
If ValidaGuardar() Then Exit Sub
|
||||||
|
|
||||||
@@ -4501,18 +4524,48 @@ Partial Class OC
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub GvBitacoraEva_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvBitacoraEva.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DBCampo("Archivo").ToString.Trim <> "" AndAlso CveOrdenCompra > 0 Then
|
||||||
|
e.Row.FCLinkButton("LinkArchivo").Visible = True
|
||||||
|
e.Row.FCLinkButton("LinkArchivo").CommandArgument = String.Format("OI\{0}", e.Row.DBCampo("Archivo").ToString)
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LinkArchivo")) 'Registro un evento Postbacktrigger, que recargue toda la pagina para que funcione
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkAddCotEva_Click(sender As Object, e As EventArgs) Handles LnkAddCotEva.Click
|
||||||
|
HdnEsCotizacion.Value = "1"
|
||||||
|
ChkEventoPrioridad.Visible = False
|
||||||
|
HBitacora.InnerText = "Cotización"
|
||||||
|
LblBitacora.InnerText = "Cotización"
|
||||||
|
|
||||||
|
UPAddEventoBitacora.Update()
|
||||||
|
UpTituloBitacora.Update()
|
||||||
|
RegistraScript("$('#ModalBitacora').modal('show');")
|
||||||
|
End Sub
|
||||||
|
Protected Sub ImgAddObs_Click(sender As Object, e As EventArgs) Handles ImgAddObs.Click
|
||||||
|
HdnEsCotizacion.Value = "0"
|
||||||
|
ChkEventoPrioridad.Visible = True
|
||||||
|
HBitacora.InnerText = "Bitácora"
|
||||||
|
LblBitacora.InnerText = "Bitácora/Observaciones"
|
||||||
|
|
||||||
|
UPAddEventoBitacora.Update()
|
||||||
|
UpTituloBitacora.Update()
|
||||||
|
RegistraScript("$('#ModalBitacora').modal('show');")
|
||||||
|
End Sub
|
||||||
Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
|
Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
|
||||||
|
|
||||||
If CveOrdenCompra > 0 Then
|
If CveOrdenCompra > 0 Then
|
||||||
GuardaBitacora()
|
GuardaBitacora(HdnEsCotizacion.Value.ToEntero() > 0)
|
||||||
Else
|
Else
|
||||||
AgregaBitacoraTemporal()
|
AgregaBitacoraTemporal()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region " GUARDA DIRECTO "
|
#Region " GUARDA DIRECTO "
|
||||||
Private Sub GuardaBitacora()
|
Private Sub GuardaBitacora(Optional EsCotizacion As Boolean = False)
|
||||||
Dim ObjEventoBitacora As New ClsOIEventos
|
Dim ObjEventoBitacora As New ClsOIEventos
|
||||||
Dim FileExtension As String = ""
|
Dim FileExtension As String = ""
|
||||||
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||||
@@ -4523,7 +4576,7 @@ Partial Class OC
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
Dim descripcion As String = TxtEventoDescripcion.Text.Trim
|
Dim descripcion As String = TxtEventoDescripcion.Text.Trim
|
||||||
Dim Prioridad As Integer = If(ChkEventoPrioridad.Checked, 3, 1)
|
Dim Prioridad As Integer = If(EsCotizacion, 4, If(ChkEventoPrioridad.Checked, 3, 1))
|
||||||
|
|
||||||
If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra, Prioridad:=Prioridad) Then
|
If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra, Prioridad:=Prioridad) Then
|
||||||
|
|
||||||
@@ -4535,7 +4588,7 @@ Partial Class OC
|
|||||||
TxtEventoDescripcion.Text = ""
|
TxtEventoDescripcion.Text = ""
|
||||||
Anexo.Text = "[]"
|
Anexo.Text = "[]"
|
||||||
ChkEventoPrioridad.Checked = False
|
ChkEventoPrioridad.Checked = False
|
||||||
Alert("La bitácora/observación se guardó correctamente", TipoMensaje.MsgInformacion)
|
Alert($"La {If(EsCotizacion, "cotización", "bitácora/observación")} se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||||
RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal")
|
RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal")
|
||||||
|
|
||||||
'obtener el Evento de bitacora para enviar el correo
|
'obtener el Evento de bitacora para enviar el correo
|
||||||
@@ -4562,7 +4615,8 @@ Partial Class OC
|
|||||||
If ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento IN (6,2) AND CvePrioridad=3").Rows.Count > 0 Then
|
If ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento IN (6,2) AND CvePrioridad=3").Rows.Count > 0 Then
|
||||||
DivEventoUrgente.Visible = True
|
DivEventoUrgente.Visible = True
|
||||||
End If
|
End If
|
||||||
GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento IN (6,2)")
|
GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento IN (6,2) AND CvePrioridad <> 4")
|
||||||
|
GvBitacoraEva.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CvePrioridad = 4")
|
||||||
Else
|
Else
|
||||||
GvEB.DataSource = Nothing
|
GvEB.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -4570,7 +4624,9 @@ Partial Class OC
|
|||||||
ObjEventoBitacora.Dispose()
|
ObjEventoBitacora.Dispose()
|
||||||
|
|
||||||
GvEB.DataBind()
|
GvEB.DataBind()
|
||||||
|
GvBitacoraEva.DataBind()
|
||||||
UPEventoBitacora.Update()
|
UPEventoBitacora.Update()
|
||||||
|
UpIvas.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -4638,7 +4694,7 @@ Partial Class OC
|
|||||||
ChkEventoPrioridad.Checked = False
|
ChkEventoPrioridad.Checked = False
|
||||||
RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal")
|
RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal")
|
||||||
|
|
||||||
CargaEventoBitacoraTemp()
|
CargaEventoBitacoraTemp()
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -4703,7 +4759,7 @@ Partial Class OC
|
|||||||
option72.Visible = True
|
option72.Visible = True
|
||||||
DivFolioAdicional.Visible = True
|
DivFolioAdicional.Visible = True
|
||||||
generarAnticipo.Visible = True
|
generarAnticipo.Visible = True
|
||||||
Ddlcliente.DataSource = GlobalDTCliente(CveEmpresaActual).FiltraParametros(" Estatus = 'Activo' ")
|
Ddlcliente.DataSource = GlobalDTCliente(CveEmpresaActual)
|
||||||
Ddlcliente.DataBind()
|
Ddlcliente.DataBind()
|
||||||
Ddlcliente.Items.Insert(0, New ListItem(" - ", "-1"))
|
Ddlcliente.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||||
DdlVendedor.DataSource = GlobalDTVendedores(CveEmpresaActual)
|
DdlVendedor.DataSource = GlobalDTVendedores(CveEmpresaActual)
|
||||||
|
|||||||
@@ -4641,6 +4641,8 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
|
RecargaGlobalCliente()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -4823,6 +4825,18 @@ Partial Class PV
|
|||||||
|
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RecargaGlobalCliente()
|
||||||
|
Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDTCliente)
|
||||||
|
Hilo.Start()
|
||||||
|
End Sub
|
||||||
|
Private Sub GeneraGlobalDTCliente()
|
||||||
|
Dim Objclientes As New ClsClientes
|
||||||
|
If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1, TipoCliente:=-1) Then
|
||||||
|
Application("GlobalDTCliente") = Objclientes.DtResultados
|
||||||
|
End If
|
||||||
|
Objclientes.Dispose()
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "CLASIFICACIONES DETALLES"
|
#Region "CLASIFICACIONES DETALLES"
|
||||||
|
|||||||
@@ -16788,7 +16788,7 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub GeneraGlobalDTCliente()
|
Private Sub GeneraGlobalDTCliente()
|
||||||
Dim Objclientes As New ClsClientes
|
Dim Objclientes As New ClsClientes
|
||||||
If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1) Then
|
If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1,TipoCliente:=-1) Then
|
||||||
Application("GlobalDTCliente") = Objclientes.DtResultados
|
Application("GlobalDTCliente") = Objclientes.DtResultados
|
||||||
End If
|
End If
|
||||||
Objclientes.Dispose()
|
Objclientes.Dispose()
|
||||||
|
|||||||
Reference in New Issue
Block a user