This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-08-27 11:51:41 -07:00
33 changed files with 4143 additions and 3861 deletions

View File

@@ -228,9 +228,9 @@ Public Class ClsContabilidad
Public Function AddPrePolizasNegativa(CvePrePoliza As Integer, CveUsuario As Integer, Concepto As String, CveEmpresa As Integer, Fecha As Date) As Boolean
Public Function AddPrePolizasNegativa(CvePrePoliza As Integer, CveUsuario As Integer, Concepto As String, CveEmpresa As Integer, Fecha As Date) As Integer
Dim Retorno As Boolean = False
Dim Retorno As Integer = -1
DataAdapter("PA_Conta_PrePolizasNegativaAdd")
@@ -240,11 +240,12 @@ Public Class ClsContabilidad
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Fecha", SqlDbType.Date).Value = Fecha
.Add("@CvePrePolizaNueva", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePolizaNueva").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try

View File

@@ -2746,7 +2746,7 @@ Namespace Modelos
End If
'ContPAQ El movimiento 1 es el de Venta
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And UsuarioActual.Empresa.UsaContabilidad = True And Not ErrorPrepoliza Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso Not ErrorPrepoliza Then
If idCuentaContabilizacion > 0 Then
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=objContPaqi) Then
Else

View File

@@ -467,7 +467,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
}
//CONTABILIZA
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
{
if (IDCtaContableDevolucion > 0 && IDCtaContableBancos > 0)
{

File diff suppressed because it is too large Load Diff

View File

@@ -527,7 +527,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
}
//CONTABILIZA
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
{
if (IDCtaContableAcreedor > 0 && IDCtaContableBancos > 0)
{
@@ -801,7 +801,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
}
//CONTABILIZA
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") )
{
if (IDCtaContableAcreedor > 0 && IDCtaContableBancos > 0)
{

View File

@@ -447,7 +447,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
if (AutoConta && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
if (AutoConta && MsgError.Equals(""))
{
//JJMQ:20190103: Cambio la siguiente linea porque esta validando siempre una complementaria aunque el movto sea dlls
//if (IDCtaContableDeudorPrestamo > 0 && IDCtaContableBancosPrestamo > 0 && IDCtaContableBancosComplementariaPrestamo > 0 && IDCtaContableDeudorCompPrestamo > 0)
@@ -838,7 +838,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
if (AutoConta && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
if (AutoConta && MsgError.Equals(""))
{
if (IDCtaContableDeudor > 0 && IDCtaContableBancos > 0)
{

View File

@@ -3090,7 +3090,7 @@ Partial Class Bancos_PopIECompras
End If
'Conta ContPAQ
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If idCuentaContabilizacion > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
IdPoliza = ObjMov.ContaIdPoliza

View File

@@ -3390,7 +3390,7 @@ Partial Class Bancos_PopIEVentas
End If
'Conta ContPAQ
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
If idCuentaContabilizacion > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then

View File

@@ -366,7 +366,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
}
//CONTABILIZA
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") )
{
if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0)
{
@@ -626,7 +626,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
}
//CONTABILIZA
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") && UsuarioActual.Empresa.UsaContabilidad)
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") )
{
if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0)
{

View File

@@ -1823,7 +1823,7 @@ Partial Class Bancos_ProveedoresAbonar
End If
'Conta ContPAQ
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" And UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If idCuentaContabilizacion > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)

View File

@@ -412,7 +412,7 @@ Partial Class Bancos_Transferencias
End If
'Conta ContPAQ
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
If (IdCtaContableOrigen > 0 AndAlso IdCtaContableDestino > 0) OrElse (IdCtaContableDestino > 0 AndAlso Opcion = 1) Then
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, Fecha:=TxtFechaDocumento.Text) Then

View File

@@ -4225,6 +4225,12 @@ Partial Class Compras_Compras
Else
CveConceptoContableAlmacen = 225
End If
'Condiciones para los casos de facturas que son en 0 pero que se utiliza el almacen
ElseIf OCVinculada AndAlso Not (CveImportacion > 0 Or CveFlete > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
ElseIf (CveImportacion > 0 Or CveFlete > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
CveConceptoContableAlmacen = CveConceptoContableAlmacen
End If
End If
@@ -6228,15 +6234,13 @@ Partial Class Compras_Compras
If ContienePSNeteoBonif Then
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 ").ToString.ToDecimal
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
If importeMovimiento <> 0 Then
Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
Else
Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
Else
ErrorPrepoliza = True
End If
End If
@@ -7005,7 +7009,7 @@ Partial Class Compras_Compras
End If
'Conta ContPAQ
If ObjContaAC IsNot Nothing AndAlso Not ErrorPrepoliza AndAlso Not ErrorPrepolizaDescuadre AndAlso UsuarioActual.Empresa.UsaContabilidad Then
If ObjContaAC IsNot Nothing AndAlso Not ErrorPrepoliza AndAlso Not ErrorPrepolizaDescuadre AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
If idCuentaContabilizacion > 0 Then
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
@@ -8571,7 +8575,7 @@ Partial Class Compras_Compras
End If
'Conta ContPAQ
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And ErrorMovtosCxP = 0 And UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso ErrorMovtosCxP = 0 Then
If idCuentaContabilizacion > 0 Then
If ObjConta.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
alertaContabilizacion.AppendFormat("<a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={0}'>{1}<\a><br>", ObjConta.ContaIdPoliza, ObjConta.ContaFolio)
@@ -9737,18 +9741,21 @@ Partial Class Compras_Compras
ReceptorRFC = ValorXML(node, "RFC")
End If
node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
If ValorXML(node, "TipoRelacion").ToString.Contiene("04", "07") Then
Dim nodeDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionado", Prefijo), namespaces)
For Each documento As XmlNode In nodeDocumentosRelacionados
If documento.Attributes("UUID").Value <> "" Then
ListaDocumentos.Add(documento.Attributes("UUID").Value)
End If
Next
If UsuarioActual.CveEmpresa.Contiene(119) Then
node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
If ValorXML(node, "TipoRelacion").ToString.Contiene("04", "07") Then
Dim nodeDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionado", Prefijo), namespaces)
For Each documento As XmlNode In nodeDocumentosRelacionados
If documento.Attributes("UUID").Value <> "" Then
ListaDocumentos.Add(documento.Attributes("UUID").Value)
End If
Next
End If
End If
End If
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Impuestos", Prefijo), namespaces)
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
Dim nodeRetenciones As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Impuestos/{0}:Retenciones/{0}:Retencion", Prefijo), namespaces)

View File

@@ -1295,7 +1295,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If
'Conta ContPAQ AUTOMATICA
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError.Trim = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then
If CvePrePolizaIERegistrado > 0 Then
If IdCtaPersonal > 0 Or DdlCajaChica.Visible Then
If IdCtaProveedor > 0 Then

View File

@@ -200,7 +200,7 @@ Partial Class Compras_RepNotasCredito
End If
End If
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" And UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
If MensajeAlert.ToString = "" Then
MensajeAlert.AppendFormat("Los siguientes movimientos fueron saldados correctamente: <br/>")

View File

@@ -198,7 +198,7 @@ Partial Class Compras_RepRembolsoComprobaciones
Msg.AppendFormat("Se unificaron todas las compras con éxito")
End If
If UsuarioActual.Empresa.UsaContabilidad AndAlso Not TieneError Then
If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" AndAlso Not TieneError Then
If ObjAC Is Nothing Then
TieneError = True
End If

View File

@@ -1,371 +1,371 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports System.Data
Partial Class PopUpAuxiliar
Inherits ClsPaginas
Private Property Tipo As String
Get
Return ViewState("Tipo").ToString
End Get
Set(value As String)
ViewState("Tipo") = value
End Set
End Property
Private Property CveCliente As Integer
Get
Return ViewState("CveCliente").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveCliente") = value
End Set
End Property
Private Property CveVenta As Integer
Get
Return ViewState("CveVenta").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveVenta") = value
End Set
End Property
Private Property CveProveedor As Integer
Get
Return ViewState("CveProveedor").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveProveedor") = value
End Set
End Property
Private Property CveCompra As Integer
Get
Return ViewState("CveCompra").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveCompra") = value
End Set
End Property
Private Property DTDatos As DataTable
Get
Return CType(ViewState("DTDatos"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTDatos") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CType(Me.Master, BaseMasterPage).EsPopup = True
CType(Me.Master, BaseMasterPage).PopupWidth = 915
RegistraScript("$get('tdContenido').style.height='1000'")
Tipo = Request("Tipo")
CveCliente = 0
CveProveedor = 0
CargaDatos()
End If
End Sub
Private Sub CargaDatos()
GVAuxiliar.Columns(10).Visible = UsuarioActual.TienePermisoProceso(94)
Option Explicit On
Option Strict On
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports System.Data
Partial Class PopUpAuxiliar
Inherits ClsPaginas
Private Property Tipo As String
Get
Return ViewState("Tipo").ToString
End Get
Set(value As String)
ViewState("Tipo") = value
End Set
End Property
Private Property CveCliente As Integer
Get
Return ViewState("CveCliente").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveCliente") = value
End Set
End Property
Private Property CveVenta As Integer
Get
Return ViewState("CveVenta").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveVenta") = value
End Set
End Property
Private Property CveProveedor As Integer
Get
Return ViewState("CveProveedor").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveProveedor") = value
End Set
End Property
Private Property CveCompra As Integer
Get
Return ViewState("CveCompra").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveCompra") = value
End Set
End Property
Private Property DTDatos As DataTable
Get
Return CType(ViewState("DTDatos"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTDatos") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CType(Me.Master, BaseMasterPage).EsPopup = True
CType(Me.Master, BaseMasterPage).PopupWidth = 915
RegistraScript("$get('tdContenido').style.height='1000'")
Tipo = Request("Tipo")
CveCliente = 0
CveProveedor = 0
CargaDatos()
End If
End Sub
Private Sub CargaDatos()
GVAuxiliar.Columns(10).Visible = UsuarioActual.TienePermisoProceso(94)
'GVAuxiliar.Columns(11).Visible = UsuarioActual.TienePermisoProceso(94)
GVAuxiliar.Columns(12).Visible = UsuarioActual.TienePermisoProceso(94)
Select Case Tipo
Case "CxCClientes"
CveCliente = Request("CveCliente").ToEntero
CveVenta = Request("CveVenta").ToEntero
CargaAuxiliarClienteCxC(CveCliente, CveVenta)
LtlTipo1.Text = "Cuentas por Cobrar"
LtlTipo2.Text = "Folio de la Venta"
LtlTipo3.Text = "Fecha de la Venta"
Case "AnticiposClientes"
CveCliente = Request("CveCliente").ToEntero
CveVenta = Request("CveVenta").ToEntero
CargaAuxiliarClienteAnticipos(CveCliente, CveVenta)
LtlTipo1.Text = "Anticipo de Clientes"
LtlTipo2.Text = "Folio de la Venta"
LtlTipo3.Text = "Fecha de la Venta"
Case "CxPProveedor"
CveProveedor = Request("CveProveedor").ToEntero
CveCompra = Request("CveCompra").ToEntero
CargaAuxiliarProveedor(CveProveedor, CveCompra)
LtlTipo1.Text = "Cuentas por Pagar"
LtlTipo2.Text = "Folio de la Compra"
LtlTipo3.Text = "Fecha de la Compra"
End Select
UpDatos.Update()
End Sub
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
DTDatos = ObjMovtos.DtResultados
GVAuxiliar.DataSource = ObjMovtos.DtResultados
If ObjMovtos.DtResultados.Rows.Count > 0 Then
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
End If
Else
GVAuxiliar.DataSource = Nothing
End If
ObjMovtos.Dispose()
GVAuxiliar.DataBind()
End Sub
Private Sub CargaAuxiliarClienteAnticipos(CveCliente As Integer, CveVenta As Integer)
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposClienteAuxiliar(CveCliente, CveVenta) Then
DTDatos = ObjMovtos.DtResultados
GVAuxiliar.DataSource = ObjMovtos.DtResultados
If ObjMovtos.DtResultados.Rows.Count > 0 Then
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
'LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
'LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
End If
Else
GVAuxiliar.DataSource = Nothing
End If
ObjMovtos.Dispose()
GVAuxiliar.DataBind()
End Sub
Private Sub CargaAuxiliarProveedor(CveProveedor As Integer, CveCompra As Integer)
Dim ObjMovtos As New ClsContabilidad()
If ObjMovtos.GetProveedorAuxiliar(CveProveedor, CveCompra) Then
DTDatos = ObjMovtos.DtResultados
GVAuxiliar.DataSource = ObjMovtos.DtResultados
If ObjMovtos.DtResultados.Rows.Count > 0 Then
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
End If
Else
GVAuxiliar.DataSource = Nothing
End If
ObjMovtos.Dispose()
GVAuxiliar.DataBind()
End Sub
GVAuxiliar.Columns(12).Visible = UsuarioActual.TienePermisoProceso(94)
Select Case Tipo
Case "CxCClientes"
CveCliente = Request("CveCliente").ToEntero
CveVenta = Request("CveVenta").ToEntero
CargaAuxiliarClienteCxC(CveCliente, CveVenta)
LtlTipo1.Text = "Cuentas por Cobrar"
LtlTipo2.Text = "Folio de la Venta"
LtlTipo3.Text = "Fecha de la Venta"
Case "AnticiposClientes"
CveCliente = Request("CveCliente").ToEntero
CveVenta = Request("CveVenta").ToEntero
CargaAuxiliarClienteAnticipos(CveCliente, CveVenta)
LtlTipo1.Text = "Anticipo de Clientes"
LtlTipo2.Text = "Folio de la Venta"
LtlTipo3.Text = "Fecha de la Venta"
Case "CxPProveedor"
CveProveedor = Request("CveProveedor").ToEntero
CveCompra = Request("CveCompra").ToEntero
CargaAuxiliarProveedor(CveProveedor, CveCompra)
LtlTipo1.Text = "Cuentas por Pagar"
LtlTipo2.Text = "Folio de la Compra"
LtlTipo3.Text = "Fecha de la Compra"
End Select
UpDatos.Update()
End Sub
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
DTDatos = ObjMovtos.DtResultados
GVAuxiliar.DataSource = ObjMovtos.DtResultados
If ObjMovtos.DtResultados.Rows.Count > 0 Then
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
End If
Else
GVAuxiliar.DataSource = Nothing
End If
ObjMovtos.Dispose()
GVAuxiliar.DataBind()
End Sub
Private Sub CargaAuxiliarClienteAnticipos(CveCliente As Integer, CveVenta As Integer)
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposClienteAuxiliar(CveCliente, CveVenta) Then
DTDatos = ObjMovtos.DtResultados
GVAuxiliar.DataSource = ObjMovtos.DtResultados
If ObjMovtos.DtResultados.Rows.Count > 0 Then
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
'LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
'LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
End If
Else
GVAuxiliar.DataSource = Nothing
End If
ObjMovtos.Dispose()
GVAuxiliar.DataBind()
End Sub
Private Sub CargaAuxiliarProveedor(CveProveedor As Integer, CveCompra As Integer)
Dim ObjMovtos As New ClsContabilidad()
If ObjMovtos.GetProveedorAuxiliar(CveProveedor, CveCompra) Then
DTDatos = ObjMovtos.DtResultados
GVAuxiliar.DataSource = ObjMovtos.DtResultados
If ObjMovtos.DtResultados.Rows.Count > 0 Then
LtlFechaVenta.Text = ObjMovtos.DtResultados.Rows(1)("FechaVenta").ToString.ToDate.ToShortDateString()
LtlFolio.Text = ObjMovtos.DtResultados.Rows(1)("Folio").ToString
LtlImporte.Text = ObjMovtos.DtResultados.Rows(1)("Total").ToString.FormatoNumero(2)
LtlSaldo.Text = ObjMovtos.DtResultados.Rows(1)("Saldo").ToString.FormatoNumero(2)
End If
Else
GVAuxiliar.DataSource = Nothing
End If
ObjMovtos.Dispose()
GVAuxiliar.DataBind()
End Sub
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.BackColor = Drawing.Color.LightGray
e.Row.FCLiteral("LtlFechaMovto").Text = "Totales:&nbsp;"
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(0).ColumnSpan = 2
e.Row.Cells(1).Visible = False
e.Row.Cells(4).ColumnSpan = 3
e.Row.Cells(5).Visible = False
e.Row.Cells(6).Visible = False
e.Row.Cells(7).Visible = False
e.Row.Cells(8).Visible = False
e.Row.Cells(12).Visible = False
ElseIf e.Row.RowIndex = 1 Then
e.Row.Cells(0).Width = Unit.Pixel(95)
e.Row.Cells(1).Width = Unit.Pixel(180)
e.Row.Cells(2).Width = Unit.Pixel(80)
e.Row.Cells(3).Width = Unit.Pixel(80)
e.Row.Cells(4).Width = Unit.Pixel(83)
e.Row.Cells(5).Width = Unit.Pixel(93)
e.Row.Cells(6).Width = Unit.Pixel(85)
e.Row.Cells(7).Width = Unit.Pixel(95)
e.Row.Cells(8).Width = Unit.Pixel(70)
End If
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
If e.Row.FCLiteral("LtlContabilizado").Text = "Si" Then
Dim Liga As String = String.Format("<a class=""Texto"" href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">", e.Row.DBCampo("IdPoliza"))
e.Row.FCLiteral("LtlPoliza").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("Poliza"))
End If
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(2) AndAlso e.Row.DBCampo("CvePersonal").ToEntero > 0 Then
Dim Liga As String = String.Format("<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal={0}"">", e.Row.DBCampo("CvePersonal"))
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
End If
If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then
' e.Row.Cells(10).Text = ""
'End If
ElseIf e.Row.DBCampo("TipoReferencia").ToEntero = 2 Then
Select Case Tipo
Case "CxCClientes"
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveReferencia").ToEntero}"
Case "CxPProveedor"
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveReferencia").ToEntero}"
End Select
End If
'If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(272) AndAlso e.Row.DBCampo("CveCompraAmortizacion").ToEntero > 0 Then
' Dim Liga As String = String.Format("<a class=""Texto"" href=""/Compras/Compras.aspx?CveCompra={0}"">", e.Row.DBCampo("CveCompraAmortizacion"))
' e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
'End If
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(275) AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta").ToEntero}"
'Dim Liga As String = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta"))
'e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
End If
End If
End Sub
Protected Sub GvDatos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GVAuxiliar.RowDeleting
Dim ObjContPaq As ClsContPAQi = Nothing
Dim Conta As New ClsContabilidad()
Conta.IniciaTransacSQL()
Dim ClavePrePoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("CvePrePolizaOriginal").ToEntero
Dim IdPoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("IdPoliza").ToEntero
Dim TieneError = False
If Not TieneError Then
If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then
TieneError = True
End If
End If
If Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
TieneError = True
End If
If Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
If Conta.ValorPolizaDescuadre > 0 Then
TieneError = True
End If
End If
If Not TieneError Then
If IdPoliza > 0 Then
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
ObjContPaq.IniciaTransacSQL()
If Not ObjContPaq.RemovePoliza(IdPoliza) Then
TieneError = True
End If
End If
End If
End If
If Not TieneError Then
Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion, "window.opener.location.reload(); window.close();")
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
Conta.Commit()
Else
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
Conta.RollBack()
End If
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
Conta.Dispose()
CargaDatos()
End Sub
Private Sub GVAuxiliar_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GVAuxiliar.RowUpdating
Dim CvePrePoliza As Integer
Dim ObjConta As New ClsContabilidad
ObjConta.IniciaTransacSQL()
Dim CvePlantillaPoliza As Integer = 0
Dim Importe As Decimal
Dim MsgError As String = ""
If GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal > GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal Then
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal
Else
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal
End If
If CveCliente > 0 Then CvePlantillaPoliza = 11
If CveProveedor > 0 Then CvePlantillaPoliza = 2
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, Now, "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePlantillaPoliza = 2 Then
If Not ObjConta.CancelarPagoCompraConAnticipo(CvePrePoliza, CveCompra, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
MsgError = "Ocurrió un error al cancelar el pago de la compra"
End If
End If
If CvePlantillaPoliza = 11 Then
If Not ObjConta.CancelarPagoVentaConAnticipo(CvePrePoliza, CveVenta, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
MsgError = "Ocurrió un error al cancelar el pago de la venta"
End If
End If
If MsgError = "" Then
ObjConta.Commit()
Alert("El movimiento se canceló exitosamente.")
Else
ObjConta.RollBack()
Alert(MsgError, TipoMensaje.MsgError)
End If
ObjConta.Dispose()
End Sub
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
GenerarPDF("Excel")
End Sub
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosPDF.Click
GenerarPDF()
End Sub
Private Sub GenerarPDF(Optional Formato As String = "PDF")
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If DTDatos IsNot Nothing And DTDatos.Rows.Count > 0 Then
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Tipo", LtlTipo1.Text))
params.Add(New ReportParameter("Folio", LtlFolio.Text))
params.Add(New ReportParameter("Fecha", LtlFechaVenta.Text))
params.Add(New ReportParameter("Importe", LtlImporte.Text))
params.Add(New ReportParameter("Saldo", LtlSaldo.Text))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF("Empresas\Grales\Formatos\RepAuxiliarContable.rdlc", DTDatos, params, "RepAuxiliarContable_" & LtlFolio.Text, Formato:=Formato)
Else
Alert("No se encontró información suficiente.", TipoMensaje.MsgAdvertencia)
End If
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.BackColor = Drawing.Color.LightGray
e.Row.FCLiteral("LtlFechaMovto").Text = "Totales:&nbsp;"
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(0).ColumnSpan = 2
e.Row.Cells(1).Visible = False
e.Row.Cells(4).ColumnSpan = 3
e.Row.Cells(5).Visible = False
e.Row.Cells(6).Visible = False
e.Row.Cells(7).Visible = False
e.Row.Cells(8).Visible = False
e.Row.Cells(12).Visible = False
ElseIf e.Row.RowIndex = 1 Then
e.Row.Cells(0).Width = Unit.Pixel(95)
e.Row.Cells(1).Width = Unit.Pixel(180)
e.Row.Cells(2).Width = Unit.Pixel(80)
e.Row.Cells(3).Width = Unit.Pixel(80)
e.Row.Cells(4).Width = Unit.Pixel(83)
e.Row.Cells(5).Width = Unit.Pixel(93)
e.Row.Cells(6).Width = Unit.Pixel(85)
e.Row.Cells(7).Width = Unit.Pixel(95)
e.Row.Cells(8).Width = Unit.Pixel(70)
End If
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
If e.Row.FCLiteral("LtlContabilizado").Text = "Si" Then
Dim Liga As String = String.Format("<a class=""Texto"" href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">", e.Row.DBCampo("IdPoliza"))
e.Row.FCLiteral("LtlPoliza").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("Poliza"))
End If
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(2) AndAlso e.Row.DBCampo("CvePersonal").ToEntero > 0 Then
Dim Liga As String = String.Format("<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal={0}"">", e.Row.DBCampo("CvePersonal"))
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
End If
If e.Row.DBCampo("TipoReferencia").ToEntero = 1 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Bancos/IE.aspx?CveIE={e.Row.DBCampo("CveReferencia").ToEntero}"
'If e.Row.DBCampo("CveReferencia").ToEntero > 0 Then
' e.Row.Cells(10).Text = ""
'End If
ElseIf e.Row.DBCampo("TipoReferencia").ToEntero = 2 Then
Select Case Tipo
Case "CxCClientes"
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveReferencia").ToEntero}"
Case "CxPProveedor"
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Compras/Compras.aspx?CveCompra={e.Row.DBCampo("CveReferencia").ToEntero}"
End Select
End If
'If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(272) AndAlso e.Row.DBCampo("CveCompraAmortizacion").ToEntero > 0 Then
' Dim Liga As String = String.Format("<a class=""Texto"" href=""/Compras/Compras.aspx?CveCompra={0}"">", e.Row.DBCampo("CveCompraAmortizacion"))
' e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
'End If
If e.Row.DBCampo("CveConceptoContable").ToEntero.Contiene(275) AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
e.Row.FCHyperLink("HplReferencia").NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta").ToEntero}"
'Dim Liga As String = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta"))
'e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
End If
End If
End Sub
Protected Sub GvDatos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GVAuxiliar.RowDeleting
Dim ObjContPaq As ClsContPAQi = Nothing
Dim Conta As New ClsContabilidad()
Conta.IniciaTransacSQL()
Dim ClavePrePoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("CvePrePolizaOriginal").ToEntero
Dim IdPoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("IdPoliza").ToEntero
Dim TieneError = False
If Not TieneError Then
If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then
TieneError = True
End If
End If
If Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
TieneError = True
End If
If Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
If Conta.ValorPolizaDescuadre > 0 Then
TieneError = True
End If
End If
If Not TieneError Then
If IdPoliza > 0 Then
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
ObjContPaq.IniciaTransacSQL()
If Not ObjContPaq.RemovePoliza(IdPoliza) Then
TieneError = True
End If
End If
End If
End If
If Not TieneError Then
Alert("Movimiento Eliminado", TipoMensaje.MsgInformacion, "window.opener.location.reload(); window.close();")
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
Conta.Commit()
Else
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
Conta.RollBack()
End If
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
Conta.Dispose()
CargaDatos()
End Sub
Private Sub GVAuxiliar_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GVAuxiliar.RowUpdating
Dim CvePrePoliza As Integer
Dim ObjConta As New ClsContabilidad
ObjConta.IniciaTransacSQL()
Dim CvePlantillaPoliza As Integer = 0
Dim Importe As Decimal
Dim MsgError As String = ""
If GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal > GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal Then
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Cargo").ToDecimal
Else
Importe = GVAuxiliar.Rows(e.RowIndex).DataKey("Abono").ToDecimal
End If
If CveCliente > 0 Then CvePlantillaPoliza = 11
If CveProveedor > 0 Then CvePlantillaPoliza = 2
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, Now, "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePlantillaPoliza = 2 Then
If Not ObjConta.CancelarPagoCompraConAnticipo(CvePrePoliza, CveCompra, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
MsgError = "Ocurrió un error al cancelar el pago de la compra"
End If
End If
If CvePlantillaPoliza = 11 Then
If Not ObjConta.CancelarPagoVentaConAnticipo(CvePrePoliza, CveVenta, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then
MsgError = "Ocurrió un error al cancelar el pago de la venta"
End If
End If
If MsgError = "" Then
ObjConta.Commit()
Alert("El movimiento se canceló exitosamente.")
Else
ObjConta.RollBack()
Alert(MsgError, TipoMensaje.MsgError)
End If
ObjConta.Dispose()
End Sub
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
GenerarPDF("Excel")
End Sub
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosPDF.Click
GenerarPDF()
End Sub
Private Sub GenerarPDF(Optional Formato As String = "PDF")
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If DTDatos IsNot Nothing And DTDatos.Rows.Count > 0 Then
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Tipo", LtlTipo1.Text))
params.Add(New ReportParameter("Folio", LtlFolio.Text))
params.Add(New ReportParameter("Fecha", LtlFechaVenta.Text))
params.Add(New ReportParameter("Importe", LtlImporte.Text))
params.Add(New ReportParameter("Saldo", LtlSaldo.Text))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF("Empresas\Grales\Formatos\RepAuxiliarContable.rdlc", DTDatos, params, "RepAuxiliarContable_" & LtlFolio.Text, Formato:=Formato)
Else
Alert("No se encontró información suficiente.", TipoMensaje.MsgAdvertencia)
End If
End Sub
Property CvePrePolizaNegativa As Integer
@@ -390,23 +390,37 @@ Partial Class PopUpAuxiliar
Dim TieneError As Boolean = False
ObjContabilidad.IniciaTransacSQL()
If ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) Then
Alert("Se agrego polzia negativa correctamente.")
Else
Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate)
If Not CvePrePolizaNueva > 0 Then
TieneError = True
End If
If TieneError Then
ObjContabilidad.RollBack()
Else
If Not TieneError Then
ObjContabilidad.Commit()
Dim Str As New StringBuilder
Str.Append("Se agrego la póliza de cancelación correctamente.<br/>")
RegistraScript(" $('#DivCancelar').modal('hide'); ")
CargaDatos()
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Str.AppendFormat("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", ObjContabilidad.ContaIdPoliza)
End If
End If
Alert(Str.ToString)
Else
ObjContabilidad.RollBack()
End If
ObjContabilidad.Dispose()
ObjContabilidad.Dispose()
CargaDatos()
End Sub
@@ -424,4 +438,4 @@ Partial Class PopUpAuxiliar
End Class
End Class

View File

@@ -694,7 +694,7 @@ Partial Class RepCxC
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $"&emsp;<b>Registró:</b>&nbsp;{DdlUsuario.SelectedItem.Text}")
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $"&emsp;<b>Responsable:</b>&nbsp;{DdlResponsable.SelectedItem.Text}")
Dim EstatusCob = If(DdlCobranzaEstatus.SelectedValue = "-1", "", $"&emsp;<b>Estatus Cobranza:</b>&nbsp;{DdlCobranzaEstatus.SelectedItem.Text}")
'Dim CorteA As String = If(txtCorteA.Text = "31/12/2018", "", $"&emsp;<b>Corte A:</b>&nbsp;{txtCorteA.Text}")
Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $"&emsp;<b>Corte A:</b>&nbsp;{txtCorteA.Text}")
Dim EstatusCli = If(DdlEstatusCliente.SelectedValue = "-1", "", $"&emsp;<b>Clientes:</b>&nbsp;{DdlEstatusCliente.SelectedItem.Text}")
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $"&emsp;<b>Clasificación Cliente:</b>&nbsp;{DdlClienteClasificacion.SelectedItem.Text}")
@@ -725,7 +725,7 @@ Partial Class RepCxC
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text))
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{EstatusCli}{ClasificacionCli}"))
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{EstatusCli}{ClasificacionCli}{CorteA}"))
params.Add(New ReportParameter("TituloReporte", TituloReporte))
params.Add(New ReportParameter("CantColumnas", CantidadColumnas.ToString))

View File

@@ -833,7 +833,7 @@ Partial Class RepCxCDetalle
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $"&emsp;<b>Registró:</b>&nbsp;{DdlUsuario.SelectedItem.Text}")
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $"&emsp;<b>Responsable:</b>&nbsp;{DdlResponsable.SelectedItem.Text}")
Dim EstatusCob = If(DdlCobranzaEstatusFiltro.SelectedValue = "-1", "", $"&emsp;<b>Estatus Cobranza:</b>&nbsp;{DdlCobranzaEstatusFiltro.SelectedItem.Text}")
'Dim CorteA As String = If(txtCorteA.Text = "31/12/2018", "", $"&emsp;<b>Corte A:</b>&nbsp;{txtCorteA.Text}")
Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $"&emsp;<b>Corte A:</b>&nbsp;{txtCorteA.Text}")
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $"&emsp;<b>Clasificación Cliente:</b>&nbsp;{DdlClienteClasificacion.SelectedItem.Text}")
Dim TituloReporte As String = "REPORTE DE CUENTAS POR COBRAR DEL CLIENTE CON DETALLE"
@@ -850,7 +850,7 @@ Partial Class RepCxCDetalle
params.Add(New ReportParameter("FechaFin", FechaF))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}"))
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}{CorteA}"))
params.Add(New ReportParameter("TituloReporte", TituloReporte))
If Imagen.Exists Then

View File

@@ -1209,7 +1209,7 @@
</Style>
</TextRun>
<TextRun>
<Value> ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a Soluciones en Telemedición JAR SA de CV o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a </Value>
<Value> ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a PAOLA CASTILLO VALENZUELA o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a </Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>

View File

@@ -456,7 +456,7 @@
<Style>
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -468,7 +468,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -490,7 +490,7 @@
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Format>dd/MM/yyyy</Format>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -504,7 +504,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -525,7 +525,7 @@
<Style>
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -537,7 +537,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -555,11 +555,11 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Nombre.Value</Value>
<Value>=IIf(Fields!Nombre.Value = "", IIf(Fields!Gpo.Value = "", Fields!Moneda.Value, Fields!Gpo.Value), Fields!Nombre.Value)</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -571,13 +571,14 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -592,7 +593,7 @@
<Style>
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -606,7 +607,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -629,7 +630,7 @@
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Format>f2</Format>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -641,7 +642,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -664,7 +665,7 @@
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;- #,0.00;'-'</Format>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -678,7 +679,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -701,7 +702,7 @@
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;- #,0.00;'-'</Format>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -715,7 +716,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -737,7 +738,7 @@
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;-#,0.00;'-'</Format>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -751,7 +752,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -773,7 +774,7 @@
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;- #,0.00;'-'</Format>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -787,7 +788,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -810,7 +811,7 @@
<FontSize>8pt</FontSize>
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;-#,0.00;'-'</Format>
<Color>=iif(Fields!CveVenta.Value= "", "White", "Black")</Color>
<Color>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","White","#67809F"), "Black")</Color>
</Style>
</TextRun>
</TextRuns>
@@ -824,7 +825,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveVenta.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>=iif(Fields!CveVenta.Value = "",IIf(Fields!Gpo.Value = "","#67809F","#cccccc"), "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -896,14 +897,16 @@
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>0.18521cm</Top>
<Left>2.8349cm</Left>
<Left>3.37444cm</Left>
<Height>0.6cm</Height>
<Width>12.60299cm</Width>
<Width>21.20747cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -949,9 +952,9 @@
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>1.10271cm</Top>
<Left>8.17404cm</Left>
<Left>9.22743cm</Left>
<Height>0.52945cm</Height>
<Width>10.36447cm</Width>
<Width>10.12635cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
@@ -1018,7 +1021,7 @@
</Style>
</PageHeader>
<PageFooter>
<Height>0.58209cm</Height>
<Height>1.04773cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1140,9 +1143,9 @@
</Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.0829cm</Top>
<Left>9.84544cm</Left>
<Left>10.83183cm</Left>
<Height>0.38981cm</Height>
<Width>2.92333cm</Width>
<Width>2.91804cm</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
@@ -1161,22 +1164,56 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!FechaImpresion.Value</Value>
<Value>=Globals!ExecutionTime</Value>
<Style>
<FontSize>9pt</FontSize>
<Format>g</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox11</rd:DefaultName>
<Top>0.0829cm</Top>
<Left>13.56466cm</Left>
<Height>0.38981cm</Height>
<Width>6.47703cm</Width>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox14">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>IMPRESO EN SIG, Rep. Productos Servicios</Value>
<Style>
<FontSize>9pt</FontSize>
<Format>D</Format>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox11</rd:DefaultName>
<Top>0.0829cm</Top>
<Left>12.75466cm</Left>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.50799cm</Top>
<Left>0.06614cm</Left>
<Height>0.38981cm</Height>
<Width>4.32745cm</Width>
<ZIndex>4</ZIndex>
<Width>6.69369cm</Width>
<ZIndex>5</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1272,6 +1309,14 @@
<DataField>Nombre</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Gpo">
<DataField>Gpo</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Moneda">
<DataField>Moneda</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Codigo">
<DataField>Codigo</DataField>
<rd:TypeName>System.String</rd:TypeName>
@@ -1331,6 +1376,7 @@
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<Language>es-MX</Language>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>
</Report>

View File

@@ -5,6 +5,8 @@ Imports System.Data
Imports Extensiones
Imports System.Xml
Imports Microsoft.Reporting.WebForms
Imports GemBox.Spreadsheet
Partial Class General_SaldosIniciales
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -25,44 +27,46 @@ Partial Class General_SaldosIniciales
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
Dim dt As New DataTable
Dim Conexion As Odbc.OdbcConnection = Nothing
' Conexion As Odbc.OdbcConnection = Nothing
Dim ErrorArchivo = False
Dim ErrorExcel = False
Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1;"""
Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
objDbConnection.ConnectionString = strConnString
objDbConnection.Open()
Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
Try
Select Case Tipo
Case "CSV"
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
Conexion.Open()
Dim cmd = Conexion.CreateCommand()
cmd.CommandType = CommandType.Text
cmd.CommandText = $"SELECT * FROM [{FileName}]"
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
DataAdapter.Fill(dt)
Case "EXCEL"
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
Conexion.Open()
Dim cmd = Conexion.CreateCommand()
cmd.CommandType = CommandType.Text
cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
DataAdapter.Fill(dt)
Case Else
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
Exit Sub
End Select
Catch ex As Exception
ErrorArchivo = True
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
End Try
Conexion.Close()
dt = ReadExcelFile(Ruta + FileName, True)
'Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1;"""
'Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
'Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
'Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
'objDbConnection.ConnectionString = strConnString
'objDbConnection.Open()
'Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
'Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
'Try
' Select Case Tipo
' Case "CSV"
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
' Conexion.Open()
' Dim cmd = Conexion.CreateCommand()
' cmd.CommandType = CommandType.Text
' cmd.CommandText = $"SELECT * FROM [{FileName}]"
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
' DataAdapter.Fill(dt)
' Case "EXCEL"
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
' Conexion.Open()
' Dim cmd = Conexion.CreateCommand()
' cmd.CommandType = CommandType.Text
' cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
' DataAdapter.Fill(dt)
' Case Else
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
' Exit Sub
' End Select
'Catch ex As Exception
' ErrorArchivo = True
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
'End Try
'Conexion.Close()
If Not ErrorArchivo Then
If RblFormato.SelectedValue = "1" Or RblFormato.SelectedValue = "2" Then
If Not dt.Columns(0).ColumnName = "Codigo" Then
@@ -1523,57 +1527,69 @@ Partial Class General_SaldosIniciales
ElseIf RblFormato.SelectedValue = "12" Then
Dim ObjMovimientos As New ClsInventarios
ObjMovimientos.IniciaTransacSQL()
Dim OcurrioError As Boolean = False
Dim ProductosServiciosRef As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
Dim AlmacenRef As DataTable = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
Dim contadorMovimientos As Integer = 0
Dim listadoMovimientos As String = ""
Dim mensajeError As String = ""
Try
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("", DistinctColumns:={"Almacen"}).Rows
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString
Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
'Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
Dim CveAlmacen As Integer = AlmacenRef.FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, 1, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
If CveAlmacen > 0 Then
contadorMovimientos += 1
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = '{almacenActual}'").Rows
Dim CvePS As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePS", $"Codigo = '{nuevaEntrada("CodigoPS")}'").ToEntero
Dim CveUM As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"Codigo = '{nuevaEntrada("CodigoPS")}'").ToEntero
Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' AND CveEmpresa = {UsuarioActual.CveEmpresa}")
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero
If CvePS > 0 Then
If CveUM > 0 Then
Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString.ToDecimal
Dim Valor As Decimal = nuevaEntrada("Valor").ToString.ToDecimal
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, (Valor / Cantidad), -1, -1) Then
OcurrioError = True
mensajeError = "No se logró generar el detalle del movimiento"
Throw New Exception()
End If
Else
OcurrioError = True
mensajeError = $"La unidad de medida no se reconoce para el producto servicio:{nuevaEntrada("CodigoPS")}"
Throw New Exception()
End If
Else
OcurrioError = True
mensajeError = $"No se encontró el producto o servicio con código ""{nuevaEntrada("CodigoPS")}"""
Throw New Exception()
End If
Next
Else
OcurrioError = True
'alert amacén no existe
mensajeError = $"No se encontró el almacén con nombre ""{almacenActual}"""
Throw New Exception()
Exit For
End If
Next
Catch ex As Exception
OcurrioError = True
If mensajeError = "" Then
mensajeError = "Error técnico, informar a soporte"
End If
ObjMovimientos.RollBack()
End Try
If Not OcurrioError Then
If mensajeError = "" Then
ObjMovimientos.Commit()
Alert($"Se cargaron correctamente {contadorMovimientos} movimientos<br/><br/>{listadoMovimientos}")
Else
Alert("Ocurrió un error al cargar las existencias", TipoMensaje.MsgError)
Alert(mensajeError, TipoMensaje.MsgError)
ObjMovimientos.RollBack()
End If
ObjMovimientos.Dispose()
ProductosServiciosRef.Dispose()
AlmacenRef.Dispose()
End If
End If
@@ -1618,5 +1634,51 @@ Partial Class General_SaldosIniciales
End If
End Sub
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
Dim unnamed As Integer = 0
Dim cols As Integer
Dim columns As String()
Dim curRow As Integer = 0
Dim curCol As Integer = 0
Dim dataTable As DataTable = New DataTable()
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
If firstRowHasHeaders Then
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
Else
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
End If
curRow = 1
Else
dataTable.Columns.Add("Column " & (cols + 1))
End If
Next
While curRow < worksheet.Rows.Count
columns = New String(cols - 1) {}
For curCol = 0 To cols - 1
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
columns(curCol) = ""
Else
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
End If
Next
dataTable.Rows.Add(columns)
curRow += 1
End While
Return dataTable
End Function
End Class

View File

@@ -95,15 +95,18 @@
<td>
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False" EmptyDataText="No hay movimientos." ToolTip="Listado de Movimientos" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
<Columns>
<asp:HyperLinkField HeaderText="Folio Almacen" DataTextField="FolioAlmacen" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" ItemStyle-Width="7.5%" />
<asp:HyperLinkField HeaderText="Folio Almacen" DataTextField="FolioAlmacen" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField HeaderText="Almacen" DataField="Almacen" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Fecha Movto" DataField="FechaMovto" DataFormatString="{0:d}" ItemStyle-Width="7.5%" />
<asp:HyperLinkField HeaderText="Folio Compra" DataTextField="FolioCompra" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Total" DataField="TotalAlmacen" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:HyperLinkField HeaderText="Folio Compra" DataTextField="FolioCompra" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Proveedor" DataField="RazonSocial" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Descuentos" DataField="Descuentos" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
</Columns>
</asp:GridView>
</td>

View File

@@ -43,12 +43,15 @@ Partial Class Inventarios_RepAlmacenCompras
#Region " CARGA VALORES INICIALES "
Private Sub CargaPermisos()
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
GvDatos.Columns(6).Visible = TienePermisoImportes
GvDatos.Columns(3).Visible = TienePermisoImportes
GvDatos.Columns(7).Visible = TienePermisoImportes
GvDatos.Columns(8).Visible = TienePermisoImportes
GvDatos.Columns(9).Visible = TienePermisoImportes
GvDatos.Columns(10).Visible = TienePermisoImportes
GvDatos.Columns(11).Visible = TienePermisoImportes
If TienePermisoImportes Then
CabeceraAlmacen.Width = "35%"
CabeceraAlmacen.Width = "36%"
CabeceraCompra.Width = "65%"
Else
CabeceraAlmacen.Width = "45%"

View File

@@ -70,6 +70,7 @@ Partial Class CatFolios
DdlTipoDocto.Items.Insert(31, New ListItem("Proveedor", "Pro"))
DdlTipoDocto.Items.Insert(32, New ListItem("Acreedor", "Acr"))
DdlTipoDocto.Items.Insert(33, New ListItem("Productos/Servicios", "PS"))
DdlTipoDocto.Items.Insert(34, New ListItem("NC de Remisión", "RNC"))
ElseIf UsuarioActual.Empresa.CvePlataforma = 2 Then
DdlTipoDocto.Items.Insert(1, New ListItem("Facturas", "Ing"))
DdlTipoDocto.Items.Insert(2, New ListItem("Notas de Crédito", "Egs"))

View File

@@ -1538,7 +1538,7 @@ Partial Class Ventas_ClientesAbonar
End If
'Conta ContPAQ
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" AndAlso UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If idCuentaContabilizacion > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
IDPoliza = ObjMov.ContaIdPoliza

View File

@@ -46,6 +46,7 @@
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
<asp:ListItem Text="Autorización" Value="PA"></asp:ListItem>
<asp:ListItem Text="Pedido2" Value="Pd2"></asp:ListItem>
<asp:ListItem Text="NC de Remisión" Value="RNC"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Estatus Factura:</b></td>

View File

@@ -661,6 +661,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
params.Add(New ReportParameter("LogoPath", ""))
End If
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
ImprimirPDF("Empresas/Grales/Formatos/RepProductosServiciosDetalle.rdlc", TmpDT, params, "ReportePS")

View File

@@ -233,7 +233,7 @@
<tr>
<td id="dvInv" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 42%; font-size: 14px;"><b>Venta</b></td>
<td id="dvVen" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; border-right-color: white!important; border-left-color: white!important; width: 25%; border-style: solid;"><b>Costo</b></td>
<td id="dvUt" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 40%; font-size: 14px;"><b>Utilidad/Pérdida</b></td>
<td id="dvUt" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 42%; font-size: 14px;"><b>Utilidad/Pérdida</b></td>
</tr>
</table>
</div>
@@ -287,7 +287,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="% Rentabilidad" DataTextFormatString="{0:N}" DataTextField="Rentabilidad" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
</Columns>
</asp:GridView>
</ContentTemplate>

View File

@@ -180,7 +180,9 @@ Partial Class Ventas_RepVentasUtilidad
e.Row.BackColor = ColorTranslator.FromHtml("#95A5A6")
End If
If Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("CveVenta") <> "" Then
If Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("SubTotal").ToDecimal = 0 AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
e.Row.CssClass = "danger"
ElseIf Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("CveVenta") <> "" Then
e.Row.Cells(0).BackColor = ColorTranslator.FromHtml("#e9e9e9")
e.Row.Cells(1).BackColor = ColorTranslator.FromHtml("#e9e9e9")
e.Row.Cells(2).BackColor = ColorTranslator.FromHtml("#e9e9e9")

View File

@@ -4,7 +4,7 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
<style>
.gvFull tr td:nth-child(4) {
/*.gvFull tr td:nth-child(4) {
display: none;
}
@@ -18,7 +18,7 @@
.gvFull tr th:nth-child(7) {
display: none;
}
}*/
.Widthall {
@@ -64,7 +64,8 @@
.white a {
color: white !important;
}
.select2 .select2-selection__rendered {
.select2 .select2-selection__rendered {
line-height: 1;
color: #111;
}
@@ -279,6 +280,48 @@
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpBonificacion" runat="server" UpdateMode="Conditional" class="col-md-4">
<ContentTemplate>
<div class="portlet smmallpadding light bordered" id="Div2" runat="server">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase"><a id="A2" runat="server" class="Texto">Bonificación </a></span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-top: 0px; margin-top: -5px;">
<div class="form-body">
<asp:GridView ID="GvBonificacion" runat="server" CssClass="table table-striped table-hover Widthall"
AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText=""
GridLines="None" DataKeyNames="CveVenta,Serie,Folio,SerieFolio,FolioFiscal,TipoDocto,CveConceptoContable,Importe">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>Factura</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplFactura" runat="server" Target="_blank" CssClass="Texto" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha" DataField="FechaAplicado" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Total" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Anticipo/NC/IxC" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Mon" DataField="Moneda" ItemStyle-HorizontalAlign="Center" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDetallesCosto" runat="server" UpdateMode="Conditional" class="col-md-4">
<ContentTemplate>
<div class="portlet smmallpadding light bordered" id="Div1" runat="server">
@@ -320,7 +363,7 @@
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UpIndicador" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivUtilidad" visible="False" runat="server" class="col-md-3">
@@ -371,10 +414,10 @@
<ContentTemplate>
<div id="dvCa" style="width:100%;top:40px">
<table id="dTable" class="correcto table Widthall Titulos"><tr>
<td id="Td1" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; width:30%;"><b>Producto</b></td>
<td id="dvInv" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; width:25%; border-left-color: white!important;border-style: solid;border-right-color: white!important;"><b>Venta</b></td>
<td id="dvVen" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:18%;border-style: solid;"><b>Costo</b></td>
<td id="dvUt" runat="server" class="dataTables_scrollHead" style="text-align:center!important;width: 35%;font-size:14px; "><b>Utilidad/Pérdida</b></td>
<td id="Td1" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; width:25%;"><b>Producto</b></td>
<td id="dvInv" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; width:30%; border-left-color: white!important;border-style: solid;border-right-color: white!important;"><b>Venta</b></td>
<td id="dvVen" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:15%;border-style: solid;"><b>Costo</b></td>
<td id="dvUt" runat="server" class="dataTables_scrollHead" style="text-align:center!important;width: 15%;font-size:14px; "><b>Utilidad/Pérdida</b></td>
</tr></table>
</div>
</ContentTemplate>
@@ -383,51 +426,72 @@
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Cant." ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Cant." ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="LbCantVenta" runat="server" Text='<%# If(Eval("CantVta").ToString() = "0", "-", Eval("CantVta", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Código" ItemStyle-Width="10%">
<asp:TemplateField HeaderText="Código" >
<ItemTemplate>
<asp:Label ID="LbCodigo" runat="server" Text='<%# If(Eval("Codigo").ToString() = "0", "-", Eval("Codigo", "{0:#,###.##}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PS" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left">
<asp:TemplateField HeaderText="PS" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="LbPS" runat="server" Text='<%# If(Eval("PS").ToString() = "0", "-", Eval("PS", "{0:#,###.##}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="5%" DataNavigateUrlFields="CveVenta" DataTextField="SerieFolio" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataTextField="SerieFolio" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
<asp:TemplateField HeaderText="P.U" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
<asp:TemplateField HeaderText="P.U" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbPU1" runat="server" Text='<%# If(Eval("PUVta").ToString() = "0", "-", Eval("PUVta", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
<asp:TemplateField HeaderText="SubTotal" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbTotal1" runat="server" Text='<%# If(Eval("TotalVta").ToString() = "0", "-", Eval("TotalVta", "{0:#,###.00}")) %>'></asp:Label>
<asp:Label ID="LbSubTotal" runat="server" Text='<%# If(Eval("SubTotal").ToString() = "0", "-", Eval("SubTotal", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbDescuento" runat="server" Text='<%# If(Eval("Descuento").ToString() = "0", "-", Eval("Descuento", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Bonificacion" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbBonificacion" runat="server" Text='<%# If(Eval("Bonificacion").ToString() = "0", "-", Eval("Bonificacion", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SubTotal2" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbSubTotal2" runat="server" Text='<%# If(Eval("SubTotal2").ToString() = "0", "-", Eval("SubTotal2", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="5%" DataNavigateUrlFields="CveMovimiento" DataTextField="FolioMovto" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"/>
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveMovimiento" DataTextField="FolioMovto" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"/>
<asp:TemplateField HeaderText="P.U " ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
<asp:TemplateField HeaderText="P.U " ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbPUs" runat="server" Text='<%# If(Eval("PUInv").ToString() = "0", "-", Eval("PUInv", "{0:#,###.##}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbTotal" runat="server" Text='<%# If(Eval("TotalInv").ToString() = "0", "-", Eval("TotalInv", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
@@ -437,25 +501,25 @@
<asp:TemplateField HeaderText="Utilidad" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Right">
<asp:TemplateField HeaderText="Utilidad" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbUt" runat="server" Text='<%# If(Eval("Utilidad").ToString() = "0", "-", Eval("Utilidad", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="%" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Right">
<asp:TemplateField HeaderText="%" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbPorUtilidad" runat="server" Text='<%# If(Eval("PorUtilidad").ToString() = "0", "-", Eval("PorUtilidad", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Pérdida" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Right">
<asp:TemplateField HeaderText="Pérdida" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbPerdida" runat="server" Text='<%# If(Eval("Perdida").ToString() = "0", "-", Eval("Perdida", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="%" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Right">
<asp:TemplateField HeaderText="%" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LbPorPerdida" runat="server" Text='<%# If(Eval("PorPerdida").ToString() = "0", "-", Eval("PorPerdida", "{0:#,###.00}")) %>'></asp:Label>
</ItemTemplate>

View File

@@ -196,7 +196,14 @@ Partial Class Ventas_RepVentasUtilidadDetalle
LblPorUtilidad.Text = ((ObjVentas.Utilidad - ObjVentas.Perdida) / ObjVentas.SubTotalVenta * 100).ToString("N2")
LblPerdida.Text = "$" + (ObjVentas.Perdida - ObjVentas.Utilidad).ToString("N2")
LblPorPerdida.Text = ((ObjVentas.Perdida - ObjVentas.Utilidad) / ObjVentas.SubTotalVenta * 100).ToString("N2")
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
GvBonificacion.DataSource = ObjVentas.DtResultados
End If
ObjVentas.Dispose()
GvBonificacion.DataBind()
If ObjVentas.SubTotalVenta <> ObjVentas.SubTotalVentaDolares Then
LbSubTotalDolares.Visible = True
@@ -220,10 +227,12 @@ Partial Class Ventas_RepVentasUtilidadDetalle
End If
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Or e.Row.DBCampo("CveVentaDetalle") = "" Then
If e.Row.DBCampo("CveVentaDetalle") = "" AndAlso e.Row.DBCampo("CveVenta") = "" Then
e.Row.CssClass = "Totales"
Else
'e.Row.Cells(0).BackColor = ColorTranslator.FromHtml("#e9e9e9")

View File

@@ -1238,6 +1238,7 @@
<asp:HyperLink ID="HplFactura" runat="server" Target="_blank" CssClass="Texto" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha" DataField="FechaAplicado" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Total" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Anticipo/NC/IxC" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
@@ -1252,6 +1253,7 @@
<asp:HyperLink ID="HplFactura" runat="server" Target="_blank" CssClass="Texto" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha" DataField="FechaAplicado" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Total" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Anticipo/NC/IxC" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
@@ -1419,7 +1421,7 @@
</td>
<td><b>T.C.:</b></td>
<td>
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static"></asp:TextBox>
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static" Readonly ="true"></asp:TextBox>
<asp:CompareValidator ID="CVTipoCambio" runat="server" ControlToValidate="TxtTipoCambio" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="CVTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:Label runat="server" ID="LblTCValuacion" ToolTip="Última Valuación" Text="" Visible="false"></asp:Label>

View File

@@ -1727,6 +1727,10 @@ Partial Class Ventas
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Pd2"))
If UsuarioActual.Empresa.Funcionalidad(344).ToString = "1" Then
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("NC de Remisión", "RNC"))
End If
If UsuarioActual.Empresa.Funcionalidad(528) = "1" Then 'FUNCIONALIDAD. DE REGISTRO DE CUENTA PREDIAL.
GvPS.Columns(ColumnaPredial).Visible = True
thPredial1.Visible = True
@@ -6568,11 +6572,11 @@ Partial Class Ventas
'ContPAQ El movimiento 1 es el de Venta
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "Cot", "Ped", "Pd2", "PA", "NC") Then
If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "NC") Then
AutoConta = False
End If
If AutoConta And UsuarioActual.Empresa.UsaContabilidad = True Then
If AutoConta Then
If idCuentaContabilizacion > 0 Then
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
@@ -6623,7 +6627,7 @@ Partial Class Ventas
Dim EstatusSMS = 0
'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO
If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "Cot", "Ped", "DPe", "PA", "Pd2")) Then
If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "RNC", "Cot", "Ped", "DPe", "PA", "Pd2")) Then
Dim DebeTimbrar As Boolean = True
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then
@@ -9104,7 +9108,7 @@ Partial Class Ventas
CvePlantilaPoliza = 4
ElseIf ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
CvePlantilaPoliza = 7
ElseIf ObjFactura.TipoDocto = "Rem" Then
ElseIf ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
CvePlantilaPoliza = 4
End If
@@ -9173,7 +9177,7 @@ Partial Class Ventas
Select Case ConceptoContable
Case 1 'Cliente
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem") Then
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
@@ -9247,6 +9251,37 @@ Partial Class Ventas
ViewState("SeGuardoPrePoliza") = True
End If
Case 277 'Remisión del cliente
If ObjFactura.TipoDocto = "RNC" Then
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
CveSubProyectoContabilizar = CveSubProyectoVenta
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
If tipoCambio = 1 Then
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
Else
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
End If
IdCtaContableCliente = IdCtaContable
CveCuentaCliente = CveCuenta
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
End If
Else
ErrorPrepoliza = True
End If
importeMovimiento = 0
ViewState("SeGuardoPrePoliza") = True
End If
Case 12 'Nota de Credito
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
importeMovimiento = ObjFactura.Total * ValorMultiplicador
@@ -9712,7 +9747,7 @@ Partial Class Ventas
importeMovimiento = 0
Case 4 'Venta Clasificacion
If Not ObjFactura.TipoDocto.Contiene("Rem", "Ant", "Egs", "Dev") Then
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC", "Ant", "Egs", "Dev") Then
Dim ConceptoContableAplicar = 4
Dim CveVentaAplicar = ObjFactura.CveVenta
@@ -9890,7 +9925,7 @@ Partial Class Ventas
importeMovimiento = 0
Case 103 'Descuento
If Not ObjFactura.TipoDocto.Contiene("Rem") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then
importeMovimiento = ObjFactura.Descuento * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
@@ -9937,7 +9972,7 @@ Partial Class Ventas
End If
Case 8 'Ret IVA por Trasladar
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
importeMovimiento = ObjFactura.RetIVA * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
@@ -9968,7 +10003,7 @@ Partial Class Ventas
End If
Case 9 'Ret ISR por Trasladar
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
importeMovimiento = ObjFactura.RetISR * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
@@ -9998,7 +10033,7 @@ Partial Class Ventas
End If
End If
Case 13 'Iva por Trasladar
If Not ObjFactura.TipoDocto.Contiene("Rem") Then
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then
importeMovimiento = ObjFactura.IVA * ValorMultiplicador
importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2)
FechaMovimiento = ObjFactura.FechaPago
@@ -20758,13 +20793,19 @@ Partial Class Ventas
CalculaTotalesVenta(True)
'condicióon, en la que se verifica que el importe total de aplicación de la nota de crédito sea igual al del total de la nota de crédito, ej. saldo de la factura 1000.01 y la nota de crédito se generó po 1000.00
If Not AplicaNCMasiva Then
Dim TT As Decimal = TxtNCImporte.Text.ToDecimal
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
CargaNCDT(CveVenta, TT)
End If
End If
'verifica el tipo de cambio que se actualice
If DdlMoneda.SelectedValue <> "1" Then
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString
End If
LblTCValuacion.Visible = False
UpPS.Update()
LBNotaCredito.Visible = False