Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Option Strict On
|
||||
Option Infer On
|
||||
|
||||
Imports System.Activities.Expressions
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Diagnostics
|
||||
@@ -3547,6 +3548,10 @@ Partial Class Ventas
|
||||
End If
|
||||
UpPS.Update()
|
||||
|
||||
If DdlTipoComprobante.Items.FindByValue("RNC") Is Nothing Then
|
||||
DdlTipoComprobante.Items.Add(New ListItem("Remisión de nota de crédito", "RNC"))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -5057,10 +5062,6 @@ Partial Class Ventas
|
||||
|
||||
Select Case DbRowVenta("TipoDocto").ToString()
|
||||
Case "Ing"
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TxtAtencionA.Text = DbRowVenta("AtencionA").ToString()
|
||||
End If
|
||||
|
||||
Trsaldo.Visible = True
|
||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
@@ -5097,10 +5098,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Case "Rem"
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TxtAtencionA.Text = DbRowVenta("AtencionA").ToString()
|
||||
End If
|
||||
|
||||
Trsaldo.Visible = True
|
||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
@@ -5260,6 +5257,10 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TxtAtencionA.Text = DbRowVenta("AtencionA").ToString()
|
||||
End If
|
||||
|
||||
DdlTipoRelacionARelacionar.SelectedValueExist(DbRowVenta("CveTipoRelacion").ToString())
|
||||
|
||||
'contado 0, credito 1, terminal 2
|
||||
@@ -9244,6 +9245,11 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso TxtAtencionA.Text.Trim.Length = 0 Then
|
||||
Alert("El campo 'Atención A' es requerido. Favor de llenarlo", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not ValidaImportePublicoGeneral() Then
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -14869,6 +14875,33 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
'SI ES PAGO CON DEVOLUCION
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 277 Then
|
||||
|
||||
If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
||||
importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal() * Multiplicador
|
||||
importeMX = importeMovimiento * tipoCambio
|
||||
sumaAmorticaciones += importeMovimiento
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(344) = "1" AndAlso ObjFactura.TipoDocto = "Egs" Then
|
||||
@@ -16201,7 +16234,11 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
GVAnticipos.Columns(4).Visible = False
|
||||
GVAnticipos.Columns(7).Visible = False
|
||||
GVAnticipos.Columns(8).Visible = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
GVAnticipos.Columns(6).Visible = True
|
||||
End If
|
||||
|
||||
GVAnticipos.DataBind()
|
||||
End If
|
||||
@@ -16339,7 +16376,7 @@ Partial Class Ventas
|
||||
'SI UN REGISTRO ES DE DIFERENTE MONEDA AL DOCUMENTO SE MUESTRAN LAS COLUMNAS
|
||||
If e.Row.DBCampo("CveMoneda").ToString().ToEntero() > 0 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() <> DdlMoneda.SelectedValue.ToEntero() Then
|
||||
GVAnticipos.Columns(4).Visible = True
|
||||
GVAnticipos.Columns(7).Visible = True
|
||||
GVAnticipos.Columns(8).Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -16740,7 +16777,7 @@ Partial Class Ventas
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
|
||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||
If gvr.FCCheckBox("Chk" & gvr.RowIndex) IsNot Nothing AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked AndAlso gvr.DataKey("CveConceptoContable").ToEntero().Contiene(12) Then
|
||||
If gvr.FCCheckBox("Chk" & gvr.RowIndex) IsNot Nothing AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked AndAlso gvr.DataKey("CveConceptoContable").ToEntero().Contiene(12, 277) Then
|
||||
Amortizacion += gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text.ToDecimal ' - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
||||
End If
|
||||
Next
|
||||
@@ -20180,28 +20217,14 @@ Partial Class Ventas
|
||||
'si tiene la funcionalidad que se active independiente del tipo de documento RMF 15-10-2017
|
||||
Tr33.Visible = True
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs", "Dev") Then
|
||||
BtnEmitirImprimir.Text = "Emitir e Imprimir"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
ElseIf DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Then
|
||||
BtnEmitirImprimir.Text = "Emitir e Imprimir"
|
||||
'TdReferencia.Style.Remove("display")
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||
ElseIf DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ped", "PeC", "PA", "RNC", "Com") Then
|
||||
BtnEmitirImprimir.Text = "Registrar"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
ElseIf DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC", "PA") Then
|
||||
BtnEmitirImprimir.Text = "Registrar"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
BtnEmitirImprimir.Text = "Cotizar"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
|
||||
'FACTURACION 3.3
|
||||
Tr33.Visible = True
|
||||
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Com" Then
|
||||
BtnEmitirImprimir.Text = "Registrar"
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
ElseIf DdlTipoComprobante.SelectedValue.ToString() = "OP" Then
|
||||
BtnEmitirImprimir.Text = "Registrar"
|
||||
TdOrdenPago.Visible = True
|
||||
@@ -26772,26 +26795,7 @@ Partial Class Ventas
|
||||
|
||||
#Region " SALDAR VENTA "
|
||||
Protected Sub BtnSaldarVenta_Click(sender As Object, e As EventArgs)
|
||||
'SaldarVenta()
|
||||
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
|
||||
Dim FolioFiscal As String = LblFolioFiscal.Text
|
||||
Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||
Dim RFCReceptor As String = LblRFC.Text
|
||||
Dim CvePACCancelacion As Integer = 4
|
||||
|
||||
|
||||
Dim RespCancelacion As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, TxtTotal.Text.ToDecimal, RFCReceptor, RFCEmisor, CvePACCancelacion, CveSATMotivoCancelacion:=3)
|
||||
|
||||
If RespCancelacion.Verificado Then
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("Los servicios de cancelación del SAT no se encuentran disponibles o presentan time out. Intente de nuevo en unos minutos.<br/>Origen del error: WebService www.sat.gob.mx", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
SaldarVenta()
|
||||
End Sub
|
||||
Private Sub SaldarVenta()
|
||||
'Dim ObjVenta As New ClsVentas
|
||||
@@ -26805,9 +26809,6 @@ Partial Class Ventas
|
||||
'RegistraScript("$('#ModalSaldarVenta').modal('hide')", "ModalSaldarVentaHidde")
|
||||
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
Dim MsgError As String = ""
|
||||
|
||||
@@ -26919,69 +26920,74 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim UsaComplementaria As Boolean = True
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Try
|
||||
If MsgError = "" AndAlso Saldo > 0 Then
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Ventas/Saldarr", 47, SaldoVenta, SaldoVenta, tCveMoneda, FechaPago, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If MsgError = "" AndAlso Saldo > 0 Then
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Ventas/Saldarr", 47, SaldoVenta, SaldoVenta, tCveMoneda, FechaPago, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If UsaComplementaria AndAlso tCveMoneda = 2 Then
|
||||
'normal
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, If(tCveMoneda = 1, Saldo, Saldo), CveConceptoCliente, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
'complementaria
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, If(tCveMoneda = 1, Saldo, (Saldo * TCVenta) - Saldo), 207, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteME:=Saldo, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, If(tCveMoneda = 1, Saldo, Saldo * TCVenta), CveConceptoCliente, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'fluctuación.
|
||||
If tCveMoneda = 2 Then
|
||||
Dim ImporteFluctuacion As Decimal = 0
|
||||
ImporteFluctuacion = Saldo * (TCPago - TCVenta)
|
||||
If TCPago > TCVenta Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Math.Abs(ImporteFluctuacion), 64, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||
If UsaComplementaria AndAlso tCveMoneda = 2 Then
|
||||
'normal
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, If(tCveMoneda = 1, Saldo, Saldo), CveConceptoCliente, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
'complementaria
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, If(tCveMoneda = 1, Saldo, (Saldo * TCVenta) - Saldo), 207, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteME:=Saldo, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), Math.Abs(ImporteFluctuacion), 65, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, If(tCveMoneda = 1, Saldo, Saldo * TCVenta), CveConceptoCliente, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
End If
|
||||
|
||||
'cuando hay pago en dólares, se ajusta el concepto de subtotal,
|
||||
SubTotal = (Saldo * TCVenta) + ImporteFluctuacion - (IVA * TCVenta) - (IEPS * TCVenta)
|
||||
|
||||
End If
|
||||
If IVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, If(tCveMoneda = 1, IVA, IVA * TCVenta), 13, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, If(tCveMoneda = 1, IEPS, IEPS * TCVenta), 38, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
'al gasto,Subtotal
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, SubtotalMovto, SubTotal, SubTotal, CveConceptoDeduccion, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
|
||||
GuardaLogAD($"Ventas/ClientesAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MsgError = "Saldo Cero"
|
||||
End If
|
||||
|
||||
'fluctuación.
|
||||
If tCveMoneda = 2 Then
|
||||
Dim ImporteFluctuacion As Decimal = 0
|
||||
ImporteFluctuacion = Saldo * (TCPago - TCVenta)
|
||||
If TCPago > TCVenta Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Math.Abs(ImporteFluctuacion), 64, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), Math.Abs(ImporteFluctuacion), 65, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
End If
|
||||
|
||||
'cuando hay pago en dólares, se ajusta el concepto de subtotal,
|
||||
SubTotal = (Saldo * TCVenta) + ImporteFluctuacion - (IVA * TCVenta) - (IEPS * TCVenta)
|
||||
|
||||
End If
|
||||
If IVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, If(tCveMoneda = 1, IVA, IVA * TCVenta), 13, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, If(tCveMoneda = 1, IEPS, IEPS * TCVenta), 38, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
'al gasto,Subtotal
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, SubtotalMovto, SubTotal, SubTotal, CveConceptoDeduccion, SerieFolio, ConceptoPartida, CveCliente:=CveCliente, CveVenta:=CveVenta, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
|
||||
GuardaLogAD($"Ventas/ClientesAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MsgError = "Saldo Cero"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgError = "Ocurrió un error al saldar"
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
|
||||
If MsgError = "" Then
|
||||
'ObjConta.RollBack()
|
||||
@@ -29002,6 +29008,13 @@ Partial Class Ventas
|
||||
CambiaTipoDocto()
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If TxtAtencionA.Text.Trim.Length = 0 Then
|
||||
TxtAtencionA.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al aplicar NC", ex)
|
||||
End Try
|
||||
@@ -30023,6 +30036,12 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If TxtAtencionA.Text.Trim.Length = 0 Then
|
||||
TxtAtencionA.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
AplicaDevolucion = True
|
||||
SaldoVentaDevolucion = HplSaldoAuxiliar.Text.ToDecimal
|
||||
CveVentaDevolucion = CveVenta
|
||||
@@ -30691,7 +30710,7 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'NC' ", "")}")
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC') ", "")}")
|
||||
divAmortizacionTipoRelacion.Visible = False
|
||||
GVAnticipos.DataSource = DtMovtos
|
||||
GVAnticipos.DataBind()
|
||||
@@ -31891,7 +31910,7 @@ Partial Class Ventas
|
||||
CveMetodoPago = Dr("CveMetodoPago33").ToString().ToEntero()
|
||||
Next
|
||||
|
||||
If EsRemisionMedica Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso EsRemisionMedica Then
|
||||
TxtObsFact.Text = If(MensajeRemisionesMedicas.ToString().Length > 0, MensajeRemisionesMedicas.ToString().Substring(0, MensajeRemisionesMedicas.ToString().Length - 2), "")
|
||||
Else
|
||||
TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "")
|
||||
@@ -36927,8 +36946,14 @@ Partial Class Ventas
|
||||
If DdlClientesModal.SelectedValue.ToEntero > 0 Then
|
||||
ViewState("CveCliente") = DdlClientesModal.SelectedValue.ToEntero
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Dim CveClientePublicoGeneral As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", " RFC = 'XAXX010101000' ").ToEntero
|
||||
|
||||
If CveClientePublicoGeneral > 0 Then
|
||||
ViewState("CveCliente") = CveClientePublicoGeneral
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user