Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -207,7 +207,7 @@ Partial Class CatPS
|
||||
If ObjPS.DtResultados.Rows.Count > 0 Then
|
||||
GvProductos.DataSource = ObjPS.DtResultados
|
||||
GvProductos.DataBind()
|
||||
GvProductos.ExportToExcelx("Reporte de Producto")
|
||||
GvProductos.ExportToExcelX("Reporte de Producto")
|
||||
Else
|
||||
Alert("Todos los productos tienen Asignada Clave Producto Servicio SAT.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
@@ -43,7 +43,7 @@ public partial class Ventas_ClasificacionesDetalle : ClsPaginas
|
||||
ClsVentas ObjVentas = new ClsVentas();
|
||||
if (ObjVentas.GetClasificacionDetalle(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
GvDatos.DataBind();
|
||||
@@ -74,7 +74,7 @@ public partial class Ventas_ClasificacionesDetalle : ClsPaginas
|
||||
|
||||
if (Convert.ToBoolean(e.Row.DBCampo("Estatus")) == true)
|
||||
{
|
||||
e.Row.Cells[3].Text = "Activo";
|
||||
e.Row.Cells[3].Text = "Activo";
|
||||
e.Row.Cells[3].ForeColor = System.Drawing.Color.Green;
|
||||
}
|
||||
else
|
||||
@@ -87,7 +87,7 @@ public partial class Ventas_ClasificacionesDetalle : ClsPaginas
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
ClsVentas ObjVenta = new ClsVentas();
|
||||
bool Continuar = ObjVenta.RemoveClasificacionDetalle(gvRow.DataKey("CveClasificacionDetalle").ToEntero());
|
||||
ObjVenta.Dispose();
|
||||
@@ -97,7 +97,7 @@ public partial class Ventas_ClasificacionesDetalle : ClsPaginas
|
||||
CargaDatos();
|
||||
Alert("La Clasificacion Detalle se ha eliminado");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -668,17 +668,34 @@
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Giro:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-4" id="Div1" runat="server">
|
||||
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control select2me" Width="200px" DataTextField="Vendedor" DataValueField="CveVendedor"></asp:DropDownList>
|
||||
<asp:LinkButton ID="LnkAgregarVendedorSucursal" Visible="false" runat="server" data-toggle="tooltip" data-placement="right" title="Agregar vendedor por sucursal." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar por Sucursal"></asp:LinkButton>
|
||||
<label for="<%= DdlVendedor.ClientID.ToString()%>">Vendedor:</label>
|
||||
<div class="col-md-6">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:90%">
|
||||
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">
|
||||
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="Vendedor" DataValueField="CveVendedor"></asp:DropDownList>
|
||||
<asp:LinkButton ID="LnkAgregarVendedorSucursal" Visible="false" runat="server" data-toggle="tooltip" data-placement="right" title="Agregar vendedor por sucursal." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar por Sucursal"></asp:LinkButton>
|
||||
<label for="<%= DdlVendedor.ClientID.ToString()%>">Vendedor:</label>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:10%">
|
||||
<div class="form-group form-md-line-input input-iconright" id="DVLnkCambiarVendedor" runat="server" visible="false">
|
||||
<asp:LinkButton runat="server" ID="LnkCambiarVendedor" CssClass="btn btn-default btn-circle btn-xs" Text="<i class='fa fa-check' style='color:green'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Actualizar Vendedor?" data-btn-ok-label="si"
|
||||
OnClick="LnkCambiarVendedor_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-2" id="DVLnkCambiarVendedor" runat="server" visible="false">
|
||||
<asp:LinkButton runat="server" ID="LnkCambiarVendedor" CssClass="Texto" Text="Actualziar" OnClick="LnkCambiarVendedor_Click">Actualziar</asp:LinkButton>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="Div2" runat="server">
|
||||
@@ -1102,10 +1119,8 @@
|
||||
|
||||
<div class="caption font-blue">
|
||||
<i class="icon-pin font-blue"></i>
|
||||
<span class="caption-subject bold uppercase">CFDI Versión 3.3</span>
|
||||
<span class="caption-subject bold uppercase">CFDI Versión</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlUsoCFDI" CssClass="form-control select2me" runat="server" Width="250" AppendDataBoundItems="true" CausesValidation="true" DataTextField="UsoCFDIDescripcion" DataValueField="CveUsoCFDI" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
|
||||
@@ -875,7 +875,7 @@ Partial Class Clientes
|
||||
End If
|
||||
'CargaCuentasyConceptos()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.TienePermisoProceso(353) Then
|
||||
DVLnkCambiarVendedor.Visible = True
|
||||
End If
|
||||
|
||||
@@ -6505,11 +6505,12 @@ Partial Class Clientes
|
||||
End Sub
|
||||
|
||||
Public Sub CargaGlobal()
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuariosEmpresas(-1) Then
|
||||
Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim ObjUsuarios As New ClsSisUsuarios
|
||||
'If ObjUsuarios.GetUsuariosEmpresas(-1) Then
|
||||
' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
|
||||
'End If
|
||||
'ObjUsuarios.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvUsuarios_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuarios.RowDataBound
|
||||
|
||||
@@ -684,6 +684,9 @@
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaFormato" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -296,7 +296,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83, 158) Then
|
||||
LnkAccionesModalSeleccionLayout.Visible = True
|
||||
|
||||
End If
|
||||
@@ -864,15 +864,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
'inserto los movimientos de la conta para abonar al saldo
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
Dim PorcentajePago As Decimal = 100
|
||||
Dim CvePlantillaPoliza As Integer = 11
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim idCuentaContabilizacion As Long = 1
|
||||
Dim CveCuentaContabilizacion As Long = 1
|
||||
Dim dtConceptos As DataTable = Nothing
|
||||
Dim tipoCambioVenta As Decimal
|
||||
Dim tipoCambioPago As Decimal
|
||||
Dim tipoCambioVentaValuacion As Decimal = 1
|
||||
Dim TipoCambioGeneral As Decimal = 1
|
||||
Dim CveSubProyectoContabilizar As Integer = -1
|
||||
Dim CveSubProyectoMaximo As Integer = -1
|
||||
@@ -886,6 +883,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Dim ImportePrestamo As Decimal = 0
|
||||
Dim TCPrestamo As Decimal = 0
|
||||
|
||||
If TxtPrestamoImporte.Text.ToDecimal <> 0 Then 'amortización del préstamo
|
||||
ImportePrestamo = TxtPrestamoImporte.Text.ToDecimal
|
||||
Dim tCveProv As Integer = DtPrestamos.FiltroPrimeroValor("CveProveedor", "CveIE=" & DdlPrestamo.SelectedValue)
|
||||
@@ -912,14 +910,14 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
If TxtPrestamoIntereses.Text.ToDecimal <> 0 AndAlso MsgError = "" Then
|
||||
tipoCambioPago = If(TxtTCDolares.Visible, TxtTCDolares.Text.ToDecimal, TxtTCDolaresDolares.Text.ToDecimal)
|
||||
Dim ImporteIntereses As Decimal = (TxtPrestamoIntereses.Text.ToDecimal * tipoCambioPago).RoundSQL
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteIntereses, ImporteIntereses, 51, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=11881, TipoCambio:=tipoCambioPago, CveClasificacion:=21927) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If TxtPrestamoIntereses.Text.ToDecimal <> 0 AndAlso MsgError = "" Then
|
||||
tipoCambioPago = If(TxtTCDolares.Visible, TxtTCDolares.Text.ToDecimal, TxtTCDolaresDolares.Text.ToDecimal)
|
||||
Dim ImporteIntereses As Decimal = (TxtPrestamoIntereses.Text.ToDecimal * tipoCambioPago).RoundSQL
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteIntereses, ImporteIntereses, 51, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=11881, TipoCambio:=tipoCambioPago, CveClasificacion:=21927) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
|
||||
'inserto las ventas que voy a pagar
|
||||
@@ -977,26 +975,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
||||
tipoCambioPago = 1
|
||||
tipoCambioVenta = 1
|
||||
PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
||||
tipoCambioPago = TxtTC.Text.ToDecimal
|
||||
tipoCambioVenta = gvr.DataKey("TipoCambio").ToDecimal
|
||||
tipoCambioVentaValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
PorcentajePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||
tipoCambioPago = If(CveMonedaFiltro = -1, TxtTCDolares.Text.ToDecimal, TxtTCDolaresDolares.Text.ToDecimal)
|
||||
tipoCambioVenta = gvr.DataKey("TipoCambio").ToDecimal
|
||||
tipoCambioVentaValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
tipoCambioVenta = 1
|
||||
PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
||||
End If
|
||||
|
||||
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then
|
||||
EsAnticipoEspecial = True
|
||||
Pago.AplicaTraslado = False
|
||||
@@ -1109,7 +1087,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo
|
||||
FluctuacionAnticipo = ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago)
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago)
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero > 0 Then
|
||||
@@ -1130,12 +1108,13 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo
|
||||
FluctuacionAnticipo += ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort2").Text.ToDecimal).RoundSQL
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago)
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago)
|
||||
End If
|
||||
|
||||
If ImportePrestamo <> 0 Then
|
||||
If TCPrestamo > 0 Then
|
||||
FluctuacionAnticipo += ((TCPrestamo - tipoCambioPago) * ImportePrestamo).RoundSQL
|
||||
ImportePrestamo = 0
|
||||
End If
|
||||
End If
|
||||
Pago.ImporteFluctuacionAdicional = FluctuacionAnticipo
|
||||
@@ -1216,8 +1195,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
||||
@@ -1386,13 +1363,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
StrMsg.AppendFormat("Nota de crédito generada correctamente.<br/><br/> Folio: <a href='/Ventas/Ventas.aspx?CveVenta={0}' target='_blank' class='Texto'>{1}</a><br/>", RespuestaNotaCredito.Respuesta.CveVenta, RespuestaNotaCredito.Respuesta.SerieFolio)
|
||||
End If
|
||||
Next
|
||||
|
||||
Alert($"{StrMsg.ToString}<br/><br/>{TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx"""))
|
||||
|
||||
Else
|
||||
If ObjConta IsNot Nothing Then ObjConta.RollBack()
|
||||
ObjIE.RollBack()
|
||||
' Alert(MsgError, TipoMensaje.MsgAdvertencia)
|
||||
Alert(MsgError, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjIE.Dispose()
|
||||
@@ -1409,7 +1385,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function RegistraAmortizacionAnticipo(ByRef ObjMov As ClsContabilidad, CvePrePoliza As Integer, CveIE As Integer, Importe As Decimal, tipoCambioPago As Decimal, tipoCambioVenta As Decimal, CveVenta As Integer, ReferenciaVenta As String, ReferenciaPago As String) As String
|
||||
Private Function RegistraAmortizacionAnticipo(ByRef ObjMov As ClsContabilidad, CvePrePoliza As Integer, CveIE As Integer, Importe As Decimal, tipoCambioPago As Decimal, CveVenta As Integer, ReferenciaVenta As String, ReferenciaPago As String) As String
|
||||
Dim MsgError As String = ""
|
||||
If CveMonedaPago = 2 Then
|
||||
|
||||
@@ -2756,7 +2732,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkLiquidacion_CheckedChanged(sender As Object, e As EventArgs)
|
||||
ActivaDesactivaLiquidacion()
|
||||
End Sub
|
||||
|
||||
Private Sub ActivaDesactivaLiquidacion()
|
||||
|
||||
If ChkLiquidacion.Checked Then
|
||||
TimTiempo.Enabled = True 'para que no me saque
|
||||
@@ -2811,7 +2790,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
|
||||
UPVentas.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -2833,31 +2811,36 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim CountRegistros As Integer = 0
|
||||
Dim TotalSeleccion As Decimal = 0D
|
||||
|
||||
Dim SBNoEncotradosEnLista As New StringBuilder
|
||||
Dim SBPagoMAyorASaldo As New StringBuilder
|
||||
Dim SBNoEncontradosEnLista As New StringBuilder
|
||||
Dim SBPagoMayorASaldo As New StringBuilder
|
||||
|
||||
If TxtModalLayoutExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtModalLayoutExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = Server.MapPath("~") & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
|
||||
Dim DT As New DataTable
|
||||
Dim DTExcel As New DataTable
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel = False
|
||||
|
||||
DT = ReadExcelFile(Directorio + file.filename, True)
|
||||
DTExcel = ReadExcelFile(Directorio + file.filename, True)
|
||||
|
||||
If Not DT.Columns(0).ColumnName.ToUpper = "FOLIO" Then
|
||||
If Not DTExcel.Columns(0).ColumnName.ToUpper = "FOLIO" Then
|
||||
Alert("El nombre de la primera columna debe ser 'Folio'. Favor de corregirlo", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not DT.Columns(1).ColumnName.ToUpper = "IMPORTE PAGO" Then
|
||||
Alert("El nombre de la segunda columna debe ser 'Importe Pago'.Favor de corregirlo." & DT.Columns(1).ColumnName, TipoMensaje.MsgAdvertencia)
|
||||
If Not DTExcel.Columns(1).ColumnName.ToUpper = "IMPORTE PAGO" Then
|
||||
Alert("El nombre de la segunda columna debe ser 'Importe Pago'.Favor de corregirlo." & DTExcel.Columns(1).ColumnName, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
For Each Drow As DataRow In DT.Rows
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
ChkLiquidacion.Checked = True
|
||||
ActivaDesactivaLiquidacion()
|
||||
End If
|
||||
|
||||
For Each Drow As DataRow In DTExcel.Rows
|
||||
|
||||
Dim SerieFolioBusqueda As String = Drow("Folio").ToString.Trim.ToUpper
|
||||
Dim ImportePago As Decimal = Drow("Importe Pago").ToString.ToDecimal.RoundSQL(2)
|
||||
@@ -2878,7 +2861,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
If Diferencia < 0 Then
|
||||
|
||||
If Math.Abs(Diferencia) > 0.01 Then
|
||||
SBPagoMAyorASaldo.AppendLine($"Factura: {SerieFolioBusqueda} Importe de pago {ImportePago.ToString("###,###,###.00")} es mayor al saldo {SaldoGV.ToString("###,###,###.00")} <br/>")
|
||||
SBPagoMayorASaldo.AppendLine($"Factura: {SerieFolioBusqueda} Importe de pago {ImportePago.ToString("###,###,###.00")} es mayor al saldo {SaldoGV.ToString("###,###,###.00")} <br/>")
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
Else
|
||||
@@ -2889,6 +2872,26 @@ Partial Class Ventas_ClientesAbonar
|
||||
GvRow.FCCheckBox("Chk").Checked = True
|
||||
GvRow.FCTextBox("TxtAbonar").Text = ImportePago.ToString("###,###,###.00")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
|
||||
GvRow.FCDropDownList("DdlTG").SelectedTextExist(Drow("Tipo").ToString)
|
||||
GvRow.FCTextBox("TxtLiqCol1").Text = Drow("Comisión").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol2").Text = Drow("Gastos").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol3").Text = Drow("Inspeccion").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol4").Text = Drow("Seguro").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol5").Text = Drow("AduanaMex").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol6").Text = Drow("Diversos").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol7").Text = Drow("AduanaUSA").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol8").Text = Drow("MaterialEmpaque").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol9").Text = Drow("Semilla").ToString
|
||||
|
||||
GvRow.FCDropDownList("DdlAnti").SelectedTextLikeIfExist(Drow("FolioAnticipo1").ToString)
|
||||
GvRow.FCTextBox("TxtAmort").Text = Drow("ImporteAnticipo1").ToString
|
||||
GvRow.FCDropDownList("DdlAnti2").SelectedTextLikeIfExist(Drow("FolioAnticipo2").ToString)
|
||||
GvRow.FCTextBox("TxtAmort2").Text = Drow("ImporteAnticipo2").ToString
|
||||
|
||||
End If
|
||||
|
||||
TotalSeleccion = TotalSeleccion + ImportePago
|
||||
CountRegistros = CountRegistros + 1
|
||||
|
||||
@@ -2897,7 +2900,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Next
|
||||
|
||||
If Not SerieFolioEncontrado Then
|
||||
SBNoEncotradosEnLista.AppendLine($"{SerieFolioBusqueda}<br>")
|
||||
SBNoEncontradosEnLista.AppendLine($"{SerieFolioBusqueda}<br>")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -2908,7 +2911,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
Alert($"Facturas seleccionadas: {CountRegistros} <br/>{SBNoEncotradosEnLista.ToString}")
|
||||
Alert($"Facturas seleccionadas: {CountRegistros} <br/>{SBNoEncontradosEnLista.ToString}")
|
||||
RegistraScript("$('#ModalSeleccionLayout').modal('hide');")
|
||||
TxtImporte.Text = TotalSeleccion.ToString("###,###,###.00")
|
||||
|
||||
@@ -2925,13 +2928,26 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
End Sub
|
||||
|
||||
'Public Sub SelectedTextLikeIfExist(ByRef Rbl As RadioButtonList, Value As String)
|
||||
' Try
|
||||
|
||||
' For Each item As ListItem In Rbl.Items
|
||||
' If item.Value.Contains(Value) Then
|
||||
' item.Selected = True
|
||||
' End If
|
||||
' Next
|
||||
' Catch ex As Exception
|
||||
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
Protected Sub LnkDescargaFormato_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Directorio As String = ""
|
||||
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\LayoutSeleccion.xlsx"
|
||||
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\LayoutPagoCliente.xlsx"
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\LayoutPagoClienteLiquidacion.xlsx"
|
||||
End If
|
||||
|
||||
If Not (Directorio = "") Then
|
||||
|
||||
|
||||
@@ -360,12 +360,10 @@ Partial Class ProductosyServicios
|
||||
|
||||
CargaCombosSeccionAlmacen()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then 'emisión 4.0
|
||||
DivObjetoImpuesto.Visible = True
|
||||
DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos
|
||||
DdlObjetoImpuesto.DataBind()
|
||||
DdlObjetoImpuesto.SelectedValue = "2" 'se sugiere este valor, que sería el más utilizado
|
||||
End If
|
||||
DivObjetoImpuesto.Visible = True
|
||||
DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos
|
||||
DdlObjetoImpuesto.DataBind()
|
||||
DdlObjetoImpuesto.SelectedValue = "2" 'se sugiere este valor, que sería el más utilizado
|
||||
|
||||
CreaDtSeccionAlmacen()
|
||||
|
||||
|
||||
@@ -372,6 +372,6 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas
|
||||
else if (Convert.ToBoolean(gvRow.DataKey("TieneCategoriaValida")) && gvRow.DataKey("Comision").ToDouble() == 0)
|
||||
{
|
||||
LblInfo.Text = $"El producto se encuentra en la categoria: <b>{get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria", $"CveCategoria = {gvRow.DataKey("CveCategoria").ToString()}")}</b> que da comision, pero no se encuentra dentro de los rangos de precio publico y dias validos. <br/> % Precio Publico: <b>{gvRow.DataKey("PorcentajePrecioPublico").ToString()}</b> <br/> Dias Pago: <b>{gvRow.DataKey("DiasPago").ToString()}</b>";
|
||||
}
|
||||
}
|
||||
else if (gvRow.DataKey("Comision").ToDouble() > 0)
|
||||
{
|
||||
@@ -314,13 +314,13 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
GridView gvTemp = GvLineasAdicionales;
|
||||
gvTemp.ExportToExcelX("RepLineasAdicionales" + DateTime.Now.ToShortDateString());
|
||||
}
|
||||
else if(TipoLinea == 2)
|
||||
else if(TipoLinea == 2)
|
||||
{
|
||||
GridView gvTemp = GvLAPO;
|
||||
gvTemp.Columns[8].Visible = false;
|
||||
|
||||
Reference in New Issue
Block a user