-- mejora.
--- facturaglobal. considerar de todos los clientes para emitir
This commit is contained in:
@@ -110,7 +110,7 @@ Partial Class Ventas_FacturacionGlobal
|
|||||||
GvDatos.Columns(7).Visible = True
|
GvDatos.Columns(7).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveCliente As Integer = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
Dim CveCliente As Integer = -1 'UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ Partial Class Ventas_FacturacionGlobal
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||||
Dim CveCliente As Integer = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
Dim CveCliente As Integer = -1 'UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||||
Dim CveMoneda As Integer = 1
|
Dim CveMoneda As Integer = 1
|
||||||
|
|
||||||
Dim SbRemisiones As New StringBuilder()
|
Dim SbRemisiones As New StringBuilder()
|
||||||
@@ -231,8 +231,8 @@ Partial Class Ventas_FacturacionGlobal
|
|||||||
|
|
||||||
ObjFactura.PreparaTimbre()
|
ObjFactura.PreparaTimbre()
|
||||||
|
|
||||||
If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.01 Then
|
If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.1 Then
|
||||||
Alert("Los pagos no coinciden con el total de la factura", TipoMensaje.MsgError)
|
Alert($"Los pagos no coinciden con el total de la factura [{ObjFactura.Total.RoundSQL(2)}-{ DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)}]", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -346,6 +346,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
Dim MsgError As String = ""
|
Dim MsgError As String = ""
|
||||||
Dim SaldoPendiente As Decimal = DbRowVenta("Saldo").ToString.ToDecimal
|
Dim SaldoPendiente As Decimal = DbRowVenta("Saldo").ToString.ToDecimal
|
||||||
|
Dim SaldoTotalInicial As Decimal = DbRowVenta("Saldo").ToString.ToDecimal
|
||||||
Dim PagoAplicado As Decimal = 0
|
Dim PagoAplicado As Decimal = 0
|
||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
@@ -384,8 +385,8 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
|
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
|
||||||
|
|
||||||
PagoAplicado += PagoEfectivo
|
PagoAplicado += PagoEfectivo
|
||||||
If PagoAplicado > VentaActual.Total Then
|
If PagoAplicado >= SaldoTotalInicial Then
|
||||||
TxtCambio.Text = (PagoAplicado - VentaActual.Total).FormatoNumero
|
TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero
|
||||||
PagoEfectivo = SaldoPendiente
|
PagoEfectivo = SaldoPendiente
|
||||||
End If
|
End If
|
||||||
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
|
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
|
||||||
|
|||||||
Reference in New Issue
Block a user