Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
30
AF/AF.aspx
30
AF/AF.aspx
@@ -154,6 +154,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 ">
|
||||
<label class="control-label">Grupo:</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" DataValueField="CveGrupo" DataTextField="Grupo" CssClass="form-control input-small select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:Button ID="BtnAgregarGrupo" runat="server" CssClass="btn btn-primary btn-sm" Text="+" Visible="True" />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 ">
|
||||
<label class="control-label">Marca:</label>
|
||||
@@ -179,20 +194,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 ">
|
||||
<label class="control-label">Grupo:</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" DataValueField="CveGrupo" DataTextField="Grupo" CssClass="form-control input-small select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:Button ID="BtnAgregarGrupo" runat="server" CssClass="btn btn-primary btn-sm" Text="+" Visible="True" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="" id="DvFiltros">
|
||||
<div class="portlet-title portlet-filterT portletfiltrostitlee">
|
||||
<div class="tools">
|
||||
<asp:UpdatePanel runat="server" style="display: inline-block;">
|
||||
@@ -131,7 +131,8 @@
|
||||
<div class="row">
|
||||
<div class="col-md-1">Cliente:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCliente" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList>
|
||||
<%--<asp:DropDownList ID="DdlCliente" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList>--%>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">Grupo:</div>
|
||||
|
||||
@@ -95,9 +95,20 @@ Partial Class AF_CatAF
|
||||
'DdlProyecto.DataBind()
|
||||
'DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlCliente.DataBind()
|
||||
DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
'DdlCliente.DataBind()
|
||||
'DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
'CargaClientes
|
||||
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
CargarTipoActivoFijo()
|
||||
CargaGrupos()
|
||||
@@ -234,7 +245,8 @@ Partial Class AF_CatAF
|
||||
|
||||
If intContador > 0 Then strSQL1.AppendFormat(" group by CveActivoFijo having count(*)={0}", intContador)
|
||||
|
||||
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, -1, CveGrupo:=DdlGrupo.SelectedValue.ToEntero) Then
|
||||
Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, CveCliente:=CveCliente, CveGrupo:=DdlGrupo.SelectedValue.ToEntero) Then
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
DtActivosFijos = ObjAF.DtResultados
|
||||
'GvDatos.DataSource = ObjAF.DtResultados
|
||||
|
||||
@@ -3,10 +3,11 @@ Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports CFDi
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatModelos
|
||||
Inherits ClsPaginas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
@@ -71,7 +72,13 @@ Partial Class AF_CatModelos
|
||||
CargaDatos()
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
RegarGlobalDT()
|
||||
End Sub
|
||||
|
||||
Private Sub RegarGlobalDT()
|
||||
GlobalDTModeloActivoFijo(UsuarioActual.CveEmpresa, -1) = Nothing
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
@@ -101,6 +108,7 @@ Partial Class AF_CatModelos
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
RegarGlobalDT()
|
||||
End Sub
|
||||
Private Sub GvModelo_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvModelos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
@@ -1637,7 +1637,7 @@ Partial Class Bancos_IE
|
||||
DdlCuenta.Items.Clear()
|
||||
Dim dt As DataTable
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(127) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(127) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas
|
||||
|
||||
@@ -529,7 +529,7 @@
|
||||
<div class="form-group proveedoreespes" runat="server" id="divRecoleccion" visible="false">
|
||||
<span class="whitoutcol proveedoreespes">Recolección</span>
|
||||
<div class="whitoutcol whitoutcol">
|
||||
<asp:DropDownList ID="DdlRecoleccion" runat="server" AutoPostBack="true" DataTextField="Referencia" DataValueField="CveEntregaAlmacen" OnSelectedIndexChanged="DdlFolioGarantia_SelectedIndexChanged" CssClass="form-control input-sm input-small select2me">
|
||||
<asp:DropDownList ID="DdlRecoleccion" runat="server" AutoPostBack="true" DataTextField="Referencias" DataValueField="CveEntregaAlmacen" OnSelectedIndexChanged="DdlFolioGarantia_SelectedIndexChanged" CssClass="form-control input-sm input-small select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Button ID="BtnRecolecciónAplicar" runat="server" Text="Aplicar" CssClass="default" />
|
||||
@@ -775,7 +775,7 @@
|
||||
<asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion") %>'></asp:Label>
|
||||
</span>
|
||||
<br />
|
||||
<asp:HyperLink Style="display: initial;" ID="HplPS" Width="200px" NavigateUrl='<%# If(CInt(Eval("CvePS").ToString) > 0, String.Format("/Ventas/ProductosServicios.aspx?CvePS={0}&Ret=Comp&Popup=1&TB_iframe=true&height=500&width=950&Ret=Comp", Eval("CvePS")), "")%>' CssClass='<%# If(CInt(Eval("CvePS").ToString) > 0, "Texto thickbox", "") %>' runat="server" Text='<%# Eval("PS") %>'></asp:HyperLink>
|
||||
<asp:HyperLink Style="display: initial;" ID="HplPS" Width="200px" NavigateUrl='<%# If(CInt(Eval("CvePS").ToString) > 0, String.Format("/Ventas/ProductosServicios.aspx?CvePS={0}&Ret=Comp&Popup=1&TB_iframe=true&height=500&width=950&Ret=Comp", Eval("CvePS")), "")%>' CssClass='<%# If(CInt(Eval("CvePS").ToString) > 0, "Texto thickbox", "") %>' runat="server" Text='<%# Eval("CodigoPS") %>'></asp:HyperLink>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -17044,6 +17044,8 @@ Partial Class Compras_Compras
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
Select Case Modalidad
|
||||
Case "A" 'ADD
|
||||
|
||||
@@ -17058,11 +17060,13 @@ Partial Class Compras_Compras
|
||||
Else
|
||||
IVA = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2)
|
||||
End If
|
||||
|
||||
|
||||
AddPS(TxtCantidad.Text.Trim.ToDecimal, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
|
||||
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDecimal, Total, IVA,
|
||||
TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=0, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
|
||||
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS, CveContratoDetalle:=CveContratoDetalle,
|
||||
CveCultivoCuadroDetalle:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1), TemporadaCuadro:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, ""))
|
||||
CveCultivoCuadroDetalle:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1), TemporadaCuadro:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, ""), CodigoPS:=CodigoPS)
|
||||
|
||||
AddPS2()
|
||||
LimpiaAgregar()
|
||||
@@ -17135,11 +17139,13 @@ Partial Class Compras_Compras
|
||||
Optional PSCodigo As String = "-", Optional PSDescripcion As String = "-", Optional CantidadF As Double = -1, Optional EntregaDirecta As Integer = -1, Optional OtrosGastos As Decimal = 0,
|
||||
Optional CveSATPS As Integer = -1, Optional CargaXml As Boolean = False, Optional CveTipoGasto As Integer = -1, Optional TipoGasto As String = "", Optional PorcentajeIVA As Decimal = 0,
|
||||
Optional PorcentajeIEPS As Decimal = 0, Optional PorcentajeRetIVA As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1,
|
||||
Optional CveSATPSActualizado As Boolean = False, Optional TemporadaCuadro As String = "") As Integer
|
||||
Optional CveSATPSActualizado As Boolean = False, Optional TemporadaCuadro As String = "", Optional CodigoPS As String = "") As Integer
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
|
||||
|
||||
If Not TmpDT.Columns.Contains("CodigoPS") Then
|
||||
TmpDT.Columns.Add("CodigoPS")
|
||||
End If
|
||||
|
||||
Row = TmpDT.NewRow()
|
||||
Dim Retorno As Integer = 0
|
||||
@@ -17224,6 +17230,12 @@ Partial Class Compras_Compras
|
||||
Row("Clasificacion") = Clasificacion
|
||||
Row("CvePS") = CvePS
|
||||
Row("PS") = PS
|
||||
|
||||
If CodigoPS.Trim = "" Then
|
||||
CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CodigoPS")
|
||||
End If
|
||||
Row("CodigoPS") = CodigoPS
|
||||
|
||||
Row("CveTipoPS") = CveTipoPS
|
||||
|
||||
Row("PSDescripcion") = PSDescripcion
|
||||
@@ -17407,6 +17419,9 @@ Partial Class Compras_Compras
|
||||
DrPS("Clasificacion") = PSRow("Clasificacion").ToString
|
||||
DrPS("CvePS") = DdlPS.SelectedValue
|
||||
DrPS("PS") = PSRow("PS").ToString
|
||||
|
||||
DrPS("CodigoPS") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimeroValor("CodigoPS")
|
||||
|
||||
DrPS("CveTipoPS") = CveTipoPS
|
||||
DrPS("CveSATPS") = PSRow("CveSATPS").ToString.ToEntero
|
||||
DrPS("SATClaveProductoServicio") = PSRow("SATClaveProductoServicio").ToString
|
||||
|
||||
@@ -606,7 +606,7 @@ Partial Class General_SaldosIniciales
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not dt.Columns(5).ColumnName = "AgrupadorSAT" Then
|
||||
If Not dt.Columns(4).ColumnName = "AgrupadorSAT" Then
|
||||
Alert("El nombre de la quinta columna debe ser 'AgrupadorSAT'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -855,6 +855,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim Linea As String = If(Row.Table.Columns.Contains("Linea"), Row("Linea").ToString().Trim, "")
|
||||
Dim Modelo As String = If(Row.Table.Columns.Contains("Modelo"), Row("Modelo").ToString().Trim, "")
|
||||
Dim RetIVA As Decimal = If(Row.Table.Columns.Contains("RetIVA"), Row("RetIVA").ToString().Trim.ToDecimal, 0D)
|
||||
Dim NumeroParte As String = If(Row.Table.Columns.Contains("NumeroParte"), Row("NumeroParte").ToString().Trim, "")
|
||||
|
||||
Dim CvePS As Integer = DTPS.FiltroPrimeroValor("CvePS", $"Codigo = '{Codigo}'").ToString().ToEntero()
|
||||
|
||||
@@ -973,7 +974,7 @@ Partial Class General_SaldosIniciales
|
||||
'If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then Alert("No se encontró la Serie: " + Clasificacion2, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
||||
|
||||
If CvePS > 0 Then
|
||||
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, -1, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, UsuarioActual.CveEmpresa,
|
||||
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, NumeroParte, CodigoBarras, Descripcion, Precio, -1, RetIVA, False, -1, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, UsuarioActual.CveEmpresa,
|
||||
CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
||||
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2) Then
|
||||
'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
||||
@@ -987,7 +988,7 @@ Partial Class General_SaldosIniciales
|
||||
Else
|
||||
'If Codigo.Length > 0 Then
|
||||
|
||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, NumeroParte, CodigoBarras, Descripcion, Precio, -1, RetIVA, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||
CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
||||
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2) <= 0 Then
|
||||
'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||
|
||||
@@ -591,7 +591,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
|
||||
End If
|
||||
If Not Correcto Then
|
||||
ProductosNoCargados.AppendFormat("{0},", row("Producto / Servicio").ToString())
|
||||
ProductosNoCargados.AppendFormat("{0}-{1},", row(0).ToString(), row("Producto / Servicio").ToString())
|
||||
RowsNoCargados += 1
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -136,7 +136,7 @@ Partial Class CatClasificaciones
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($" (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)") '' comentado. (Codigo IS NULL OR Codigo = '') AND
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
@@ -110,7 +110,7 @@ Partial Class Ventas_FacturacionGlobal
|
||||
GvDatos.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
Dim CveCliente As Integer = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
Dim CveCliente As Integer = -1 'UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
|
||||
@@ -152,7 +152,7 @@ Partial Class Ventas_FacturacionGlobal
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim CveCliente As Integer = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
Dim CveCliente As Integer = -1 'UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
Dim CveMoneda As Integer = 1
|
||||
|
||||
Dim SbRemisiones As New StringBuilder()
|
||||
@@ -232,8 +232,8 @@ Partial Class Ventas_FacturacionGlobal
|
||||
|
||||
ObjFactura.PreparaTimbre()
|
||||
|
||||
If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.01 Then
|
||||
Alert("Los pagos no coinciden con el total de la factura", TipoMensaje.MsgError)
|
||||
If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.1 Then
|
||||
Alert($"Los pagos no coinciden con el total de la factura [{ObjFactura.Total.RoundSQL(2)}-{ DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)}]", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
@@ -346,6 +346,7 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
Dim MsgError As String = ""
|
||||
Dim SaldoPendiente As Decimal = DbRowVenta("Saldo").ToString.ToDecimal
|
||||
Dim SaldoTotalInicial As Decimal = DbRowVenta("Saldo").ToString.ToDecimal
|
||||
Dim PagoAplicado As Decimal = 0
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
@@ -384,8 +385,8 @@ Partial Class Ventas_PVCobranza
|
||||
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
|
||||
|
||||
PagoAplicado += PagoEfectivo
|
||||
If PagoAplicado > VentaActual.Total Then
|
||||
TxtCambio.Text = (PagoAplicado - VentaActual.Total).FormatoNumero
|
||||
If PagoAplicado >= SaldoTotalInicial Then
|
||||
TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero
|
||||
PagoEfectivo = SaldoPendiente
|
||||
End If
|
||||
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
|
||||
|
||||
Reference in New Issue
Block a user