diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 7c08d813d..254a7c886 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -939,7 +939,7 @@ Public Class ClsContabilidad
.Add("@CvePrePolizaOriginal", SqlDbType.Int).Value = CvePrePolizaOriginal
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
.Add("@TipoMovto", SqlDbType.Bit).Value = TipoMovimiento
- .Add("@Importe", SqlDbType.Money).Value = If(CveConceptoContable = 30, Importe, Math.Round(Importe, 2))
+ .Add("@Importe", SqlDbType.Money).Value = Math.Round(Importe, 2)
.Add("@ImporteMX", SqlDbType.Money).Value = Math.Round(ImporteMX, 2)
.Add("@ImporteME", SqlDbType.Money).Value = Math.Round(ImporteME, 3)
.Add("@TC", SqlDbType.Decimal).Value = TipoCambio
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 7a6893c9d..acbed6511 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -759,7 +759,7 @@ Namespace Modelos
If ObjContPaqTransac IsNot Nothing Then
ObjContPaq = ObjContPaqTransac
Else
- If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
+ If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1") Then
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
End If
End If
@@ -3825,6 +3825,49 @@ Namespace Modelos
If Not (GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenTraspasoDestino, 9, factura.CveMoneda, factura.CveVenta, "Modelos/SD2", CveMovimientoRelacionado:=CveMovimientoSalida) > 0) Then
OcurrioError = True
End If
+
+ ' COMIENZA: GARANTIAS
+ Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero()
+ Dim DtGarantias As DataTable = Nothing
+
+ If ObjAcum.GetGarantiasDetalle(factura.CveVenta) Then
+ DtGarantias = ObjAcum.DtResultados.Copy()
+ End If
+
+ If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then
+ Dim TotalGarantia As Decimal = 0
+ Dim CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 2, 1, factura.Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, -1, -1, Observaciones:="", Guia:="", Modulo:="Modelos/SDGA")
+ Dim FolioGarantia = ObjInventario.Folio
+
+ For Each RowGarantia As DataRow In DtGarantias.Rows
+ Dim CvePS = RowGarantia("CvePS").ToString().ToEntero()
+ Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero()
+ Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero()
+ Dim PU As Decimal = RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble()
+ Dim Serie As String = RowGarantia("Comprobante").ToString
+
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, Serie:=Serie, CveVentaDetalle:=RowGarantia("CveVentaDetalle").ToString.ToEntero) Then
+ OcurrioError = True
+ Exit For
+ End If
+ TotalGarantia += (RowGarantia("Cantidad").ToString().ToDecimal() * PU)
+ Next
+
+ Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/Gar", 53, 0, 0, 1, factura.Fecha, "Entrada Garantía", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ If CvePrePolizaTraspaso > 0 Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, TotalGarantia, "MOVIMIENTO DE GARANTIA", 68, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
+ OcurrioError = True
+ End If
+
+ If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, TotalGarantia, "MOVIMIENTO DE GARANTIA", 331, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
+ OcurrioError = True
+ End If
+ Else
+ OcurrioError = True
+ End If
+
+ End If
+
Else
OcurrioError = True
End If
@@ -5095,7 +5138,7 @@ Namespace Modelos
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
Dim ObjAC As ClsContPAQi = Nothing
- If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
+ If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1") Then
ObjAC = New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
End If
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs
index ad11e336e..dfbffe5c3 100644
--- a/Bancos/Devoluciones.aspx.cs
+++ b/Bancos/Devoluciones.aspx.cs
@@ -385,6 +385,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
int CveConceptoContableBanco = 30;
int CveConceptoContableDevolucion = 0;
int CvePlantillaPoliza = 0;
+ int CveTipoPoliza = 1;// tipo ingreso
int CvePrePoliza = 0;
int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero();
int FolioFijo = 0;
@@ -403,6 +404,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
CveConceptoContableDevolucion = 92;
CvePlantillaPoliza = 7;
TipoMovtoDevolucion = false;
+ CveTipoPoliza = 2; //tipo egreso
break;
case "2":
PagueseA = DdlProveedores.SelectedText.ToString();
@@ -431,7 +433,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
// DATOS PREPOLIZA
if ( DdlTipoTransanccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero();
- CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE Devoluciones", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), 1, TxtFechaDocumento.Text.ToDate(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransanccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransanccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
+ CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE Devoluciones", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), 1, TxtFechaDocumento.Text.ToDate(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransanccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: CveTipoPoliza);
if (CvePrePoliza > 0)
{
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index 1c2ca9a0c..e34d14c39 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -700,6 +700,13 @@ Partial Class Bancos_IE
TxtImporte.Attributes.Add("onkeypress", "javascript: return false;")
End If
+ If Request("Opcion") IsNot Nothing AndAlso Request("Opcion") = "INGPC" Then
+ If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
+ DivOtrosIngresosEgresos.Visible = True
+ End If
+
+ End If
+
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then
LblPagueseA.Text = ""
@@ -1844,18 +1851,18 @@ Partial Class Bancos_IE
Private Sub CargaTipoTransaccion(Optional Tipo As String = "")
Dim dt As DataTable
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSSINFACT", "EGSCREDITO") Then
- dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs'")
+ dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs' AND Estatus = 1")
LtlTitulo.Text = "Egreso Por Comprobar"
RBL.Items.Remove(RBL.Items.FindByValue("C"))
ElseIf Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "DEV" Then
- dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing'")
+ dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing' AND Estatus = 1 ")
LtlTitulo.Text = If(Request("Opcion").ToString = "INGPC", "Ingreso por comprobar", "Devolución")
LblPagueseA.Text = "Recibido de:"
RBL.SelectedValue = "C"
Anexo.Visible = True
ElseIf Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "INGPC" Then
- dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing'")
+ dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing' AND Estatus = 1")
LtlTitulo.Text = If(Request("Opcion").ToString = "INGPC", "Ingreso por comprobar", "Devolución")
LblPagueseA.Text = "Recibido de:"
RBL.SelectedValue = "C"
@@ -1865,13 +1872,13 @@ Partial Class Bancos_IE
RBL.Items.Remove(RBL.Items.FindByValue("FE"))
ElseIf Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "ANTC" Then
- dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing'")
+ dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing' AND Estatus = 1 ")
LtlTitulo.Text = "Anticipo de Cliente"
LblPagueseA.Text = "Recibido de:"
Anexo.Visible = True
RBL.Items.Remove(RBL.Items.FindByValue("P")) : RBL.Items.Remove(RBL.Items.FindByValue("FE")) : RBL.Items.Remove(RBL.Items.FindByValue("DD")) : RBL.Items.Remove(RBL.Items.FindByValue("AC")) : RBL.Items.Remove(RBL.Items.FindByValue("DP"))
ElseIf Opcion = "DevDinV" Then ' DEVOLUCION DINERO NC-VENTAS
- dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs'")
+ dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs' AND Estatus = 1 ")
LtlTitulo.Text = "Devolución dinero"
RBL.SelectedValue = "C"
RBL.Enabled = False
@@ -1879,20 +1886,17 @@ Partial Class Bancos_IE
dt = GlobalDTTipoTransacciones
End If
-
-
If Opcion = "DevDinC" AndAlso Request("P") IsNot Nothing AndAlso Request("P").Length > 0 Or Opcion = "DevDinC" AndAlso Masivonotas Then
- DdlTipoTransaccion.DataSource = dt.FiltraParametros("Tipo = 'Ing' ")
+ DdlTipoTransaccion.DataSource = dt.FiltraParametros("Tipo = 'Ing' AND Estatus = 1 ")
Else
DdlTipoTransaccion.DataSource = dt
End If
If Tipo.Length > 0 Then
DdlTipoTransaccion.Items.Clear()
- DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros($"Tipo = '{Tipo}' AND EstatusTexto = 'Activo' ")
+ DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros($"Tipo = '{Tipo}' AND Estatus = 1 ")
End If
-
DdlTipoTransaccion.DataBind()
DdlTipoTransaccion.Items.Insert(0, New ListItem("Seleccione Tipo Movimiento", "-1"))
RBL_SelectedIndexChanged(RBL, Nothing)
@@ -2584,6 +2588,7 @@ Partial Class Bancos_IE
Dim CveConceptoContable As Integer = 30
Dim CveConceptoCompra As Integer = 10
Dim CveCreditoDetalle As Integer = -1
+ Dim tCveTipoPoliza As Integer = 2
Dim CIF As Decimal = 0
Dim CvePlantillaPoliza As Integer = 3
Dim CvePrePoliza As Integer = 0
@@ -2667,9 +2672,11 @@ Partial Class Bancos_IE
CvePlantillaPoliza = 92
End If
+
Dim AgregaPolizaSaldoInicial As Boolean = False
'Cuando es Egreso sin factura, se registra una compra tipo anticipo
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "EGSSINFACT" Then
+ tCveTipoPoliza = 2
Select Case RBL.SelectedValue
Case "P" 'Proveedores
If CveProveedor > 0 Then
@@ -2710,6 +2717,7 @@ Partial Class Bancos_IE
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "INGPC" Then
HdnProvPorIVA.Value = "0"
CvePlantillaPoliza = 6
+ tCveTipoPoliza = 1
Select Case RBL.SelectedValue
Case "DD" ' Deudores Diversos
If CveProveedor > 0 Then
@@ -2792,7 +2800,7 @@ Partial Class Bancos_IE
End If
If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa <> 119 Then FolioFijo = ObjIE.Folio.ToEntero 'cheque
- CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
+ CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=tCveTipoPoliza)
'valida prepoliza
If CvePrePoliza > 0 Then
@@ -2873,6 +2881,30 @@ Partial Class Bancos_IE
Dim importeMX As Decimal
Dim Multiplicador As Integer
+ Dim tCveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveSubProyecto).FiltroPrimeroValor("CveSubProyecto").ToEntero
+
+ 'OTROS INGRESOS/EGRESOS
+ Dim TCC As Decimal = 1
+ If TxtTipoCambio.Text.Trim.ToDecimal > 0 Then TCC = TxtTipoCambio.Text.Trim.ToDecimal
+
+ Dim ImporteOtros As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal * TCC
+ If ImporteOtros <> 0 Then
+ Dim TipoMovtoIE As Boolean = False
+ Dim CveConcIE As Integer = 78
+ If ImporteOtros > 0 Then
+ TipoMovtoIE = True : ImporteOtros = Math.Abs(ImporteOtros)
+ CveConcIE = 78
+ Else
+ TipoMovtoIE = False : ImporteOtros = Math.Abs(ImporteOtros)
+ CveConcIE = 211
+ End If
+
+ Dim OtConcepto As String = PagueseA & " $" & TxtOtrosIngresosEgresos.Text.ToDecimal.FormatoNumero
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, ImporteOtros, PagueseA, CveConcIE, OtConcepto, Now, -1, -1, CveIE, CveCliente:=CveCliente, ImporteMX:=ImporteOtros, CveSubProyecto:=tCveSubProyecto, ImporteME:=0) Then
+ MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
+ Exit Select
+ End If
+ End If
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
@@ -2929,7 +2961,7 @@ Partial Class Bancos_IE
Case 66
If RBL.SelectedValue = "C" AndAlso CveCliente > 0 Then
- importeMovimiento = TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal
+ importeMovimiento = TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal - TxtOtrosIngresosEgresos.Text.ToDecimal
importeMX = importeMovimiento
'Agregamos el IVA
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 387ed4951..cdd2e3557 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -333,7 +333,7 @@ Partial Class Bancos_ProveedoresAbonar
If UsuarioActual.TienePermisoProceso(98) Then
PermiteModificarImporte = False
End If
- Calendario.StartDate = Now.AddMonths(-4)
+ Calendario.StartDate = Now.AddMonths(-8)
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes
If UsuarioActual.TienePermisoProceso(105) Then
Calendario.StartDate = Now
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 75c065a2f..0ddd596fe 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -5087,31 +5087,6 @@ Partial Class Compras_Compras
Next
- ''[IPP] COMENTADO A MIRAS DE ELIMINAR 21-FEBRERO-2018
- ''VERIFICA SI TIENE DESCUENTO (AMORTIZACION)
- 'If TxtDescuento.Text.ToDouble > 0 Then
- ' DescuentoConIVA = TxtDescuento.Text.ToDecimal * 1.16D
-
- ' 'Valida que el descuento con iva cuadre en los totales
- ' If Math.Abs(DescuentoConIVA - (Importe - TxtTotal.Text.ToDecimal)) < 0.02 Then
- ' DescuentoConIVA = Importe - TxtTotal.Text.ToDecimal
- ' ElseIf DescuentoConIVA <> (Importe - TxtTotal.Text.ToDecimal) Then
- ' ErrorACMEnsaje.Append(" - Valida que el descuento con iva cuadre en los totales ")
- ' ErrorAC = True
- ' End If
-
- ' 'actualizo el idcuenta del presupuesto
- ' If ObjContaAC.AddMovimiento(IdPoliza, tIdContaProveedor, True, MultiplicadorNC * (Importe - DescuentoConIVA), "", ConceptoRenglon, 0, Fecha, "") Then
- ' 'agrego a la cuenta contable anticipos
- ' If Not ObjContaAC.AddMovimiento(IdPoliza, CtaProveedorAnticipos, True, MultiplicadorNC * DescuentoConIVA, "", ConceptoRenglon, 0, Fecha, "") Then
- ' ErrorACMEnsaje.Append(" - actualizo el idcuenta del presupuesto ObjContaAC.AddMovimiento 1")
- ' ErrorAC = True
- ' End If
- ' Else
- ' ErrorACMEnsaje.Append(" - actualizo el idcuenta del presupuesto ObjContaAC.AddMovimiento 2")
- ' ErrorAC = True
- ' End If
- 'Else
'actualizo el idcuenta del presupuesto
Importe = TxtTotal.Text.ToDecimal
If Not ObjContaAC.AddMovimiento(IdPoliza, tIdContaProveedor, True, MultiplicadorNC * (If(ArrAnticipos.Count > 0, ImporteAnticipo, Importe)), "", ConceptoRenglon, 0, Fecha, "") Then
@@ -5511,20 +5486,12 @@ Partial Class Compras_Compras
Next
End If
Next
-
End If
-
-
If AplicarCostoIndirecto(ObjInventario, ObjCompras) Then
ErrorMovInv = True
End If
- 'Else
- ' Alert("El tipo de cambio no esta actualizado. Por favor comuniquese con un asistente SIG.", TipoMensaje.MsgError)
- ' ErrorMovInv = True
- 'End If
-
End If
'*************************************************** P R I M E R A P A R T E C O M P R A S **************************************************************************************************************************************************************************************************************************************************************************************************
@@ -5667,12 +5634,6 @@ Partial Class Compras_Compras
Dim CveCompraCapital As Integer = -1
Dim CveCompraInteres As Integer = -1
- 'Dim ImporteCapital As Decimal = 0
- ' Dim ImporteCapitalIVA As Decimal = 0
-
- 'Dim ImporteInteres As Decimal = 0
- ' Dim ImporteInteresIVA As Decimal = 0
-
' Dim ImporteIEMensualidad As Decimal = ObjIE.DtResultados.FiltroPrimeroValor("ImporteIE", $"CveCreditoDetalle = {CveCreditoDetalleTemp}").ToDecimal
CreditoEstatus = ObjIE.DtResultados.FiltroPrimeroValor("Estatus", $"CveCreditoDetalle = {CveCreditoDetalleTemp}").ToEntero
@@ -5691,7 +5652,6 @@ Partial Class Compras_Compras
Capital = Ambos
Interes = Ambos
-
End If
If Capital > 0 Then
@@ -5701,8 +5661,6 @@ Partial Class Compras_Compras
CveCompraInteres = CveCompra
End If
-
-
If (CveCompraCapital > 0 And CveCompraInteres > 0) And EstusTemp = 2 Then
If EstusTemp = 2 Then
EstusTemp = 3
@@ -5721,9 +5679,6 @@ Partial Class Compras_Compras
ImporteInteres:=Interes) Then
ErrorCredito = True
End If
- 'ObjIE.UpdateCreditosDetalle(CveCreditoDetalle, "01/01/2000".ToDate, -1, -1, -1, -1, -1, -1, Estatus)
-
-
Else
ErrorCredito = True
@@ -5762,8 +5717,6 @@ Partial Class Compras_Compras
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
End If
-
-
'********************** Variables '**********************
'****** Pagos
@@ -5870,8 +5823,6 @@ Partial Class Compras_Compras
Dim importeRetISRxAcreditar As Decimal = 0
importeRetISRxAcreditar = TxtRetISR.Text.ToDecimal
-
-
'****** Movimientos Independientes
'Pago Proveedores (17)
@@ -6282,17 +6233,6 @@ Partial Class Compras_Compras
End If
End If
-
- 'Codigo anterior
- 'If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
- ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
- ''End If
-
- 'If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
- ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
- 'End If
-
-
'Agregamos el Opuesto del 22 -> 15
If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
@@ -6420,34 +6360,8 @@ Partial Class Compras_Compras
End If
End If
- 'Case 244 'RetISR Acreditable Terceros y Arrendamiento
- ' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
- ' If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
- ' importeMovimiento = importeRetISRAcreditable
- ' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
- ' If CtaProveedorRetISR > 0 Then
- ' IdCtaContable = CtaProveedorRetISR
- ' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
- ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
- ' Else
- ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
- ' If ObjConta.DtResultados.Rows.Count > 0 Then
- ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
- ' End If
- ' End If
- ' End If
- ' 'Agregamos el Opuesto del 244 -> 243
- ' If importeMovimiento <> 0 Then
- ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 243, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
- ' ErrorPrepoliza = True
- ' End If
- ' End If
- ' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
- ' End If
- ' End If
Case 64 'Ganancia
-
CveSubProyectoInsertar = CveSubProyecto
If CveSubProyectoInsertar <= 0 Then
ErrorPrepoliza = True
@@ -6488,30 +6402,7 @@ Partial Class Compras_Compras
Else
importeMovimiento = 0
End If
- 'Case 285 'Ret IVA 6% Servicios
- ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
-
- ' 'If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
- ' ' If ObjConta.DtResultados.Rows.Count > 0 Then
- ' ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
- ' ' End If
- ' 'End If
-
-
- ' If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
-
- ' If CveMoneda = 2 Then
- ' importeMN = TxtRetIVA.Text.ToDecimal * TxtTC.Text.ToDecimal
- ' Else
- ' importeMN = TxtRetIVA.Text.ToDecimal
- ' importeMovimiento = TxtRetIVA.Text.ToDecimal
-
- ' End If
-
- ' Else
- ' importeMovimiento = 0
- ' End If
Case 6 'Compra
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 145, 141, 152, 153, 154, 158, 159, 160, 161, 162, 163) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
@@ -6922,8 +6813,6 @@ Partial Class Compras_Compras
End If
Next
-
-
'la diferencia se va aplicar sobre los
'Dim diferenciaTransito As Decimal = ImporteTransito - importeMN.RoundSQL
@@ -6973,12 +6862,9 @@ Partial Class Compras_Compras
End If
End If
-
-
End If
End If
-
If UsuarioActual.CveEmpresa.Contiene(119) Then
Dim ContienePSNeteoBonif As Boolean = False
For Each Dr As DataRow In TmpDT.Rows
@@ -7156,15 +7042,11 @@ Partial Class Compras_Compras
End If
-
-
End If
-
Next
End If
End If
-
'LIMPIA
importeMovimiento = 0
IdCtaContable = 0
@@ -7205,12 +7087,6 @@ Partial Class Compras_Compras
End If
End If
- 'If CveCompraRefacturacion > 0 Then
- ' importeMovimiento = 0
- ' importeMN = 0
- ' End If
-
-
Case 59 'Documentos
importeMovimiento = importeCreditos
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
@@ -7362,8 +7238,6 @@ Partial Class Compras_Compras
End If
End If
-
- 'ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
End If
Next
@@ -7713,12 +7587,8 @@ Partial Class Compras_Compras
End If
End If
End If
-
-
End If
-
-
'** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA
'[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018
Dim tConceptoContable As Integer
@@ -8424,8 +8294,6 @@ Partial Class Compras_Compras
End If
-
-
'VALIDAR ERRORES
If ErrorAC OrElse ErrorPrepoliza OrElse ErrorPrepolizaDescuadre OrElse ErrorDetalles OrElse ErrorMovDev OrElse ErrorMovtosCxP OrElse ErrorMovtosRetIVA OrElse ErrorMovtosRetISR OrElse ErrorMovtosEstimaciones OrElse ErrorMovtosIE OrElse ErrorMovtosIVA OrElse ErrorMovInv OrElse TieneError OrElse ErrorAF OrElse ErrorOC OrElse ErrorBitacora OrElse ErrorAddAcarreos OrElse ErrorCreditosCompra Then
If ErrorDetalles Then
@@ -8497,8 +8365,6 @@ Partial Class Compras_Compras
MsgAccionAceptar = "location.href =""Compras.aspx"""
End If
-
-
'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA
If UsuarioActual.CveEmpresa.Contiene(1, 119, 141) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then
If ObjCompras.GetComprobacion(DdlPersonalReembolso.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, TxtNumeroReembolso.Text.Trim, UsuarioActual.CveEmpresa) Then
@@ -8523,8 +8389,6 @@ Partial Class Compras_Compras
End If
-
-
'AJUSTA POLIZA
If IdPoliza > 0 Then
PolizaFolio = ObjContaAC.Folio
@@ -8546,6 +8410,11 @@ Partial Class Compras_Compras
Msg.AppendFormat($"Recibir mercancía de entrega directa.")
End If
+ If Not TieneError AndAlso Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
+ TieneError = True
+ Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
+ End If
+
If Not TieneError Then
ObjCompras.Commit()
If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
@@ -18907,7 +18776,7 @@ Partial Class Compras_Compras
CompruebaAgregar()
End If
- Alert("SubProyectos cambiados correctamente", TipoMensaje.MsgInformacion)
+ Alert("SubProyectos cambiados correctamente", TipoMensaje.ToastInformacion)
End Sub
@@ -18936,7 +18805,7 @@ Partial Class Compras_Compras
CompruebaAgregar()
End If
- Alert("Los tipos de gastos han sido cambiados correctamente", TipoMensaje.MsgInformacion)
+ Alert("Los tipos de gastos han sido cambiados correctamente", TipoMensaje.ToastInformacion)
End Sub
diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx
index 68914892e..cfc98f3ab 100644
--- a/Contabilidad/RegPrePolizaS.aspx
+++ b/Contabilidad/RegPrePolizaS.aspx
@@ -359,7 +359,7 @@
@@ -477,7 +477,7 @@
+ DataKeyNames="CvePrePolizaDetalle,IdMov, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,Cargo,Abono" Width="100%" >
Movimiento
@@ -740,14 +740,14 @@
-
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index 8c3721346..c5fd7b7f2 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -61,10 +61,15 @@ Partial Class ContabilidadC_RegPrePolizaS
Public Property DrConceptoContable As DataRow
Get
- Return CType(ViewState("ArregloMovs"), DataRow)
+ If ViewState("DrConceptoContable") IsNot Nothing Then
+ Return CType(ViewState("DrConceptoContable"), DataRow)
+ Else
+ Return Nothing
+ End If
+
End Get
Set(value As DataRow)
- ViewState("ArregloMovs") = value
+ ViewState("DrConceptoContable") = value
End Set
End Property
@@ -397,97 +402,18 @@ Partial Class ContabilidadC_RegPrePolizaS
.Add("PorcentajeImpuesto", Type.GetType("System.Decimal"))
.Add("Modificado", Type.GetType("System.Boolean"))
.Add("EsComplementaria", Type.GetType("System.Boolean"))
+ .Add("EsMonedaExtranjera", Type.GetType("System.Boolean"))
.Add("TC", Type.GetType("System.Decimal"))
-
End With
-
If Not DtMovimientos.Columns.Contains("Cargo") Then
DtMovimientos.Columns.Add("Cargo", Type.GetType("System.Decimal"))
DtMovimientos.Columns.Add("Abono", Type.GetType("System.Decimal"))
End If
-
DtMovimientos.AcceptChanges()
End Sub
-
- 'Private Sub CargaNomina()
- ' Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
- ' Dim ObjNomina As New ClsNominas
- ' Dim ObjConta As New ClsContabilidad
-
- ' Dim Dt As DataTable = Nothing
- ' Dim Cuenta As String = ""
- ' Dim Concepto As String = ""
- ' Dim IdCuenta As Integer = 0
- ' Dim TipoMovto As Integer
- ' Dim CveConcepto As Integer
- ' Dim CodigoCuenta As String = ""
- ' Dim NombreCuenta As String = ""
- ' Dim Referencia As String = ""
- ' Dim EsComodin As Integer = 0
- ' DtMovimientos.Clear()
-
- ' If ObjNomina.GetProvisionNomina(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, UsuarioActual.CveEmpresa) Then
- ' Dt = ObjNomina.DtResultados
-
- ' For Each drt As DataRow In Dt.Rows
- ' Dim dr As DataRow = DtMovimientos.NewRow
-
- ' If drt("NombreCompleto").ToString = "" AndAlso ObjConta.GetRetCuenta(31, UsuarioActual.CveEmpresa) Then
- ' CveConcepto = 98
- ' Cuenta = "Nominas por Pagar"
- ' IdCuenta = ObjConta.DtResultados(0)("IdCtaContable").ToString.ToEntero
- ' Concepto = "Pago Nomina"
- ' Referencia = "Pago Nomina"
- ' Else
- ' Concepto = drt("NombreCompleto")
- ' Referencia = ""
- ' CveConcepto = drt("CveConceptoContable").ToString.ToEntero
- ' Cuenta = drt("ConceptoContable").ToString
- ' IdCuenta = drt("IdCtaContable").ToString.ToEntero
- ' End If
-
- ' Dim drr As DataRow = DtCuentasContables.FiltroPrimero($"Id={IdCuenta}")
- ' CodigoCuenta = If(drr IsNot Nothing, drr("CuentaFormato").ToString(), "")
- ' NombreCuenta = If(drr IsNot Nothing, drr("Nombre").ToString(), "")
-
- ' TipoMovto = drt("TipoMovto")
-
- ' If TipoMovto = 0 Then
- ' dr("Cargo") = Math.Abs(drt("Importe").ToString.ToDecimal)
- ' dr("Abono") = 0
- ' Else
- ' dr("Cargo") = 0
- ' dr("Abono") = Math.Abs(drt("Importe").ToString.ToDecimal)
- ' End If
-
- ' dr("IdCuenta") = IdCuenta
- ' dr("CodigoCuenta") = CodigoCuenta & "
" & NombreCuenta
- ' dr("Cuenta") = Cuenta
- ' dr("Concepto") = Concepto
- ' dr("Descripcion") = Concepto
- ' dr("Referencia") = Referencia
- ' dr("TipoMovto") = TipoMovto
- ' dr("EsComodin") = EsComodin
- ' dr("CveConcepto") = CveConcepto
- ' dr("CveProveedor") = "-1"
- ' dr("CveSubProyecto") = drt("CveSubProyecto")
- ' dr("CvePersonal") = drt("CvePersonal")
- ' dr("CveClasificacion") = drt("CveClasificacion")
- ' dr("CveTipoGasto") = drt("CveTipoGasto")
-
- ' DtMovimientos.Rows.Add(dr)
- ' Next
-
- ' GvMov.DataSource = DtMovimientos
- ' GvMov.DataBind()
- ' UPMovs.Update()
- ' End If
-
- 'End Sub
-
Private Sub CargaPrePoliza()
BtnEliminar.Visible = True
LblEncabezado.Text = "Edición de Póliza"
@@ -864,16 +790,7 @@ Partial Class ContabilidadC_RegPrePolizaS
IdCuenta = 0
CodigoCuenta = ""
NombreCuenta = ""
- 'If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
- ' Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
- ' If drr IsNot Nothing Then
- ' IdCuenta = drt("IdCtaContable").ToString.ToEntero
- ' CodigoCuenta = drr("CuentaFormato").ToString()
- ' NombreCuenta = drr("Nombre").ToString()
- ' 'Cuenta = drr("Nombre").ToString()
- ' End If
- ' EsComodin = 0
- 'End If
+
Dim dr As DataRow = DtMovimientos.NewRow
@@ -894,7 +811,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
dr("CveCuenta") = drt("CveCuenta")
dr("EsComplementaria") = drt("EsComplementaria")
- 'dr("FolioPoliza") = 0 'drt("FolioPoliza")
+ dr("EsMonedaExtranjera") = drt("EsMonedaExtranjera")
DtMovimientos.Rows.Add(dr)
Next
@@ -1100,19 +1017,17 @@ Partial Class ContabilidadC_RegPrePolizaS
TmpAbono = TmpAbono + Importe
TipoMovto = True
- If gvr.DataKey("EsComplementaria") = "True" Then
- ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
- TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal
- End If
+ If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
+ If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.FCTextBox("TC").Text.ToDecimal
+
Else
Importe = gvr.DataKey("Abono").ToDecimal
TmpAbono = TmpAbono + Importe
TipoMovto = True
- If gvr.DataKey("EsComplementaria") = "True" Then
- ImporteME = gvr.DataKey("MonedaExtranjera").ToDecimal
- TipoCambio = gvr.DataKey("TipoCambio").ToDecimal
- End If
+ If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.DataKey("ImporteME").ToDecimal
+ If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.DataKey("TC").ToDecimal
+
End If
Else
If TipoGrid = 0 Then 'gvmov
@@ -1120,22 +1035,16 @@ Partial Class ContabilidadC_RegPrePolizaS
TmpCargo = TmpCargo + Importe
TipoMovto = False
- If gvr.DataKey("EsComplementaria") = "True" Then
- ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal
- TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal
- End If
+ If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
+ If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.FCTextBox("TC").Text.ToDecimal
Else
Importe = gvr.DataKey("Cargo").ToDecimal
TmpCargo = TmpCargo + Importe
TipoMovto = False
- If gvr.DataKey("EsComplementaria") = "True" Then
- ImporteME = gvr.DataKey("MonedaExtranjera").ToDecimal
- TipoCambio = gvr.DataKey("TipoCambio").ToDecimal
- End If
+ If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.DataKey("ImporteME").ToDecimal
+ If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.DataKey("TC").ToDecimal
End If
-
-
End If
If Not gvr.DataKey("CveConceptoContable").Contiene("30", "10") Then ' 30-bancos, 10-anticipos proveedores
@@ -1153,16 +1062,19 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
If Importe <> 0 Then
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
+ Dim tReferencia, tConcepto As String
+ Dim tCveSubProyecto, tCveTipoGasto As Integer
- Dim tReferencia As String = gvr.DataKey("Referencia")
- Dim tConcepto As String = gvr.DataKey("Concepto")
- Dim tCveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero
- Dim tCveTipoGasto As Integer = gvr.DataKey("CveTipoGasto").ToEntero
If TipoGrid = 0 Then 'gvmov
tReferencia = gvr.FCLiteral("LtlReferencia").Text
tConcepto = gvr.FCTextBox("TxtConcepto").Text
tCveSubProyecto = gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero
tCveTipoGasto = gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero
+ Else
+ tReferencia = gvr.DataKey("Referencia")
+ tConcepto = gvr.DataKey("Concepto")
+ tCveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
+ tCveTipoGasto = gvr.DataKey("CveTipoGasto").ToEntero
End If
If ObjMov.AddPrePolizasDetalle(CvePrePolizaInsertada, TipoMovto, Importe, tReferencia, gvr.DataKey("CveConceptoContable").ToEntero, tConcepto,
@@ -1199,7 +1111,6 @@ Partial Class ContabilidadC_RegPrePolizaS
MsgError = $"Error {ex.Message}"
End Try
-
If ContRegInsertados = 0 Then
MsgError = $"No se insertaron registros (Revise que los importes de los registros contengan valores)"
End If
@@ -1414,6 +1325,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Private Sub CargaConceptosContablesE()
DdlConceptosContablesE.DataSource = GlobalDTContaConceptosContables(-1)
DdlConceptosContablesE.DataBind()
+ DdlConceptosContablesE.Items.Insert(0, New ListItem(" - ", "-1"))
End Sub
Private Sub CargaSubProyectoE()
DdlSubProyectoE.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
@@ -1603,23 +1515,24 @@ Partial Class ContabilidadC_RegPrePolizaS
End Sub
Private Sub CargaClientesE()
DdlClientesE.setEsWebService(True)
+
DdlClientesE.Attributes.Add("data-metodo", "getcliente")
- DdlClientesE.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
- DdlClientesE.DataBind()
+ 'DdlClientesE.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
+ 'DdlClientesE.DataBind()
' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1"))
End Sub
Private Sub CargaVentasE(CveCliente As Integer, Optional CveMoneda As Integer = -1)
DvModalconceptoVenta.Visible = True
- Dim ObjVentas As New ClsVentas
-
+ DdlVentasE.DataSource = Nothing
DdlVentasE.ClearSelection()
+
+ Dim ObjVentas As New ClsVentas
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
If CveMoneda = 2 Then
DdlVentasE.DataSource = ObjVentas.DtResultados.FiltraParametros("CveMoneda = 2")
Else
DdlVentasE.DataSource = ObjVentas.DtResultados.FiltraParametros("CveMoneda = 1")
End If
-
DdlVentasE.DataBind()
DdlVentasE.Items.Insert(0, New ListItem(" - ", "-1"))
Else
@@ -1657,7 +1570,12 @@ Partial Class ContabilidadC_RegPrePolizaS
End Sub
Private Function CargaValidacionesConcepto() As Boolean
- Dim Retorno As Boolean = true
+ Dim Retorno As Boolean = True
+
+ If DdlConceptosContablesE.SelectedValue <= 0 Then
+ Alert("No se ha especificado el concepto", TipoMensaje.ToastAdventencia)
+ Return False
+ End If
If DrConceptoContable IsNot Nothing Then
Dim AplicaComplementaria = Boolean.Parse(DrConceptoContable("EsComplementaria").ToString)
@@ -1716,6 +1634,15 @@ Partial Class ContabilidadC_RegPrePolizaS
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
dr("Modificado") = True
+ dr("TC") = TxtTipoCambio.Text.ToDecimal
+
+ If DrConceptoContable IsNot Nothing Then
+ dr("EsComplementaria") = DrConceptoContable("EsComplementaria")
+ dr("EsMonedaExtranjera") = DrConceptoContable("EsMonedaExtranjera")
+
+ If dr("EsMonedaExtranjera") = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal
+
+ End If
If DdlPorcentajeIVAE.Visible Then
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
@@ -1735,7 +1662,7 @@ Partial Class ContabilidadC_RegPrePolizaS
UpTotalCargo.Update()
UpTotalAbono.Update()
If Not ChkSeguir.Checked Then RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
-
+ Alert("Concepto Registrado", TipoMensaje.ToastInformacion)
Else
Dim CvePrePolizaDetalle As Integer = GvPrePoliza.DataKeys(IndiceGrid).Value.ToString.ToEntero
@@ -1775,14 +1702,22 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("TC") = TxtTipoCambio.Text.ToDecimal
+ If DrConceptoContable IsNot Nothing Then
+ dr("EsComplementaria") = DrConceptoContable("EsComplementaria")
+ dr("EsMonedaExtranjera") = DrConceptoContable("EsMonedaExtranjera")
+
+ If dr("EsMonedaExtranjera") = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal
+
+ End If
+
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
If TxtCargoE.Text <> "" Then
dr("Cargo") = TxtCargoE.Text.ToDecimal
- dr("Abono") = "".ToDecimal
+ dr("Abono") = 0
Else
dr("Abono") = TxtAbonoE.Text.ToDecimal
- dr("Cargo") = "".ToDecimal
+ dr("Cargo") = 0
End If
DtMovimientos.AcceptChanges()
diff --git a/Inicio.aspx b/Inicio.aspx
index 5a586ad33..f4aa36e37 100644
--- a/Inicio.aspx
+++ b/Inicio.aspx
@@ -614,7 +614,7 @@
-
MOTOBATERIAS AMERICA
+ MOTOBATERIAS AMERICA
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb
index 8893506f5..3d38484e1 100644
--- a/Inventarios/RecepcionAlmacen.aspx.vb
+++ b/Inventarios/RecepcionAlmacen.aspx.vb
@@ -4864,7 +4864,13 @@ Partial Class Inventarios_RecepcionAlmacen
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
- CargarArchivoExcel(Directorio, file.filename)
+
+ If Tipo = "CSV" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'empresa de acumuladores
+ CargaArchivoCSV(Directorio, file.filename, HLFolio.Text)
+ Else
+ CargarArchivoExcel(Directorio, file.filename)
+ End If
+
Else
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
End If
@@ -4903,93 +4909,97 @@ Partial Class Inventarios_RecepcionAlmacen
Exit Sub
End If
-
- dt.TableName = "Datos"
- Dim ProductosNoCargados As New StringBuilder()
- Dim RowsCargados As Integer = 0
- Dim RowsNoCargados As Integer = 0
- Dim NoPSConSerie As Integer = 0
-
- If CveCompraSurtir > 0 Then
- 'DtRecepcion
- Try
- 'Dim DtPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa)
- 'If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString.ToDecimal, 4), 0)
- For Each RowExcel As DataRow In dt.Rows
- If RowExcel("Código").ToString() <> "" Then
-
- Dim RowPS = DtInv.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Código").ToString()))
-
- If RowPS IsNot Nothing AndAlso RowPS("CvePS").ToString().ToEntero() > 0 Then
-
- Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
- Dim CveUnidadMedida As Integer = RowPS("CveUM").ToString().ToEntero()
- CvePSSerie = CveProducto
- CveConsecSerie = DtInv.FiltroPrimeroValor("Consec", "CvePS=" & CvePSSerie).ToEntero
-
- Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
- Dim Serie As String = RowExcel("Serie").ToString()
- Dim Lote As String = "" '= RowExcel("Lote").ToString()
- Dim FechaCaducidad As Date = MinFecha '= If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
- Dim Observaciones As String = "" '= If(dt.Columns.Contains("Observaciones"), RowExcel("Observaciones").ToString, "").ToString
- LbCantidad.Text = Cantidad.ToString
-
- Dim Valido As Boolean = True
-
- If RowPS("AplicaSerie").ToString() = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
- Valido = False
- Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia)
- ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
- End If
-
- If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then
- NoPSConSerie = NoPSConSerie + 1
- End If
-
-
- If Valido Then
- CveConsecSerie = RowPS("Consec").ToString.ToEntero
- AgregaSerie(RowExcel("Serie").ToString, 1)
-
- 'AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False)
- RowsCargados = RowsCargados + 1
- Else
- RowsNoCargados = RowsNoCargados + 1
- ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
- End If
-
- Else
- RowsNoCargados = RowsNoCargados + 1
- ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString())
- End If
- End If
- Next
- Catch ex As Exception
- OnError("Ocurrió un error al cargar los productos." & ProductosNoCargados.ToString(), ex)
- Finally
-
- Dim MensajeFinal As New StringBuilder()
- If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
- MensajeFinal.Append("Los productos se cargaron correctamente.
")
- End If
- If RowsCargados > 0 Then
- MensajeFinal.Append("Se cargaron
" & RowsCargados & " productos correctamente.")
- End If
- If RowsNoCargados > 0 Then
- MensajeFinal.Append("No se pudieron cargar
" & RowsNoCargados & " productos.
Los siguientes productos no se pudieron cargar: " & ProductosNoCargados.ToString())
- End If
-
- Alert(MensajeFinal.ToString())
-
- End Try
- Else
- Alert("No hay seleccionada compra", TipoMensaje.MsgError)
- End If
-
+ ProcesaExcel(dt)
End If
End Sub
+ Private Function ProcesaExcel(dt As DataTable) As Boolean
+ dt.TableName = "Datos"
+ Dim ProductosNoCargados As New StringBuilder()
+ Dim RowsCargados As Integer = 0
+ Dim RowsNoCargados As Integer = 0
+ Dim NoPSConSerie As Integer = 0
+
+ If CveCompraSurtir > 0 Then
+
+ Try
+
+ For Each RowExcel As DataRow In dt.Rows
+ If RowExcel("Código").ToString() <> "" Then
+
+ Dim RowPS = DtInv.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Código").ToString()))
+
+ If RowPS IsNot Nothing AndAlso RowPS("CvePS").ToString().ToEntero() > 0 Then
+
+ Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
+ Dim CveUnidadMedida As Integer = RowPS("CveUM").ToString().ToEntero()
+ CvePSSerie = CveProducto
+ CveConsecSerie = DtInv.FiltroPrimeroValor("Consec", "CvePS=" & CvePSSerie).ToEntero
+
+ Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
+ Dim Serie As String = RowExcel("Serie").ToString()
+ Dim Lote As String = ""
+ Dim FechaCaducidad As Date = MinFecha
+ Dim Observaciones As String = ""
+ LbCantidad.Text = Cantidad.ToString
+
+ Dim Valido As Boolean = True
+
+ If RowPS("AplicaSerie").ToString() = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
+ Valido = False
+ Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia)
+ ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
+ End If
+
+ If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then
+ NoPSConSerie = NoPSConSerie + 1
+ End If
+
+
+ If Valido Then
+ CveConsecSerie = RowPS("Consec").ToString.ToEntero
+ AgregaSerie(RowExcel("Serie").ToString, 1)
+
+ 'AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False)
+ RowsCargados = RowsCargados + 1
+ Else
+ RowsNoCargados = RowsNoCargados + 1
+ ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
+ End If
+
+ Else
+ RowsNoCargados = RowsNoCargados + 1
+ ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString())
+ End If
+ End If
+ Next
+ Catch ex As Exception
+ OnError("Ocurrió un error al cargar los productos." & ProductosNoCargados.ToString(), ex)
+ Finally
+
+ Dim MensajeFinal As New StringBuilder()
+ If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
+ MensajeFinal.Append("Los productos se cargaron correctamente.
")
+ End If
+ If RowsCargados > 0 Then
+ MensajeFinal.Append("Se cargaron
" & RowsCargados & " productos correctamente.")
+ End If
+ If RowsNoCargados > 0 Then
+ MensajeFinal.Append("No se pudieron cargar
" & RowsNoCargados & " productos.
Los siguientes productos no se pudieron cargar: " & ProductosNoCargados.ToString())
+ End If
+
+ Alert(MensajeFinal.ToString())
+
+ End Try
+ Else
+ Alert("No hay seleccionada compra", TipoMensaje.MsgError)
+ End If
+
+ Return True
+
+ End Function
+
Protected Sub LbDescargarExcelConceptos_Click(sender As Object, e As EventArgs)
DescargarFormato()
End Sub
@@ -5024,6 +5034,59 @@ Partial Class Inventarios_RecepcionAlmacen
End Sub
+
+ Private Sub CargaArchivoCSV(Ruta As String, FileName As String, Optional FolioFactura As String = "")
+
+ 'Create a DataTable.
+ Dim dt As New DataTable()
+
+ dt.Columns.AddRange(New DataColumn(9) {New DataColumn("CodBarra", GetType(String)),
+ New DataColumn("OVenta", GetType(String)),
+ New DataColumn("Factura", GetType(String)),
+ New DataColumn("FechaFac", GetType(String)),
+ New DataColumn("Pallet", GetType(String)),
+ New DataColumn("CodigoJCI", GetType(String)),
+ New DataColumn("Producto", GetType(String)),
+ New DataColumn("Serie", GetType(String)),'CodigoUnico
+ New DataColumn("Cantidad", GetType(Integer)),
+ New DataColumn("Código", GetType(String))})
+ FolioFactura = FolioFactura.Replace("-", "")
+
+ 'Read the contents of CSV file.
+ Dim csvData As String = File.ReadAllText(Ruta & FileName)
+ Dim CodigoUnico As String = "CU no escaneado" 'texto constante para determinar que no se leyó
+
+ Dim r As Integer = 1
+ 'Execute a loop over the rows.
+ For Each row As String In csvData.Split(ControlChars.Lf)
+
+ If r > 2 Then ' si es la segundo renglon
+ If Not String.IsNullOrEmpty(row) Then
+ Dim i As Integer = 0
+ Dim rr As String() = row.Split(","c)
+
+ If CodigoUnico <> rr(7).Trim AndAlso (FolioFactura = "" OrElse FolioFactura = rr(2).Trim) Then
+ dt.Rows.Add()
+ dt.Rows(dt.Rows.Count - 1)("CodBarra") = rr(0).Trim
+ dt.Rows(dt.Rows.Count - 1)("OVenta") = rr(1).Trim
+ dt.Rows(dt.Rows.Count - 1)("Factura") = rr(2).Trim
+ dt.Rows(dt.Rows.Count - 1)("FechaFac") = rr(3).Trim
+ dt.Rows(dt.Rows.Count - 1)("Pallet") = rr(4).Trim
+ dt.Rows(dt.Rows.Count - 1)("CodigoJCI") = rr(5).Trim
+ dt.Rows(dt.Rows.Count - 1)("Producto") = rr(6).Trim
+ dt.Rows(dt.Rows.Count - 1)("Serie") = rr(7).Trim
+ dt.Rows(dt.Rows.Count - 1)("Cantidad") = 1
+ dt.Rows(dt.Rows.Count - 1)("Código") = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Codigo", String.Format("Codigo2 = '{0}'", rr(5).Trim))
+
+ End If
+ End If
+ End If
+ r += 1
+ Next
+
+ ProcesaExcel(dt)
+
+ End Sub
#End Region
Private Function GuardaDocumentoBitacora(ObjEventoBitacora As ClsOIEventos, CveMovimiento As Integer) As Boolean
diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx.cs b/Inventarios/RepEntregaAlmacenRuta.aspx.cs
index a58cccd61..229e939f5 100644
--- a/Inventarios/RepEntregaAlmacenRuta.aspx.cs
+++ b/Inventarios/RepEntregaAlmacenRuta.aspx.cs
@@ -537,11 +537,11 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
{
CveTimbre = ObjGenerales.AddGralTimbre("Tra", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true);
}
- //regenero el timbre
- if (TimbreTipoDocto == "Ent")
- {
- CveTimbre = ObjGenerales.AddGralTimbre("Ent", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true);
- }
+ ////regenero el timbre
+ //if (TimbreTipoDocto == "Ent")
+ //{
+ // CveTimbre = ObjGenerales.AddGralTimbre("Ent", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true);
+ //}
ProcesoOK = true;
}
}
diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb
index ea04c720e..ee136e7bb 100644
--- a/OC/OC.aspx.vb
+++ b/OC/OC.aspx.vb
@@ -2549,7 +2549,8 @@ Partial Class OC
Dim ObjConta As New ClsContabilidad(OC.IniciaTransacSQL())
Dim ObjVentas As New ClsVentas(OC.IniciaTransacSQL())
Dim Conta As ClsContPAQi = Nothing
- If (UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto) Or UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
+
+ If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ((UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto) Or UsuarioActual.Empresa.Funcionalidad(200) = "1") Then
Conta = New ClsContPAQi(UsuarioActual.Empresa)
Conta.IniciaTransacSQL()
End If
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index 879b6f7fd..573a49386 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -1080,7 +1080,7 @@
-
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 302d66ca7..2cc4a6b2d 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -8808,7 +8808,7 @@ Partial Class Ventas
'CONTABILIDAD AUTOMATICA Y AC
- If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
+ If UsuarioActual.Empresa.UsaAC AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
ObjContPaq.IniciaTransacSQL()
End If
@@ -14193,6 +14193,7 @@ Partial Class Ventas
If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, TmpDTDetalle) Then
OcurrioError = True
ErrorList.Add("Ocurrió un error al verificar inventario de remisiones.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
+ ModExtensiones.GuardaLog("Ocurrió un error al verificar inventario de remisiones.Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Exit For
End If
Next
@@ -34251,11 +34252,11 @@ Partial Class Ventas
Dim CveDireccionDestino As Integer = -1
If SucursalOrigenCP IsNot Nothing Then
- CveDireccionOrigen = 0 'ObjClientes.DireccionEnvioAdd(-1, SucursalOrigenCP.Direccion, SucursalOrigenCP.NoExt, SucursalOrigenCP.NoInt, SucursalOrigenCP.Colonia, SucursalOrigenCP.Municipio, SucursalOrigenCP.Estado, SucursalOrigenCP.CP.ToEntero(), "", UsuarioActual.CveUsuario, 1, -1, "", CveEstado:=SucursalOrigenCP.CveEstado, CvePais:=SucursalOrigenCP.CvePais, CveEmpresa:=UsuarioActual.CveEmpresa)
+ CveDireccionOrigen = ObjClientes.DireccionEnvioAdd(-1, SucursalOrigenCP.Direccion, SucursalOrigenCP.NoExt, SucursalOrigenCP.NoInt, SucursalOrigenCP.Colonia, SucursalOrigenCP.Municipio, SucursalOrigenCP.Estado, SucursalOrigenCP.CP.ToEntero(), "", UsuarioActual.CveUsuario, 1, -1, "", CveEstado:=SucursalOrigenCP.CveEstado, CvePais:=SucursalOrigenCP.CvePais, CveEmpresa:=UsuarioActual.CveEmpresa)
End If
If SucursalDestinoCP IsNot Nothing Then
- CveDireccionDestino = 0 'ObjClientes.DireccionEnvioAdd(-1, SucursalDestinoCP.Direccion, SucursalDestinoCP.NoExt, SucursalDestinoCP.NoInt, SucursalDestinoCP.Colonia, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.CP.ToEntero(), "", UsuarioActual.CveUsuario, 1, -1, "", CveEstado:=SucursalDestinoCP.CveEstado, CvePais:=SucursalDestinoCP.CvePais, CveEmpresa:=UsuarioActual.CveEmpresa)
+ CveDireccionDestino = ObjClientes.DireccionEnvioAdd(-1, SucursalDestinoCP.Direccion, SucursalDestinoCP.NoExt, SucursalDestinoCP.NoInt, SucursalDestinoCP.Colonia, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.CP.ToEntero(), "", UsuarioActual.CveUsuario, 1, -1, "", CveEstado:=SucursalDestinoCP.CveEstado, CvePais:=SucursalDestinoCP.CvePais, CveEmpresa:=UsuarioActual.CveEmpresa)
End If
If Not (CveDireccionOrigen > 0 And CveDireccionDestino > 0) Then
@@ -34370,9 +34371,9 @@ Partial Class Ventas
SucursalOrigenCP.Colonia = Row("Colonia").ToString()
SucursalOrigenCP.CP = Row("CP").ToString()
SucursalOrigenCP.Municipio = Row("Municipio").ToString()
- 'SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
+ SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
SucursalOrigenCP.Estado = Row("Estado").ToString()
- 'SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
+ SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
SucursalOrigenCP.Pais = Row("Pais").ToString()
SBDomicilioSucursal.AppendFormat("{0}", Row("Calle").ToString())
@@ -34434,9 +34435,9 @@ Partial Class Ventas
SucursalDestinoCP.Direccion = Row("EnvioDireccion").ToString()
SucursalDestinoCP.Colonia = Row("EnvioColonia").ToString()
SucursalDestinoCP.Municipio = Row("EnvioCiudad").ToString()
- 'SucursalDestinoCP.CveEstado = Row("CveEstado").ToString().ToEntero()
+ SucursalDestinoCP.CveEstado = Row("CveEstado").ToString().ToEntero()
SucursalDestinoCP.Estado = Row("EnvioEstado").ToString()
- 'SucursalDestinoCP.CvePais = Row("CvePais").ToString().ToEntero()
+ SucursalDestinoCP.CvePais = Row("CvePais").ToString().ToEntero()
SucursalDestinoCP.Pais = Row("Pais").ToString()
SucursalDestinoCP.CP = Row("EnvioCP").ToString()