This commit is contained in:
2025-04-10 07:22:46 -07:00
15 changed files with 360 additions and 63 deletions

View File

@@ -528,6 +528,25 @@ Public Class ClsClientes
Return Retorno
End Function
Public Function GetClienteInformacionCompleta(CveCliente As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesInformacionCompletaGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener la información completa.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function AddCliente(Nombre As String, NombreComercial As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String, Pais As String, RFC As String, CP As String, Telefono As String,
Contacto As String, Mail As String, MailCotizacion As String, Notificar As String, Pagina As String, Giro As String, CvePrecioLista As Integer, EnviarFactura As Boolean, RetIVA As Double, RetISR As Double,
@@ -544,7 +563,7 @@ Public Class ClsClientes
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False, Optional CveSubProyectoCobranza As Integer = -1) As Boolean
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False, Optional CveSubProyectoCobranza As Integer = -1, Optional InformacionCompleta As Boolean = True) As Boolean
Dim Retorno As Boolean = False
@@ -683,6 +702,7 @@ Public Class ClsClientes
.Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial
.Add("@Aseguradora", SqlDbType.Bit).Value = Aseguradora
.Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza
.Add("@InformacionCompleta", SqlDbType.Bit).Value = InformacionCompleta
End With
Try
SqlAdapter.Fill(Data)
@@ -729,7 +749,7 @@ Public Class ClsClientes
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False, Optional CveSubProyectoCobranza As Integer = -1) As Boolean
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False, Optional CveSubProyectoCobranza As Integer = -1, Optional InformacionCompleta As Boolean = True) As Boolean
Dim Retorno As Boolean = False
@@ -878,6 +898,7 @@ Public Class ClsClientes
.Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial
.Add("@Aseguradora", SqlDbType.Bit).Value = Aseguradora
.Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza
.Add("@InformacionCompleta", SqlDbType.Bit).Value = InformacionCompleta
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -151,12 +151,15 @@
<label style="">Cuenta:</label>
</div>
<div class="col-md-2" runat="server">
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%" AutoPostBack ="true" OnSelectedIndexChanged="DdlCuentaDeposito_SelectedIndexChanged"></asp:DropDownList>
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlCuentaDeposito_SelectedIndexChanged"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" InitialValue="-1" CssClass="help-block errorimput" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida">
</asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCRfvDdlCuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuentaDeposito" Width="350px"></ajax:ValidatorCalloutExtender>
<div id="divtcdeposito" runat="server" visible="False">TC: <asp:TextBox ID="TxtTCDeposito" Width="60px" runat="server"></asp:TextBox></div>
<div id="divtcdeposito" runat="server" visible="False">
TC:
<asp:TextBox ID="TxtTCDeposito" Width="60px" runat="server"></asp:TextBox>
</div>
</div>
<div class="col-md-1">
@@ -403,6 +406,12 @@
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sob/Fal" ItemStyle-Width="20px">
<ItemTemplate>
<asp:Literal ID="LtlSobranteFaltante" runat="server" ClientIDMode="Static" Text='<%# Eval("SobranteFaltante", "{0:N2}")%>'></asp:Literal>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Literal ID="LtImporte" runat="server" ClientIDMode="Static" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Literal>

View File

@@ -1217,7 +1217,8 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>CAMELIA 619 LIBERTAD HERMOSILLO</Value>
<Value>CAMELIA No.Ext: 619, Col: Libertad,
CP: 83130, Hermosillo,Sonora, México</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -1230,7 +1231,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>HERMOSILLO SONORA CP 83130 MEXICO</Value>
<Value />
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -1277,18 +1278,13 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Expedido en Sucursal: 2</Value>
<Value>Expedido en Sucursal: </Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Sucursal.Value</Value>
<Style>
@@ -1313,6 +1309,19 @@
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>

View File

@@ -1441,7 +1441,13 @@
CssClass="lnkMovotPermanente" runat="server" Text='<%# Eval("Saldo", "{0:###,###.##}")%>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Movto. Bancario" DataNavigateUrlFields="CveIE" DataTextField="FolioIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" Target="_blank" />
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" OnClick="LnkEditarMovtoPermanente_Click"
CssClass="lnkMovotPermanente" runat="server" Text='<%# Eval("FechaInicioAplicacion", "{0:dd/MM/yyyy}")%>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:HyperLinkField HeaderText="Movto. Bancario" DataNavigateUrlFields="CveIE" DataTextField="FolioIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" Target="_blank" />--%>
<asp:TemplateField ItemStyle-Width="38">
<ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditarmovtoper" OnClick="LnkEditarMovtoPermanente_Click" CssClass="btn btn-circle btn-sm btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
@@ -5289,6 +5295,9 @@
<span class="ltlzip">
<asp:Literal ID="LtlZip" runat="server"></asp:Literal></span>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="BtnGenerateXml" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">

View File

@@ -16,6 +16,7 @@ using iTextSharp.text.pdf.parser;
using Profact.TimbraCFDI40;
using Ionic.Zip;
using DocumentFormat.OpenXml.Drawing;
using System.Web;
public partial class Nomina_Nomina2 : ClsPaginas
{
@@ -5100,6 +5101,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
ClosedXML.Excel.XLColor colorperp = ClosedXML.Excel.XLColor.FromArgb(51, 153, 102);
ClosedXML.Excel.XLColor colorded = ClosedXML.Excel.XLColor.FromArgb(150, 54, 52);
ClosedXML.Excel.XLColor colororange = ClosedXML.Excel.XLColor.FromArgb(247, 150, 70);
ClosedXML.Excel.XLColor colororangeblue = ClosedXML.Excel.XLColor.FromArgb(79, 129, 189);
ClosedXML.Excel.IXLCell celda;
DataTable dtConceptos = this.dtConceptos.FiltraParametros("(Tipo ='P' AND EsPadre = 1 AND EsFormula =0) OR (Tipo = 'D' AND EsPadre = 1 AND EsFormula =0) OR Tipo = 'O' AND EsPadre = 1 AND EsFormula =0");
DataTable dtFiltrado = dtConceptos.Clone(); // Clonar la estructura del DataTable
@@ -5194,8 +5196,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
column++;
TitleRange(libro, "Incapacidad", filainicio + 2, column, filainicio + 2, column, true, false, dedcborderColor);
TitleRange(libro, "Perm. Faltas", filainicio + 3, column, filainicio + 3, column, false, true, dedcborderColor);
TitleRange(libro, "Asistencias", filainicio + 2, column, filainicio + 2, column+2, false, false, colororangeblue);
TitleRange(libro, "Incapacidad", filainicio + 3, column, filainicio + 3, column, false, false, colororangeblue);
column++;
TitleRange(libro, "Permisos", filainicio + 3, column, filainicio + 3, column, false, false, colororangeblue);
column++;
TitleRange(libro, "Faltas", filainicio + 3, column, filainicio + 3, column, false, false, colororangeblue);
column++;
Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor);
libro.Column(column).Width = 15;
if (dtConceptos.FiltraParametros("Tipo ='D'").Rows.Count > 0)
@@ -5391,7 +5398,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
column++;
libro.Cell(Fila, column).Value = "";
Titlecell(libro, erow["DiasIncapacidad"], Fila, column, false, false, dedcborderColor);
column++;
Titlecell(libro, "0", Fila, column, false, false, dedcborderColor);
column++;
Titlecell(libro, erow["DiasFaltados"], Fila, column, false, false, dedcborderColor);
if (dtConceptos.FiltraParametros("Tipo ='D'").Rows.Count > 0)
{
@@ -9704,6 +9715,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
LtlXml.Text = System.IO.File.ReadAllText(PathXML);
script = string.Format("Savexml(\"{0} {1}.xml\", $('.ltlxml').html());", Xmlname, empleado);
//System.IO.FileInfo file = new System.IO.FileInfo(PathXML);
//string mimeType = "text/plain";
//try

View File

@@ -284,6 +284,7 @@ Partial Class RH_CatPersonal
Private Sub CargaEstatusPersonal()
DdlEstatusPersonal.DataSource = GlobalDTEstatusPersonal
DdlEstatusPersonal.DataBind()
DdlEstatusPersonal.SelectedValueExist("1")
End Sub
Private Sub CargaProyecto()
'DdlProyectoAsignado.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1)

View File

@@ -2124,7 +2124,7 @@ Partial Class RH_Personal
If TempDTCuentasBancos IsNot Nothing AndAlso TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString(), EstatusPagoElectronico:=True, EstatusPagoElectronicoGrupos:=True) Then
TieneError = True
Exit For
End If

View File

@@ -67,7 +67,11 @@
<asp:ListItem Text="GlobalDTAC" Value="GlobalDTAC"></asp:ListItem>
<asp:ListItem Text="GlobalDTSATUsosCFDI" Value="GlobalDTSATUsosCFDI"></asp:ListItem>
<asp:ListItem Text="GlobalDTVtaCondicionesEntrega" Value="GlobalDTVtaCondicionesEntrega"></asp:ListItem>
<<<<<<< HEAD
<asp:ListItem Text="GlobalDTTipoVenta" Value="GlobalDTTipoVenta"></asp:ListItem>
=======
<asp:ListItem Text="GlobalDTDIOTTipoOperacion" Value="GlobalDTDIOTTipoOperacion"></asp:ListItem>
>>>>>>> 5f99bce007430083b8e29bf39512f4aa4b51efae
</asp:DropDownList>&nbsp;&nbsp;

View File

@@ -111,8 +111,13 @@ Partial Class Sistemas_CatSesiones
CargaUsosCFDI()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTVtaCondicionesEntrega" Then
CargaCondicionesEntrega()
<<<<<<< HEAD
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTTipoVenta" Then
CargaTipoVenta()
=======
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTDIOTTipoOperacion" Then
CargaDIOTTipoOperacion()
>>>>>>> 5f99bce007430083b8e29bf39512f4aa4b51efae
End If
@@ -705,6 +710,10 @@ Partial Class Sistemas_CatSesiones
Private Sub CargaDTInvPSSeccionesAlmacen()
GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, -1, -1) = Nothing
GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = Nothing
End Sub
Private Sub CargaTipoVenta()
GlobalDTTipoVenta(UsuarioActual.CveEmpresa) = Nothing
End Sub
End Class

View File

@@ -3785,6 +3785,10 @@
<asp:CheckBox ID="ChkEstado" runat="server" CssClass="make-switchsd" data-size="small" />
</div>
<div class="form-group" id="DivInfoCompleta" runat="server" visible="false">
Información Completa:
<asp:CheckBox ID="ChkInformacionCompleta" runat="server" CssClass="make-switchsd" data-size="small" />
</div>
<div class="form-group">
Fecha de Captura:

View File

@@ -682,6 +682,9 @@ Partial Class Clientes
RegistraScript("CargaHeader();")
CargaCombosDirecionesClientesSAT()
If UsuarioActual.CveRol = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DivInfoCompleta.Visible = True
End If
If UsuarioActual.Empresa.CvePlataforma = 3 Then 'SI ES USUARIO GPS
TabFiscalContable.Visible = True
@@ -1764,6 +1767,8 @@ Partial Class Clientes
End If
ChkInformacionCompleta.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("InformacionCompleta").ToString())
'Horario
TxtHorario.Text = ObjClientes.Horario
TxtObsDiasRevision.Text = ObjClientes.ObservacionRevision
@@ -2574,6 +2579,19 @@ Partial Class Clientes
Alert("El uso del cfdi debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim InformacionCompleta As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
If TxtRFC.Text.Trim() = "" Then
InformacionCompleta = False
End If
If DivInfoCompleta.Visible Then
InformacionCompleta = ChkInformacionCompleta.Checked
End If
End If
'CargaSucursal()
@@ -2683,7 +2701,7 @@ Partial Class Clientes
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente,
CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero()) Then
CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero(), InformacionCompleta:=InformacionCompleta) Then
CveClienteNuevo = ObjClientes.CveCliente
@@ -2768,7 +2786,7 @@ Partial Class Clientes
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenConsignacion:=DdlAlmacenConsignacion.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked,
EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero()) Then
EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero(), InformacionCompleta:=InformacionCompleta) Then
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then
ErrorProceso = True

View File

@@ -6,6 +6,43 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
div.chksino, span.chksino {
border: 1px solid #B8B8B8;
max-width: 77px;
overflow: hidden;
max-height: 28px;
display: inline-block;
text-align: left;
vertical-align: middle;
}
.chksino label::after {
content: 'No';
padding: 1px;
padding-left: 12px;
padding-right: 12px;
margin-left: 45px;
font-size: 12px !important;
font-weight: normal !important;
display: inline-block;
background: #ececec;
color: #666;
height: 25px;
}
.chksino label::before {
content: 'Si ';
padding: 1px;
padding-left: 15px !important;
padding-right: 14px !important;
font-size: 12px !important;
font-weight: normal !important;
display: inline-block;
background: #428bca;
color: #FFF;
height: 25px;
}
.e-big-btn {
height: 50px;
width: 200px;
@@ -644,26 +681,36 @@
<ContentTemplate>
<div class="chequesie2">
<div class="row">
<label class="col-md-1">Total:</label>
<div class="col-md-3 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
<div class="col-md-4" style="display: flex; align-items: center;">
<label style="font-weight: bold; font-size: medium;">Total:</label>
<div class="input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="180px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
</div>
</div>
<label id="lblCambio" class="col-md-1">Cambio:</label>
<div class="col-md-3 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
<br />
</div>
<label id="lblCambio2" class="col-md-1">Sob/falt:</label>
<div class="col-md-3 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
<br />
<div class="col-md-8">
<div class="row">
<div class="col-md-4" style="display: flex; align-items: center;">
<label id="lblCambio" runat="server" style="font-weight: bold; font-size: medium;">Cambio:</label>
<div class="input-icon">
<i style="margin: 0px;">$</i>
<asp:HiddenField ID="HdnSobranteFaltante" Value="0" ClientIDMode="Static" runat="server" />
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
</div>
</div>
<div class="col-md-8" style="display: flex; align-items: center;">
<label style="font-weight: bold; font-size: medium;">Sob/falt:</label>
&nbsp;
<asp:CheckBox ID="ChkSobFaltante" runat="server" ClientIDMode="Static" />
<div class="input-icon" style="margin-left: 20px;">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
</div>
</div>
</div>
</div>
</div>
</div>
@@ -1195,8 +1242,8 @@
</div>
<br />
<div class="row">
<div class="col-md-12" style="display:flex; justify-content:end; font-size:16px; font-weight: bold;">
<span> Total: </span>
<div class="col-md-12" style="display: flex; justify-content: end; font-size: 16px; font-weight: bold;">
<span>Total: </span>
<asp:Label ID="LblTotalAnticipos" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label>
</div>
</div>
@@ -1519,7 +1566,7 @@
let totalTransferencia = $get("TxtImporteTransferencia") ? ToDouble($get("TxtImporteTransferencia").value) : 0;
let totalCobranza = $get("TxtCxCAplicado") ? ToDouble($get("TxtCxCAplicado").value) : 0;
let TotalOtrosContado = 0;
debugger;
let total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia;
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
@@ -1532,12 +1579,26 @@
let totalVenta = $get('HdnTotal').value ? ToDouble($get('HdnTotal').value) : 0 + totalCobranza;// - ToDouble($get('HdnTotal').value);
if (total > totalVenta) {
lblCambio.innerHTML = "Cambio:";
C_lblCambio.innerHTML = "Cambio:";
HdnSobranteFaltante.value = "0";
//HdnCambioFaltante.value = "1";
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
let cambio = total - totalVenta;
if (cambio > 1) {
$get("TxtFaltante").value = "";
$get("ChkSobFaltante").checked = false;
$get("TxtCambio").value = FormatoNumero(cambio);
} else {
$get("TxtFaltante").value = FormatoNumero(cambio);
$get("ChkSobFaltante").checked = true;
$get("TxtCambio").value = FormatoNumero(cambio);
}
} else {
lblCambio.innerHTML = "Faltante:";
//HdnCambioFaltante.value = "0";
C_lblCambio.innerHTML = "Faltante:";
HdnSobranteFaltante.value = "1";
$get("TxtFaltante").value = "";
$get("ChkSobFaltante").checked = false;
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
}
@@ -1556,5 +1617,28 @@
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
}
function CargaSobranteFaltante() {
$('#ChkSobFaltante').change(function () {
if (this.checked == true) {
if (ToDouble($get("TxtCambio").value) > 1) {
alert("El sobrante/faltante no debe ser mayor a 1")
} else {
$get("TxtFaltante").value = $get("TxtCambio").value;
}
}
else {
$get("TxtFaltante").value = "";
}
});
}
jQuery(document).ready(function () {
CargaSobranteFaltante();
Sys.Application.add_load(function (s, e) {
CargaSobranteFaltante();
});
});
</script>
</asp:Content>

View File

@@ -4,10 +4,7 @@ Option Strict On
Imports System.Data
Imports System.IO
Imports System.Net.Http
Imports CrystalDecisions.CrystalReports.Engine
Imports Extensiones
Imports Modelos.Factura
Partial Class Ventas_PVCobranza
Inherits ClsPaginas
@@ -579,8 +576,41 @@ Partial Class Ventas_PVCobranza
Dim VentaContado As Boolean = HdnVentaCondicionesPago.Value = "0"
If VentaContado Then
Dim Faltante As Decimal = 0
Dim Sobrante As Decimal = 0
If ChkSobFaltante.Checked Then
If Not HdnSobranteFaltante.Value.Contiene("0", "1") Then
Alert("Sobrante/Faltante no definido", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If HdnSobranteFaltante.Value = "0" Then
Sobrante = Math.Abs(TxtFaltante.Text.ToDecimal())
End If
If HdnSobranteFaltante.Value = "1" Then
Faltante = Math.Abs(TxtFaltante.Text.ToDecimal())
End If
If Faltante > 1 Then
Alert("El faltante no puede ser mayor a 1.00", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Sobrante > 1 Then
Alert("El sobrante no puede ser mayor a 1.00", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtFaltante.Text.ToDecimal() = 0 Then
Alert("No hay importe para sobrante/faltante", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
'validaciones
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal() + TxtImporteOtrosContado.Text.ToDecimal()
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal() + TxtImporteOtrosContado.Text.ToDecimal() + Faltante
If Pagado = 0 Then
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
Exit Sub
@@ -590,7 +620,8 @@ Partial Class Ventas_PVCobranza
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal
Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal - Sobrante
If PagadoSinEfectivo > (LtlSaldo.Text.ToDecimal() + TxtCxCAplicado.Text.ToDecimal) Then
Alert("El pago con los metodos de pago actuales no puede ser mayor al importe de la venta", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -619,6 +650,16 @@ Partial Class Ventas_PVCobranza
Exit Sub
End If
End If
End If
Dim SobranteFaltante As Decimal = 0
If ChkSobFaltante.Checked Then
SobranteFaltante = TxtFaltante.Text.ToDecimal()
'SI ES FALTANTE DEBE SER SIEMPRE NEGATIVO
If HdnSobranteFaltante.Value = "1" Then
SobranteFaltante = $"-{Math.Abs(TxtFaltante.Text.ToDecimal())}".ToDecimal()
End If
End If
Dim tCveCorte As Integer = CveCorte
@@ -771,14 +812,14 @@ Partial Class Ventas_PVCobranza
If CvePrePoliza > 0 Then
If MsgError = "" AndAlso SaldoPendientePagos > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then
MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
SaldoPendienteVenta -= TxtImporteCredito.Text.ToDecimal
SaldoPendientePagos -= TxtImporteCredito.Text.ToDecimal
PagoAplicado += TxtImporteCredito.Text.ToDecimal
End If
If MsgError = "" AndAlso SaldoPendientePagos > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then
MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
SaldoPendienteVenta -= TxtImporteDebito.Text.ToDecimal
SaldoPendientePagos -= TxtImporteDebito.Text.ToDecimal
PagoAplicado += TxtImporteDebito.Text.ToDecimal
@@ -790,14 +831,14 @@ Partial Class Ventas_PVCobranza
Obs = $"{VentaActual.SerieFolio} - Autorizó: {TxtAutorizo.Text}"
End If
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, Obs:=Obs, CveAutorizacion:=TxtClaveAutorizacion.Text.Trim(), CveSubProyecto:=VentaActual.CveSubProyecto)
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, Obs:=Obs, CveAutorizacion:=TxtClaveAutorizacion.Text.Trim(), CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
SaldoPendienteVenta -= TxtImporteCheque.Text.ToDecimal
SaldoPendientePagos -= TxtImporteCheque.Text.ToDecimal
PagoAplicado += TxtImporteCheque.Text.ToDecimal
End If
If MsgError = "" AndAlso SaldoPendientePagos > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then
MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
SaldoPendienteVenta -= TxtImporteTransferencia.Text.ToDecimal
SaldoPendientePagos -= TxtImporteTransferencia.Text.ToDecimal
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
@@ -815,7 +856,7 @@ Partial Class Ventas_PVCobranza
CveConceptroOtros = 8
End Select
MsgError = RegistraIE(CveConceptroOtros, DdlCuentaOtrosContado.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteOtrosContado.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
MsgError = RegistraIE(CveConceptroOtros, DdlCuentaOtrosContado.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteOtrosContado.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
SaldoPendienteVenta -= TxtImporteOtrosContado.Text.ToDecimal
SaldoPendientePagos -= TxtImporteOtrosContado.Text.ToDecimal
PagoAplicado += TxtImporteOtrosContado.Text.ToDecimal
@@ -830,12 +871,12 @@ Partial Class Ventas_PVCobranza
PagoEfectivo = SaldoPendientePagos
End If
If SaldoPendienteVenta < 0 Then SaldoPendienteVenta = 0
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, SaldoPendienteVenta, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, SaldoPendienteVenta, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
SaldoPendienteVenta -= PagoEfectivo
SaldoPendientePagos -= PagoEfectivo
End If
If SaldoPendienteVenta > 0 Then
If SaldoPendienteVenta > 0 AndAlso Not ChkSobFaltante.Checked Then
MsgError = "Tiene saldo pendiente por aplicar"
End If
@@ -910,7 +951,7 @@ Partial Class Ventas_PVCobranza
GuardaLog(ex.ToString())
End Try
If MsgError = "" Then
If MsgError = "" AndAlso Not ChkSobFaltante.Checked Then
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=CveVenta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
@@ -918,6 +959,16 @@ Partial Class Ventas_PVCobranza
End If
End If
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso VentaContado Then
Dim SaldoPendiente As Decimal = 0
If ObjVentas2.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) AndAlso ObjVentas2.DtResultados.Rows.Count > 0 Then
SaldoPendiente = ObjVentas2.DtResultados.FiltroPrimeroValor("Saldo").ToDecimal()
End If
If SaldoPendiente > 0 Then
MsgError = "La factura tiene saldo pendiente por aplicar"
End If
End If
If MsgError = "" Then
ObjVentas2.Commit()
Dim msBuild As New StringBuilder()
@@ -1183,6 +1234,8 @@ Partial Class Ventas_PVCobranza
TxtAutorizo.Text = ""
TxtNCDev.Text = ""
LtlTipoAnticipo.Text = ""
TxtFaltante.Text = ""
ChkSobFaltante.Checked = False
'HdnTipoAmortizacion.Value = ""
CveCliente = -1
CveVendedor = -1
@@ -1614,7 +1667,7 @@ Partial Class Ventas_PVCobranza
Return ObjTimbrado
End Function
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImporteAbonoVenta As Decimal, ImporteBancos As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer, Optional Obs As String = "", Optional CveAutorizacion As String = "", Optional CveSubProyecto As Integer = -1) As String
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImporteAbonoVenta As Decimal, ImporteBancos As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer, Optional Obs As String = "", Optional CveAutorizacion As String = "", Optional CveSubProyecto As Integer = -1, Optional ByRef SobranteFaltante As Decimal = 0) As String
Dim Retorno As String = ""
If CveBancoCuenta > 0 Then
Dim CveIEPago As Integer = 0
@@ -1626,14 +1679,54 @@ Partial Class Ventas_PVCobranza
Obs = $"{Obs}. Folio: {VentaActual.SerieFolio}"
End If
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImporteBancos, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto)
Dim ImporteIE As Decimal = ImporteBancos.ToString().ToDecimal()
Dim Pago As New VentaPago
'SOBRANTE/FALTANTE
If ChkSobFaltante.Checked AndAlso SobranteFaltante <> 0 Then
'SOBRANTE
If SobranteFaltante > 0 Then
'SI ES EL SOBRANTE EN EFECTIVO SUMAR EL SOBRANTE/FALTANTE
If Metodo = 13 Then
ImporteIE += SobranteFaltante
Pago.OtroGastoIngreso = SobranteFaltante.ToString().ToDecimal()
'LIMPIAR SOBRANTE/FALTANTE
SobranteFaltante = 0
Else
'AJUSTAR DONDE EL IMPORTE A BANCOS SEA MAYOR EN EL DE LA VENTA
If ImporteBancos.RoundSQL(2) >= ImporteAbonoVenta.RoundSQL(2) Then
Pago.OtroGastoIngreso = SobranteFaltante.ToString().ToDecimal()
'LIMPIAR SOBRANTE/FALTANTE
SobranteFaltante = 0
End If
End If
End If
'FALTANTE
If SobranteFaltante < 0 Then
'METER LO QUE FALTA COMO GASTO
If (ImporteBancos.RoundSQL(2) + Math.Abs(SobranteFaltante)) = ImporteAbonoVenta.RoundSQL(2) Then
Pago.OtroGastoIngreso = SobranteFaltante.ToString().ToDecimal()
'LIMPIAR SOBRANTE/FALTANTE
SobranteFaltante = 0
'SUMAR AL PAGO
If ImporteBancos < ImporteAbonoVenta Then
ImporteBancos += Math.Abs(SobranteFaltante)
End If
End If
End If
End If
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImporteIE, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto)
If CveIEPago > 0 Then
Dim tImportePago As Decimal = If(ImporteBancos > ImporteAbonoVenta, ImporteAbonoVenta, ImporteBancos) 'toma el importe menor para la factura
If ImporteBancos > 0 Then
Dim Pago As New VentaPago
If ImporteIE > 0 Then
Pago.ImportePagoVenta = tImportePago
Pago.ImportePago = ImporteBancos
Pago.ImportePago = ImporteIE
Pago.CveIE = CveIEPago
Pago.CveMonedaPago = VentaActual.CveMoneda
Pago.Fecha = NowADS()

View File

@@ -317,6 +317,11 @@ Partial Class RepVentasDetalle
DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13"))
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "23"))
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DdlGrupo.Items.Insert(13, New ListItem("Tipo Venta", "24"))
DdlGrupo.DataBind()
End Sub

View File

@@ -8371,6 +8371,24 @@ Partial Class Ventas
LblEnviarMail.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjClie As New ClsClientes
If ObjClie.GetClienteInformacionCompleta(CveCliente, UsuarioActual.CveEmpresa) Then
If Not CBool(ObjClie.DtResultados.FiltroPrimeroValor("InformacionCompleta")) Then
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", "Información incompleta")
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
BtnEmitirImprimir.Visible = False
BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False
TieneBloqueoPorCreditoVencimiento = 1
End If
End If
ObjClie.Dispose()
End If
End Sub