This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-07-10 12:30:41 -07:00
20 changed files with 120 additions and 53 deletions

View File

@@ -1344,7 +1344,7 @@ Namespace Modelos
Public Sub GuardarVenta(ByRef factura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNotaCredito As Boolean = False, Optional ObjAcum As ClsAcumuladores = Nothing) Public Sub GuardarVenta(ByRef factura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNotaCredito As Boolean = False, Optional ObjAcum As ClsAcumuladores = Nothing)
Dim Msgok As New StringBuilder Dim Msgok As New StringBuilder
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVentaM", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa) factura.CvePrePoliza = ObjConta.AddPrePolizas("Modelos/GuardarVentaM", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa)
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,

View File

@@ -2277,22 +2277,42 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
End Property End Property
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
Get Get
If CveEmpresa <> -1 Then Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
Dim Str As New StringBuilder 'sino existe, recarga los datos
Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa) If HttpContext.Current.Application(AppNombre) Is Nothing Then
If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) Dim ObjUsr As New ClsSisUsuarios
If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) ObjUsr.Dispose()
GlobalDTAlmacenUsuarios = Dv.ToTable
Dv.Dispose()
Else
GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable)
End If End If
Dim Str As New StringBuilder
Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTAlmacenUsuarios = Dv.ToTable
Dv.Dispose()
End Get End Get
Set(value As DataTable) Set(value As DataTable)
HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
HttpContext.Current.Application(AppNombre) = value
End Set End Set
'Get
' If CveEmpresa <> -1 Then
' Dim Str As New StringBuilder
' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
' GlobalDTAlmacenUsuarios = Dv.ToTable
' Dv.Dispose()
' Else
' GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable)
' End If
'End Get
'Set(value As DataTable)
' HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value
'End Set
End Property End Property
Property GlobalDTNom_Periodos() As DataTable Property GlobalDTNom_Periodos() As DataTable
Get Get

View File

@@ -246,7 +246,7 @@ Partial Class Bancos_PagosIntermediarios
Else Else
ObjIE.RollBack() ObjIE.RollBack()
Alert(String.Format("Ocurrió un error al registrar el movimiento."), TipoMensaje.MsgError) Alert(String.Format("Ocurrió un error al registrar el movimiento."), TipoMensaje.MsgError)
GuardaLog(MsgError) GuardaLog($"RegistroPagoIntermediario --> {MsgError}")
End If End If
ObjIE.Dispose() ObjIE.Dispose()

View File

@@ -7712,7 +7712,7 @@ Partial Class Compras_Compras
' ImporteAnticipo += Ant.Importe ' RESTO DEL IMPORTE POR SI QUEDA DIFERENCIA DE LA SUMA DE LOS ANTICIPOS Y EL PROVEEDOR TIENE QUE PAGAR ' ImporteAnticipo += Ant.Importe ' RESTO DEL IMPORTE POR SI QUEDA DIFERENCIA DE LA SUMA DE LOS ANTICIPOS Y EL PROVEEDOR TIENE QUE PAGAR
'movimiento de pago proveedor, --no se regisra porque no se registra el total de la compra como deuda del proveedor, solo lo que queda a deber 'movimiento de pago proveedor, --no se regisra porque no se registra el total de la compra como deuda del proveedor, solo lo que queda a deber
'si es l moviemiento es de amortizacion con descuento, no registra el pago, ya esta descontado 'si es l moviemiento es de amortizacion con descuento, no registra el pago, ya esta descontado
If TieneAnticiposXML = False AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe) Then If TieneAnticiposXML = False AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe, CveCompraAmortizacion:=CveCompraNC) Then
ErrorMovtosCxP = True ErrorMovtosCxP = True
End If End If
PorcentajePago = (Ant.Importe) / TxtTotal.Text.ToDecimal PorcentajePago = (Ant.Importe) / TxtTotal.Text.ToDecimal
@@ -10630,7 +10630,7 @@ Partial Class Compras_Compras
e.Row.Cells(0).ToolTip = "Producto/Servicio NO Registrado" e.Row.Cells(0).ToolTip = "Producto/Servicio NO Registrado"
e.Row.Cells(0).ID = String.Format("tr{0}", e.Row.RowIndex) e.Row.Cells(0).ID = String.Format("tr{0}", e.Row.RowIndex)
e.Row.Cells(0).ClientIDMode = ClientIDMode.Static e.Row.Cells(0).ClientIDMode = ClientIDMode.Static
e.Row.Cells(0).Attributes.Add("onclick", String.Format("fnAltaPS('{0}','{1}',{2})", String.Format("tr{0}", e.Row.RowIndex), e.Row.DBCampo("PS").Replace("'", "").Replace(Chr(13), "").Replace(Chr(10), ""), e.Row.RowIndex)) e.Row.Cells(0).Attributes.Add("onclick", String.Format("fnAltaPS('{0}','{1}',{2})", String.Format("tr{0}", e.Row.RowIndex), e.Row.DBCampo("PS").Replace("'", "&#39;").Replace(Chr(13), "").Replace(Chr(10), ""), e.Row.RowIndex))
If e.Row.FCTextBox("TxtPrecioEdit") IsNot Nothing Then e.Row.FCTextBox("TxtPrecioEdit").Enabled = False If e.Row.FCTextBox("TxtPrecioEdit") IsNot Nothing Then e.Row.FCTextBox("TxtPrecioEdit").Enabled = False
If e.Row.FCTextBox("TxtCantidadEdit") IsNot Nothing Then e.Row.FCTextBox("TxtCantidadEdit").Enabled = False If e.Row.FCTextBox("TxtCantidadEdit") IsNot Nothing Then e.Row.FCTextBox("TxtCantidadEdit").Enabled = False
End If End If
@@ -17979,7 +17979,7 @@ Partial Class Compras_Compras
CvePS = DdlPSAlias2.SelectedValue.ToEntero CvePS = DdlPSAlias2.SelectedValue.ToEntero
tPS = DdlPSAlias2.SelectedText tPS = DdlPSAlias2.SelectedText
If PS.AddPSAlias(TxtPSAlias.Text.Trim, CvePS) Then If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS) Then
GlobalDTProductosServiciosAlias(-1) = PS.DtResultados GlobalDTProductosServiciosAlias(-1) = PS.DtResultados
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS

View File

@@ -2335,16 +2335,16 @@ Partial Class PopUpVerFactura
Dim ObjCompra As New ClsCompras() Dim ObjCompra As New ClsCompras()
If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0) Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
Dim FechaCompra As Date = dr("Fecha").ToString.ToDate Dim FechaCompra As Date = dr("FechaMovto").ToString.ToDate
Dim FechaVencimiento As Date = dr("FechaVencimiento").ToString.ToDate Dim FechaVencimiento As Date = dr("FechaVencimiento").ToString.ToDate
params.Add(New ReportParameter("Fecha", FechaCompra.ToShortDateString)) params.Add(New ReportParameter("Fecha", FechaCompra.ToShortDateString))
params.Add(New ReportParameter("FechaVencimiento", FechaVencimiento.ToShortDateString)) params.Add(New ReportParameter("FechaVencimiento", FechaVencimiento.ToShortDateString))
params.Add(New ReportParameter("Plazo", DateDiff(DateInterval.Day, FechaCompra, FechaVencimiento).ToString)) params.Add(New ReportParameter("Plazo", DateDiff(DateInterval.Day, FechaCompra, FechaVencimiento).ToString))
params.Add(New ReportParameter("Folio", Folio.ToString)) 'params.Add(New ReportParameter("Folio", Folio.ToString))
params.Add(New ReportParameter("Serie", dr("Serie").ToString)) params.Add(New ReportParameter("Serie", dr("Serie").ToString))
'params.Add(New ReportParameter("NumeroOrden", dr("OCVinculada").ToString)) 'params.Add(New ReportParameter("NumeroOrden", dr("OCVinculada").ToString))
'params.Add(New ReportParameter("FacturaProveedor", dr("SerieFolio").ToString)) params.Add(New ReportParameter("FacturaProveedor", dr("SerieFolio").ToString))
params.Add(New ReportParameter("NombreProveedor", dr("RazonSocial").ToString)) params.Add(New ReportParameter("NombreProveedor", dr("RazonSocial").ToString))
params.Add(New ReportParameter("DireccionProveedor", dr("Direccion").ToString)) params.Add(New ReportParameter("DireccionProveedor", dr("Direccion").ToString))
params.Add(New ReportParameter("CiudadProveedor", " ")) params.Add(New ReportParameter("CiudadProveedor", " "))

View File

@@ -140,7 +140,7 @@
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3%" /> <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3%" />
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="40%" /> <asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="40%" />
<asp:BoundField HeaderText="Contrato Externo" DataField="ContratoExterno" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Contrato Externo" DataField="ContratoExterno" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
@@ -180,7 +180,7 @@
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3%" /> <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3%" />
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="40%" /> <asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="40%" />
<asp:BoundField HeaderText="Contrato Externo" DataField="ContratoExterno" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Contrato Externo" DataField="ContratoExterno" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View File

@@ -611,7 +611,7 @@ Partial Class Contratos_FacturacionMasiva
Dim CveSubProyecto = TmpDTDetalle.Rows(0)("CveSubProyecto").ToString.ToEntero Dim CveSubProyecto = TmpDTDetalle.Rows(0)("CveSubProyecto").ToString.ToEntero
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa) factura.CvePrePoliza = ObjConta.AddPrePolizas("FacMas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa)
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento, factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,

View File

@@ -303,7 +303,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim CantidadEntrada As Decimal = RowExcel("Cantidad").ToString().ToDecimal() Dim CantidadEntrada As Decimal = RowExcel("Cantidad").ToString().ToDecimal()
Dim CvePS As Integer = DrPS("CvePS").ToString().ToEntero() Dim CvePS As Integer = DrPS("CvePS").ToString().ToEntero()
Dim CveUM As Integer = DrPS("CveUM").ToString().ToEntero() Dim CveUM As Integer = DrPS("CveUnidadMedida").ToString().ToEntero()
Dim SeccionAlmacen As String = RowExcel("SeccionAlmacen").ToString.Trim Dim SeccionAlmacen As String = RowExcel("SeccionAlmacen").ToString.Trim
Dim CveSeccionAlmacen As Integer = -1 Dim CveSeccionAlmacen As Integer = -1

View File

@@ -1960,6 +1960,8 @@ Partial Class Inventarios_EntradasSalidas
If DdlConcepto.Items.FindByValue("1") Is Nothing Then If DdlConcepto.Items.FindByValue("1") Is Nothing Then
DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 1, 1, 0), New ListItem(" Inventario Inicial ", "1")) DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 1, 1, 0), New ListItem(" Inventario Inicial ", "1"))
End If End If
DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 1, 1, 0), New ListItem(" Salida por Ajuste ", "34"))
End If End If
'ACTIVO FIJO 'ACTIVO FIJO
@@ -1977,7 +1979,7 @@ Partial Class Inventarios_EntradasSalidas
If DdlConcepto.Items.FindByValue("2") Is Nothing Then If DdlConcepto.Items.FindByValue("2") Is Nothing Then
DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 2, 2, DdlConcepto.Items.Count), New ListItem("Entrada Almacen ", "2")) DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 2, 2, DdlConcepto.Items.Count), New ListItem("Entrada Almacen ", "2"))
End If End If
DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 1, 1, 0), New ListItem(" Salida por Ajuste ", "34"))
End If End If
'[IPP]: PARCHE PARA JAM '[IPP]: PARCHE PARA JAM

View File

@@ -674,7 +674,7 @@ Partial Class Inventarios_Remanufactura
Dim CveSubProyecto = TmpDTDetalle.Rows(0)("CveSubProyecto").ToString.ToEntero Dim CveSubProyecto = TmpDTDetalle.Rows(0)("CveSubProyecto").ToString.ToEntero
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa) factura.CvePrePoliza = ObjConta.AddPrePolizas("Reman/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa)
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento, factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,

View File

@@ -26,7 +26,7 @@
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Sucursal:</label> <label class="col-md-1 truncate">Sucursal:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlSucursal" runat="server" AppendDataBoundItems="true" DataTextField="Sucursal" DataValueField="CveSucursal" CssClass="form-control input-sm select2me"> <asp:DropDownList ID="DdlSucursal" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>

View File

@@ -17,7 +17,7 @@ Partial Class OC_RepOCSinFactura
Private Sub CargaCombos() Private Sub CargaCombos()
'CargaSucursales 'CargaSucursales
DdlSucursal.DataSource = GlobalDTSucursales.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) DdlSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
DdlSucursal.DataBind() DdlSucursal.DataBind()
'Vendedor 'Vendedor

View File

@@ -2978,7 +2978,7 @@ Partial Class Ventas_PortalCliente
Dim EsDevolucionVenta = -1 Dim EsDevolucionVenta = -1
Dim TotalImpuestoLocal As Double = 0 Dim TotalImpuestoLocal As Double = 0
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa) factura.CvePrePoliza = ObjConta.AddPrePolizas("PortalC/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa)
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento, factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,

View File

@@ -198,7 +198,7 @@
<div class="col-md-1 truncate">Sucursal</div> <div class="col-md-1 truncate">Sucursal</div>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DDLSucursal" runat="server" DataTextField="Sucursal" DataValueField="CveSucursal" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="150px"> <asp:DropDownList ID="DDLSucursal" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="150px">
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator InitialValue="-1" ID="RequiredFieldValidator1" CssClass="help-block errorimput" ControlToValidate="DDLSucursal" <asp:RequiredFieldValidator InitialValue="-1" ID="RequiredFieldValidator1" CssClass="help-block errorimput" ControlToValidate="DDLSucursal"
ValidationGroup="registro" runat="server" Text="*" ErrorMessage="Seleccione una de las opciones"></asp:RequiredFieldValidator> ValidationGroup="registro" runat="server" Text="*" ErrorMessage="Seleccione una de las opciones"></asp:RequiredFieldValidator>

View File

@@ -87,7 +87,7 @@ Partial Class RH_RepDocumentacionVencida
DDLSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.Empresa.CveEmpresa) DDLSucursal.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DDLSucursal.DataBind() DDLSucursal.DataBind()
DDLSucursal.Items.Insert(0, New ListItem("Todos", "-1")) DDLSucursal.Items.Insert(0, New ListItem("Todos", "-1"))
If UsuarioActual.CveSucursal > 0 Then If UsuarioActual.CveSucursal > 0 Then

View File

@@ -131,13 +131,58 @@ public class TareasJam : IHttpHandler
DTClientes.Columns[7].ColumnName = "address.street1"; DTClientes.Columns[7].ColumnName = "address.street1";
DTClientes.Columns[8].ColumnName = "address.street2"; DTClientes.Columns[8].ColumnName = "address.street2";
DTClientes.Columns[9].ColumnName = "address.postalCode"; DTClientes.Columns[9].ColumnName = "address.postalCode";
DTClientes.Columns[9].ColumnName = "phone.intCode"; DTClientes.Columns[10].ColumnName = "phone.intCode";
DTClientes.Columns[9].ColumnName = "phone.areaCode"; DTClientes.Columns[11].ColumnName = "phone.areaCode";
DTClientes.Columns[9].ColumnName = "phone.number"; DTClientes.Columns[12].ColumnName = "phone.number";
DTClientes.Dispose();
DTClientes.Columns.RemoveAt(12);
DTClientes.Columns.RemoveAt(11);
DTClientes.Columns.RemoveAt(10);
DTClientes.Columns.RemoveAt(8);
DTClientes.Columns.RemoveAt(7);
DTClientes.AcceptChanges();
DTVentas.Columns.RemoveAt(7); DTVentas.Columns.RemoveAt(7);
DTVentas.Columns.RemoveAt(6);
DTVentas.AcceptChanges(); DTVentas.AcceptChanges();
DataTable dtCloned = DTVentas.Clone();
dtCloned.Columns[3].DataType = typeof(string);
foreach (DataRow row in DTVentas.Rows)
{
dtCloned.ImportRow(row);
}
DTVentas = dtCloned;
foreach(DataRow dRow in DTVentas.Rows)
{
string tmpString = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
dRow[3] = tmpString;
}
DTVentas.AcceptChanges();
dtCloned = DTAlmacenes.Clone();
dtCloned.Columns[3].DataType = typeof(string);
foreach (DataRow row in DTAlmacenes.Rows)
{
dtCloned.ImportRow(row);
}
DTAlmacenes = dtCloned;
foreach(DataRow dRow in DTAlmacenes.Rows)
{
string tmpString = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
dRow[3] = tmpString;
}
DTAlmacenes.AcceptChanges();
} }
catch (Exception e) catch (Exception e)
{ {
@@ -313,7 +358,7 @@ public class TareasJam : IHttpHandler
{ {
ClsSisMail Correo = new ClsSisMail(); ClsSisMail Correo = new ClsSisMail();
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx"; string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
//string Para = "oscar.irigoyen@adssistemas.mx"; // string Para = "oscar.irigoyen@adssistemas.mx";
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}"; string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo); Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo);

View File

@@ -60,7 +60,7 @@
</thead> </thead>
<tr> <tr>
<td style="text-align: center"> <td style="text-align: center">
<asp:DropDownList ID="ddlSucursal" runat="server" DataValueField="CveSucursal" DataTextField="Sucursal" Width="134px" AutoPostBack="true"></asp:DropDownList> <asp:DropDownList ID="ddlSucursal" runat="server" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Width="134px" AutoPostBack="true"></asp:DropDownList>
<asp:RangeValidator ID="RVSucursal" runat="server" ControlToValidate="ddlSucursal" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator> <asp:RangeValidator ID="RVSucursal" runat="server" ControlToValidate="ddlSucursal" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCESucursal" runat="server" HighlightCssClass="vco" TargetControlID="RVSucursal" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCESucursal" runat="server" HighlightCssClass="vco" TargetControlID="RVSucursal" Width="300px"></ajax:ValidatorCalloutExtender>
</td> </td>
@@ -88,7 +88,7 @@
<asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("Sucursal", "&nbsp;{0}") %>'></asp:Literal> <asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("Sucursal", "&nbsp;{0}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
<EditItemTemplate> <EditItemTemplate>
<asp:DropDownList ID="ddlSucursal" runat="server" Width="134" DataValueField="CveSucursal" DataTextField="Sucursal"></asp:DropDownList> <asp:DropDownList ID="ddlSucursal" runat="server" Width="134" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>

View File

@@ -42,7 +42,7 @@ Partial Class Ventas_CatMesas
End Sub End Sub
Public Sub CargaSucursales() Public Sub CargaSucursales()
ddlSucursal.DataSource = GlobalDTSucursales().FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) ddlSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
ddlSucursal.DataBind() ddlSucursal.DataBind()
ddlSucursal.Items.Insert(0, New ListItem("Todas", "-1")) ddlSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub End Sub
@@ -106,7 +106,7 @@ Partial Class Ventas_CatMesas
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
e.Row.FCDropDownList("ddlSucursal").DataSource = GlobalDTSucursales().FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) e.Row.FCDropDownList("ddlSucursal").DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("ddlSucursal").DataBind() e.Row.FCDropDownList("ddlSucursal").DataBind()
e.Row.FCDropDownList("ddlSucursal").SelectedValue = e.Row.DBCampo("CveSucursal") e.Row.FCDropDownList("ddlSucursal").SelectedValue = e.Row.DBCampo("CveSucursal")
End If End If

View File

@@ -1300,11 +1300,11 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="DivOCRelacionadas" class="modal ADS fade" role="dialog" runat="server" visible="false"> <div id="DivOCRelacionadas" class="col-md-3" runat="server" visible="false">
<asp:GridView runat="server" ID="GvOCRelacionadas" Caption="Ordenes de Compra Relacionadas:" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra,Folio" <asp:GridView runat="server" ID="GvOCRelacionadas" Caption="OC Relacionadas:" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra,Folio"
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None" ShowHeader="False"> CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns> <Columns>
<asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveOrdenCompra" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" /> <asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveOrdenCompra" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" HeaderText="Orden Compra" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View File

@@ -10902,8 +10902,8 @@ Partial Class Ventas
Case 103 'Descuento Case 103 'Descuento
If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then
importeMovimiento = ObjFactura.Descuento * ValorMultiplicador importeMovimiento = ObjFactura.Descuento * Multiplicador * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador * ValorMultiplicador
FechaMovimiento = ObjFactura.FechaPago FechaMovimiento = ObjFactura.FechaPago
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta