This commit is contained in:
@@ -4334,6 +4334,7 @@ Partial Class Ventas
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") AndAlso GvRemisiones.Rows.Count > 0 Then
|
||||
ChkDevAlm.Checked = True
|
||||
ChkDevAlm.Enabled = False
|
||||
LiDevolucionAlmacen.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -8776,10 +8777,10 @@ Partial Class Ventas
|
||||
'Try
|
||||
'Obj.SetSubProyecto(Me)
|
||||
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
If Timbre.Comprobante.LugarExpedicion = "" Then
|
||||
Dim aa As String = "no se guardo lugar de expedicion"
|
||||
aa.GuardaLog()
|
||||
End If
|
||||
If Timbre.Comprobante.LugarExpedicion = "" Then
|
||||
Dim aa As String = "no se guardo lugar de expedicion"
|
||||
aa.GuardaLog()
|
||||
End If
|
||||
'Catch ex As Exception
|
||||
|
||||
'End Try
|
||||
@@ -9425,15 +9426,20 @@ Partial Class Ventas
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Then
|
||||
If DtVentasNC IsNot Nothing Then
|
||||
For Each row As DataRow In DtVentasNC.Rows
|
||||
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, row("CveVenta").ToString.ToEntero) Then
|
||||
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico")
|
||||
If Not row("CveVenta").ToString.ToEntero = -1 Then
|
||||
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, row("CveVenta").ToString.ToEntero) Then
|
||||
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveVenta) Then
|
||||
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico")
|
||||
If Not CveVenta = -1 Then
|
||||
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveVenta) Then
|
||||
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -11023,15 +11029,6 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
||||
|
||||
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
|
||||
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
|
||||
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al traspasos saldos en refacturación")
|
||||
End If
|
||||
End If
|
||||
|
||||
'Si es Facturacion de una remision cancelamos, traspasamos saldos y agregamos evento a la bitacora
|
||||
If RemisionesLista.Count > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
|
||||
|
||||
@@ -11124,9 +11121,18 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
||||
|
||||
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
|
||||
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
|
||||
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al traspasos saldos en refacturación")
|
||||
End If
|
||||
End If
|
||||
|
||||
Return ErrorPrepoliza
|
||||
Catch ex As Exception
|
||||
GuardaLog(ex.ToString())
|
||||
GuardaLog("GuardaPreP." & ex.ToString())
|
||||
Return True
|
||||
End Try
|
||||
|
||||
@@ -11169,7 +11175,7 @@ Partial Class Ventas
|
||||
CveConceptoAlmacen = 18
|
||||
End If
|
||||
|
||||
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
|
||||
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEnteroca
|
||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E1")
|
||||
|
||||
If CveMovimientoInventario <= 0 Then
|
||||
@@ -13462,7 +13468,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLog(ex.ToString())
|
||||
GuardaLog("CancelF." & ex.ToString())
|
||||
ErrorCancelar = True
|
||||
End Try
|
||||
|
||||
@@ -22047,14 +22053,14 @@ Partial Class Ventas
|
||||
If UltimoRenglon = DtImpuestos.Rows.Count Then
|
||||
'ajusta 5 centavos de diferencia
|
||||
If Acumulado12 <> AcumuladoNC And Math.Abs(Acumulado12 - AcumuladoNC) <= 0.05 Then
|
||||
Ajuste = Acumulado12 - AcumuladoNC
|
||||
Ajuste = (Acumulado12 - AcumuladoNC)
|
||||
End If
|
||||
End If
|
||||
UltimoRenglon += 1
|
||||
AgregaTempDT(TmpDT, DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, DrPS("Codigo").ToString, DrPS("PSCodigo").ToString, DrPS("CveTipoPS").ToString.ToEntero, DrPS("Inv_CveMetodoInventario").ToString.ToEntero,
|
||||
DrPS("CveUM").ToString.ToEntero, DrPS("UnidadMedida").ToString, DrPS("CveClasificacion").ToString.ToEntero, DrPS("Clasificacion").ToString, CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString.ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("ImporteRetIVA").ToString.ToDecimal,
|
||||
Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal, "", "", -1, -1,
|
||||
Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal(), "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1)
|
||||
Next
|
||||
|
||||
@@ -22166,7 +22172,7 @@ Partial Class Ventas
|
||||
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
|
||||
Dim difTmp As Decimal = Importe - importeNC
|
||||
|
||||
If Math.Abs(difTmp) >= 0.01 Then
|
||||
If Math.Abs(difTmp) > 0.00D Then
|
||||
'asusto la diferencia en el último concepto
|
||||
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString.ToDecimal + difTmp
|
||||
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
|
||||
|
||||
Reference in New Issue
Block a user