Clientes - Grupos
This commit is contained in:
@@ -1068,7 +1068,7 @@ Public Class ClsClientes
|
|||||||
' Return Retorno
|
' Return Retorno
|
||||||
'End Function
|
'End Function
|
||||||
Public Function AddSucursal(CveCliente As Integer, Sucursal As String, CveUsuario As Integer, Ciudad As String, Colonia As String, CP As String, Direccion As String, Estado As String, Localidad As String, Pais As String, NoExt As String, NoInt As String, Telefono As String, Correo As String, CorreoCotizacion As String, Contacto As String, CveVendedor As Integer, NumCtaPago As String, CveMetodoPago As Integer,
|
Public Function AddSucursal(CveCliente As Integer, Sucursal As String, CveUsuario As Integer, Ciudad As String, Colonia As String, CP As String, Direccion As String, Estado As String, Localidad As String, Pais As String, NoExt As String, NoInt As String, Telefono As String, Correo As String, CorreoCotizacion As String, Contacto As String, CveVendedor As Integer, NumCtaPago As String, CveMetodoPago As Integer,
|
||||||
LimiteCredito As Decimal, CveResponsableSucursal As Integer, CveUsoCFDI As Integer, CveFormaPago33 As Integer, CveMetodoPago33 As Integer, Optional LT As String = "0", Optional LG As String = "0") As Boolean
|
LimiteCredito As Decimal, CveResponsableSucursal As Integer, CveUsoCFDI As Integer, CveFormaPago33 As Integer, CveMetodoPago33 As Integer, Optional LT As String = "0", Optional LG As String = "0", Optional RFC As String = "") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_SucursalClienteAdd")
|
DataAdapter("PA_Vta_SucursalClienteAdd")
|
||||||
@@ -1101,6 +1101,7 @@ Public Class ClsClientes
|
|||||||
|
|
||||||
.Add("@LT", SqlDbType.VarChar).Value = LT
|
.Add("@LT", SqlDbType.VarChar).Value = LT
|
||||||
.Add("@LG", SqlDbType.VarChar).Value = LG
|
.Add("@LG", SqlDbType.VarChar).Value = LG
|
||||||
|
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -1120,7 +1121,7 @@ Public Class ClsClientes
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateSucursal(Sucursal As String, Estatus As Boolean, CveCliente As Integer, CveClienteSucursal As Integer, Ciudad As String, Colonia As String, CP As String, Direccion As String, Estado As String, Localidad As String, Pais As String, NoExt As String, NoInt As String, Telefono As String, Correo As String, CorreoCotizacion As String, Contacto As String, CveVendedor As Integer, NumCtaPago As String, CveMetodoPago As Integer,
|
Public Function UpdateSucursal(Sucursal As String, Estatus As Boolean, CveCliente As Integer, CveClienteSucursal As Integer, Ciudad As String, Colonia As String, CP As String, Direccion As String, Estado As String, Localidad As String, Pais As String, NoExt As String, NoInt As String, Telefono As String, Correo As String, CorreoCotizacion As String, Contacto As String, CveVendedor As Integer, NumCtaPago As String, CveMetodoPago As Integer,
|
||||||
LimiteCredito As Decimal, CveResponsableSucursal As Integer, CveUsoCFDI33 As Integer, CveFormaPago33 As Integer, CveMetodoPago33 As Integer, Optional LT As String = "0", Optional LG As String = "0") As Boolean
|
LimiteCredito As Decimal, CveResponsableSucursal As Integer, CveUsoCFDI33 As Integer, CveFormaPago33 As Integer, CveMetodoPago33 As Integer, Optional LT As String = "0", Optional LG As String = "0", Optional RFC As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_SucursalClienteUpdate")
|
DataAdapter("PA_Vta_SucursalClienteUpdate")
|
||||||
@@ -1156,6 +1157,7 @@ Public Class ClsClientes
|
|||||||
|
|
||||||
.Add("@LT", SqlDbType.VarChar).Value = LT
|
.Add("@LT", SqlDbType.VarChar).Value = LT
|
||||||
.Add("@LG", SqlDbType.VarChar).Value = LG
|
.Add("@LG", SqlDbType.VarChar).Value = LG
|
||||||
|
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ Public Class ClsVentas
|
|||||||
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
|
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
|
||||||
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
||||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||||
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1) As Boolean
|
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_VentasAdd")
|
DataAdapter("PA_VentasAdd")
|
||||||
@@ -432,6 +432,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CveTipoRetencion", SqlDbType.TinyInt).Value = CveTipoRetencion
|
.Add("@CveTipoRetencion", SqlDbType.TinyInt).Value = CveTipoRetencion
|
||||||
.Add("@CorreoNotificacion", SqlDbType.VarChar).Value = CorreoNotificacion
|
.Add("@CorreoNotificacion", SqlDbType.VarChar).Value = CorreoNotificacion
|
||||||
.Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
|
.Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
|
||||||
|
.Add("@FacturarSucursal", SqlDbType.Bit).Value = FacturarSucursal
|
||||||
|
|
||||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -5613,6 +5613,7 @@ Namespace Modelos
|
|||||||
Public Property Pagado As Decimal
|
Public Property Pagado As Decimal
|
||||||
Public Property DescuentoProntoPago As Decimal
|
Public Property DescuentoProntoPago As Decimal
|
||||||
Public Property CveVentaRNCCargo As Integer
|
Public Property CveVentaRNCCargo As Integer
|
||||||
|
Public Property FacturarSucursal As Boolean = False
|
||||||
'Public Property Sucursal As SucursalModel
|
'Public Property Sucursal As SucursalModel
|
||||||
Public Property SubProyecto As Modelos.SubProyectoModel
|
Public Property SubProyecto As Modelos.SubProyectoModel
|
||||||
|
|
||||||
@@ -9079,6 +9080,7 @@ Namespace Modelos
|
|||||||
FormatoFactura = ""
|
FormatoFactura = ""
|
||||||
Sucursal = ""
|
Sucursal = ""
|
||||||
CorreoSucursal = ""
|
CorreoSucursal = ""
|
||||||
|
RFC = ""
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
MyBase.New()
|
MyBase.New()
|
||||||
@@ -9095,6 +9097,8 @@ Namespace Modelos
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public Property CveSucursal As Integer
|
Public Property CveSucursal As Integer
|
||||||
|
Public Property RFC As String
|
||||||
|
Public Property Nombre As String
|
||||||
Public Property Calle As String
|
Public Property Calle As String
|
||||||
Public Property Direccion As String
|
Public Property Direccion As String
|
||||||
Public Property NoExt As String
|
Public Property NoExt As String
|
||||||
@@ -9114,6 +9118,7 @@ Namespace Modelos
|
|||||||
Public Property TelefonoSucursal As String
|
Public Property TelefonoSucursal As String
|
||||||
Public Property ImprimeNombreSucursal As String
|
Public Property ImprimeNombreSucursal As String
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
<Serializable>
|
<Serializable>
|
||||||
|
|||||||
@@ -725,7 +725,7 @@ Public Class Timbrado
|
|||||||
If Msg = String.Empty Then
|
If Msg = String.Empty Then
|
||||||
|
|
||||||
'Nodo receptor
|
'Nodo receptor
|
||||||
Msg = CFDi.ReceptorCfd(Ventas.Cliente.RFC, Ventas.Cliente.Nombre, "", "", Ventas.ClaveUsoCFDI)
|
Msg = CFDi.ReceptorCfd(ObjCFDITimbre.Receptor.RFC, ObjCFDITimbre.Receptor.Nombre, "", "", Ventas.ClaveUsoCFDI)
|
||||||
If Msg = String.Empty Then
|
If Msg = String.Empty Then
|
||||||
|
|
||||||
'Nodo conceptos, se agregan los PS
|
'Nodo conceptos, se agregan los PS
|
||||||
@@ -941,7 +941,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
|
|
||||||
Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
||||||
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Ventas.Cliente.RFC, Ventas.TotalTC, FolioFiscal, RutaCBB)
|
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ObjCFDITimbre.Receptor.RFC, Ventas.TotalTC, FolioFiscal, RutaCBB)
|
||||||
|
|
||||||
''Genero la addenda de 7-Eleven
|
''Genero la addenda de 7-Eleven
|
||||||
'If sevenElevenNumProveedor <> "" AndAlso sevenElevenFolio <> "" AndAlso sevenElevenTienda <> "" AndAlso sevenElevenFecha <> "" AndAlso sevenElevenFecha <> "__/__/____" Then
|
'If sevenElevenNumProveedor <> "" AndAlso sevenElevenFolio <> "" AndAlso sevenElevenTienda <> "" AndAlso sevenElevenFecha <> "" AndAlso sevenElevenFecha <> "__/__/____" Then
|
||||||
|
|||||||
@@ -692,7 +692,9 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Sucursales y/o Departamentos</span>
|
<span class="caption-subject bold uppercase">
|
||||||
|
<asp:Literal ID="LtlGvSucursalesCliente" runat="server" Text="Sucursales y/o Departamentos" />
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -704,7 +706,8 @@
|
|||||||
<table class="table table-striped table-advance table-hover" style="width: 100%">
|
<table class="table table-striped table-advance table-hover" style="width: 100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="Titulos">
|
<tr class="Titulos">
|
||||||
<th width="150px">Sucursal y/o Departamento</th>
|
<th width="150px">
|
||||||
|
<asp:Literal ID="LtlNombreSucursalTitulo" runat="server" Text="Sucursal y/o Departamento:"></asp:Literal></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th width="121px">Comandos</th>
|
<th width="121px">Comandos</th>
|
||||||
@@ -787,7 +790,7 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Sucursal/Depto
|
<asp:Literal ID="LtlNombreSucursal" runat="server" Text="Sucursal/Depto"></asp:Literal>
|
||||||
|
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -4654,7 +4657,9 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="fa fa-users font-green"></i>
|
<i class="fa fa-users font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Datos de la Sucursal </span>
|
<span class="caption-subject bold uppercase">
|
||||||
|
<asp:Literal ID="LtlTituloSurcusalCliente" runat="server" Text="Datos de la Sucursal"></asp:Literal>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -4670,7 +4675,9 @@
|
|||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtNombreSucursal" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtNombreSucursal" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVNombreSucursal" runat="server" ControlToValidate="TxtNombreSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVNombreSucursal" runat="server" ControlToValidate="TxtNombreSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtNombreSucursal.ClientID.ToString()%>">Sucursal y/o Departamento:</label>
|
<label for="<%= TxtNombreSucursal.ClientID.ToString()%>">
|
||||||
|
<asp:Literal ID="LtlNombreSucursal" runat="server" Text="Sucursal y/o Departamento:"></asp:Literal>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -4738,11 +4745,18 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="row" style="padding-left: 16px;">
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||||
<asp:TextBox ID="TxtTelefonoSucursal" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtTelefonoSucursal" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||||
<ajax:MaskedEditExtender ID="mskTelefono" runat="server" TargetControlID="TxtTelefonoSucursal" ClearMaskOnLostFocus="false" MaskType="None" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="mskTelefono" runat="server" TargetControlID="TxtTelefonoSucursal" ClearMaskOnLostFocus="false" MaskType="None" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||||
<label for="<%= TxtTelefonoSucursal.ClientID.ToString()%>">Teléfono:</label>
|
<label for="<%= TxtTelefonoSucursal.ClientID.ToString()%>">Teléfono:</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="DivRFCSucursal" visible="false" runat="server" class="form-group form-md-line-input input-iconright col-xs-8">
|
||||||
|
<asp:TextBox ID="TxtRFCSucursal" Style="text-transform: uppercase;" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RegularExpressionValidator ID="REVRFCSucursal" runat="server" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardarSucursal" ControlToValidate="TxtRFCSucursal" ValidationExpression="^[a-zA-Z.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
|
||||||
|
<label for="<%= TxtRFCSucursal.ClientID.ToString()%>">RFC:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtCorreoSucursal" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtCorreoSucursal" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
|
||||||
@@ -7069,6 +7083,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"></script>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -1421,6 +1421,7 @@ Partial Class Clientes
|
|||||||
'TxtEstado.Text = ObjClientes.Estado
|
'TxtEstado.Text = ObjClientes.Estado
|
||||||
'TxtPais.Text = ObjClientes.Pais
|
'TxtPais.Text = ObjClientes.Pais
|
||||||
TxtRFC.Text = ObjClientes.RFC
|
TxtRFC.Text = ObjClientes.RFC
|
||||||
|
|
||||||
TxtCP.Text = ObjClientes.CP.ToString
|
TxtCP.Text = ObjClientes.CP.ToString
|
||||||
TxtTelefono.Text = ObjClientes.Telefono
|
TxtTelefono.Text = ObjClientes.Telefono
|
||||||
TxtContacto.Text = ObjClientes.Contacto
|
TxtContacto.Text = ObjClientes.Contacto
|
||||||
@@ -1899,6 +1900,15 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
GvDireccionesEnvio.DataBind()
|
GvDireccionesEnvio.DataBind()
|
||||||
|
|
||||||
|
If TxtRFC.Text = "XAXX010101000" Then
|
||||||
|
GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal").Text = "Cliente"
|
||||||
|
LtlNombreSucursal.Text = "Cliente"
|
||||||
|
LtlNombreSucursalTitulo.Text = "Cliente"
|
||||||
|
LtlTituloSurcusalCliente.Text = "Datos del cliente"
|
||||||
|
LtlGvSucursalesCliente.Text = "Clientes"
|
||||||
|
End If
|
||||||
|
UpAgregarSucursal.Update()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub CargaAFAsignados()
|
Public Sub CargaAFAsignados()
|
||||||
@@ -2976,15 +2986,13 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Dim LT As String = If(txtLt.Text.ToDouble <> 0, txtLt.Text, "0")
|
Dim LT As String = If(txtLt.Text.ToDouble <> 0, txtLt.Text, "0")
|
||||||
Dim LG As String = If(txtLg.Text.ToDouble <> 0, txtLg.Text, "0")
|
Dim LG As String = If(txtLg.Text.ToDouble <> 0, txtLg.Text, "0")
|
||||||
|
Dim RFC As String = If(String.IsNullOrEmpty(TxtRFCSucursal.Text), "-1", TxtRFCSucursal.Text)
|
||||||
|
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
If Actualizar Then
|
If Actualizar Then
|
||||||
|
|
||||||
|
|
||||||
Dim Estatus As Boolean = ChkEstatusSucursal.Checked
|
Dim Estatus As Boolean = ChkEstatusSucursal.Checked
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ObjCliente.UpdateSucursal(TxtNombreSucursal.Text.Trim, Estatus, CveCliente, CveClienteSuc, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim,
|
If ObjCliente.UpdateSucursal(TxtNombreSucursal.Text.Trim, Estatus, CveCliente, CveClienteSuc, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim,
|
||||||
TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtCorreoSucursal.Text.Trim, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim, DdlVendedorSucursal.SelectedValue.ToEntero, TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero, TxtLimiteCreditoSucursal.Text.ToDecimal, DdlResponsableSucursal.SelectedValue.ToEntero,
|
TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtCorreoSucursal.Text.Trim, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim, DdlVendedorSucursal.SelectedValue.ToEntero, TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero, TxtLimiteCreditoSucursal.Text.ToDecimal, DdlResponsableSucursal.SelectedValue.ToEntero,
|
||||||
DdlSucursalUsoCFDI.SelectedValue.ToEntero, DdlSucursalFormaPago33.SelectedValue.ToEntero, DdlSucursalMetodoPago33.SelectedValue.ToEntero, LT:=LT, LG:=LG) Then
|
DdlSucursalUsoCFDI.SelectedValue.ToEntero, DdlSucursalFormaPago33.SelectedValue.ToEntero, DdlSucursalMetodoPago33.SelectedValue.ToEntero, LT:=LT, LG:=LG) Then
|
||||||
@@ -3126,6 +3134,7 @@ Partial Class Clientes
|
|||||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GVSucursales.RowEditing
|
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GVSucursales.RowEditing
|
||||||
|
|
||||||
Me.Actualizar = True
|
Me.Actualizar = True
|
||||||
|
Me.DivRFCSucursal.Visible = False
|
||||||
Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString.ToEntero
|
Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
@@ -3146,6 +3155,8 @@ Partial Class Clientes
|
|||||||
TxtNumExtSucursal.Text = ObjCliente.DtResultados.Rows(0)("NoExt").ToString
|
TxtNumExtSucursal.Text = ObjCliente.DtResultados.Rows(0)("NoExt").ToString
|
||||||
TxtNumIntSucursal.Text = ObjCliente.DtResultados.Rows(0)("NoInt").ToString
|
TxtNumIntSucursal.Text = ObjCliente.DtResultados.Rows(0)("NoInt").ToString
|
||||||
TxtTelefonoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString
|
TxtTelefonoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString
|
||||||
|
TxtRFCSucursal.Text = ObjCliente.DtResultados.Rows(0)("RFC").ToString
|
||||||
|
DivRFCSucursal.Visible = Not String.IsNullOrEmpty(TxtRFCSucursal.Text.Trim())
|
||||||
TxtCorreoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Correo").ToString
|
TxtCorreoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Correo").ToString
|
||||||
TxtCorreoSucursalCotizacion.Text = ObjCliente.DtResultados(0)("CorreoCotizacion").ToString
|
TxtCorreoSucursalCotizacion.Text = ObjCliente.DtResultados(0)("CorreoCotizacion").ToString
|
||||||
TxtContactoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString
|
TxtContactoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString
|
||||||
|
|||||||
@@ -417,11 +417,33 @@
|
|||||||
<td width="135px">
|
<td width="135px">
|
||||||
<asp:CheckBox ID="ChkEnviarFactura" runat="server" /></td>
|
<asp:CheckBox ID="ChkEnviarFactura" runat="server" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<%-- <tr runat="server" id="trFacturacionSucursal" visible="false">
|
||||||
|
<td><b>Facturar Sucursal :</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:CheckBox ID="ChkFacturarSucursal" runat="server" OnCheckedChanged="ChkFacturarSucursal_CheckedChanged" />
|
||||||
|
</td>
|
||||||
|
</tr>--%>
|
||||||
<tr runat="server" id="trsucursalciente" visible="false">
|
<tr runat="server" id="trsucursalciente" visible="false">
|
||||||
<td><b>Sucursal :</b></td>
|
<td align="left" ><b>
|
||||||
<td colspan="3">
|
<asp:Label ID="LblSucursal" runat="server" Text="Sucursal"></asp:Label>
|
||||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal" Width="150px">
|
:</b></td>
|
||||||
|
<td align="left" >
|
||||||
|
<div class="row align-items-start">
|
||||||
|
<div class="col-md-10">
|
||||||
|
<asp:DropDownList ID="DdlSucursalCliente" runat="server" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2" style="padding: inherit;">
|
||||||
|
<asp:LinkButton ID="LnkAgregarSucursal" Visible="false" runat="server" CssClass="btn btn-primary btn-circle btn-xs" Text="<i class='fa fa-plus' aria-hidden='true'></i>" OnClick="LnkAgregarSucursal_Click"></asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td align="left" >
|
||||||
|
<b>
|
||||||
|
<asp:Label ID="LtlTitleRFCSucursal" runat="server" Text=""></asp:Label></b>
|
||||||
|
</td>
|
||||||
|
<td align="left" >
|
||||||
|
<asp:Label ID="LtlRFCSucursal" runat="server" Text=""></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left" runat="server" id="TrDireccion">
|
<tr align="left" runat="server" id="TrDireccion">
|
||||||
@@ -6880,6 +6902,132 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
<%-- MODAL SUCURSAL --%>
|
||||||
|
<div id="divAgregarSucursal" class="modal fade" role="dialog">
|
||||||
|
<div class="modal-dialog" style="max-height: 500px; max-width: 500px;">
|
||||||
|
<asp:UpdatePanel ID="UpAgregarSucursal" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<fieldset>
|
||||||
|
<table border="0" class="portlet light bordered">
|
||||||
|
<tr>
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="fa fa-users font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Datos del cliente </span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<div class="row" style="padding-left: 16px;">
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-12">
|
||||||
|
<asp:TextBox ID="TxtNombreSucursal" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVNombreSucursal" runat="server" ControlToValidate="TxtNombreSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtNombreSucursal.ClientID.ToString()%>">Nombre del cliente:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-left: 16px;">
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-12">
|
||||||
|
<asp:TextBox ID="TxtRFCSucursal" Style="text-transform: uppercase;" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RegularExpressionValidator ID="RFVRFCSucursal" runat="server" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardarSucursal" ControlToValidate="TxtRFCSucursal" ValidationExpression="^[a-zA-Z.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
|
||||||
|
<label for="<%= TxtRFCSucursal.ClientID.ToString()%>">RFC:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtDireccionSucursal" CssClass="form-control " runat="server" MaxLength="90" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="TxtDireccionSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtDireccionSucursal.ClientID.ToString()%>">Calle:</label>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-left: 16px;">
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||||
|
<asp:TextBox ID="TxtNumExtSucursal" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="TxtNumExtSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Número Exterior''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtNumExtSucursal.ClientID.ToString()%>">Número Exterior:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||||
|
<asp:TextBox ID="TxtNumIntSucursal" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true"></asp:TextBox>
|
||||||
|
<label for="<%= TxtNumIntSucursal.ClientID.ToString()%>">Número Interior:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-left: 16px">
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||||
|
<asp:TextBox ID="TxtCPSucursal" CssClass="form-control " runat="server" MaxLength="5" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" ControlToValidate="TxtCPSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código Postal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtCPSucursal.ClientID.ToString()%>">Código Postal:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||||
|
<asp:TextBox ID="TxtColoniaSucursal" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" ControlToValidate="TxtColoniaSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtColoniaSucursal.ClientID.ToString()%>">Colonia:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-left: 16px;">
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||||
|
<asp:TextBox ID="TxtCiudadSucursal" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" ControlToValidate="TxtCiudadSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtCiudadSucursal.ClientID.ToString()%>">Ciudad:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||||
|
<asp:TextBox ID="TxtLocalidadSucursal" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" ControlToValidate="TxtLocalidadSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtLocalidadSucursal.ClientID.ToString()%>">Localidad:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-left: 16px;">
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||||
|
<asp:TextBox ID="TxtEstadoSucursal" CssClass="form-control " runat="server" MaxLength="35" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" ControlToValidate="TxtEstadoSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtEstadoSucursal.ClientID.ToString()%>">Estado:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||||
|
<asp:TextBox ID="TxtPaisSucursal" CssClass="form-control " Text="Mexico" runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator20" runat="server" ControlToValidate="TxtPaisSucursal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''País''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarSucursal"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtPaisSucursal.ClientID.ToString()%>">País:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtTelefonoSucursal" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||||
|
<ajax:MaskedEditExtender ID="mskTelefono" runat="server" TargetControlID="TxtTelefonoSucursal" ClearMaskOnLostFocus="false" MaskType="None" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||||
|
<label for="<%= TxtTelefonoSucursal.ClientID.ToString()%>">Teléfono:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtCorreoSucursal" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtCorreoSucursal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarSucursal"></asp:RegularExpressionValidator>
|
||||||
|
<label for="<%= TxtCorreoSucursal.ClientID.ToString()%>">Correo Envio Factura:(xml/pdf) </label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="padding-left: 16px">
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||||
|
<asp:DropDownList ID="DdlVendedorSucursal" runat="server" CssClass="form-control input-sm select2me" Width="250px" DataTextField="Vendedor" DataValueField="CveVendedor">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlVendedorSucursal.ClientID.ToString()%>">Vendedor:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||||
|
<asp:DropDownList ID="DdlSucursalUsoCFDI" CssClass="form-control select2me" runat="server" Width="150px" AppendDataBoundItems="true" DataTextField="UsoCFDIDescripcion" DataValueField="CveUsoCFDI">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlSucursalUsoCFDI.ClientID.ToString()%>">Uso CFDI:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnAgregarSucursal" runat="server" CssClass="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarSucursal" />
|
||||||
|
<button id="BtnCancelarSucursal" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||||
@@ -8098,5 +8246,26 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function showDivAgregarSucursal() {
|
||||||
|
|
||||||
|
$('#<%= TxtNombreSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtDireccionSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtNumExtSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtNumIntSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtCPSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtColoniaSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtTelefonoSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtCiudadSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtLocalidadSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtEstadoSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtPaisSucursal.ClientID %>').val('');
|
||||||
|
$('#<%= TxtCorreoSucursal.ClientID %>').val('');
|
||||||
|
$('#divAgregarSucursal').modal();
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideDivAgregarSucursal() {
|
||||||
|
$('#divAgregarSucursal').modal('hide');
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -1764,6 +1764,23 @@ Partial Class Ventas
|
|||||||
ViewState("CvePrecioLista") = value
|
ViewState("CvePrecioLista") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property FacturarSucursal As Boolean
|
||||||
|
Get
|
||||||
|
Return CBool(IfNull(ViewState("FacturarSucursal"), "False", ViewState("FacturarSucursal")))
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("FacturarSucursal") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property ClienteSucursal As Modelos.SucursalModel
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("ClienteSucursal"), Modelos.SucursalModel)
|
||||||
|
End Get
|
||||||
|
Set(value As Modelos.SucursalModel)
|
||||||
|
ViewState("ClienteSucursal") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -4566,6 +4583,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
|
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
|
||||||
|
|
||||||
|
Me.FacturarSucursal = CBool(DbRowVenta("FacturarSucursal").ToString())
|
||||||
|
|
||||||
|
If Me.FacturarSucursal Then
|
||||||
|
HabilitarFacturacionSucursal()
|
||||||
|
End If
|
||||||
|
|
||||||
CargaPS(-1, DdlPS)
|
CargaPS(-1, DdlPS)
|
||||||
|
|
||||||
'CARGA GV DE OC RELACIONADAS
|
'CARGA GV DE OC RELACIONADAS
|
||||||
@@ -4802,7 +4825,10 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaUsoCFDI()
|
Private Sub CargaUsoCFDI()
|
||||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||||
|
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||||
|
|
||||||
DdlUsoCFDI.DataBind()
|
DdlUsoCFDI.DataBind()
|
||||||
|
DdlSucursalUsoCFDI.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaTiposRelacion()
|
Private Sub CargaTiposRelacion()
|
||||||
DdlTiposRelacion.DataSource = GlobalDTVtaTiposRelacion
|
DdlTiposRelacion.DataSource = GlobalDTVtaTiposRelacion
|
||||||
@@ -5221,6 +5247,11 @@ Partial Class Ventas
|
|||||||
DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1"))
|
DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1"))
|
||||||
DdlSucursalCliente.DataBind()
|
DdlSucursalCliente.DataBind()
|
||||||
|
|
||||||
|
'SI UTILIZA EL RFC GENERICO PERMITE FACTURAR SUCURSAL
|
||||||
|
If (CveVenta <= 0 OrElse NuevaFactura = 1) AndAlso LblRFC.Text.Trim() = "XAXX010101000" Then
|
||||||
|
HabilitarFacturacionSucursal()
|
||||||
|
End If
|
||||||
|
|
||||||
'CargaFolios()
|
'CargaFolios()
|
||||||
|
|
||||||
CargaDatosEstimaciones(CveCliente)
|
CargaDatosEstimaciones(CveCliente)
|
||||||
@@ -5576,6 +5607,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
Private Sub CargaClienteSucursal(CveClienteSuc As Integer, Optional ByRef ObjVentas As ClsVentas = Nothing)
|
Private Sub CargaClienteSucursal(CveClienteSuc As Integer, Optional ByRef ObjVentas As ClsVentas = Nothing)
|
||||||
|
Me.ClienteSucursal = Nothing
|
||||||
|
Me.FacturarSucursal = False
|
||||||
|
LtlTitleRFCSucursal.Text = ""
|
||||||
|
LtlRFCSucursal.Text = ""
|
||||||
|
|
||||||
Dim ObjCliente As New ClsClientes
|
Dim ObjCliente As New ClsClientes
|
||||||
If CveClienteSuc > 0 Then
|
If CveClienteSuc > 0 Then
|
||||||
If ObjCliente.GetSucursales(CveCliente, CveClienteSuc) Then
|
If ObjCliente.GetSucursales(CveCliente, CveClienteSuc) Then
|
||||||
@@ -5612,6 +5648,32 @@ Partial Class Ventas
|
|||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'SI EL CLIENTE TIENE RFC GENERICO Y LA SUCURSAL TIENE RFC DEBE FACTURAR LA SUCURSAL
|
||||||
|
If LblRFC.Text.Trim() = "XAXX010101000" AndAlso Not String.IsNullOrEmpty(ObjCliente.DtResultados.Rows(0)("RFC").ToString()) Then
|
||||||
|
Me.FacturarSucursal = True
|
||||||
|
|
||||||
|
LtlTitleRFCSucursal.Text = "RFC:"
|
||||||
|
LtlRFCSucursal.Text = ObjCliente.DtResultados.Rows(0)("RFC").ToString()
|
||||||
|
|
||||||
|
Me.ClienteSucursal = New Modelos.SucursalModel
|
||||||
|
Me.ClienteSucursal.Nombre = ObjCliente.DtResultados.Rows(0)("SucursalCliente").ToString()
|
||||||
|
Me.ClienteSucursal.RFC = ObjCliente.DtResultados.Rows(0)("RFC").ToString()
|
||||||
|
Me.ClienteSucursal.NoExt = CliNoExt
|
||||||
|
Me.ClienteSucursal.NoInt = CliNoInt
|
||||||
|
Me.ClienteSucursal.Localidad = CliLocalidad
|
||||||
|
Me.ClienteSucursal.Direccion = LblDireccion.Text
|
||||||
|
Me.ClienteSucursal.Colonia = LblColonia.Text
|
||||||
|
Me.ClienteSucursal.Municipio = LblCiudad.Text
|
||||||
|
Me.ClienteSucursal.Estado = LblEstado.Text
|
||||||
|
Me.ClienteSucursal.CP = LblCP.Text
|
||||||
|
Me.ClienteSucursal.Pais = CliPais
|
||||||
|
Me.ClienteSucursal.CorreoSucursal = CliCorreoCot.ToString()
|
||||||
|
Me.ClienteSucursal.TelefonoSucursal = LblTelefono.Text
|
||||||
|
Me.ClienteSucursal.Sucursal = If(DdlSucursalCliente.SelectedValue.ToEntero() > 0, DdlSucursalCliente.SelectedItem.Text, "")
|
||||||
|
Me.ClienteSucursal.ImprimeNombreSucursal = ImprimeNombreSucursal.ToString()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString().ToEntero()
|
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString().ToEntero()
|
||||||
|
|
||||||
@@ -5666,10 +5728,12 @@ Partial Class Ventas
|
|||||||
LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva()
|
LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
UPPVentas.Update()
|
UPPVentas.Update()
|
||||||
UpEstatus.Update()
|
UpEstatus.Update()
|
||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
ObjCliente.Dispose()
|
UpCliente.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Function CargaCreditoDisponible(tCveCliente As Integer, tCveSucursalCliente As Integer, Optional ByRef ObjVentas As ClsVentas = Nothing) As Decimal
|
Private Function CargaCreditoDisponible(tCveCliente As Integer, tCveSucursalCliente As Integer, Optional ByRef ObjVentas As ClsVentas = Nothing) As Decimal
|
||||||
Dim Retorno As Decimal = 0
|
Dim Retorno As Decimal = 0
|
||||||
@@ -6630,6 +6694,11 @@ Partial Class Ventas
|
|||||||
DtOCTmpDT = TmpDT.Copy
|
DtOCTmpDT = TmpDT.Copy
|
||||||
TmpDTError = TmpDT.Copy
|
TmpDTError = TmpDT.Copy
|
||||||
|
|
||||||
|
If (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) Then
|
||||||
|
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
'CUANDO ES PEDIDO SE DEBE ESPECIFICAR EL NUMERO DE CONTRATO
|
'CUANDO ES PEDIDO SE DEBE ESPECIFICAR EL NUMERO DE CONTRATO
|
||||||
If TrTipoPedido.Visible AndAlso DdlTipoPedido.SelectedIndex = 2 Then
|
If TrTipoPedido.Visible AndAlso DdlTipoPedido.SelectedIndex = 2 Then
|
||||||
If String.IsNullOrEmpty(TxtObsFact.Text.Trim()) Then
|
If String.IsNullOrEmpty(TxtObsFact.Text.Trim()) Then
|
||||||
@@ -7904,6 +7973,10 @@ Partial Class Ventas
|
|||||||
'ObjFacturaDevolucion.SetSucursal(Me)
|
'ObjFacturaDevolucion.SetSucursal(Me)
|
||||||
|
|
||||||
ObjFacturaDevolucion.ClienteSucursal = New Modelos.SucursalModel
|
ObjFacturaDevolucion.ClienteSucursal = New Modelos.SucursalModel
|
||||||
|
If Me.ClienteSucursal IsNot Nothing Then
|
||||||
|
ObjFacturaDevolucion.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||||
|
ObjFacturaDevolucion.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||||
|
End If
|
||||||
ObjFacturaDevolucion.ClienteSucursal.NoExt = CliNoExt
|
ObjFacturaDevolucion.ClienteSucursal.NoExt = CliNoExt
|
||||||
ObjFacturaDevolucion.ClienteSucursal.NoInt = CliNoInt
|
ObjFacturaDevolucion.ClienteSucursal.NoInt = CliNoInt
|
||||||
ObjFacturaDevolucion.ClienteSucursal.Localidad = CliLocalidad
|
ObjFacturaDevolucion.ClienteSucursal.Localidad = CliLocalidad
|
||||||
@@ -8140,6 +8213,11 @@ Partial Class Ventas
|
|||||||
'ObjFacturaBonificacion.SetSucursal(Me)
|
'ObjFacturaBonificacion.SetSucursal(Me)
|
||||||
|
|
||||||
ObjFacturaBonificacion.ClienteSucursal = New Modelos.SucursalModel
|
ObjFacturaBonificacion.ClienteSucursal = New Modelos.SucursalModel
|
||||||
|
If Me.ClienteSucursal IsNot Nothing Then
|
||||||
|
ObjFacturaBonificacion.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||||
|
ObjFacturaBonificacion.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||||
|
End If
|
||||||
|
|
||||||
ObjFacturaBonificacion.ClienteSucursal.NoExt = CliNoExt
|
ObjFacturaBonificacion.ClienteSucursal.NoExt = CliNoExt
|
||||||
ObjFacturaBonificacion.ClienteSucursal.NoInt = CliNoInt
|
ObjFacturaBonificacion.ClienteSucursal.NoInt = CliNoInt
|
||||||
ObjFacturaBonificacion.ClienteSucursal.Localidad = CliLocalidad
|
ObjFacturaBonificacion.ClienteSucursal.Localidad = CliLocalidad
|
||||||
@@ -8371,7 +8449,6 @@ Partial Class Ventas
|
|||||||
ObjFactura = New Modelos.Factura
|
ObjFactura = New Modelos.Factura
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
ObjFactura.Version = "3.3"
|
ObjFactura.Version = "3.3"
|
||||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
@@ -8383,7 +8460,7 @@ Partial Class Ventas
|
|||||||
ObjFactura.Moneda = DdlMoneda.SelectedItem.Text
|
ObjFactura.Moneda = DdlMoneda.SelectedItem.Text
|
||||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
|
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
|
||||||
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue)
|
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue)
|
||||||
|
ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
|
||||||
|
|
||||||
'ObjFactura.RefDocto = TxtDocto.Text.Trim
|
'ObjFactura.RefDocto = TxtDocto.Text.Trim
|
||||||
'si es cancelacion, debe de conservar el folio actual
|
'si es cancelacion, debe de conservar el folio actual
|
||||||
@@ -8832,8 +8909,12 @@ Partial Class Ventas
|
|||||||
'ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
'ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||||
ObjFactura.SetSubProyectoMatriz(Me)
|
ObjFactura.SetSubProyectoMatriz(Me)
|
||||||
ObjFactura.SetSubProyecto(Me)
|
ObjFactura.SetSubProyecto(Me)
|
||||||
ObjFactura.ClienteSucursal = New Modelos.SucursalModel
|
ObjFactura.ClienteSucursal = New Modelos.SucursalModel()
|
||||||
If Not CveEmpresaCRM > 0 Then
|
If Not CveEmpresaCRM > 0 Then
|
||||||
|
If Me.ClienteSucursal IsNot Nothing Then
|
||||||
|
ObjFactura.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||||
|
ObjFactura.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||||
|
End If
|
||||||
ObjFactura.ClienteSucursal.NoExt = CliNoExt
|
ObjFactura.ClienteSucursal.NoExt = CliNoExt
|
||||||
ObjFactura.ClienteSucursal.NoInt = CliNoInt
|
ObjFactura.ClienteSucursal.NoInt = CliNoInt
|
||||||
ObjFactura.ClienteSucursal.Localidad = CliLocalidad
|
ObjFactura.ClienteSucursal.Localidad = CliLocalidad
|
||||||
@@ -9232,7 +9313,12 @@ Partial Class Ventas
|
|||||||
ObjFacturaDevolucion.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
ObjFacturaDevolucion.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||||
ObjFacturaDevolucion.SetSubProyectoMatriz(Me)
|
ObjFacturaDevolucion.SetSubProyectoMatriz(Me)
|
||||||
ObjFacturaDevolucion.SetSubProyecto(Me)
|
ObjFacturaDevolucion.SetSubProyecto(Me)
|
||||||
|
|
||||||
ObjFacturaDevolucion.ClienteSucursal = New Modelos.SucursalModel
|
ObjFacturaDevolucion.ClienteSucursal = New Modelos.SucursalModel
|
||||||
|
If Me.ClienteSucursal IsNot Nothing Then
|
||||||
|
ObjFacturaDevolucion.ClienteSucursal.RFC = Me.ClienteSucursal.RFC
|
||||||
|
ObjFacturaDevolucion.ClienteSucursal.Nombre = Me.ClienteSucursal.Nombre
|
||||||
|
End If
|
||||||
ObjFacturaDevolucion.ClienteSucursal.NoExt = CliNoExt
|
ObjFacturaDevolucion.ClienteSucursal.NoExt = CliNoExt
|
||||||
ObjFacturaDevolucion.ClienteSucursal.NoInt = CliNoInt
|
ObjFacturaDevolucion.ClienteSucursal.NoInt = CliNoInt
|
||||||
ObjFacturaDevolucion.ClienteSucursal.Localidad = CliLocalidad
|
ObjFacturaDevolucion.ClienteSucursal.Localidad = CliLocalidad
|
||||||
@@ -9245,6 +9331,7 @@ Partial Class Ventas
|
|||||||
ObjFacturaDevolucion.ClienteSucursal.CorreoSucursal = CliCorreoCot.ToString()
|
ObjFacturaDevolucion.ClienteSucursal.CorreoSucursal = CliCorreoCot.ToString()
|
||||||
ObjFacturaDevolucion.ClienteSucursal.TelefonoSucursal = LblTelefono.Text
|
ObjFacturaDevolucion.ClienteSucursal.TelefonoSucursal = LblTelefono.Text
|
||||||
ObjFacturaDevolucion.ClienteSucursal.Sucursal = If(DdlSucursalCliente.SelectedValue.ToEntero() > 0, DdlSucursalCliente.SelectedItem.Text, "")
|
ObjFacturaDevolucion.ClienteSucursal.Sucursal = If(DdlSucursalCliente.SelectedValue.ToEntero() > 0, DdlSucursalCliente.SelectedItem.Text, "")
|
||||||
|
ObjFacturaDevolucion.ClienteSucursal.ImprimeNombreSucursal = ImprimeNombreSucursal.ToString()
|
||||||
|
|
||||||
'ENVIO DIRECCION
|
'ENVIO DIRECCION
|
||||||
ObjFacturaDevolucion.EnviarA = New Modelos.EnviarAModel
|
ObjFacturaDevolucion.EnviarA = New Modelos.EnviarAModel
|
||||||
@@ -9292,13 +9379,18 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Timbre.Comprobante.Confirmacion = ""
|
Timbre.Comprobante.Confirmacion = ""
|
||||||
|
|
||||||
|
If Obj.FacturarSucursal Then
|
||||||
|
Timbre.Receptor.RFC = Obj.ClienteSucursal.RFC
|
||||||
|
Timbre.Receptor.Nombre = Obj.ClienteSucursal.Nombre
|
||||||
|
Else
|
||||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||||
|
End If
|
||||||
|
|
||||||
Timbre.Receptor.ResidenciaFiscal = ""
|
Timbre.Receptor.ResidenciaFiscal = ""
|
||||||
Timbre.Receptor.NumeroRegistroTributario = ""
|
Timbre.Receptor.NumeroRegistroTributario = ""
|
||||||
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
||||||
|
|
||||||
|
|
||||||
If HdnTipoDescuento.Value = "3" And DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero() > 0 Then
|
If HdnTipoDescuento.Value = "3" And DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero() > 0 Then
|
||||||
|
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "07"
|
Timbre.CFDIRelacionados.TipoRelacion = "07"
|
||||||
@@ -9367,8 +9459,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||||
Dim totIVA As Decimal = Obj.IVA
|
Dim totIVA As Decimal = Obj.IVA
|
||||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||||
@@ -9936,7 +10026,7 @@ Partial Class Ventas
|
|||||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero() > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero() > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero) Then
|
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal) Then
|
||||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Else
|
Else
|
||||||
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
|
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
|
||||||
@@ -15027,7 +15117,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
DdlVendedor.SelectedValue = "0"
|
DdlVendedor.SelectedValue = "0"
|
||||||
DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||||
|
|
||||||
|
DdlVendedorSucursal.DataSource = DdlVendedor.DataSource
|
||||||
|
|
||||||
DdlVendedor.DataBind()
|
DdlVendedor.DataBind()
|
||||||
|
DdlVendedorSucursal.DataBind()
|
||||||
|
|
||||||
DdlVendedor.SelectedValueExist(CveVendedorActual)
|
DdlVendedor.SelectedValueExist(CveVendedorActual)
|
||||||
|
|
||||||
@@ -16709,6 +16803,84 @@ Partial Class Ventas
|
|||||||
Protected Sub TxtFolio_TextChanged(sender As Object, e As System.EventArgs) Handles TxtFolio.TextChanged
|
Protected Sub TxtFolio_TextChanged(sender As Object, e As System.EventArgs) Handles TxtFolio.TextChanged
|
||||||
ViewState("EstablecioFolio") = True
|
ViewState("EstablecioFolio") = True
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub HabilitarFacturacionSucursal()
|
||||||
|
trsucursalciente.Visible = True
|
||||||
|
LnkAgregarSucursal.Visible = True
|
||||||
|
LblSucursal.Text = "Cliente"
|
||||||
|
If (CveVenta <= 0 OrElse NuevaFactura = 1) Then
|
||||||
|
DdlSucursalCliente.Enabled = True
|
||||||
|
End If
|
||||||
|
DdlSucursalCliente_SelectedIndexChanged(DdlSucursalCliente, EventArgs.Empty)
|
||||||
|
|
||||||
|
UpCliente.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ChkFacturarSucursal_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkAgregarSucursal_Click(sender As Object, e As EventArgs)
|
||||||
|
RegistraScript("showDivAgregarSucursal();")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarSucursal.Click
|
||||||
|
|
||||||
|
Dim LT As String = "0"
|
||||||
|
Dim LG As String = "0"
|
||||||
|
|
||||||
|
If CveCliente > 0 Then
|
||||||
|
Dim ObjCliente As New ClsClientes
|
||||||
|
Try
|
||||||
|
If ObjCliente.AddSucursal(CveCliente, TxtNombreSucursal.Text.Trim, UsuarioActual.CveUsuario, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim, TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", ""), TxtCorreoSucursal.Text.Trim, "", "",
|
||||||
|
DdlVendedorSucursal.SelectedValue.ToEntero, "", -1, 0, -1, DdlSucursalUsoCFDI.SelectedValue.ToEntero, -1, -1, LT:=LT, LG:=LG, RFC:=TxtRFCSucursal.Text.Trim()) Then
|
||||||
|
TxtNombreSucursal.Text = ""
|
||||||
|
TxtCiudadSucursal.Text = ""
|
||||||
|
TxtColoniaSucursal.Text = ""
|
||||||
|
TxtCPSucursal.Text = ""
|
||||||
|
TxtDireccionSucursal.Text = ""
|
||||||
|
TxtEstadoSucursal.Text = ""
|
||||||
|
TxtLocalidadSucursal.Text = ""
|
||||||
|
TxtPaisSucursal.Text = ""
|
||||||
|
TxtNumExtSucursal.Text = ""
|
||||||
|
TxtNumIntSucursal.Text = ""
|
||||||
|
TxtTelefonoSucursal.Text = ""
|
||||||
|
TxtCorreoSucursal.Text = ""
|
||||||
|
|
||||||
|
DdlVendedorSucursal.SelectedIndex = 0
|
||||||
|
DdlSucursalUsoCFDI.SelectedIndex = 0
|
||||||
|
|
||||||
|
|
||||||
|
Alert("La nueva Sucursal del Cliente se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
'VUELVE A CARGAR LAS SUCURSALES
|
||||||
|
DdlSucursalCliente.Items.Clear()
|
||||||
|
If ObjCliente.GetSucursales(CveCliente) Then
|
||||||
|
DdlSucursalCliente.DataSource = ObjCliente.DtResultados
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
trsucursalciente.Visible = True
|
||||||
|
Else
|
||||||
|
trsucursalciente.Visible = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
trsucursalciente.Visible = False
|
||||||
|
DdlSucursalCliente.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1"))
|
||||||
|
DdlSucursalCliente.DataBind()
|
||||||
|
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agregar la sucursal", ex)
|
||||||
|
End Try
|
||||||
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpCliente.Update()
|
||||||
|
RegistraScript("hideDivAgregarSucursal();")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub ConfiguraTipoDocto()
|
Private Sub ConfiguraTipoDocto()
|
||||||
|
|
||||||
'Esconde Todo
|
'Esconde Todo
|
||||||
@@ -17824,6 +17996,11 @@ Partial Class Ventas
|
|||||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||||
|
|
||||||
|
'SI SE FACTURO LA SUCURSAL DEL CLIENTE TOMA EL RFC DE ESTA
|
||||||
|
If FacturarSucursal AndAlso Me.ClienteSucursal IsNot Nothing Then
|
||||||
|
RFCReceptor = Me.ClienteSucursal.RFC
|
||||||
|
End If
|
||||||
|
|
||||||
Dim SWatch As New Stopwatch
|
Dim SWatch As New Stopwatch
|
||||||
SWatch.Start()
|
SWatch.Start()
|
||||||
|
|
||||||
@@ -20040,6 +20217,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||||
|
|
||||||
|
'SI SE FACTURO LA SUCURSAL DEL CLIENTE TOMA EL RFC DE ESTA
|
||||||
|
If FacturarSucursal AndAlso Me.ClienteSucursal IsNot Nothing Then
|
||||||
|
RFCReceptor = Me.ClienteSucursal.RFC
|
||||||
|
End If
|
||||||
|
|
||||||
Dim SWatch As New Stopwatch
|
Dim SWatch As New Stopwatch
|
||||||
SWatch.Start()
|
SWatch.Start()
|
||||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||||
@@ -25953,6 +26136,12 @@ Partial Class Ventas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
||||||
|
|
||||||
|
If (FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) Then
|
||||||
|
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
|
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
|
||||||
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
|
|||||||
Reference in New Issue
Block a user