This commit is contained in:
rakcsle
2022-05-20 10:37:09 -07:00
23 changed files with 8515 additions and 417 deletions

View File

@@ -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

View File

@@ -3139,18 +3139,18 @@ Public Class ClsNominas
Return retorno
End Function
Public Function PA_AGRO_Embarque_ManifiestoGet(cveSubproyecto As Int32, cveUsuario As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32) As Boolean
Public Function EmbarqueManifiestoGet(cveSubproyecto As Int32, cveUsuario As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_AGRO_Embarque_ManifiestoGet", CommandType.StoredProcedure)
addParameters("@CveSubproyecto", SqlDbType.Int, cveSubproyecto)
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
addParameters("@CveEmbarqueManifiesto", SqlDbType.Int, cveEmbarqueManifiesto)
retorno = RunQuery("Ocurrió un error al obtener el PA_AGRO_Embarque_ManifiestoGet.")
retorno = RunQuery("Ocurrió un error al obtener el Embarque Manifiesto .")
Return retorno
End Function
Public Function PA_Agro_Embarque_PalletGet(cvePallet As Int32, cveCultivo As Int32, cveCultivoVariedad As Int32, cveEnvase As Int32, cveEtiqueta As Int32, cveEtiquetasporTarima As Int32, cveFormatoImpresion As Int32, cveTamaño As Int32, cveTipoTarima As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32, cveTemporada As Int32) As Boolean
Public Function EmbarquePalletGet(cvePallet As Int32, cveCultivo As Int32, cveCultivoVariedad As Int32, cveEnvase As Int32, cveEtiqueta As Int32, cveEtiquetasporTarima As Int32, cveFormatoImpresion As Int32, cveTamaño As Int32, cveTipoTarima As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32, cveTemporada As Int32, Optional agrupado As Boolean = False) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Agro_Embarque_PalletGet", CommandType.StoredProcedure)
addParameters("@CvePallet", SqlDbType.Int, cvePallet)
@@ -3165,7 +3165,8 @@ Public Class ClsNominas
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
addParameters("@CveEmbarqueManifiesto", SqlDbType.Int, cveEmbarqueManifiesto)
addParameters("@CveTemporada", SqlDbType.Int, cveTemporada)
retorno = RunQuery("Ocurrió un error al obtener el PA_Agro_Embarque_PalletGet.")
addParameters("@Agrupado", SqlDbType.Bit, agrupado)
retorno = RunQuery("Ocurrió un error al obtener el Embarque Pallet .")
Return retorno
End Function
#Region "Visor sat"

View File

@@ -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

View File

@@ -1527,8 +1527,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim xmlarchivos As System.Xml.Linq.XDocument = New System.Xml.Linq.XDocument()
Dim xfolder As XElement = New XElement("folder")
For Each urfile In System.IO.Directory.GetFiles(directorio)
Dim xfile As New XElement("archivo", urfile)
Dim xfile As New XElement("archivo", "")
xfile.SetAttributeValue("EXT", Path.GetExtension(urfile))
xfile.SetAttributeValue("urlfile", urfile)
xfolder.Add(xfile)
Next

View File

@@ -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)
{

View File

@@ -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

View File

@@ -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

View File

@@ -1290,7 +1290,13 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
DVCultivosCuadro.Visible = True
DdlSubProyecto.AutoPostBack = True
DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue}")
GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing
Dim extrafiltro = "Estatus=1 AND "
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
extrafiltro = ""
End If
DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"{extrafiltro} CveSubProyecto = {DdlSubProyecto.SelectedValue}")
DdlCultivosCuadro.DataBind()
DdlCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
@@ -5081,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
@@ -5505,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 **************************************************************************************************************************************************************************************************************************************************************************************************
@@ -5661,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
@@ -5685,7 +5652,6 @@ Partial Class Compras_Compras
Capital = Ambos
Interes = Ambos
End If
If Capital > 0 Then
@@ -5695,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
@@ -5715,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
@@ -5756,8 +5717,6 @@ Partial Class Compras_Compras
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
End If
'********************** Variables '**********************
'****** Pagos
@@ -5864,8 +5823,6 @@ Partial Class Compras_Compras
Dim importeRetISRxAcreditar As Decimal = 0
importeRetISRxAcreditar = TxtRetISR.Text.ToDecimal
'****** Movimientos Independientes
'Pago Proveedores (17)
@@ -6276,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
@@ -6414,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
@@ -6482,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"
@@ -6916,8 +6813,6 @@ Partial Class Compras_Compras
End If
Next
'la diferencia se va aplicar sobre los
'Dim diferenciaTransito As Decimal = ImporteTransito - importeMN.RoundSQL
@@ -6967,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
@@ -7150,15 +7042,11 @@ Partial Class Compras_Compras
End If
End If
Next
End If
End If
'LIMPIA
importeMovimiento = 0
IdCtaContable = 0
@@ -7199,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
@@ -7356,8 +7238,6 @@ Partial Class Compras_Compras
End If
End If
'ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
End If
Next
@@ -7707,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
@@ -8418,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
@@ -8491,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
@@ -8517,8 +8389,6 @@ Partial Class Compras_Compras
End If
'AJUSTA POLIZA
If IdPoliza > 0 Then
PolizaFolio = ObjContaAC.Folio
@@ -8540,6 +8410,11 @@ Partial Class Compras_Compras
Msg.AppendFormat($"</br><a class=""Texto"" target='_blank' href=""/Inventarios/RecepcionAlmacen.aspx?CveCompra={CveCompra}&ED=1"">Recibir mercancía de entrega directa.</a>")
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()
@@ -18057,9 +17932,13 @@ Partial Class Compras_Compras
End If
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing
Dim extrafiltro = "Estatus=1 AND "
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
extrafiltro = ""
End If
DdlCultivosCuadro.Items.Clear()
DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($" CveSubProyecto = {DdlSubProyecto.SelectedValue}")
DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"{extrafiltro} CveSubProyecto = {DdlSubProyecto.SelectedValue}")
DdlCultivosCuadro.DataBind()
DdlCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
@@ -18897,7 +18776,7 @@ Partial Class Compras_Compras
CompruebaAgregar()
End If
Alert("SubProyectos cambiados correctamente", TipoMensaje.MsgInformacion)
Alert("SubProyectos cambiados correctamente", TipoMensaje.ToastInformacion)
End Sub
@@ -18926,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

View File

@@ -247,6 +247,7 @@ Partial Class PopUpVerFactura
Dim SCAC As String = ""
Dim CAAT As String = ""
Dim NumeroTrailer As String = ""
Dim Permiso As String = ""
Dim tablaReporte As New DataTable
@@ -257,7 +258,7 @@ Partial Class PopUpVerFactura
'noPallet = "000001"
'Variedad = "Golden"
Using objnom As New ClsNominas
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
If objnom.EmbarqueManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
Dim row As DataRow = objnom.DtResultados.Rows(0)
NoEmbarque = row("NoEmbarque").ToString()
Cliente = row("Cliente").ToString()
@@ -282,7 +283,7 @@ Partial Class PopUpVerFactura
LineaTransportacion = row("LineaTransportacion").ToString()
SCAC = row("SCAC").ToString()
CAAT = row("CAAT").ToString()
Permiso = row("Permiso").ToString()
'If row("CveCamionRemolque1").ToString() = "1" Then
' Rem1Placa = "12-TF-5E"
' Remolque1 = "Remolque 1"
@@ -292,12 +293,13 @@ Partial Class PopUpVerFactura
'End If
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
NoPallets = objnom.DtResultados.Rows.Count.ToString()
If objnom.EmbarquePalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1, True) And objnom.DtResultados.Rows.Count > 0 Then
NoPallets = objnom.DtResultados.SUM("NoPallets").ToString()
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
tablaReporte = objnom.DtResultados
End If
End If
'Remolque 1 12-TF-5E' }, { cveCamion: 2, placa: 'Remolque 2 15-TF-7f
@@ -307,7 +309,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Cliente", Cliente))
params.Add(New ReportParameter("Direccion", Direccion))
params.Add(New ReportParameter("Fecha", Fecha))
params.Add(New ReportParameter("SubProyecto", SubProyecto))
params.Add(New ReportParameter("SubProyecto", SubProyecto.ToUpper()))
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
params.Add(New ReportParameter("AgenciaAduanalMEX", AgenciaAduanalMEX))
params.Add(New ReportParameter("Temperatura", Temperatura))
@@ -317,6 +319,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Camion", Camion))
params.Add(New ReportParameter("Rem1Placa", Rem1Placa))
params.Add(New ReportParameter("Remolque1", Remolque1))
params.Add(New ReportParameter("Permiso", Permiso))
params.Add(New ReportParameter("LongitudCaja", LongitudCaja))
@@ -343,7 +346,11 @@ Partial Class PopUpVerFactura
lrds.Add(rds)
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Manifesto", Content_Disposition:="Inline")
Dim rutardlc = "GPS/EmbarqueManifiesto.rdlc"
If Not IsNothing(tablaReporte.FiltroPrimero("TipoManifiesto=1")) Then
rutardlc = "GPS/EmbarqueManifiesto2.rdlc"
End If
ImprimirPDF(rutardlc, lrds, params, "Manifesto", Content_Disposition:="Inline")
End Sub
Private Sub imprimirManifiestoRemision(cveEmbarqueManifiesto As Integer)
@@ -392,7 +399,7 @@ Partial Class PopUpVerFactura
'noPallet = "000001"
'Variedad = "Golden"
Using objnom As New ClsNominas
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
If objnom.EmbarqueManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
Dim row As DataRow = objnom.DtResultados.Rows(0)
NoEmbarque = row("NoEmbarque").ToString()
Cliente = row("Cliente").ToString()
@@ -438,7 +445,7 @@ Partial Class PopUpVerFactura
'End If
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
If objnom.EmbarquePalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
NoPallets = objnom.DtResultados.Rows.Count.ToString()
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
@@ -547,7 +554,7 @@ Partial Class PopUpVerFactura
'noPallet = "000001"
'Variedad = "Golden"
Using objnom As New ClsNominas
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
If objnom.EmbarqueManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
Dim row As DataRow = objnom.DtResultados.Rows(0)
NoEmbarque = row("NoEmbarque").ToString()
Cliente = row("Cliente").ToString()
@@ -593,7 +600,7 @@ Partial Class PopUpVerFactura
'End If
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
If objnom.EmbarquePalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
NoPallets = objnom.DtResultados.Rows.Count.ToString()
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
@@ -684,7 +691,7 @@ Partial Class PopUpVerFactura
'noPallet = "000001"
'Variedad = "Golden"
Using objnom As New ClsNominas
If objnom.PA_Agro_Embarque_PalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then
If objnom.EmbarquePalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then
Dim row As DataRow = objnom.DtResultados.Rows(0)
Envase = row("Envase").ToString()
Tamano = row("Tamaño").ToString()
@@ -754,7 +761,7 @@ Partial Class PopUpVerFactura
'Cultivo = "Tomate"
'noPallet = "000001"
Using objnom As New ClsNominas
If objnom.PA_Agro_Embarque_PalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then
If objnom.EmbarquePalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then
Dim row As DataRow = objnom.DtResultados.Rows(0)
Envase = row("Envase").ToString()
Tamano = row("Tamaño").ToString()

View File

@@ -123,6 +123,9 @@ Partial Class Compras_RepProductosServiciosDetalle
txtFechaI.Text = If(Mes <> "-1", String.Format("01/{0}/0001", Mes), txtFechaI.Text)
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
If CveCultivo.ToEntero() > 0 AndAlso FechaI = "-1" AndAlso Anio = "-1" AndAlso Mes = "-1" AndAlso AnioMes = "-1" Then
txtFechaI.Text = "01/01/1900"
End If
If Fecha <> "-1" Then
txtFechaI.Text = Fecha
txtFechaF.Text = Fecha

View File

@@ -359,7 +359,7 @@
</div>
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False"
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones,EsComplementaria, ImporteME"
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones,EsComplementaria, EsMonedaExtranjera,ImporteME"
Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
@@ -477,7 +477,7 @@
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
DataKeyNames="CvePrePolizaDetalle,IdMov, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,Cargo,Abono" Width="100%" >
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%" >
<Columns>
<asp:TemplateField>
<HeaderTemplate>Movimiento</HeaderTemplate>
@@ -740,14 +740,14 @@
<div class="row">
<div class="col-md-12" runat="server" id="DvMoldalConceptoSeccion1">
<br />
<div class="row">
<div class="col-xs-2" style="text-align: left">Concepto:</div>
<div class="col-xs-2" style="text-align: left">Con Admin:</div>
<div class="col-xs-4" style="text-align: left">
<asp:DropDownList ID="DdlConceptosContablesE" CssClass="form-control input-sm select2me" Width="405px" runat="server" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" AutoPostBack="true">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVConceptoE" runat="server" ControlToValidate="DdlConceptosContablesE" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto admin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEConceptoE" runat="server" HighlightCssClass="vco" TargetControlID="RFVConceptoE" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>

View File

@@ -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 & "<br>" & 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()

View File

@@ -4561,13 +4561,15 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Value>GGN:</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox209</rd:DefaultName>
@@ -4602,7 +4604,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Value>=Parameters!Permiso.Value</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
@@ -7146,7 +7148,6 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -7179,7 +7180,6 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -7212,7 +7212,6 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -7245,7 +7244,6 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -7278,7 +7276,6 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
@@ -7334,6 +7331,12 @@
</ReportSection>
</ReportSections>
<ReportParameters>
<ReportParameter Name="Permiso">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NoEmbarque">
<DataType>String</DataType>
<Nullable>true</Nullable>

7902
GPS/EmbarqueManifiesto2.rdlc Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -614,7 +614,7 @@
</div>
<div class="col-md-6">
<div class="well well-sm">
<asp:HyperLink ID="LnkDoc17" NavigateUrl="Empresas\140\DocElectronica\Precios\MOTOBATERIASOPTIMA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> MOTOBATERIAS AMERICA
<asp:HyperLink ID="LnkDoc17" NavigateUrl="Empresas\140\DocElectronica\Precios\MOTOBATERIASAMERICA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> MOTOBATERIAS AMERICA
</asp:HyperLink>
</div>
</div>

View File

@@ -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. <br/><br/>")
End If
If RowsCargados > 0 Then
MensajeFinal.Append("Se cargaron <b>" & RowsCargados & "</b> productos correctamente.")
End If
If RowsNoCargados > 0 Then
MensajeFinal.Append("No se pudieron cargar <b>" & RowsNoCargados & "</b> productos. <br/>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. <br/><br/>")
End If
If RowsCargados > 0 Then
MensajeFinal.Append("Se cargaron <b>" & RowsCargados & "</b> productos correctamente.")
End If
If RowsNoCargados > 0 Then
MensajeFinal.Append("No se pudieron cargar <b>" & RowsNoCargados & "</b> productos. <br/>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

View File

@@ -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;
}
}

View File

@@ -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

View File

@@ -451,9 +451,16 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaFAdd" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaFAdd" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-2" style="padding-top: 14px; padding-left: 0px;">
<div class="input-group input-sm input-small date date-picker " style="padding-left: 0px;" data-date-format="dd/mm/yyyy">
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
</div>
</div>
<div class="text-right">
<asp:LinkButton ID="LnkSolicitarSat" OnClick="LnkSolicitarSat_Click" runat="server">Solicitar</asp:LinkButton>
<asp:LinkButton ID="LnkSolicitarSat" CssClass="btn btn-primary" OnClick="LnkSolicitarSat_Click" runat="server">Solicitar</asp:LinkButton>
</div>
</div>
</div>
@@ -546,6 +553,7 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="No CFDI">
<ItemTemplate>
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("numeroCFDIs")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Observaciones">

View File

@@ -2,6 +2,11 @@
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
@@ -44,9 +49,9 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
{
if (!IsPostBack)
{
TxtRpdFechaInicio.Text = string.Format("01/01/{0}", DateTime.Now.Year - 1);
TxtRpdFechaFin.Text = string.Format("31/12/{0}", DateTime.Now.Year - 1);
LnkConsultar_Click(null, null);
TxtRpdFechaInicio.Text = string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1));
TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth());
//LnkConsultar_Click(null, null);
}
}
@@ -174,6 +179,9 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
}
}
UPModalViewSolicitudes.Update();
var api = new GeneralesAPI();
api.GeneraSolicitud();
api.VerificaSolicitudesNominas();
}
protected void LnkShowSolicitudes_Click(object sender, EventArgs e)
{
@@ -196,6 +204,9 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
using (ClsNominas nom = new ClsNominas())
{
Continuar = nom.SolicitudesNominasAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa);
var api = new GeneralesAPI();
api.GeneraSolicitud();
api.VerificaSolicitudesNominas();
}
if (Continuar)
{
@@ -207,4 +218,198 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
}
}
}
}
public class GeneralesAPI : ADSNetLibrary.Helpers.Conexiones.SIGAPI.BaseSIGAPI
{
public GeneralesAPI(string domainApi = "http://localhost:4001/", string token = "") : base(domainApi, token) { }
public object GeneraSolicitud()
{
return getData<object>("GeneraSolicitud", null, ADSNetLibrary.Helpers.Conexiones.SIGAPI.requestMethod.GET,false);
}
public object VerificaSolicitudesNominas()
{
return getData<object>("VerificaSolicitudesNominas", null, ADSNetLibrary.Helpers.Conexiones.SIGAPI.requestMethod.GET, false);
}
}
//using ADSNetLibrary. SIGAPI;
//using ADSNetLibrary. SIGAPI.Models;
//using ADSNetLibrary. SIGAPI.Models.Request;
//using ADSNetLibrary.SIGAPI.Models.Sistema;
//using System;
//using System.Collections.Generic;
////using System.IdentityModel.Tokens.Jwt;
//using System.Linq;
//using System.Net.Http;
//using System.Net.Http.Headers;
//using System.Text;
//using System.Threading;
//using System.Threading.Tasks;
namespace ADSNetLibraryzd.Helpers.Conexiones.SIGAPI
{
public enum requestMethod
{
POST = 1,
GET = 2
}
public class BaseSIGAPI
{
private const string tituloLog = "ADSNetLibrary.Helpers.Conexiones.SIGAPI";
public string domainApi;
public string authorization;
protected string RouteController = "";
protected string FullRoute = "";
public string GetRoutbyclass() { string classname = this.GetType().Name; return classname.Substring(0, classname.Length - 3); }
public string GetRoute(string path)
{
if (string.IsNullOrEmpty(FullRoute))
{
return string.Format("api/{0}/{1}", (string.IsNullOrEmpty(RouteController) ? GetRoutbyclass() : RouteController), path);
}
else
{
return string.Format("{0}{1}", FullRoute, path);
}
}
/// <summary>
/// nueva instancia de conexion para una api
/// </summary>
/// <param name="domainApi"> url de la api</param>
/// <param name="authorization"> llenar si se tiene si se desea obtner usuar campos usuario y pasword</param>
public BaseSIGAPI(string domainApi, string authorization = null, string fullRoute = null)
{
if (string.IsNullOrEmpty(domainApi))
{
domainApi = "http://localhost:4001/";//"http://jam.adssistemas.mx:4001/";//Helpers.ModVars.UrlApi;
}
this.authorization = authorization;
this.domainApi = domainApi;
this.FullRoute = fullRoute;
}
//public string GetSIGToken(string userName, string password, int cveEmpresa)
//{
// var objauth = new RequestLogin() { UserName = userName, Password = password, CveEmpresa = cveEmpresa };
// var retorno = getData<ResponseModel<ResponseLogin>>("api/Usuario/Login", objauth, requestMethod.POST, false, true);
// if (retorno != null && retorno.IsSuccess)
// {
// return retorno.Result.AccessToken;
// }
// else
// {
// return null;
// }
//}
/// <summary>
/// Obtiene datos de la api asincrono.
/// </summary>
/// <typeparam name="T">Clase genérica en donde se obtiene la información del SqlDataReader.</typeparam>
/// <param name="path">ruta sin domino ejemplo "/api/usuarios/login".</param>
/// <param name="requestobject">request object.</param>
/// <returns>Lista de objetos.</returns>
public async Task<T> getDataAsync<T>(string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
{
T objreturn = null;
using (
HttpClient client = new HttpClient())
{
// Setting Base address.
client.BaseAddress = new Uri(domainApi);
// Setting content type.
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
// Setting Authorization.
if (needauthorization) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", authorization); }
client.Timeout = TimeSpan.FromMinutes(15);
HttpResponseMessage response = new HttpResponseMessage();
var strjsonreq = Newtonsoft.Json.JsonConvert.SerializeObject(requestobject);
StringContent content = new StringContent(strjsonreq, Encoding.UTF8, "application/json");
string route = isfullpath ? path : GetRoute(path);
try
{
switch (reqmet)
{
case requestMethod.POST:
response = await client.PostAsync(route, content);
break;
case requestMethod.GET:
response = await client.GetAsync(route);
break;
}
if (response.IsSuccessStatusCode)
{
string jsondata = await response.Content.ReadAsStringAsync();
Newtonsoft.Json.JsonSerializerSettings settings = new Newtonsoft.Json.JsonSerializerSettings
{
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore
};
objreturn = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(jsondata, settings);
}
else {
//ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}StatusCode:{3}{1}{4}{1}{5}{1}", tituloLog, ModVars.NewLine, route, response.StatusCode, response.RequestMessage, strjsonreq), ModVars.ADSNetLibraryLog);
}
}
catch (Exception e) {
//ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}{3}{1}{4}{1}", tituloLog, ModVars.NewLine, route, e, strjsonreq), ModVars.ADSNetLibraryLog);
}
}
return objreturn;
}
/// <summary>
/// Obtiene datos de la api.
/// </summary>
/// <typeparam name="T">Clase genérica en donde se obtiene la información del SqlDataReader.</typeparam>
/// <param name="path">ruta sin domino ejemplo "/api/usuarios/login".</param>
/// <param name="requestobject">request object.</param>
/// <returns>Lista de objetos.</returns>
public T getData<T>(string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
{
return AsyncHelper.RunSync<T>(() => getDataAsync<T>(path, requestobject, reqmet, needauthorization, isfullpath));
}
}
internal static class AsyncHelper
{
private static readonly TaskFactory _myTaskFactory = new
TaskFactory(CancellationToken.None,
TaskCreationOptions.None,
TaskContinuationOptions.None,
TaskScheduler.Default);
public static TResult RunSync<TResult>(Func<Task<TResult>> func)
{
return AsyncHelper._myTaskFactory
.StartNew<Task<TResult>>(func)
.Unwrap<TResult>()
.GetAwaiter()
.GetResult();
}
public static void RunSync(Func<Task> func)
{
AsyncHelper._myTaskFactory
.StartNew<Task>(func)
.Unwrap()
.GetAwaiter()
.GetResult();
}
}
}

View File

@@ -1080,7 +1080,7 @@
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad") %>' Visible="false"></asp:Literal>
<asp:Literal ID="LtlTipoDescuento" runat="server" Text='<%# Eval("TipoDescuento") %>' Visible="false"></asp:Literal>
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento") %>' Visible="false"></asp:Literal>
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Cantidad", "{0:####.######}") %>' ValidationGroup="GprGV" Width="45px" Height="24px"></asp:TextBox>
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Cantidad", "{0:0.######}") %>' ValidationGroup="GprGV" Width="45px" Height="24px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVCantidadEdit" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprGV"></asp:CustomValidator>

View File

@@ -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.<br />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()

View File

@@ -472,6 +472,18 @@