SMS -Crear lista de precios desde clientes.aspx
This commit is contained in:
@@ -1976,8 +1976,8 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Porcentaje As Double) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Porcentaje As Double) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Vta_PrecioListaAdd")
|
||||
|
||||
@@ -1986,19 +1986,20 @@ Public Class ClsVentas
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@PrecioLista", SqlDbType.VarChar).Value = PrecioLista
|
||||
.Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrecioLista").Value.ToString.ToEntero
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe una Lista con el mismo Nombre: " & PrecioLista & ".", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Ya existe una lista con el mismo Nombre: " & PrecioLista & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al Guardar la Lista.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Me.OnError("Ocurrió un error al guardar la lista.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al la Lista", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al la lista", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
@@ -67,7 +67,7 @@ Partial Class Ventas_CatPreciosLista
|
||||
Dim ObjVta As New ClsVentas
|
||||
|
||||
If EsEditar = 0 Then
|
||||
If ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0) Then
|
||||
If ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0) > 0 Then
|
||||
Alert("El Precio de Lista se agregó correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar el Precio de Lista", TipoMensaje.MsgError)
|
||||
|
||||
@@ -7,6 +7,43 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet" />
|
||||
<style>
|
||||
div.chksino, span.chksino {
|
||||
border: 1px solid #B8B8B8;
|
||||
max-width: 77px;
|
||||
overflow: hidden;
|
||||
max-height: 28px;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.chksino label::after {
|
||||
content: 'No';
|
||||
padding: 1px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
margin-left: 45px;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
display: inline-block;
|
||||
background: #ececec;
|
||||
color: #666;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.chksino label::before {
|
||||
content: 'Si ';
|
||||
padding: 1px;
|
||||
padding-left: 15px !important;
|
||||
padding-right: 14px !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
display: inline-block;
|
||||
background: #428bca;
|
||||
color: #FFF;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.v-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -392,7 +429,7 @@
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DivPersonaFisica" visible="false">
|
||||
<div class="col-md-4 form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtApellidoPaterno" CssClass="form-control " runat="server" MaxLength="150"></asp:TextBox>
|
||||
@@ -412,7 +449,7 @@
|
||||
<label style="width: 90%" for="<%= TxtNombres.ClientID.ToString()%>">Nombres:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtNombreComercial" CssClass="form-control" runat="server" MaxLength="200" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombreComercial" runat="server" ControlToValidate="TxtNombreComercial" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre Comercial''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
@@ -427,21 +464,21 @@
|
||||
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6 ">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" OnTextChanged="TxtCodigo_TextChanged" AutoPostBack="true" CssClass="form-control" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" OnTextChanged="TxtCodigo_TextChanged" AutoPostBack="true" CssClass="form-control" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
|
||||
</div>
|
||||
<div class="col-md-6 ">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtNombreCorto" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<label for="<%= TxtNombreCorto.ClientID.ToString()%>">Nombre Corto: </label>
|
||||
</div>
|
||||
<div class="col-md-6 ">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtNombreCorto" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<label for="<%= TxtNombreCorto.ClientID.ToString()%>">Nombre Corto: </label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDireccion" runat="server" CssClass="form-control" MaxLength="90"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDireccion" runat="server" ControlToValidate="TxtDireccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dirección''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
@@ -532,7 +569,7 @@
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlRegimenFiscal" DataTextField="CodigoRegimenFiscalTexto" AutoPostBack ="true" Width="100%" DataValueField="CveRegimenFiscal" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:DropDownList ID="DdlRegimenFiscal" DataTextField="CodigoRegimenFiscalTexto" AutoPostBack="true" Width="100%" DataValueField="CveRegimenFiscal" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVRegimenFiscal" runat="server" InitialValue="-1" ControlToValidate="DdlRegimenFiscal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Regimen Fiscal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
@@ -543,8 +580,8 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright col-md-4" runat="server" visible ="false" id="DvGenero">
|
||||
<asp:DropDownList ID="DdlGeneroCliente" runat="server" CssClass="form-control input-sm select2me">
|
||||
<div class="form-group form-md-line-input input-iconright col-md-4" runat="server" visible="false" id="DvGenero">
|
||||
<asp:DropDownList ID="DdlGeneroCliente" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Hombre" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mujer" Value="0"></asp:ListItem>
|
||||
@@ -555,7 +592,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -578,7 +615,7 @@
|
||||
<label for="<%= TxtContacto.ClientID.ToString()%>">Contacto Compras: </label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtTelefono" CssClass="form-control" runat="server" MaxLength="10" ValidationGroup="GrpGuardar"></asp:TextBox>
|
||||
@@ -593,21 +630,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtTelefonoOtro" CssClass="form-control" runat="server" MaxLength="150"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtTelefonoOtro" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<label for="<%= TxtTelefonoOtro.ClientID.ToString()%>">Teléfono Otro: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtExtOtro" CssClass="form-control" runat="server" MaxLength="10" ValidationGroup="GrpGuardar"></asp:TextBox>
|
||||
<label for="<%= TxtExtOtro.ClientID.ToString()%>">Ext: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
@@ -665,22 +702,6 @@
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-md-6" id="DivPrecioLista" runat="server">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
|
||||
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivPortletAsignaciones" runat="server">
|
||||
<asp:DropDownList ID="DdlClasificacion" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" Width="100%" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Giro:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
@@ -700,6 +721,38 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivPortletAsignaciones" runat="server">
|
||||
<asp:DropDownList ID="DdlClasificacion" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" Width="100%" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Giro:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div id="DivTxtCrearPrecioLista" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrecioLista" CssClass="form-control" runat="server" MaxLength="300"></asp:TextBox>
|
||||
<label for="<%= TxtPrecioLista.ClientID.ToString()%>">Precio Lista: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div id="DivPrecioLista" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
|
||||
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div id="DivCrearPrecioLista" runat="server" visible="false" class="form-group">
|
||||
<label>¿Crear lista?</label>
|
||||
<asp:CheckBox ID="ChkCrearPrecioLista" runat="server" CssClass="chksino" Text=" " Checked="false" OnCheckedChanged="ChkCrearPrecioLista_CheckedChanged" AutoPostBack="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="Div2" runat="server">
|
||||
<asp:DropDownList ID="DdlCorporativo" runat="server" CssClass="form-control select2me" Width="200px" DataTextField="Descripcion" DataValueField="CveClienteCorporativo"></asp:DropDownList>
|
||||
<label for="<%= DdlCorporativo.ClientID.ToString()%>">Corporativo:</label>
|
||||
@@ -1049,11 +1102,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
|
||||
<div id="DivRetenciones" runat="server">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div id="DivRetIVA" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRetIVA" CssClass="form-control" runat="server" MaxLength="9" Text="0"></asp:TextBox>
|
||||
@@ -1096,12 +1149,12 @@
|
||||
¿El Cliente nos retiene IVA por Fletes y Acarreos?:
|
||||
<asp:CheckBox ID="ChkRetIVAFletesAcarreos" CssClass="make-switchsd" runat="server" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input" style="display:none;">
|
||||
<div class="form-group form-md-line-input" style="display: none;">
|
||||
<asp:TextBox ID="TxtReferenciaFiscal" CssClass="form-control" runat="server" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtReferenciaFiscal.ClientID.ToString()%>">Referencia:</label>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
||||
<div class="caption font-blue">
|
||||
<i class="icon-pin font-blue"></i>
|
||||
<span class="caption-subject bold uppercase">CFDI Versión</span>
|
||||
@@ -1129,21 +1182,21 @@
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlFormaPago33.ClientID.ToString()%>">Forma Pago:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
||||
El cliente desglosa IEPS:
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
||||
El cliente desglosa IEPS:
|
||||
|
||||
<asp:CheckBox ID="ChkDesglosarIEPS" Checked="true" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivNoDesglosaIVA" runat="server">
|
||||
El cliente No desglosa IVA:
|
||||
<asp:CheckBox ID="ChkNoDesglosaIVA" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivNoDesglosaIVA" runat="server">
|
||||
El cliente No desglosa IVA:
|
||||
<asp:CheckBox ID="ChkNoDesglosaIVA" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -1438,13 +1491,13 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" Visible="false" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" Visible="false" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# If(CDbl(Eval("SubTotal")) = 0, "", Eval("SubTotal", "{0:N2}")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descuento" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Descuento" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# If(CDbl(Eval("Descuento")) = 0, "", Eval("Descuento", "{0:N2}")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -1686,7 +1739,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaLimiteCredito.ClientID.ToString()%>" style="color: #888888;">F. Limite Crédito: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaLimiteCredito" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
@@ -1893,7 +1946,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaInicioCxP.ClientID.ToString()%>">Fecha Inicio: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaInicioCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
@@ -1906,7 +1959,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaFinCxP.ClientID.ToString()%>">Fecha Fin: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="TxtFechaFinCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
@@ -1921,7 +1974,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaVICxP.ClientID.ToString()%>">Fecha V. Inicio: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaVICxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
@@ -1934,7 +1987,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaVFCxP.ClientID.ToString()%>">Fecha V. Fin: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaVFCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
@@ -1975,7 +2028,7 @@
|
||||
<asp:CheckBox ID="ChkCobranzaEnviarCorreo" runat="server" Text="Enviar Correo Cobranza" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-center">
|
||||
<asp:RadioButtonList ID="RBLGenerarReporteCxC" RepeatDirection="Horizontal" runat="server" Style="margin: 0 auto;">
|
||||
<asp:ListItem Text="PDF" Value="PDF" Selected="True" />
|
||||
@@ -4854,13 +4907,13 @@
|
||||
<i class="fa fa-commenting font-green"></i>
|
||||
<span class="caption-subject bold">Agregar</span>
|
||||
</div>--%>
|
||||
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server"
|
||||
Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer " ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-green" runat="server"
|
||||
Text="" Visible="false" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Agendar" ><i class='fa fa-calendar-plus-o font-green' ></i>Agendar</asp:HyperLink><br />
|
||||
|
||||
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server"
|
||||
Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-green" runat="server"
|
||||
Text="" Visible="false" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-green' ></i>Agendar</asp:HyperLink><br />
|
||||
|
||||
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
|
||||
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
|
||||
<script> function OnAddedTareaNueva() { $('.btnupEventoBitacora').click(); }</script>
|
||||
|
||||
@@ -1212,6 +1212,10 @@ Partial Class Clientes
|
||||
DivPrecioLista.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 186 Then
|
||||
DivCrearPrecioLista.Visible = True
|
||||
End If
|
||||
|
||||
DdlPrecioLista.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa)
|
||||
DdlPrecioLista.DataBind()
|
||||
DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
@@ -1350,7 +1354,14 @@ Partial Class Clientes
|
||||
Private Function CargaDatos() As Boolean
|
||||
Dim watch As New Diagnostics.Stopwatch()
|
||||
watch.Start()
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If CveCliente <= 0 Then
|
||||
watch.Stop()
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus:=-1, TipoCliente:=-1) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
@@ -1427,6 +1438,9 @@ Partial Class Clientes
|
||||
TxtPagina.Text = ObjClientes.Pagina
|
||||
'TxtGiro.Text = ObjClientes.Giro
|
||||
DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString()
|
||||
ChkCrearPrecioLista.Checked = False
|
||||
ChkCrearPrecioLista_CheckedChanged(ChkCrearPrecioLista, EventArgs.Empty)
|
||||
|
||||
TxtCC.Text = ObjClientes.NotificarA
|
||||
ChkMail.Checked = ObjClientes.EnviarFactura
|
||||
DdlTipoRetencion.SelectedValueExist(ObjClientes.DtResultados(0)("CveTipoRetencion").ToString())
|
||||
@@ -2413,358 +2427,262 @@ Partial Class Clientes
|
||||
'End If
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL())
|
||||
Dim MsgCuentaContable As String = ""
|
||||
Dim ObjVentas As New ClsVentas(ObjClientes.IniciaTransacSQL())
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim MsgCuentaContable As String = ""
|
||||
Dim CveClienteNuevo As Integer = -1
|
||||
Dim CvePrecioListaNuevo As Integer = -1
|
||||
|
||||
'Dias de pago
|
||||
Dim SBDiasPago As New StringBuilder()
|
||||
Dim DiasPago As String = ""
|
||||
If ChkLunes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkMartes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkMiercoles.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkJueves.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkViernes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkSabado.Checked Then SBDiasPago.AppendFormat("1") Else SBDiasPago.AppendFormat("0")
|
||||
DiasPago = SBDiasPago.ToString()
|
||||
|
||||
'Dias de Revision
|
||||
Dim SBDiasRevision As New StringBuilder()
|
||||
Dim DiasRevision As String = ""
|
||||
If ChkRevLunes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevMartes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevMiercoles.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevJueves.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevViernes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevSabado.Checked Then SBDiasRevision.AppendFormat("1") Else SBDiasRevision.AppendFormat("0")
|
||||
DiasRevision = SBDiasRevision.ToString()
|
||||
|
||||
|
||||
Dim errorContPaq As Boolean = False
|
||||
Dim IdContPaqi As Integer = 0
|
||||
Dim CodigoPersona As Integer = 0
|
||||
|
||||
|
||||
#Region "comentado"
|
||||
'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then
|
||||
|
||||
' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
|
||||
|
||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero()
|
||||
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
||||
|
||||
' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0)
|
||||
' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString()
|
||||
' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString()
|
||||
|
||||
' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
|
||||
|
||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero()
|
||||
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' If Not errorContPaq Then
|
||||
' Dim IdContPaqiCliente As Integer
|
||||
|
||||
' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
|
||||
|
||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero()
|
||||
|
||||
' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' Else
|
||||
' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' If Not errorContPaq Then
|
||||
' ObjContPaqi.Commit()
|
||||
' ObjContPaqi.Dispose()
|
||||
' Else
|
||||
' ObjContPaqi.RollBack()
|
||||
' ObjContPaqi.Dispose()
|
||||
' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
|
||||
'End If
|
||||
#End Region
|
||||
|
||||
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0")
|
||||
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
|
||||
|
||||
Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
|
||||
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
|
||||
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||
|
||||
If CveCliente = -1 Then
|
||||
Dim ErrorAC As Boolean = False
|
||||
Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero()
|
||||
|
||||
' si tiene la funcionalidad de la cuenta contable padre
|
||||
'If UsuarioActual.Empresa.Funcionalidad(114) <> "" Then
|
||||
|
||||
' Dim ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
' ObjContaAC.IniciaTransacSQL()
|
||||
' 'se registra la cuenta contable automaticamente
|
||||
|
||||
' CtaCliente = ObjContaAC.AddSiguienteCuentaHijo(UsuarioActual.Empresa.Funcionalidad(114).ToEntero(), TxtNombreComercial.Text.Trim, "A", 2)
|
||||
|
||||
' If CtaCliente > 0 Then
|
||||
' ObjContaAC.Commit()
|
||||
' DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString()))
|
||||
' DdlCtaContableClientes.SelectedValue = CtaCliente.ToString()
|
||||
' 'MsgCuentaContable = String.Format("<br />Con la cuenta contable: {0}", NewCuenta)
|
||||
|
||||
' Else
|
||||
|
||||
' ObjContaAC.RollBack()
|
||||
' ObjContaAC.Dispose()
|
||||
' Alert("Error al guardar la cuenta contable ", TipoMensaje.MsgError)
|
||||
' ObjClientes.Dispose()
|
||||
' Exit Sub
|
||||
' End If
|
||||
' ObjContaAC.Dispose()
|
||||
'End If
|
||||
|
||||
'Dim CodigoCuentaAltaCompaq As String = ""
|
||||
'Dim NombreCuentaCuentaAltaCompaq As String = ""
|
||||
'Dim IdCuentaAltaCompaq As Integer = -1
|
||||
'Si tiene contabilizacion automatica y la funcionalidad de carga cuenta automatica o UsaAC le agregamos automaticamente una cuenta al cliente
|
||||
'If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 AndAlso (UsuarioActual.Empresa.Funcionalidad(200).ToEntero() > 0 Or UsuarioActual.Empresa.UsaAC) AndAlso DdlCtaContableClientes.SelectedValue.ToEntero() < 1 Then
|
||||
' If Not AgregarCuentaContable(BtnActivaRegistroClientes, DdlCtaContableClientes, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq) Then
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'Dim MetodoPago = DdlMetodoPago.SelectedValue.Toentero()
|
||||
'If UsuarioActual.Empresa.CvePlataforma = 3 Then
|
||||
' MetodoPago = 1
|
||||
'End If
|
||||
|
||||
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
|
||||
|
||||
|
||||
If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||
TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, Giro, DdlPrecioLista.SelectedValue.ToEntero(), ChkMail.Checked, TxtRetIVA.Text.ToDouble,
|
||||
TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(),
|
||||
DiasPago, DdlTipoPago.SelectedValue, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim,
|
||||
TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim,
|
||||
TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(),
|
||||
CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(),
|
||||
CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||
CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text,
|
||||
DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(),
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
|
||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
||||
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente) Then
|
||||
|
||||
ViewState("CveCliente") = ObjClientes.CveCliente
|
||||
|
||||
|
||||
'For Each gvr As GridViewRow In GvDocsVentas.Rows
|
||||
' If gvr.FCCheckBox("ChkDoc").Checked Then
|
||||
|
||||
' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, NowADS(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
|
||||
' End If
|
||||
|
||||
'Next
|
||||
GuardarDocumentosClientes()
|
||||
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero())
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each Row As DataRow In TempDTSucursales.Rows
|
||||
If Not CveCliente > 0 Then
|
||||
If ObjClientes.AddSucursal(ObjClientes.CveCliente, Row("SucursalCliente").ToString(), UsuarioActual.CveUsuario, Row("CiudadSucursal").ToString(), Row("ColoniaSucursal").ToString(), Row("CPSucursal").ToString(), Row("DireccionSucursal").ToString(), Row("EstadoSucursal").ToString(), Row("LocalidadSucursal").ToString(),
|
||||
Row("PaisSucursal").ToString(), Row("NumExtSucursal").ToString(), Row("NumIntSucursal").ToString(), Row("TelefonoSucursal").ToString(), Row("CorreoSucursal").ToString(), Row("CorreoCotiziacionSucursal").ToString(), Row("ContactoSucursal").ToString(),
|
||||
Row("CveVendedorSucursal").ToString().ToEntero(), Row("NumCuenta").ToString(), Row("CveMetodoPago").ToString().ToEntero(), Row("LimiteCredito").ToString().ToDecimal(), Row("CveResponsableCobranza").ToString().ToEntero(),
|
||||
Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago33").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString()) Then
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If UsuarioActual.Empresa.CvePlataforma = 3 AndAlso Not ErrorProceso Then
|
||||
Dim GPS As New ClsGPS
|
||||
GPS.IniciaTransacSQL()
|
||||
For Each GvRow As GridViewRow In GvDatosGPS.Rows
|
||||
If Not GPS.DispositivosClienteUpdate(GvRow.DataKey("CveDispositivo").ToString().ToEntero(), ObjClientes.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Next
|
||||
If ErrorProceso Then
|
||||
GPS.RollBack()
|
||||
Else
|
||||
GPS.Commit()
|
||||
End If
|
||||
End If
|
||||
|
||||
'If IdCuentaAltaCompaq > 0 Then
|
||||
' If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If ErrorProceso Then
|
||||
ObjClientes.RollBack()
|
||||
Else
|
||||
ObjClientes.Commit()
|
||||
|
||||
'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
|
||||
Dim MensajeCRM As String = ""
|
||||
If CveEmpresaCRM > 0 Then
|
||||
If VincularEmpresaCRM() Then
|
||||
MensajeCRM = "<br><br>Se vinculo el cliente a la Empresa CRM"
|
||||
Else
|
||||
MensajeCRM = "<br><br>Ocurrio un error al vincular la Empresa CRM, intente unificar el Cliente."
|
||||
End If
|
||||
End If
|
||||
|
||||
Alert("El Cliente se guardó correctamente." & MsgCuentaContable & MensajeCRM, TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/CatClientes.aspx""")
|
||||
End If
|
||||
Try
|
||||
'Dias de pago
|
||||
Dim SBDiasPago As New StringBuilder()
|
||||
Dim DiasPago As String = ""
|
||||
If ChkLunes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkMartes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkMiercoles.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkJueves.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkViernes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkSabado.Checked Then SBDiasPago.AppendFormat("1") Else SBDiasPago.AppendFormat("0")
|
||||
DiasPago = SBDiasPago.ToString()
|
||||
|
||||
'Dias de Revision
|
||||
Dim SBDiasRevision As New StringBuilder()
|
||||
Dim DiasRevision As String = ""
|
||||
If ChkRevLunes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevMartes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevMiercoles.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevJueves.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevViernes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevSabado.Checked Then SBDiasRevision.AppendFormat("1") Else SBDiasRevision.AppendFormat("0")
|
||||
DiasRevision = SBDiasRevision.ToString()
|
||||
|
||||
Dim errorContPaq As Boolean = False
|
||||
Dim IdContPaqi As Integer = 0
|
||||
Dim CodigoPersona As Integer = 0
|
||||
|
||||
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0")
|
||||
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
|
||||
|
||||
Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
|
||||
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
|
||||
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||
|
||||
Dim CvePrecioLista As Integer = DdlPrecioLista.SelectedValue.ToEntero()
|
||||
|
||||
If DivCrearPrecioLista.Visible AndAlso ChkCrearPrecioLista.Checked Then
|
||||
CvePrecioListaNuevo = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0)
|
||||
If CvePrecioListaNuevo > 0 Then
|
||||
CvePrecioLista = CvePrecioListaNuevo
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
'VERIFICA SI ES CLIENTE NUEVO O ACTUALIZACION
|
||||
If Me.CveCliente = -1 Then
|
||||
Dim ErrorAC As Boolean = False
|
||||
Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero()
|
||||
|
||||
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
|
||||
|
||||
If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||
TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, Giro, CvePrecioLista, ChkMail.Checked, TxtRetIVA.Text.ToDouble,
|
||||
TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(),
|
||||
DiasPago, DdlTipoPago.SelectedValue, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim,
|
||||
TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim,
|
||||
TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(),
|
||||
CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(),
|
||||
CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||
CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text,
|
||||
DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(),
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
|
||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
||||
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente) Then
|
||||
|
||||
CveClienteNuevo = ObjClientes.CveCliente
|
||||
|
||||
If Not ErrorProceso Then
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
If Not ObjClientes.AddClienteImpuestosLocales(CveClienteNuevo, GVR.DataKey("CveImpuestoLocal").ToEntero()) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
For Each Row As DataRow In TempDTSucursales.Rows
|
||||
If Not CveCliente > 0 Then
|
||||
If Not ObjClientes.AddSucursal(CveClienteNuevo, Row("SucursalCliente").ToString(), UsuarioActual.CveUsuario, Row("CiudadSucursal").ToString(), Row("ColoniaSucursal").ToString(), Row("CPSucursal").ToString(), Row("DireccionSucursal").ToString(), Row("EstadoSucursal").ToString(), Row("LocalidadSucursal").ToString(),
|
||||
Row("PaisSucursal").ToString(), Row("NumExtSucursal").ToString(), Row("NumIntSucursal").ToString(), Row("TelefonoSucursal").ToString(), Row("CorreoSucursal").ToString(), Row("CorreoCotiziacionSucursal").ToString(), Row("ContactoSucursal").ToString(),
|
||||
Row("CveVendedorSucursal").ToString().ToEntero(), Row("NumCuenta").ToString(), Row("CveMetodoPago").ToString().ToEntero(), Row("LimiteCredito").ToString().ToDecimal(), Row("CveResponsableCobranza").ToString().ToEntero(),
|
||||
Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago33").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString()) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If Not ErrorProceso AndAlso Not GuardarDocumentosClientes(objDoc, CveClienteNuevo) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
Else
|
||||
Dim NombreCliente As String = ""
|
||||
|
||||
If TxtRFC.Text.Length = 13 AndAlso TxtApellidoPaterno.Text <> "" AndAlso TxtApellidoMaterno.Text <> "" AndAlso TxtNombres.Text <> "" Then
|
||||
NombreCliente = ($"{TxtNombres.Text} {TxtApellidoPaterno.Text} {TxtApellidoMaterno.Text}").Trim()
|
||||
Else
|
||||
NombreCliente = TxtNombre.Text.Trim()
|
||||
End If
|
||||
|
||||
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
|
||||
|
||||
If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim,
|
||||
TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, Giro, CvePrecioLista, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked,
|
||||
ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(), DiasPago, DdlTipoPago.SelectedValue,
|
||||
TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim,
|
||||
ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim, UsuarioActual.CveUsuario,
|
||||
CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(), CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(),
|
||||
CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text,
|
||||
CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text,
|
||||
DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked,
|
||||
AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(),
|
||||
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
|
||||
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
|
||||
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
|
||||
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
||||
NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
|
||||
Genero:=GeneroCliente) Then
|
||||
|
||||
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
If Not ObjClientes.AddClienteImpuestosLocales(Me.CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero()) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorProceso AndAlso Not GuardarDocumentosClientes(objDoc, Me.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
Dim NombreCliente As String = ""
|
||||
|
||||
Catch ex As Exception
|
||||
ErrorProceso = True
|
||||
OnError("Ocurrió un error al guardar", ex)
|
||||
End Try
|
||||
|
||||
If TxtRFC.Text.Length = 13 AndAlso TxtApellidoPaterno.Text <> "" AndAlso TxtApellidoMaterno.Text <> "" AndAlso TxtNombres.Text <> "" Then
|
||||
NombreCliente = ($"{TxtNombres.Text} {TxtApellidoPaterno.Text} {TxtApellidoMaterno.Text}").Trim()
|
||||
Else
|
||||
NombreCliente = TxtNombre.Text.Trim()
|
||||
End If
|
||||
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
|
||||
If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim,
|
||||
TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, Giro, DdlPrecioLista.SelectedValue.ToEntero(), ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked,
|
||||
ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(), DiasPago, DdlTipoPago.SelectedValue,
|
||||
TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim,
|
||||
ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim, UsuarioActual.CveUsuario,
|
||||
CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(), CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(),
|
||||
CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text,
|
||||
CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text,
|
||||
DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked,
|
||||
AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(),
|
||||
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
|
||||
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
|
||||
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
|
||||
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
||||
NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
|
||||
Genero:=GeneroCliente) Then
|
||||
If ErrorProceso Then
|
||||
ObjClientes.RollBack()
|
||||
Alert("Ocurrió un error al guardar.", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjClientes.Commit()
|
||||
|
||||
If CveClienteNuevo > 0 Then
|
||||
ViewState("CveCliente") = CveClienteNuevo
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
objDoc.Dispose()
|
||||
ObjVentas.Dispose()
|
||||
|
||||
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
||||
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero())
|
||||
End If
|
||||
Next
|
||||
GuardarDocumentosClientes()
|
||||
|
||||
'For Each gvr As GridViewRow In GvDocsVentas.Rows
|
||||
' 'sino está registrada y se selecciona, se va a insertar
|
||||
' If gvr.DataKey("CveDocumentacionElectronica").Toentero() <= 0 Then
|
||||
' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, NowADS(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
' Else
|
||||
' ', Observacion2:=gvr.FCTextBox("TxtObs2").Text
|
||||
' objDoc.DocumentacionElectronicaUpdate(gvr.DataKey("CveDocumentacionElectronica").Toentero(), gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, gvr.DataKey("FechaLimite").ToDate(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
' End If
|
||||
|
||||
' 'si ya estaba registrada y no se selecciona, se va a insertar
|
||||
' If gvr.DataKey("CveDocumentacionElectronica").Toentero() > 0 AndAlso Not gvr.FCCheckBox("ChkDoc").Checked Then
|
||||
' objDoc.DocumentacionElectronicaRemove(gvr.DataKey("CveDocumentacionElectronica").Toentero(), -1)
|
||||
' End If
|
||||
|
||||
'Next
|
||||
|
||||
ObjClientes.Commit()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
If EstatusAnteriorCliente <> ChkEstado.Checked Then
|
||||
|
||||
Dim DTVendedor As New DataTable
|
||||
DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue)
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim DtVendedores As DataTable = Nothing
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
DtVendedores = ObjVendedores.DtResultados
|
||||
End If
|
||||
ObjVendedores.Dispose()
|
||||
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString()
|
||||
Dim _CorreoAsistente As String = ""
|
||||
Dim _CorreoCoordinador As String = ""
|
||||
|
||||
Dim CveSuperior As Integer = DTVendedor(0)("CveSuperior").ToString().ToEntero()
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
_CorreoAsistente = DtVendedores.FiltroPrimeroValor("Correo", "CveSuperior = " & DdlVendedor.SelectedValue.ToEntero())
|
||||
_CorreoCoordinador = DtVendedores.FiltroPrimeroValor("Correo", "CveVendedor = " & CveSuperior)
|
||||
End If
|
||||
|
||||
If (_CorreoVendedor.Length > 0 Or _CorreoAsistente.Length > 0 Or _CorreoCoordinador.Length > 0) And UsuarioActual.Empresa.Funcionalidad(571).ToEntero() > 0 Then
|
||||
|
||||
Dim Asunto As String = ""
|
||||
Dim Para As String = If(_CorreoVendedor.Length > 0, _CorreoVendedor & ";", "") & If(_CorreoAsistente.Length > 0, _CorreoAsistente & ";", "") & _CorreoCoordinador
|
||||
Dim SBBody As New StringBuilder
|
||||
|
||||
If ChkEstado.Checked Then
|
||||
Asunto = "Activación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido activado.", TxtNombre.Text))
|
||||
Else
|
||||
Asunto = "Desactivación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido desactivado.", TxtNombre.Text))
|
||||
End If
|
||||
MandaCorreo(Asunto, Para + "", SBBody.ToString())
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
CargaHistorial()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
UpnHistorial.Update()
|
||||
End If
|
||||
If Not ErrorProceso Then
|
||||
RecargaGlobal()
|
||||
|
||||
'RECARGA GLOBAL DE LISTA DE PRECIOS SI SE GENERO UNO NUEVO
|
||||
If CvePrecioListaNuevo > 0 Then
|
||||
GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing
|
||||
End If
|
||||
|
||||
'NUEVO CLIENTE
|
||||
If CveClienteNuevo > 0 Then
|
||||
'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
|
||||
Dim MensajeCRM As String = ""
|
||||
If CveEmpresaCRM > 0 Then
|
||||
If VincularEmpresaCRM() Then
|
||||
MensajeCRM = "<br><br>Se vinculo el cliente a la Empresa CRM"
|
||||
Else
|
||||
MensajeCRM = "<br><br>Ocurrio un error al vincular la Empresa CRM, intente unificar el Cliente."
|
||||
End If
|
||||
End If
|
||||
|
||||
Alert("El cliente se guardó correctamente." & MsgCuentaContable & MensajeCRM, TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/CatClientes.aspx""")
|
||||
|
||||
Else
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
|
||||
If EstatusAnteriorCliente <> ChkEstado.Checked Then
|
||||
|
||||
Dim DTVendedor As New DataTable
|
||||
DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue)
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim DtVendedores As DataTable = Nothing
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
DtVendedores = ObjVendedores.DtResultados
|
||||
End If
|
||||
ObjVendedores.Dispose()
|
||||
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString()
|
||||
Dim _CorreoAsistente As String = ""
|
||||
Dim _CorreoCoordinador As String = ""
|
||||
|
||||
Dim CveSuperior As Integer = DTVendedor(0)("CveSuperior").ToString().ToEntero()
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
_CorreoAsistente = DtVendedores.FiltroPrimeroValor("Correo", "CveSuperior = " & DdlVendedor.SelectedValue.ToEntero())
|
||||
_CorreoCoordinador = DtVendedores.FiltroPrimeroValor("Correo", "CveVendedor = " & CveSuperior)
|
||||
End If
|
||||
|
||||
If (_CorreoVendedor.Length > 0 Or _CorreoAsistente.Length > 0 Or _CorreoCoordinador.Length > 0) And UsuarioActual.Empresa.Funcionalidad(571).ToEntero() > 0 Then
|
||||
|
||||
Dim Asunto As String = ""
|
||||
Dim Para As String = If(_CorreoVendedor.Length > 0, _CorreoVendedor & ";", "") & If(_CorreoAsistente.Length > 0, _CorreoAsistente & ";", "") & _CorreoCoordinador
|
||||
Dim SBBody As New StringBuilder
|
||||
|
||||
If ChkEstado.Checked Then
|
||||
Asunto = "Activación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido activado.", TxtNombre.Text))
|
||||
Else
|
||||
Asunto = "Desactivación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido desactivado.", TxtNombre.Text))
|
||||
End If
|
||||
MandaCorreo(Asunto, Para + "", SBBody.ToString())
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
objDoc.Dispose()
|
||||
RecargaGlobal()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -7109,10 +7027,9 @@ Partial Class Clientes
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GuardarDocumentosClientes(Optional _CveDocumentacionExcluir As Integer = -1)
|
||||
Private Function GuardarDocumentosClientes(ByRef objDocumentos As ClsEdocumentacion, CveCliente As Integer, Optional _CveDocumentacionExcluir As Integer = -1) As Boolean
|
||||
|
||||
Dim hasError As Boolean = True
|
||||
Dim objDocumentos As New ClsEdocumentacion
|
||||
Dim hasError As Boolean = False
|
||||
|
||||
For Each dRow As GridViewRow In GvDocumentosCliente.Rows
|
||||
|
||||
@@ -7169,9 +7086,6 @@ Partial Class Clientes
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
hasError = False
|
||||
Catch ex As Exception
|
||||
hasError = True
|
||||
Exit For
|
||||
@@ -7181,14 +7095,21 @@ Partial Class Clientes
|
||||
|
||||
'refrescar grid datos investigacion
|
||||
CargaDocumentacionCliente()
|
||||
End Sub
|
||||
|
||||
Return Not hasError
|
||||
End Function
|
||||
|
||||
Protected Sub chkEstatus_CheckedChanged(sender As Object, e As EventArgs)
|
||||
GuardarDocumentosClientes()
|
||||
Using objDocumentos As New ClsEdocumentacion()
|
||||
GuardarDocumentosClientes(objDocumentos, Me.CveCliente)
|
||||
End Using
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub TxtObservaciones_TextChanged(sender As Object, e As EventArgs)
|
||||
GuardarDocumentosClientes()
|
||||
Protected Sub TxtObservaciones_TextChanged(sender As Object, e As EventArgs)
|
||||
Using objDocumentos As New ClsEdocumentacion()
|
||||
GuardarDocumentosClientes(objDocumentos, Me.CveCliente)
|
||||
End Using
|
||||
End Sub
|
||||
Protected Sub BtnModalFirmaContratoDocumentoUpload_Click(sender As Object, e As EventArgs) Handles BtnModalFirmaContratoDocumentoUpload.Click
|
||||
|
||||
@@ -7235,8 +7156,10 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
GuardarDocumentosClientes(CveDocumentacion)
|
||||
|
||||
Using objDocumentos As New ClsEdocumentacion()
|
||||
GuardarDocumentosClientes(objDocumentos, Me.CveCliente, CveDocumentacion)
|
||||
End Using
|
||||
CargaDocumentacionCliente()
|
||||
|
||||
|
||||
@@ -10354,6 +10277,15 @@ Partial Class Clientes
|
||||
|
||||
Private Sub DdlRegimenFiscal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRegimenFiscal.SelectedIndexChanged
|
||||
CargaComboCFDI()
|
||||
End Sub
|
||||
End Sub
|
||||
Protected Sub ChkCrearPrecioLista_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.CveEmpresa = 186 Then
|
||||
DivPrecioLista.Visible = Not ChkCrearPrecioLista.Checked
|
||||
DivTxtCrearPrecioLista.Visible = ChkCrearPrecioLista.Checked
|
||||
|
||||
UpDatos.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user