This commit is contained in:
2024-12-22 09:20:33 -07:00
20 changed files with 336 additions and 100 deletions

View File

@@ -383,7 +383,7 @@
</div> </div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom label12"> <div class="portlet-body form-horizontal form-row-sepe formnombottom label12">
<div class="form-body"> <div class="form-body">
<table width="400px" border="0" cellpadding="0"> <table width="500px" border="0" cellpadding="0">
<tr> <tr>
<td colspan="3" style="text-align: center;"><b>Usuarios con acceso a la cuenta</b></td> <td colspan="3" style="text-align: center;"><b>Usuarios con acceso a la cuenta</b></td>
</tr> </tr>
@@ -398,12 +398,16 @@
<td colspan="3" style="vertical-align: top;"> <td colspan="3" style="vertical-align: top;">
<asp:GridView ID="GVU" runat="server" Width="400px" DataKeyNames="CveCuenta,CveUsuario" AutoGenerateColumns="False" GridLines="None" CssClass="mysmallbtn"> <asp:GridView ID="GVU" runat="server" Width="400px" DataKeyNames="CveCuenta,CveUsuario" AutoGenerateColumns="False" GridLines="None" CssClass="mysmallbtn">
<Columns> <Columns>
<asp:BoundField HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField HeaderText="Nombre" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
(<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>)
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False"> <asp:TemplateField ShowHeader="False">
<ItemTemplate> <ItemTemplate>
<%--<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />--%>
<asp:LinkButton ID="ImageButton4" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" /> <asp:LinkButton ID="ImageButton4" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>

View File

@@ -478,8 +478,12 @@ Partial Class Bancos_CuentasBancariasDetalle
For Each row As DataRow In DTUsuarios.Rows For Each row As DataRow In DTUsuarios.Rows
sUsuarios = $"{sUsuarios} {row("CveUsuario").ToString}," sUsuarios = $"{sUsuarios} {row("CveUsuario").ToString},"
Next Next
If sUsuarios <> "" Then If sUsuarios <> "" Then
DdlUsuarios.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros($"CveUsuario NOT IN ({sUsuarios.Substring(0, sUsuarios.Length - 1)})", "Nombre")
' Dim tablaUsuariosAux As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", DistinctColumns:={"CveUsuario", "Nombre", "Usuario"})
Dim tablaUsuariosAux As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros($"CveUsuario NOT IN ({sUsuarios.Substring(0, sUsuarios.Length - 1)})", "Nombre")
DdlUsuarios.DataSource = CargarDdlUsuarios(tablaUsuariosAux)
'DdlUsuarios.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros($"CveUsuario NOT IN ({sUsuarios.Substring(0, sUsuarios.Length - 1)})", "Nombre")
DdlUsuarios.DataBind() DdlUsuarios.DataBind()
End If End If
End Sub End Sub

View File

@@ -219,111 +219,147 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpComisiones" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpComisiones" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row rowcheck truncate" id="DivComisioncheck">
<div class="row rowcheck truncate " id="DivComisioncheck" style="padding:0px!important;margin:0px!important">
<div class="col-md-1 truncate" runat="server" id="DivFaltante" style="width: 155px;"> <div class="col-md-1 truncate" runat="server" id="DivFaltante" style="width: 155px;">
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" CssClass="checkbox" /> <asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" CssClass="checkbox" />
</div> </div>
<div class="col-md-10 rowcheckCampos" id="DivComision" style="display: none;">
<div class="col-md-1" style="padding-right: 130px;"> <div class="col-md-2 DivComision" style="display: none">
<label>Importe:</label>
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="Numeros"></asp:TextBox> <div class="form-group form-md-line-input input-iconright" style="width: 100px">
<asp:TextBox runat="server" ID="TxtComision"
Width="100px" onkeypress="return numericOnly(this);"
ondrop="return false;" onpaste="return false;" CssClass="form-control Numeros"></asp:TextBox>
<label for="<%= TxtComision.ClientID.ToString()%>">Importe:</label>
</div> </div>
<div class="col-md-1" style="padding-right: 190px;"> </div>
<label>SubProyecto:</label>
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <div class="col-md-2 DivComision" style="display: none">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control select2me" Width="100%">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlSubProyectoDeposito.ClientID.ToString()%>">SubProyecto:</label>
</div> </div>
<div class="col-md-1">
<label>Clasificación:</label> </div>
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
<div class="col-md-2 DivComision" style="display: none">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="form-control select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación:</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row rowcheck truncate" id="DivDescuentocheck" style="margin-top: -25px;" runat="server">
<div class="row rowcheck truncate" id="DivDescuentocheck" runat="server" style="padding:0px!important;margin:0px!important" >
<div class="col-md-1" runat="server" id="Div1" style="width: 155px"> <div class="col-md-1" runat="server" id="Div1" style="width: 155px">
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" CssClass="checkbox" /> <asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" CssClass="checkbox" />
</div> </div>
<div class="col-md-10 rowcheckCampos" id="DivDescuento" style="display: none"> <div class="col-md-1 DivDescuento" style="display:none" >
<div class="col-md-1" style="padding-right: 130px;"> <div class="form-group form-md-line-input input-iconright">
<label for="TxtDescuento">Importe:</label> <asp:TextBox runat="server" ID="TxtDescuento" Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="form-control Numeros"></asp:TextBox>
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="Numeros"></asp:TextBox> <label for="<%= TxtDescuento.ClientID.ToString()%>">Importe:</label>
</div>
</div>
</div> <div class="col-md-1 DivDescuento" style="display:none" >
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoDescuento" Width="100px" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control select2me" >
</asp:DropDownList>
<label for="<%= DdlSubProyectoDescuento.ClientID.ToString()%>">SubProyecto:</label>
</div>
<div class="col-md-1" style="padding-right: 190px;"> </div>
<label>SubProyecto:</label>
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
<div class="col-md-2"> <div class="col-md-2 DivDescuento" style="display:none">
<label>Clasificación:</label> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion"> <asp:DropDownList ID="DdlClasificacionDescuento" Width="100%" AutoPostBack="false" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control select2me">
</asp:DropDownList>
</div>
<div class="col-md-1">
<label>Emp:</label>
<asp:DropDownList ID="DdlPersonal" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlClasificacionDescuento.ClientID.ToString()%>">Clasificación:</label>
</div> </div>
</div> </div>
<div class="col-md-2 DivDescuento" style="display:none">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPersonal" AutoPostBack="false" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control select2me">
</asp:DropDownList>
<label for="<%= DdlPersonal.ClientID.ToString()%>">Emp:</label>
</div>
</div>
</div> </div>
<div class="row rowcheck truncate" id="DivIntercheck" style="margin-top: -15px;" runat="server">
<div class="row rowcheck truncate" id="DivIntercheck" runat="server" style="padding:0px!important;margin:0px!important">
<div class="col-md-1" runat="server" id="Div2" style="width: 155px"> <div class="col-md-1" runat="server" id="Div2" style="width: 155px">
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario" CssClass="checkbox" /> <asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario" CssClass="checkbox" />
</div> </div>
<div class="col-md-10 rowcheckCampos" id="DivInter" style="display: none"> <div class="col-md-10 rowcheckCampos xspadding" id="DivInter" style="display: none">
<div class="col-md-1" id="dd" style="padding-right: 130px;"> <div class="col-md-1" id="dd" >
<label>Intermediario:</label> <div class="form-group form-md-line-input input-iconright" >
<asp:DropDownList ID="DdlProveedorIntermediario" CssClassDdl="select2me" Width="100px" CssStyle="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" runat="server"></asp:DropDownList> <asp:DropDownList ID="DdlProveedorIntermediario" CssClass="form-control select2me" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" runat="server"></asp:DropDownList>
</div> <label for="<%= DdlProveedorIntermediario.ClientID.ToString()%>">Intermediario:</label>
<div class="col-md-2" style="width: 205px;">
<div class="col-md-6" id="DivinterImporte" style="padding-left: 0px; padding-right: 0px;">
<label>Importe:</label>
<asp:TextBox runat="server" ID="TxtComisionIntermediario" Class=" input-sm " Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="Numeros"></asp:TextBox>
</div> </div>
<div class="col-md-6" id="DivIVA"> </div>
<label>IVA:</label>
<asp:TextBox runat="server" ID="TxtIVA" Class=" input-sm " Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="Numeros"></asp:TextBox> <div class="col-md-1" id="DivinterImporte" >
<div class="form-group form-md-line-input input-iconright" >
<asp:TextBox runat="server" ID="TxtComisionIntermediario" Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass=" form-control Numeros"></asp:TextBox>
<label for="<%= TxtComisionIntermediario.ClientID.ToString()%>">Importe:</label>
</div> </div>
</div> </div>
<div class="col-md-1" id="DivIVA">
<div class="form-group form-md-line-input input-iconright" >
<asp:TextBox runat="server" ID="TxtIVA" Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="form-control Numeros"></asp:TextBox>
<label for="<%= TxtIVA.ClientID.ToString()%>">IVA:</label>
</div>
</div>
<div class="col-md-1" id="dd2" style="margin-right: 100px;"> <div class="col-md-1" id="dd2" style="margin-right: 100px;">
<label id="LblClasificacion3">Gasto:</label>
<asp:DropDownList ID="DdlClasificacionIntermediario" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
</div>
<div class="col-md-1" id="divSubProyectoIntermediario">
<label id="LblSubproyectoIntermediario">SubProyecto:</label>
<asp:DropDownList ID="DdlSubProyectoIntermediario" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <div class="form-group form-md-line-input input-iconright" >
</asp:DropDownList> <asp:DropDownList ID="DdlClasificacionIntermediario" AutoPostBack="false" Class=" form-control select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
<label for="<%= DdlClasificacionIntermediario.ClientID.ToString()%>"><label id="LblClasificacion3">Gasto:</label></label>
</div>
</div>
<div class="col-md-2" id="divSubProyectoIntermediario">
<div class="form-group form-md-line-input input-iconright" >
<asp:DropDownList ID="DdlSubProyectoIntermediario" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control select2me" >
</asp:DropDownList>
<label for="<%= DdlSubProyectoIntermediario.ClientID.ToString()%>"><label id="LblSubproyectoIntermediario">SubProyecto:</label></label>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="row rowcheck truncate" id="DivRowCuenta" style="margin-top: -15px;" runat="server" visible="false" >
<div class="row rowcheck truncate" id="DivRowCuenta" style="padding:0px!important;margin:0px!important" runat="server" visible="false" >
<div class="col-md-1" runat="server" id="Div3" style="width: 155px"> <div class="col-md-1" runat="server" id="Div3" style="width: 155px">
<asp:CheckBox ID="ChkCuentaRetorno" runat="server" Text="Caja" CssClass="checkbox" /> <asp:CheckBox ID="ChkCuentaRetorno" runat="server" Text="Caja" CssClass="checkbox" />
</div> </div>
<div class="col-md-10 rowcheckCampos" id="DivRowCuenta2" style="display: none"> <div class="col-md-2 DivRowCuenta2" id="DivCuentaImporte" style="display:none">
<div class="row"> <div class="form-group form-md-line-input input-iconright" >
<div class="col-md-2" id="DivCuentaImporte" style="padding-left: 0px; padding-right: 0px;"> <asp:TextBox runat="server" ID="TxtCuentaRetorno" Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass=" form-control Numeros"></asp:TextBox>
<label>Importe:</label> <label for="<%= TxtCuentaRetorno.ClientID.ToString()%>">Importe:</label>
<asp:TextBox runat="server" ID="TxtCuentaRetorno" Class=" input-sm " Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="Numeros"></asp:TextBox> </div>
</div> </div>
<div class="col-md-6" style="padding-left: 0px; padding-right: 0px;"> <div class="col-md-6 DivRowCuenta2" style="display:none">
<label>Obs:</label> <div class="form-group form-md-line-input input-iconright" >
<asp:TextBox runat="server" ID="TxtCuentaRetornoObs" Class=" input-sm " Width="250px" ></asp:TextBox> <asp:TextBox runat="server" ID="TxtCuentaRetornoObs" Width="100%" CssClass=" form-control" ></asp:TextBox>
<label for="<%= TxtCuentaRetornoObs.ClientID.ToString()%>">Obs:</label>
</div>
</div> </div>
</div>
</div>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -671,13 +707,13 @@
function CheckFaltante(chk) { function CheckFaltante(chk) {
if (chk.checked == true) { if (chk.checked == true) {
$('#DivComision').css("display", "block"); $('.DivComision').css("display", "block");
$('#DivComisioncheck').removeClass("truncate"); $('#DivComisioncheck').removeClass("truncate");
$("#DivDescuentocheck").css("margin-top", 0); $("#DivDescuentocheck").css("margin-top", 0);
} else { } else {
$('#C_TxtComision').val(0); $('#C_TxtComision').val(0);
Recalcular(); Recalcular();
$('#DivComision').css("display", "none"); $('.DivComision').css("display", "none");
$('#DivComisioncheck').addClass("truncate"); $('#DivComisioncheck').addClass("truncate");
$("#DivDescuentocheck").css("margin-top", -25); $("#DivDescuentocheck").css("margin-top", -25);
@@ -687,7 +723,7 @@
function CheckDescuento(chk) { function CheckDescuento(chk) {
if (chk.checked == true) { if (chk.checked == true) {
$('#DivDescuento').css("display", "block"); $('.DivDescuento').css("display", "block");
$('#DivDescuentocheck').removeClass("truncate"); $('#DivDescuentocheck').removeClass("truncate");
$("#DivIntercheck").css("margin-top", 0); $("#DivIntercheck").css("margin-top", 0);
@@ -695,7 +731,7 @@
} else { } else {
$('#C_TxtDescuento').val(0); $('#C_TxtDescuento').val(0);
Recalcular(); Recalcular();
$('#DivDescuento').css("display", "none"); $('.DivDescuento').css("display", "none");
$('#DivDescuentocheck').addClass("truncate"); $('#DivDescuentocheck').addClass("truncate");
$("#DivIntercheck").css("margin-top", -25); $("#DivIntercheck").css("margin-top", -25);
@@ -719,13 +755,13 @@
} }
function CheckRowCuenta(chk) { function CheckRowCuenta(chk) {
if (chk.checked == true) { if (chk.checked == true) {
$('#DivRowCuenta2').css("display", "block"); $('.DivRowCuenta2').css("display", "block");
$('#DivRowCuenta').removeClass("truncate"); $('#DivRowCuenta').removeClass("truncate");
} else { } else {
Recalcular(); Recalcular();
$('#DivRowCuenta2').css("display", "none"); $('.DivRowCuenta2').css("display", "none");
$('#DivRowCuenta').addClass("truncate"); $('#DivRowCuenta').addClass("truncate");
} }
} }

View File

@@ -788,6 +788,13 @@ Partial Class Bancos_IE
TRImporteDeduccionesPago.Visible = True TRImporteDeduccionesPago.Visible = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If Not UsuarioActual.TienePermisoProceso(404) Then
TxtFechaDocumento.Enabled = False
ImgCalendario.Visible = False
End If
End If
End If End If
End Sub End Sub

View File

@@ -351,6 +351,14 @@ Partial Class Bancos_PopIECompras
TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
End If End If
UpDatos.Update() UpDatos.Update()
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If Not UsuarioActual.TienePermisoProceso(404) Then
TxtFechaDocumento.Enabled = False
ImgCalendario.Visible = False
End If
End If
End If End If
End Sub End Sub

View File

@@ -358,6 +358,14 @@ Partial Class Bancos_PopIEVentas
ChkPagarDolares.Visible = True ChkPagarDolares.Visible = True
TxtTCDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) TxtTCDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4)
End If End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If Not UsuarioActual.TienePermisoProceso(404) Then
TxtFechaDocumento.Enabled = False
ImgCalendario.Visible = False
End If
End If
End If End If
End Sub End Sub

View File

@@ -326,6 +326,14 @@ Partial Class Bancos_ProveedoresAbonar
chkaplicaDescuento.Visible = True chkaplicaDescuento.Visible = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If Not UsuarioActual.TienePermisoProceso(404) Then
TxtFechaDocumento.Enabled = False
ImgCalendario.Visible = False
End If
End If
End If End If
End Sub End Sub

View File

@@ -1316,6 +1316,7 @@ Partial Class General_SaldosIniciales
Dim ErrorClientes As Boolean = False Dim ErrorClientes As Boolean = False
Dim ExisteCliente As Boolean = False Dim ExisteCliente As Boolean = False
Dim Contador As Integer = 0 Dim Contador As Integer = 0
Dim CountRFCGenerico As Integer = 0
Dim NumRow As Integer = 0 Dim NumRow As Integer = 0
@@ -1376,7 +1377,17 @@ Partial Class General_SaldosIniciales
Dim Vendedor As String = If(dt.Columns.Contains("Vendedor"), Row("Vendedor").ToString(), "").Trim Dim Vendedor As String = If(dt.Columns.Contains("Vendedor"), Row("Vendedor").ToString(), "").Trim
Dim Clasificacion As String = If(dt.Columns.Contains("ClasificacionCliente"), Row("ClasificacionCliente").ToString(), "").Trim Dim Clasificacion As String = If(dt.Columns.Contains("ClasificacionCliente"), Row("ClasificacionCliente").ToString(), "").Trim
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
Dim CveCliente As Integer = -1 'GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
Dim EsRFCGenerico As Boolean = If(RFC.ToUpper = "XAXX010101000" Or RFC.ToUpper = "XEXX010101000" Or RFC.ToUpper = "AAA010101AAA", True, False)
'If CveCliente <= 0 And Not EsRFCGenerico Then
' If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1) Then
' CveCliente = ObjClientes.DtResultados.Copy().FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
' End If
'End If
Dim CveVendedor As Integer = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"Vendedor = '{Vendedor}'").ToString().ToEntero() Dim CveVendedor As Integer = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"Vendedor = '{Vendedor}'").ToString().ToEntero()
Dim CveClasificación As Integer = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClienteClasificacion", $"ClienteClasificacion = '{Clasificacion}'").ToEntero() Dim CveClasificación As Integer = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClienteClasificacion", $"ClienteClasificacion = '{Clasificacion}'").ToEntero()
@@ -1400,6 +1411,8 @@ Partial Class General_SaldosIniciales
Dim CveRegimenFiscal As Integer = 0 Dim CveRegimenFiscal As Integer = 0
Dim TipoPersona As Boolean = If(RFC.Length = 12, True, False) Dim TipoPersona As Boolean = If(RFC.Length = 12, True, False)
If CodigoRegimenFiscal.Trim.Length > 0 Then If CodigoRegimenFiscal.Trim.Length > 0 Then
CveRegimenFiscal = GlobalDTRegimenesFiscales.FiltroPrimeroValor("CveRegimenFiscal", $"CodigoRegimenFiscal= '{CodigoRegimenFiscal}' ").ToEntero() CveRegimenFiscal = GlobalDTRegimenesFiscales.FiltroPrimeroValor("CveRegimenFiscal", $"CodigoRegimenFiscal= '{CodigoRegimenFiscal}' ").ToEntero()
If Not CveRegimenFiscal > 0 Then If Not CveRegimenFiscal > 0 Then
@@ -1500,10 +1513,57 @@ Partial Class General_SaldosIniciales
'Contacto 'Contacto
If CveCliente > 0 Then If CveCliente > 0 Then
ExisteCliente = True ExisteCliente = True
Contador = Contador + 1
'PermiteCredito As Boolean, CveSubProyecto As Integer, CveClienteCorporativo As Integer,
Dim CveSATEstado As Integer = GlobalDTGralEstados("-1").FiltroPrimeroValor("CveSATEstado", String.Format(" NombreEstado ='{0}'", Estado.ToUpper)).ToEntero()
CveSATEstado = If(CveSATEstado > 0, CveSATEstado, -1)
Dim PermiteCredito As Boolean = If(LimiteCredito > 0, True, False)
If EsRFCGenerico Then
CountRFCGenerico = CountRFCGenerico + 1
End If
Codigo = If(Codigo.Trim.Length = 0, "-1", Codigo)
If Not EsRFCGenerico AndAlso Not ObjClientes.UpdateCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), NumInt, Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, Correo,
"-1", "-1", Pagina, "-1", -1, False, -1, -1, False, True, "-1", CveVendedor, PlazoCobranza, -1,
"-1", "-1", "-1", Codigo, LimiteCredito, False, "-1", "-1", "-1", False, "-1", "-1", "-1", "-1", "-1", False, "-1", UsuarioActual.CveUsuario, CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
"-1", "-1", PermiteCredito, -1, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado,
BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado, CveAdminTrayecto:=0,
RegimenSociedad:=RegimenSociedad, CveRegimenFiscal:=CveRegimenFiscal, TipoPersona:=TipoPersona) Then
ErrorClientes = True
RFC.GuardaLog
Exit For
Else
If EsRFCGenerico Then
CountRFCGenerico = CountRFCGenerico + 1
Else
Contador = Contador + 1
End If
End If
If CveCuentaContable > 0 Then
Dim ObjConta As New ClsContabilidad(ObjClientes.IniciaTransacSQL)
If Not ObjConta.AddCuentasAsignaciones(1, UsuarioActual.CveEmpresa, CveCuentaContable,
-1, ObjClientes.CveCliente, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
ErrorClientes = True
End If
End If
Else Else
Dim CveSATEstado As Integer = GlobalDTGralEstados("-1").FiltroPrimeroValor("CveSATEstado", String.Format(" NombreEstado ='{0}'", Estado.ToUpper)).ToEntero() Dim CveSATEstado As Integer = GlobalDTGralEstados("-1").FiltroPrimeroValor("CveSATEstado", String.Format(" NombreEstado ='{0}'", Estado.ToUpper)).ToEntero()
CveSATEstado = If(CveSATEstado > 0, CveSATEstado, 26)
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), NumInt, Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, Correo, "", "", Pagina, "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1, If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), NumInt, Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, Correo, "", "", Pagina, "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1,
"-1", "-1", "-1", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado, "-1", "-1", "-1", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado,
@@ -1513,6 +1573,8 @@ Partial Class General_SaldosIniciales
ErrorClientes = True ErrorClientes = True
RFC.GuardaLog RFC.GuardaLog
Exit For Exit For
Else
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
End If End If
If CveCuentaContable > 0 Then If CveCuentaContable > 0 Then
@@ -1533,7 +1595,7 @@ Partial Class General_SaldosIniciales
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1) Then Application("GlobalDTCliente") = ObjClientes.DtResultados 'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1) Then Application("GlobalDTCliente") = ObjClientes.DtResultados
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
If Contador > 0 Then If Contador > 0 Then
Alert(String.Format("Se agregaron: <b>{0}</b> Clientes correctamente. <br>Se Omitieron: <b>{1}</b> Clientes ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion) Alert(String.Format("Se agregaron: <b>{0}</b> Clientes correctamente. <br>Se Omitieron: <b>{1}</b> Clientes ya que ya se encontraban registrados. RFC Genericos Omitidos {2}", NumRows - Contador, Contador, CountRFCGenerico), TipoMensaje.MsgInformacion)
Else Else
Alert(String.Format("Se agregaron: <b>{0}</b> Clientes correctamente.", NumRows), TipoMensaje.MsgInformacion) Alert(String.Format("Se agregaron: <b>{0}</b> Clientes correctamente.", NumRows), TipoMensaje.MsgInformacion)
End If End If

View File

@@ -1165,8 +1165,8 @@
<ajax:ValidatorCalloutExtender ID="VCFechaInvFormat" runat="server" HighlightCssClass="vco" TargetControlID="CvFechaInv" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCFechaInvFormat" runat="server" HighlightCssClass="vco" TargetControlID="CvFechaInv" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-6" style="text-align: center;"> <div class="col-md-6" style="text-align: center;">
<asp:Button ID="BtnModalExcelAjuste" runat="server" Visible="false" CssClass="btn btn-primary" data-toggle="modal" data-target="#DivCargaAjuste" Text="Cargar Excel Ajuste" /> <asp:Button ID="BtnModalExcelAjuste" runat="server" Visible="false" CssClass="btn btn-primary" data-toggle="modal" data-target="#DivCargaAjuste" Text="Cargar Excel Ajuste" />
</div> </div>
</div> </div>
@@ -1866,12 +1866,16 @@
<div class="modal-footer"> <div class="modal-footer">
<div class="row"> <div class="row">
<div class="col-md-10" style="text-align: right"> <div class="col-md-10" style="text-align: right">
<asp:LinkButton ID="LnkDescargaFormato" runat="server" CssClass="btn btn-warning" OnClick="LnkDescargaFormato_Click" ><i class="fa fa-download" aria-hidden="true" ></i> Descargar Formato</asp:LinkButton>
<asp:Button ID="BtnCargaExcelAjuste" runat="server" CssClass="btn btn-success" Text="Aceptar" OnClick="BtnCargaExcelAjuste_Click"></asp:Button> <asp:Button ID="BtnCargaExcelAjuste" runat="server" CssClass="btn btn-success" Text="Aceptar" OnClick="BtnCargaExcelAjuste_Click"></asp:Button>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button> <button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div> </div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDescargaFormato" />
</Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div> </div>

View File

@@ -497,7 +497,7 @@ Partial Class Inventarios_EntradasSalidas
End If End If
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
TxtFecha.Enabled = False TxtFecha.Enabled = False
'ImgFecha.Visible = False 'ImgFecha.Visible = False
@@ -1221,7 +1221,7 @@ Partial Class Inventarios_EntradasSalidas
End If End If
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
TxtFecha.Enabled = False TxtFecha.Enabled = False
'ImgFecha.Visible = False 'ImgFecha.Visible = False
@@ -6071,6 +6071,27 @@ Partial Class Inventarios_EntradasSalidas
End If End If
End Sub End Sub
Protected Sub LnkDescargaFormato_Click(sender As Object, e As EventArgs)
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoAjusteInventario.xlsx"
Dim Archivo As New IO.FileInfo(Directorio)
If Archivo.Exists Then
Response.Clear()
Response.ClearHeaders()
Response.ClearContent()
Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name)
Response.AddHeader("Content-Length", Archivo.Length.ToString())
Response.ContentType = "text/plain"
Response.Flush()
Response.TransmitFile(Archivo.FullName)
Response.End()
End If
End Sub
Private Sub CargarArchivo(Ruta As String, FileName As String) Private Sub CargarArchivo(Ruta As String, FileName As String)
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim Tipo As String = "EXCEL" Dim Tipo As String = "EXCEL"
@@ -6089,21 +6110,36 @@ Partial Class Inventarios_EntradasSalidas
dt.TableName = "Datos" dt.TableName = "Datos"
Dim TieneError As Boolean = False Dim TieneError As Boolean = False
Dim TieneErrorCodigos As Boolean = False
Try Try
If DdlAlmacenInventarioFisico.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlPS.SelectedText = "" : Exit Sub If DdlAlmacenInventarioFisico.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlPS.SelectedText = "" : Exit Sub
Dim sbNoencontrados As New StringBuilder
For Each row As DataRow In dt.Rows For Each row As DataRow In dt.Rows
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, Codigo:=row("Codigo").ToString(), Estatus:=-1).FiltroPrimero("") Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, Codigo:=row("Codigo").ToString(), Estatus:=-1).FiltroPrimero("")
Dim CvePS As Integer = DrPS("CvePS").ToString().ToEntero()
If row("EntradaSalida").ToString() = "1" Then If DrPS IsNot Nothing Then
AddPSEntrada(CvePS, row("Diferencia").ToString().ToDecimal(), row("Costo").ToString().ToDecimal(), Sonido:=False, CargaGV:=False) Dim CvePS As Integer = DrPS("CvePS").ToString().ToEntero()
If row("EntradaSalida").ToString() = "1" Then
AddPSEntrada(CvePS, row("Diferencia").ToString().ToDecimal(), row("Costo").ToString().ToDecimal(), Sonido:=False, CargaGV:=False)
Else
AddPSSalida(CvePS, row("Diferencia").ToString().ToDecimal(), Sonido:=False, CargaGV:=False)
End If
Else Else
AddPSSalida(CvePS, row("Diferencia").ToString().ToDecimal(), Sonido:=False, CargaGV:=False) TieneError = True
TieneErrorCodigos = True
sbNoencontrados.Append($"{row("Codigo").ToString}<br>")
End If End If
Next Next
If sbNoencontrados.Length > 0 Then
Alert($"No se encontraron los siguientes códigos. <br> {sbNoencontrados.ToString}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
CargaGvSalidas(DtMovimientosSalidaInvFisico) CargaGvSalidas(DtMovimientosSalidaInvFisico)
CargaGvEntradas(DtMovimientosEntradaInvFisico) CargaGvEntradas(DtMovimientosEntradaInvFisico)
Catch ex As Exception Catch ex As Exception
@@ -6122,7 +6158,10 @@ Partial Class Inventarios_EntradasSalidas
CargaGvSalidas(DtMovimientosSalidaInvFisico) CargaGvSalidas(DtMovimientosSalidaInvFisico)
CargaGvEntradas(DtMovimientosEntradaInvFisico) CargaGvEntradas(DtMovimientosEntradaInvFisico)
Alert("Ocurrió un error al cargar los datos", TipoMensaje.MsgError) If Not TieneErrorCodigos Then
Alert("Ocurrió un error al cargar los datos", TipoMensaje.MsgError)
End If
Else Else
If DtMovimientosEntradaInvFisico.Rows.Count <> dt.FiltraParametros("EntradaSalida = 1").Rows.Count Then If DtMovimientosEntradaInvFisico.Rows.Count <> dt.FiltraParametros("EntradaSalida = 1").Rows.Count Then
Alert("No se cargaron todas las entradas.", TipoMensaje.MsgAdvertencia) Alert("No se cargaron todas las entradas.", TipoMensaje.MsgAdvertencia)
@@ -6144,4 +6183,6 @@ Partial Class Inventarios_EntradasSalidas
UpModalAjuste.Update() UpModalAjuste.Update()
End Sub End Sub
End Class End Class

View File

@@ -363,7 +363,7 @@ Partial Class Inventarios_EntregaAlmacen
CargaParametrosAD() CargaParametrosAD()
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146, 119, 186) Then DdlAlmacen.AutoPostBack = True If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146, 119, 186) Then DdlAlmacen.AutoPostBack = True
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero() = 1 Then If UsuarioActual.Empresa.Funcionalidad(281).ToEntero() = 1 Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
TxtFecha.Enabled = False TxtFecha.Enabled = False
ImgFecha.Visible = False ImgFecha.Visible = False
End If End If

View File

@@ -489,7 +489,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim PermisoEspecialCambioFecha As Boolean = False Dim PermisoEspecialCambioFecha As Boolean = False
If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 AndAlso Not PermisoEspecialCambioFecha Then If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 AndAlso Not PermisoEspecialCambioFecha Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
TxtFecha.Enabled = False TxtFecha.Enabled = False
ImgFecha.Visible = False ImgFecha.Visible = False

View File

@@ -229,7 +229,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim PermisoEspecialCambioFecha As Boolean = False Dim PermisoEspecialCambioFecha As Boolean = False
If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 And Not PermisoEspecialCambioFecha Then If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 And Not PermisoEspecialCambioFecha Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
TxtFecha.Enabled = False TxtFecha.Enabled = False
ImgFecha.Visible = False ImgFecha.Visible = False
TxtFechaRecepcion.Enabled = False TxtFechaRecepcion.Enabled = False

View File

@@ -227,6 +227,12 @@
OnSelectedIndexChanged="DdlSubProyectoGral_SelectedIndexChanged" AutoPostBack="true"> OnSelectedIndexChanged="DdlSubProyectoGral_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlSubProyectoGral" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyectoGral" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERfvDdlSubProyectoGral" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RfvDdlSubProyectoGral" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>

View File

@@ -2425,6 +2425,12 @@ Partial Class OC_OC
#Region " AGREGAR " #Region " AGREGAR "
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
If ModalidadSubProyectoGeneral And DdlSubProyectoGral.SelectedValue.ToEntero <= 0 Then
Alert("Debe seleccionar una Sucursal", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'VALIDA CVEPS 'VALIDA CVEPS
If DdlP2.SelectedValue().ToEntero <= 0 Then If DdlP2.SelectedValue().ToEntero <= 0 Then
Alert("El campo <b>'Producto/Servicio'</b> es necesario, por favor seleccione uno.", TipoMensaje.MsgAdvertencia) Alert("El campo <b>'Producto/Servicio'</b> es necesario, por favor seleccione uno.", TipoMensaje.MsgAdvertencia)
@@ -2491,6 +2497,16 @@ Partial Class OC_OC
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100 Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
Dim CantidadVentaMinima As Decimal = DrPS("VentaMinima").ToString.ToDecimal Dim CantidadVentaMinima As Decimal = DrPS("VentaMinima").ToString.ToDecimal
Dim CveSubProyectoVal As Integer = DdlSubProyecto.SelectedValue.ToString.ToEntero
If ModalidadSubProyectoGeneral Then
CveSubProyectoVal = DdlSubProyectoGral.SelectedValue.ToEntero
SubProyecto = DdlSubProyectoGral.SelectedItem.Text
End If
If CantidadVentaMinima > 0 AndAlso TxtCant.Text.ToDecimal > 0 Then If CantidadVentaMinima > 0 AndAlso TxtCant.Text.ToDecimal > 0 Then
If TxtCant.Text.ToDecimal Mod CantidadVentaMinima <> 0 Then If TxtCant.Text.ToDecimal Mod CantidadVentaMinima <> 0 Then
Alert(String.Format("El producto se vende solo en cantidades de <b>{0:####.####}</b>", CantidadVentaMinima)) Alert(String.Format("El producto se vende solo en cantidades de <b>{0:####.####}</b>", CantidadVentaMinima))
@@ -2509,9 +2525,11 @@ Partial Class OC_OC
End If End If
End If End If
AddPS(TxtCant.Text.ToDecimal, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDecimal, TotalPS, AddPS(TxtCant.Text.ToDecimal, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDecimal, TotalPS,
CboUnidadMedida.SelectedValue.ToEntero, IvaPS, IEPSPS, IEPSPSIVA, DdlClasificacion.SelectedValue.ToEntero, CboUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero, Proyecto, CboUnidadMedida.SelectedValue.ToEntero, IvaPS, IEPSPS, IEPSPSIVA, DdlClasificacion.SelectedValue.ToEntero, CboUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero, Proyecto,
DdlSubProyecto.SelectedValue.ToEntero, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer, CveSubProyectoVal, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer,
IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero, IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero,
DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR, CveCultivoCuadroDetalle:=DdlCultivosCuadro.SelectedValue.ToEntero, Cuadro:=DdlCultivosCuadro.SelectedItem.Text) DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR, CveCultivoCuadroDetalle:=DdlCultivosCuadro.SelectedValue.ToEntero, Cuadro:=DdlCultivosCuadro.SelectedItem.Text)
@@ -2949,9 +2967,16 @@ Partial Class OC_OC
TieneError = True TieneError = True
End If End If
Dim tCveSubProyecto As Integer = UsuarioActual.CveSubProyecto
If ModalidadSubProyectoGeneral Then tCveSubProyecto = DdlSubProyectoGral.SelectedValue.ToEntero
If tCveSubProyecto <= 0 Then
tCveSubProyecto = GetCveSubProyectoDetalles()
End If
If Not TieneError Then ' AGREGAR REQUISICION If Not TieneError Then ' AGREGAR REQUISICION
If OC.AddOrdenCompra("REQ", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CboE.SelectedValue.ToEntero, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), If OC.AddOrdenCompra("REQ", tCveSubProyecto, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CboE.SelectedValue.ToEntero, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal, LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal,
RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal,
RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim,
@@ -3184,7 +3209,16 @@ Partial Class OC_OC
End If End If
If OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), Dim tCveSubProyectoVal As Integer = -1
If ModalidadSubProyectoGeneral Then
tCveSubProyectoVal = DdlSubProyectoGral.SelectedValue.ToEntero
If tCveSubProyectoVal <= 0 Then
tCveSubProyectoVal = GetCveSubProyectoDetalles()
End If
End If
If OC.UpdateOrdenCompra(tCveSubProyectoVal, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero, LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero,
DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto, Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
@@ -9952,9 +9986,9 @@ Partial Class OC_OC
If Respuesta Then If Respuesta Then
If Recargar Then If Recargar Then
Alert($"Movimiento Guardado Correctamente Folio:{FolioMto} CveMovmiento: {CveMovimiento}", TipoMensaje.MsgInformacion, "window.location.reload();") Alert($"Movimiento Guardado Correctamente Folio:{FolioMto}", TipoMensaje.MsgInformacion, "window.location.reload();")
Else Else
Alert($"Movimiento Guardado Correctamente Folio:{FolioMto} CveMovmiento: {CveMovimiento}", TipoMensaje.MsgInformacion) Alert($"Movimiento Guardado Correctamente Folio:{FolioMto}", TipoMensaje.MsgInformacion)
End If End If
End If End If

View File

@@ -1527,7 +1527,9 @@ Partial Class Clientes
TxtRetISR.Text = ObjClientes.RetISR.ToString() TxtRetISR.Text = ObjClientes.RetISR.ToString()
ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
If ObjClientes.CveSubProyecto > 0 Then If ObjClientes.CveSubProyecto > 0 Then
DdlSubProyecto.SelectedValueExistInsert(ObjClientes.CveSubProyecto.ToString(), GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=ObjClientes.CveSubProyecto).FiltroPrimeroValor("SubProyecto")) DdlSubProyecto.SelectedValueExistInsert(ObjClientes.CveSubProyecto.ToString(), GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=ObjClientes.CveSubProyecto).FiltroPrimeroValor("SubProyecto"))
ElseIf UsuarioActual.CveSubProyecto > 0 Then
DdlSubProyecto.SelectedValueExistInsert(UsuarioActual.CveSubProyecto, GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=UsuarioActual.CveSubProyecto).FiltroPrimeroValor("SubProyecto"))
End If End If
TxtGastosEnvio.Text = ObjClientes.GastosEnvio.FormatoNumero TxtGastosEnvio.Text = ObjClientes.GastosEnvio.FormatoNumero
DdlZonaHoraria.SelectedValueExist(ObjClientes.DtResultados(0)("CveZonaHoraria").ToString()) DdlZonaHoraria.SelectedValueExist(ObjClientes.DtResultados(0)("CveZonaHoraria").ToString())

View File

@@ -240,6 +240,12 @@ Partial Class Ventas_ClientesAbonar
DVImporteDeduccionesPago.Visible = True DVImporteDeduccionesPago.Visible = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If Not UsuarioActual.TienePermisoProceso(404) Then
TxtFechaDocumento.Enabled = False
ImgCalendario.Visible = False
End If
End If
End If End If

View File

@@ -330,7 +330,13 @@
CssClass="ScrollAD table table-striped table-hover Widthall mysmallbtn" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None" CssClass="ScrollAD table table-striped table-hover Widthall mysmallbtn" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio,CondicionesPago,PlazoCobranza"> DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio,CondicionesPago,PlazoCobranza">
<Columns> <Columns>
<asp:BoundField HeaderText="Atención" DataField="AtencionA" /> <%--<asp:BoundField HeaderText="Atención" DataField="AtencionA" />--%>
<asp:TemplateField HeaderText="Atención" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<asp:Label runat="server" ID="LblAtencionA" Text='<%# Eval("AtencionA") %>' ></asp:Label><br />
<asp:Label runat="server" ID="Label4" Text='<%# Eval("NombreComercial") %>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Center" /> <asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />

View File

@@ -18481,7 +18481,7 @@ Partial Class Ventas
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere TxtPrecio.Text = PrecioSugerido.ToString("#,##0.####") ' que muestre hasta los 4 digitos si lo requiere
If IsNumeric(TxtCantidad.Text.Trim) Then If IsNumeric(TxtCantidad.Text.Trim) Then
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2) LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
@@ -18737,7 +18737,7 @@ Partial Class Ventas
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
GvRow.FCTextBox("TxtPrecio").Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere GvRow.FCTextBox("TxtPrecio").Text = PrecioSugerido.ToString("#,##0.####") ' que muestre hasta los 4 digitos si lo requiere
End If End If
End If End If