Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1024,7 +1024,8 @@ 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", Optional RFC As String = "") 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 = "",
|
||||||
|
Optional CveAlmacenAsignado As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_SucursalClienteAdd")
|
DataAdapter("PA_Vta_SucursalClienteAdd")
|
||||||
@@ -1059,6 +1060,9 @@ Public Class ClsClientes
|
|||||||
.Add("@LG", SqlDbType.VarChar).Value = LG
|
.Add("@LG", SqlDbType.VarChar).Value = LG
|
||||||
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
||||||
|
|
||||||
|
.Add("@CveAlmacenAsignado", SqlDbType.Int).Value = CveAlmacenAsignado
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -1077,7 +1081,8 @@ 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", Optional RFC As String = "-1") 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",
|
||||||
|
Optional CveAlmacenAsignado As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_SucursalClienteUpdate")
|
DataAdapter("PA_Vta_SucursalClienteUpdate")
|
||||||
@@ -1115,6 +1120,8 @@ Public Class ClsClientes
|
|||||||
.Add("@LG", SqlDbType.VarChar).Value = LG
|
.Add("@LG", SqlDbType.VarChar).Value = LG
|
||||||
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
||||||
|
|
||||||
|
.Add("@CveAlmacenAsignado", SqlDbType.Int).Value = CveAlmacenAsignado
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -519,7 +519,7 @@
|
|||||||
<div class="row rowpadding">
|
<div class="row rowpadding">
|
||||||
<label class="col-md-3">Unidad:</label>
|
<label class="col-md-3">Unidad:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged"></asp:DropDownList>
|
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
@@ -529,7 +529,7 @@
|
|||||||
<label class="col-md-3">Configuración:</label>
|
<label class="col-md-3">Configuración:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
||||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="CveConfigAutoTransporte" Style="padding: 0px">
|
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="CveConfigAutoTransporte" Style="padding: 0px">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" Enabled="false" ControlToValidate="DdlConfigAuto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" Enabled="false" ControlToValidate="DdlConfigAuto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlConfigAuto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlConfigAuto" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCERfvDdlConfigAuto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlConfigAuto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -538,7 +538,7 @@
|
|||||||
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
|
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
|
||||||
<label class="col-md-3">Remolque 1:</label>
|
<label class="col-md-3">Remolque 1:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
|
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
|
||||||
|
|||||||
@@ -699,7 +699,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtFechaEntrega.Text = NowADS().ToShortDateString
|
TxtFechaEntrega.Text = NowADS().ToShortDateString
|
||||||
TxtFechaLlegada.Text = NowADS().ToShortDateString
|
TxtFechaLlegada.Text = NowADS().ToShortDateString
|
||||||
|
|
||||||
'CargarCamiones()
|
CargarCamiones()
|
||||||
DdlClienteCarta.setEsWebService(True)
|
DdlClienteCarta.setEsWebService(True)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -5895,20 +5895,17 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
|
|
||||||
Public Sub CargarCamiones()
|
Public Sub CargarCamiones()
|
||||||
|
|
||||||
DdlConfigAuto.Items.Clear()
|
|
||||||
DdlUnidadCamion.Items.Clear()
|
|
||||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||||
DdlRemolque1.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
|
||||||
DdlUnidadCamion.DataBind()
|
DdlUnidadCamion.DataBind()
|
||||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||||
|
|
||||||
|
DdlRemolque1.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||||
DdlRemolque1.DataBind()
|
DdlRemolque1.DataBind()
|
||||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||||
|
|
||||||
DdlConfigAuto.DataSource = GlobalDTGralCartaPorteConfigAutoTransportes
|
DdlConfigAuto.DataSource = GlobalDTGralCartaPorteConfigAutoTransportes
|
||||||
DdlConfigAuto.DataBind()
|
DdlConfigAuto.DataBind()
|
||||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub EmitirTimbrado(CveTimbre As Integer, TipoDocto As String, CveMovimientoTimbrado As Integer, ByRef MensajeAlert As StringBuilder)
|
Private Sub EmitirTimbrado(CveTimbre As Integer, TipoDocto As String, CveMovimientoTimbrado As Integer, ByRef MensajeAlert As StringBuilder)
|
||||||
|
|||||||
@@ -881,7 +881,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<asp:GridView ID="GVSucursales" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClienteSucursal,Correo,CorreoCotizacion" EmptyDataText="No se encontraron Sucursales Registradas" ToolTip="Listado de Sucursales del Cliente" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None">
|
<asp:GridView ID="GVSucursales" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveClienteSucursal,Correo,CorreoCotizacion,CveAlmacenAsignado"
|
||||||
|
EmptyDataText="No se encontraron Sucursales Registradas" ToolTip="Listado de Sucursales del Cliente" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="SucursalCliente" />
|
<asp:BoundField DataField="SucursalCliente" />
|
||||||
|
|
||||||
|
|||||||
@@ -661,6 +661,19 @@ Partial Class Clientes
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Property CveAlmacenAsignadoSucursal As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveAlmacenAsignadoSucursal") Is Nothing Then
|
||||||
|
ViewState("CveAlmacenAsignadoSucursal") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CveAlmacenAsignadoSucursal").ToString().ToEntero()
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveAlmacenAsignadoSucursal") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
@@ -1234,7 +1247,7 @@ Partial Class Clientes
|
|||||||
DdlPrecioLista.DataBind()
|
DdlPrecioLista.DataBind()
|
||||||
DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1"))
|
DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||||
|
|
||||||
If CveFuncionalidad404.Contiene(30) Then
|
If CveFuncionalidad404.Contiene(30) And DdlTipoCliente.SelectedValue.ToEntero = 1 Then
|
||||||
DivCrearPrecioLista.Visible = True
|
DivCrearPrecioLista.Visible = True
|
||||||
DdlPrecioListaClonar.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa)
|
DdlPrecioListaClonar.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa)
|
||||||
DdlPrecioListaClonar.DataBind()
|
DdlPrecioListaClonar.DataBind()
|
||||||
@@ -2523,7 +2536,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
If Not ErrorProceso Then
|
If Not ErrorProceso Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(404) = "30" AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DdlAlmacenAsignado.SelectedValue.ToEntero = -1 Then 'limpiar ddl alamcen temporal que se agrego temporalmente
|
If UsuarioActual.Empresa.Funcionalidad(404) = "30" AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DdlAlmacenAsignado.SelectedValue.ToEntero = -1 Then 'limpiar ddl alamcen temporal que se agrego temporalmente
|
||||||
If Not GeneraGuardaAlmacenCliente(ObjClientes.IniciaTransacSQL) Then
|
If Not GeneraGuardaAlmacenAsignado(TxtNombre.Text.Trim, ObjClientes.IniciaTransacSQL) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -2569,14 +2582,29 @@ Partial Class Clientes
|
|||||||
If Not ErrorProceso Then
|
If Not ErrorProceso Then
|
||||||
For Each Row As DataRow In TempDTSucursales.Rows
|
For Each Row As DataRow In TempDTSucursales.Rows
|
||||||
If Not CveCliente > 0 Then
|
If Not CveCliente > 0 Then
|
||||||
|
|
||||||
|
Dim CveAlmacenAsignadoSucursal As Integer = -1
|
||||||
|
If DdlTipoCliente.SelectedValue.ToEntero = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(404) = "30" AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
|
CveAlmacenAsignadoSucursal = GeneraGuardaAlmacenAsignadoSucursal(Row("SucursalCliente").ToString(), ObjClientes.IniciaTransacSQL())
|
||||||
|
If Not CveAlmacenAsignadoSucursal > 0 Then
|
||||||
|
ErrorProceso = True
|
||||||
|
Alert($"Se presento un erro al agregar el almacen de la sucursal {Row("SucursalCliente").ToString()}", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorProceso 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(),
|
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("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("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
|
Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago33").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString(), CveAlmacenAsignado:=CveAlmacenAsignadoSucursal) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2972,10 +3000,12 @@ Partial Class Clientes
|
|||||||
|
|
||||||
#Region "S U C U R S A L E S"
|
#Region "S U C U R S A L E S"
|
||||||
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
|
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
|
||||||
|
|
||||||
ChkEstatusSucursal.Checked = True
|
ChkEstatusSucursal.Checked = True
|
||||||
DivEstatusSucursal.Visible = False
|
DivEstatusSucursal.Visible = False
|
||||||
TxtNumeroCuenta.Text = ""
|
TxtNumeroCuenta.Text = ""
|
||||||
DdlMetodoPagoSucursal.SelectedIndex = 0
|
DdlMetodoPagoSucursal.SelectedIndex = 0
|
||||||
|
CveAlmacenAsignadoSucursal = -1
|
||||||
UpAgregarSucursal.Update()
|
UpAgregarSucursal.Update()
|
||||||
Me.CveClienteSuc = -1
|
Me.CveClienteSuc = -1
|
||||||
Me.Actualizar = False
|
Me.Actualizar = False
|
||||||
@@ -3009,36 +3039,45 @@ Partial Class Clientes
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarSucursal.Click
|
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarSucursal.Click
|
||||||
Dim ObjCliente As New ClsClientes
|
|
||||||
|
|
||||||
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)
|
Dim RFC As String = If(String.IsNullOrEmpty(TxtRFCSucursal.Text), "-1", TxtRFCSucursal.Text)
|
||||||
|
Dim CveAlmacenAgregadoSucursal As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
|
|
||||||
|
Dim ProcesoOK As Boolean = True
|
||||||
|
Dim ObjCliente As New ClsClientes
|
||||||
|
ObjCliente.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If CveAlmacenAsignadoSucursal <= 0 AndAlso DdlTipoCliente.SelectedValue.ToEntero = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(404) = "30" AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
|
CveAlmacenAgregadoSucursal = GeneraGuardaAlmacenAsignadoSucursal(TxtNombreSucursal.Text.Trim, ObjCliente.IniciaTransacSQL())
|
||||||
|
If Not CveAlmacenAgregadoSucursal > 0 Then
|
||||||
|
ProcesoOK = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ProcesoOK 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, RFC:=RFC) Then
|
DdlSucursalUsoCFDI.SelectedValue.ToEntero(), DdlSucursalFormaPago33.SelectedValue.ToEntero(), DdlSucursalMetodoPago33.SelectedValue.ToEntero(), LT:=LT, LG:=LG, RFC:=RFC, CveAlmacenAsignado:=CveAlmacenAgregadoSucursal) Then
|
||||||
GVSucursales.EditIndex = -1
|
GVSucursales.EditIndex = -1
|
||||||
ViewState("DTSucursalesCliente") = ObjCliente.DtResultados
|
ViewState("DTSucursalesCliente") = ObjCliente.DtResultados
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
ProcesoOK = False
|
||||||
End If
|
End If
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
|
||||||
CargaGrid(ViewState("Orden").ToString(), 0)
|
|
||||||
Else
|
|
||||||
CargaGrid("", 0)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
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, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim,
|
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, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim,
|
||||||
DdlVendedorSucursal.SelectedValue.ToEntero(), TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero(), TxtLimiteCreditoSucursal.Text.ToDecimal(), DdlResponsableSucursal.SelectedValue.ToEntero(),
|
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, RFC:=RFC) Then
|
DdlSucursalUsoCFDI.SelectedValue.ToEntero(), DdlSucursalFormaPago33.SelectedValue.ToEntero(), DdlSucursalMetodoPago33.SelectedValue.ToEntero(), LT:=LT, LG:=LG, RFC:=RFC, CveAlmacenAsignado:=CveAlmacenAgregadoSucursal) Then
|
||||||
TxtNombreSucursal.Text = ""
|
TxtNombreSucursal.Text = ""
|
||||||
TxtCiudadSucursal.Text = ""
|
TxtCiudadSucursal.Text = ""
|
||||||
TxtColoniaSucursal.Text = ""
|
TxtColoniaSucursal.Text = ""
|
||||||
@@ -3063,14 +3102,28 @@ Partial Class Clientes
|
|||||||
DdlSucursalMetodoPago33.SelectedIndex = 0
|
DdlSucursalMetodoPago33.SelectedIndex = 0
|
||||||
Alert("La nueva Sucursal del Cliente se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La nueva Sucursal del Cliente se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
ViewState("DTSucursalesCliente") = ObjCliente.DtResultados
|
ViewState("DTSucursalesCliente") = ObjCliente.DtResultados
|
||||||
|
Else
|
||||||
|
ProcesoOK = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If ProcesoOK Then
|
||||||
|
|
||||||
|
ObjCliente.Commit()
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString(), 0)
|
CargaGrid(ViewState("Orden").ToString(), 0)
|
||||||
Else
|
Else
|
||||||
CargaGrid("", 0)
|
CargaGrid("", 0)
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
ObjCliente.RollBack()
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
AddSucursalTemp()
|
AddSucursalTemp()
|
||||||
@@ -3080,11 +3133,9 @@ Partial Class Clientes
|
|||||||
txtLt.Text = ""
|
txtLt.Text = ""
|
||||||
|
|
||||||
UpModalDivMapa.Update()
|
UpModalDivMapa.Update()
|
||||||
|
|
||||||
|
|
||||||
UpAgregarSucursal.Update()
|
UpAgregarSucursal.Update()
|
||||||
|
|
||||||
CargaDdlSucursalCliente()
|
CargaDdlSucursalCliente()
|
||||||
ObjCliente.Dispose()
|
|
||||||
|
|
||||||
Me.Actualizar = False
|
Me.Actualizar = False
|
||||||
Me.CveClienteSuc = -1
|
Me.CveClienteSuc = -1
|
||||||
@@ -3116,7 +3167,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
|
|
||||||
If Not CveCliente > 0 Then
|
If Not CveCliente > 0 Then
|
||||||
e.Row.Cells(3).Visible = False
|
e.Row.Cells(1).Visible = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3163,7 +3214,7 @@ Partial Class Clientes
|
|||||||
Me.Actualizar = True
|
Me.Actualizar = True
|
||||||
'Me.DivRFCSucursal.Visible = False
|
'Me.DivRFCSucursal.Visible = False
|
||||||
Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString().ToEntero()
|
Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString().ToEntero()
|
||||||
|
CveAlmacenAsignadoSucursal = -1
|
||||||
|
|
||||||
Dim ObjCliente As New ClsClientes
|
Dim ObjCliente As New ClsClientes
|
||||||
|
|
||||||
@@ -3203,6 +3254,8 @@ Partial Class Clientes
|
|||||||
txtLt.Text = ObjCliente.DtResultados.Rows(0)("LT").ToString()
|
txtLt.Text = ObjCliente.DtResultados.Rows(0)("LT").ToString()
|
||||||
HDMAPOP.Value = "2"
|
HDMAPOP.Value = "2"
|
||||||
|
|
||||||
|
CveAlmacenAsignadoSucursal = ObjCliente.DtResultados.Rows(0)("CveAlmacenAsignado").ToString().ToEntero
|
||||||
|
|
||||||
|
|
||||||
UpAgregarSucursal.Update()
|
UpAgregarSucursal.Update()
|
||||||
UpModalDivMapa.Update()
|
UpModalDivMapa.Update()
|
||||||
@@ -5431,8 +5484,20 @@ Partial Class Clientes
|
|||||||
TempDTSucursales.Columns.Add("Usuario", Type.GetType("System.String"))
|
TempDTSucursales.Columns.Add("Usuario", Type.GetType("System.String"))
|
||||||
TempDTSucursales.Columns.Add("LT", Type.GetType("System.String"))
|
TempDTSucursales.Columns.Add("LT", Type.GetType("System.String"))
|
||||||
TempDTSucursales.Columns.Add("LG", Type.GetType("System.String"))
|
TempDTSucursales.Columns.Add("LG", Type.GetType("System.String"))
|
||||||
|
TempDTSucursales.Columns.Add("CveAlmacenAsignado", Type.GetType("System.Int32"))
|
||||||
|
TempDTSucursales.Columns.Add("CveUsoCFDI", Type.GetType("System.Int32"))
|
||||||
|
TempDTSucursales.Columns.Add("CveFormaPago33", Type.GetType("System.Int32"))
|
||||||
|
TempDTSucursales.Columns.Add("CveMetodoPago33", Type.GetType("System.Int32"))
|
||||||
|
TempDTSucursales.Columns.Add("Correo", Type.GetType("System.String"))
|
||||||
|
TempDTSucursales.Columns.Add("CorreoCotizacion", Type.GetType("System.String"))
|
||||||
|
TempDTSucursales.Columns.Add("LimiteCredito", Type.GetType("System.Decimal"))
|
||||||
|
TempDTSucursales.Columns.Add("CveResponsableCobranza", Type.GetType("System.Int32"))
|
||||||
|
|
||||||
TempDTSucursales.Columns.Add()
|
TempDTSucursales.Columns.Add()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -5460,10 +5525,15 @@ Partial Class Clientes
|
|||||||
RowSucursal("FechaIng") = NowADS().ToShortDateString()
|
RowSucursal("FechaIng") = NowADS().ToShortDateString()
|
||||||
RowSucursal("Usuario") = UsuarioActual.Usuario
|
RowSucursal("Usuario") = UsuarioActual.Usuario
|
||||||
|
|
||||||
|
|
||||||
RowSucursal("CveUsoCFDI") = DdlSucursalUsoCFDI.SelectedValue.ToEntero()
|
RowSucursal("CveUsoCFDI") = DdlSucursalUsoCFDI.SelectedValue.ToEntero()
|
||||||
RowSucursal("CveFormaPago33") = DdlSucursalFormaPago33.SelectedValue.ToEntero()
|
RowSucursal("CveFormaPago33") = DdlSucursalFormaPago33.SelectedValue.ToEntero()
|
||||||
RowSucursal("CveMetodoPago33") = DdlSucursalMetodoPago33.SelectedValue.ToEntero()
|
RowSucursal("CveMetodoPago33") = DdlSucursalMetodoPago33.SelectedValue.ToEntero()
|
||||||
|
|
||||||
|
RowSucursal("LimiteCredito") = TxtLimiteCreditoSucursal.Text.ToDecimal
|
||||||
|
RowSucursal("CveResponsableCobranza") = DdlResponsableSucursal.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
|
||||||
RowSucursal("LT") = If(txtLt.Text.ToDouble <> 0, txtLt.Text, "0")
|
RowSucursal("LT") = If(txtLt.Text.ToDouble <> 0, txtLt.Text, "0")
|
||||||
RowSucursal("LG") = If(txtLg.Text.ToDouble <> 0, txtLg.Text, "0")
|
RowSucursal("LG") = If(txtLg.Text.ToDouble <> 0, txtLg.Text, "0")
|
||||||
|
|
||||||
@@ -9738,6 +9808,14 @@ Partial Class Clientes
|
|||||||
Protected Sub DdlTipoCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
TabSistema.Enabled = DdlTipoCliente.SelectedValue = "1"
|
TabSistema.Enabled = DdlTipoCliente.SelectedValue = "1"
|
||||||
|
|
||||||
|
Dim CveFuncionalidad404 As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||||
|
If CveFuncionalidad404.Contiene(30) And DdlTipoCliente.SelectedValue.ToEntero = 1 Then
|
||||||
|
DivCrearPrecioLista.Visible = True
|
||||||
|
Else
|
||||||
|
DivCrearPrecioLista.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -9868,6 +9946,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Public Property Token As String = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDdmVQbGF0YWZvcm1hIjoiMSIsIkN2ZVVzdWFyaW8iOiIxNTM4IiwiQ3ZlRW1wcmVzYSI6IjIiLCJDdmVSb2wiOiIxIiwiRmVjaGEiOiJzw6FiYWRvLCAyMCBkZSBtYXJ6byBkZSAyMDIxIiwibmJmIjoxNjE2MjYzMzg2LCJleHAiOjE2MTYyNzQxODYsImlhdCI6MTYxNjI2MzM4Nn0.N_4yHZ0J41GgcXbAFfvyLvXiV-U8nRm85LoZhG1riNc"
|
Public Property Token As String = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDdmVQbGF0YWZvcm1hIjoiMSIsIkN2ZVVzdWFyaW8iOiIxNTM4IiwiQ3ZlRW1wcmVzYSI6IjIiLCJDdmVSb2wiOiIxIiwiRmVjaGEiOiJzw6FiYWRvLCAyMCBkZSBtYXJ6byBkZSAyMDIxIiwibmJmIjoxNjE2MjYzMzg2LCJleHAiOjE2MTYyNzQxODYsImlhdCI6MTYxNjI2MzM4Nn0.N_4yHZ0J41GgcXbAFfvyLvXiV-U8nRm85LoZhG1riNc"
|
||||||
|
|
||||||
|
|
||||||
Public Class MResult
|
Public Class MResult
|
||||||
Public Property isSuccess As Boolean
|
Public Property isSuccess As Boolean
|
||||||
Public Property message As String
|
Public Property message As String
|
||||||
@@ -10421,12 +10500,12 @@ Partial Class Clientes
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function GeneraGuardaAlmacenCliente(ByRef transaccionSQL As SqlTransaction) As Boolean
|
Private Function GeneraGuardaAlmacenAsignado(NombreAlmacen As String, ByRef transaccionSQL As SqlTransaction) As Boolean
|
||||||
|
|
||||||
Dim respuesta As Boolean = True
|
Dim respuesta As Boolean = True
|
||||||
Dim ObjInv As New ClsInventarios(transaccionSQL)
|
Dim ObjInv As New ClsInventarios(transaccionSQL)
|
||||||
|
|
||||||
If ObjInv.AddAlmacen(TxtNombre.Text.Trim, 1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, DdlSubProyecto.SelectedValue.ToEntero) Then
|
If ObjInv.AddAlmacen(NombreAlmacen, 1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, DdlSubProyecto.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
DdlAlmacenAsignado.Items.Add(New ListItem(TxtNombre.Text.Trim, ObjInv.CveAlmacenAgregado.ToString))
|
DdlAlmacenAsignado.Items.Add(New ListItem(TxtNombre.Text.Trim, ObjInv.CveAlmacenAgregado.ToString))
|
||||||
DdlAlmacenAsignado.SelectedValueExist(ObjInv.CveAlmacenAgregado.ToString)
|
DdlAlmacenAsignado.SelectedValueExist(ObjInv.CveAlmacenAgregado.ToString)
|
||||||
@@ -10441,5 +10520,20 @@ Partial Class Clientes
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function GeneraGuardaAlmacenAsignadoSucursal(NombreAlmacen As String, ByRef transaccionSQL As SqlTransaction) As Integer
|
||||||
|
|
||||||
|
Dim CveAlmacenAgregado As Integer = -1
|
||||||
|
Dim ObjInv As New ClsInventarios(transaccionSQL)
|
||||||
|
|
||||||
|
If ObjInv.AddAlmacen(NombreAlmacen, 1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, DdlSubProyecto.SelectedValue.ToEntero) Then
|
||||||
|
CveAlmacenAgregado = ObjInv.CveAlmacenAgregado
|
||||||
|
GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return CveAlmacenAgregado
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3386,9 +3386,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If CveVenta <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso Request("VM") IsNot Nothing AndAlso IsNumeric(Request("VM")) AndAlso Request("VM").ToEntero() = 1 Then
|
If CveVenta <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
EsVentaMedica = True
|
EsVentaMedica = True
|
||||||
CargaTiposVenta()
|
CargaTiposVenta()
|
||||||
|
|
||||||
|
If CveCliente > 0 Then
|
||||||
|
DdlClientesWS.txtValue.Value = CveCliente.ToString
|
||||||
|
DdlClientesWS.txtText.Value = LblCliente.Text
|
||||||
|
DdlClientesWS.SelectedValue = CveCliente.ToString
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -24722,7 +24728,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Not dt.Columns(8).ColumnName = "Tiempo Entrega" Then
|
If Not dt.Columns(8).ColumnName = "Tiempo Entrega" Then
|
||||||
Alert("El nombre de la octava columna debe ser 'Tiempo Entrega'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la novena columna debe ser 'Tiempo Entrega'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -24767,6 +24773,11 @@ Partial Class Ventas
|
|||||||
CveSubProyecto = -1
|
CveSubProyecto = -1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CveSubProyecto <= 0 Then
|
||||||
|
RowNoEncontrados = String.Format("{3} - No se encontró '{0}' en la fila {1}, columna '{2}'<\BR>(NoBD)", Proyecto, NumRow, "Proyecto", RowNoEncontrados)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveSubProyecto > 0 Then
|
||||||
If Codigo <> "" Then
|
If Codigo <> "" Then
|
||||||
|
|
||||||
Using ObjPS As New ClsProductosServicios
|
Using ObjPS As New ClsProductosServicios
|
||||||
@@ -24776,10 +24787,10 @@ Partial Class Ventas
|
|||||||
CveUM = ObjPS.CveUnidadMedida
|
CveUM = ObjPS.CveUnidadMedida
|
||||||
CveClasificacion = ObjPS.CveClasificacion
|
CveClasificacion = ObjPS.CveClasificacion
|
||||||
Else
|
Else
|
||||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
RowNoEncontrados = String.Format("{3} - No se encontró '{0}' en la fila {1}, columna '{2}'<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
RowNoEncontrados = String.Format("{3} - No se encontró '{0}' en la fila {1}, columna '{2}'<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
@@ -24792,10 +24803,10 @@ Partial Class Ventas
|
|||||||
CveUM = ObjPS.CveUnidadMedida
|
CveUM = ObjPS.CveUnidadMedida
|
||||||
CveClasificacion = ObjPS.CveClasificacion
|
CveClasificacion = ObjPS.CveClasificacion
|
||||||
Else
|
Else
|
||||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
RowNoEncontrados = String.Format("{3} - No se encontró '{0}' en la fila {1}, columna '{2}'<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
RowNoEncontrados = String.Format("{3} - No se encontró '{0}' en la fila {1}, columna '{2}'<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
@@ -24808,15 +24819,17 @@ Partial Class Ventas
|
|||||||
CveUM = ObjPS.CveUnidadMedida
|
CveUM = ObjPS.CveUnidadMedida
|
||||||
CveClasificacion = ObjPS.CveClasificacion
|
CveClasificacion = ObjPS.CveClasificacion
|
||||||
Else
|
Else
|
||||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
RowNoEncontrados = String.Format("{3} - No se encontró '{0}' en la fila {1}, columna '{2}'<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
RowNoEncontrados = String.Format("{3} - No se encontró '{0}' en la fila {1}, columna '{2}'<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
Else
|
Else
|
||||||
RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If CvePS > 0 Then
|
If CvePS > 0 Then
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user