Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -6201,7 +6201,7 @@ Partial Class Compras_Compras
|
||||
If ObjConta.GetRetCuenta(ConceptoContabilizacionMEComp, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContableMEComp = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Dim CveMovimientoAlmacen As Integer = -1
|
||||
|
||||
'If importeMovimiento <> 0 Then
|
||||
Select Case ConceptoContabilizacion
|
||||
@@ -6209,11 +6209,12 @@ Partial Class Compras_Compras
|
||||
Dim SumatoriaOCINV = 0.0D, Importe176 = 0.0D, ImporteME176 = 0.0D, ImporteMN176 = 0.0D, Importe228 = 0.0D, ImporteME228 = 0.0D, ImporteMN228 = 0.0D, Importe229 = 0.0D, ImporteME229 = 0.0D, ImporteMN229 = 0.0D, ImporteCI176 = 0.0D
|
||||
For Each Dr As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND ISNULL(CveTipoPS,0) = 2").Rows
|
||||
If ObjOC.OrdenesCompraDetalleCostoPP(Dr("CveOrdenCompraDetalle").ToString.ToEntero) AndAlso ObjOC.DtResultados.Rows.Count = 1 Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text} OC: {ObjOC.DtResultados.FiltroPrimeroValor("Folio").ToString}"
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text} OC: {ObjOC.DtResultados.FiltroPrimeroValor("Folio").ToString} Inv:{ObjOC.DtResultados.FiltroPrimeroValor("FolioAlmacen").ToString}"
|
||||
Importe176 = ObjOC.DtResultados.FiltroPrimeroValor("Importe176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN176").ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
||||
Importe228 = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN228").ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
||||
Importe229 = ObjOC.DtResultados.FiltroPrimeroValor("Importe229").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME229 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME229").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN229 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN229").ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
||||
ImporteCI176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteCI176").ToDecimal
|
||||
CveMovimientoAlmacen = ObjOC.DtResultados.FiltroPrimeroValor("CveMovimientoAlmacen").ToEntero
|
||||
Dim TCAjuste As Decimal = ObjOC.DtResultados.FiltroPrimeroValor("TipoCambioAjuste").ToDecimal
|
||||
'RMF. falta verificar el costo indirecto de la OC
|
||||
If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
@@ -6221,8 +6222,8 @@ Partial Class Compras_Compras
|
||||
CostoIndirectoAcum176 += ImporteCI176
|
||||
'se considera costoindirecto, para que la factura tiene en un concepto tipo servicio
|
||||
SumatoriaOCINV += (Dr(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")).ToString.ToDecimal * tipoCambioActual) - (ImporteMN228 + ImporteMN229 - ImporteCI176)
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN228, ImporteME:=ImporteME228, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN229, ImporteME:=ImporteME229, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, Contabilizable:=SeContabiliza) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN228, ImporteME:=ImporteME228, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=Dr("CveMovimientoAlmacen").ToString.ToEntero, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN229, ImporteME:=ImporteME229, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=Dr("CveMovimientoAlmacen").ToString.ToEntero, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -6234,7 +6235,7 @@ Partial Class Compras_Compras
|
||||
CostoIndirectoAcum176 += ImporteCI176
|
||||
'se considera costoindirecto, para que la factura tiene en un concepto tipo servicio
|
||||
SumatoriaOCINV += (Dr(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")).ToString.ToDecimal * tipoCambioActual) - (ImporteMN176 - ImporteCI176)
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe176, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN176, ImporteME:=ImporteME176, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe176, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN176, ImporteME:=ImporteME176, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=Dr("CveMovimientoAlmacen").ToString.ToEntero, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -14295,6 +14296,7 @@ Partial Class Compras_Compras
|
||||
DTOCTemp.Columns.Add("IEPSPSIVATC", GetType(Double))
|
||||
DTOCTemp.Columns.Add("RetIVATC", GetType(Double))
|
||||
DTOCTemp.Columns.Add("RetISRTC", GetType(Double))
|
||||
DTOCTemp.Columns.Add("FolioAlmacen", GetType(String))
|
||||
For Each Dr As DataRow In DTOCTemp.Rows
|
||||
Dr("PUTC") = Dr("Importe")
|
||||
Dr("DescuentoTC") = Dr("Descuento")
|
||||
@@ -18591,6 +18593,7 @@ Partial Class Compras_Compras
|
||||
'DtInvOCDiferencias.Columns.Add("ImporteMovtoDLLS", GetType(Double))
|
||||
DtInvOCDiferencias.Columns.Add("CveAlmacen", GetType(Integer))
|
||||
DtInvOCDiferencias.Columns.Add("CveMovimiento", GetType(Integer))
|
||||
DtInvOCDiferencias.Columns.Add("FolioAlmacen", GetType(String))
|
||||
DtInvOCDiferencias.Columns.Add("TipoCambioAjuste", GetType(Double))
|
||||
DtInvOCDiferencias.Columns.Add("ConceptoSalida", GetType(Integer))
|
||||
DtInvOCDiferencias.Columns.Add("PS", GetType(String))
|
||||
@@ -18614,6 +18617,7 @@ Partial Class Compras_Compras
|
||||
DrInvOCDiferencias("FolioOC") = dr2("FolioOC").ToString
|
||||
DrInvOCDiferencias("CveProveedor") = dr2("CveProveedorOC").ToString.ToEntero
|
||||
DrInvOCDiferencias("PS") = dr2("PS").ToString
|
||||
DrInvOCDiferencias("FolioAlmacen") = dr2("FolioAlmacen").ToString
|
||||
|
||||
If DdlOCVinculaInv.SelectedValue.ToEntero.Contiene(205) Then
|
||||
DrInvOCDiferencias("TipoCambioAjuste") = 0
|
||||
@@ -18724,7 +18728,7 @@ Partial Class Compras_Compras
|
||||
SerieFolio = $"OC: {DrDiferencias("FolioOC").ToString}"
|
||||
CveProveedor = DrDiferencias("CveProveedor").ToString.ToEntero
|
||||
ProveedorNombre = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", $"CveProveedor = {CveProveedor}").ToString
|
||||
Dim ConceptoPartida As String = String.Format("{0} OC# {1}", ProveedorNombre, DrDiferencias("FolioOC"))
|
||||
Dim ConceptoPartida As String = String.Format("{0} OC: {1} Inv: {2}", ProveedorNombre, DrDiferencias("FolioOC"), DrDiferencias("FolioAlmacen"))
|
||||
|
||||
ConceptoSalida = DrDiferencias("ConceptoSalida").ToString.ToEntero
|
||||
CveAlmacen = DrDiferencias("CveAlmacen").ToString.ToEntero
|
||||
|
||||
@@ -85,8 +85,10 @@ Partial Class Contabilidad_OCDetalleAlmacen
|
||||
Dim Folio As String = GvDrow.DataKey("Folio").ToString
|
||||
|
||||
|
||||
Dim CveCuenta176 As Integer = 55169
|
||||
Dim CveCuenta176 As Integer = 0
|
||||
Dim IdCtaCuenta176 As Integer = 1245
|
||||
Dim IdCtaCuenta228 As Integer = 1247
|
||||
Dim IdCtaCuenta229 As Integer = 1249
|
||||
|
||||
Dim CveCuenta177 As Integer = 55294
|
||||
Dim IdCtaCuenta177 As Integer = 1148
|
||||
@@ -95,7 +97,7 @@ Partial Class Contabilidad_OCDetalleAlmacen
|
||||
|
||||
|
||||
If Chk IsNot Nothing AndAlso Chk.Checked Then
|
||||
CvePrePoliza = ObjConta.AddPrePolizas(modulo, 3, Diferencia, Diferencia, CveMoneda, Fecha, Referencia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||
CvePrePoliza = ObjConta.AddPrePolizas(modulo, 74, Diferencia, Diferencia, CveMoneda, Fecha, Referencia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||
|
||||
GvDrow.Cells(1).Text = CvePrePoliza.ToString
|
||||
mensaje = mensaje & $"CvePrePoliza {CvePrePoliza } OC: {Folio} Importe :{Diferencia} <br>"
|
||||
@@ -104,7 +106,7 @@ Partial Class Contabilidad_OCDetalleAlmacen
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
If Cargo > Abono Then
|
||||
If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Diferencia, Referencia, 176, Referencia, Fecha, IdCtaCuenta176, -1, ImporteME:=0, ImporteMX:=Diferencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then
|
||||
If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Diferencia, Referencia, 228, Referencia, Fecha, IdCtaCuenta228, -1, ImporteME:=Diferencia, ImporteMX:=Diferencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then
|
||||
|
||||
If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Diferencia, Referencia, 177, Referencia, Fecha, IdCtaCuenta177, -1, ImporteME:=-0, ImporteMX:=-Diferencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then
|
||||
ContadorProcesados = ContadorProcesados + 1
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row" style="padding-top: 10px; position: relative;">
|
||||
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;">Producto:</label>
|
||||
<asp:Label runat="server" ID="LblPS" CssClass="col-md-1 truncate" style="max-width: 80px;">Producto:</asp:Label>
|
||||
<div class="col-md-2 " style="min-width: 250px; max-width: 300px;">
|
||||
<ADS:Dropdownlost ID="ddlProducto2" runat="server" AutoPostBack="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
@@ -56,6 +56,10 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
CargaPermisos()
|
||||
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
LblPS.ToolTip = ddlProducto2.SelectedValue
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -160,7 +164,12 @@ Partial Class Inventarios_Kardex
|
||||
DdlUnidadMedida.Items.Clear()
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidadMedida.DataBind()
|
||||
DdlUnidadMedida.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlUnidadMedida.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
LblPS.ToolTip = ddlProducto2.SelectedValue
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80
|
||||
|
||||
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1
|
||||
|
||||
|
||||
@@ -114,12 +114,12 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel runat="server" ID="TabConfiguracion" HeaderText="Configuracion">
|
||||
<ajax:TabPanel runat="server" ID="TabPanel3" HeaderText="Configuración">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UPPEmp" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UpPrueba" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvEstatusUsuarios" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%" runat="server" AutoGenerateColumns="False" DataKeyNames="CveUsuario" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
|
||||
<asp:GridView ID="Prueba" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%" runat="server" AutoGenerateColumns="false" DataKeyNames="CveUsuario" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios" style="text-align:center">
|
||||
<HeaderStyle VerticalAlign="Middle" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -129,177 +129,10 @@
|
||||
<asp:Label Font-Bold="true" Width="250px" ID="LblUsuario" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus1" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios1" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior1" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites1" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus2" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios2" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior2" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites2" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus3" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios3" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior3" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites3" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus4" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios4" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior4" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites4" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus5" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios5" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior5" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites5" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus6" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios6" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior6" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites6" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus7" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios7" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior7" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites7" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus8" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios8" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior8" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites8" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus9" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios9" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior9" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites9" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<table style="text-align: center; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<asp:CheckBox ID="chkEstatus10" runat="server" /><asp:HiddenField runat="server" ID="hdnCveEstatusUsuarios10" />
|
||||
</td>
|
||||
<td style="width: 50%; text-align: left">
|
||||
<asp:Label ID="lblSuperior10" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
<asp:Label ID="lblLimites10" Font-Size="7" Font-Italic="true" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div style="width:100%;text-align:center">
|
||||
<asp:Button ID="btnGuardarEstatusUsuariosREQ" Text="Guardar" runat="server" Visible="true" CssClass="btn btn-primary" />
|
||||
<div style="width: 100%; text-align: center">
|
||||
<asp:Button ID="BtnGuardarPruebas" Text="Guardar" runat="server" Visible="true" CssClass="btn btn-primary" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -42,18 +42,34 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
ViewState("DTEstatusUsuarios") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTUsuarios As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTUsuarios"), DataTable)
|
||||
End Get
|
||||
Set(value As Data.DataTable)
|
||||
ViewState("DTUsuarios") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtEstatusUsuariosAsociados As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtEstatusUsuariosAsociados"), DataTable)
|
||||
End Get
|
||||
Set(value As Data.DataTable)
|
||||
ViewState("DtEstatusUsuariosAsociados") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
DTUsuarios = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
CargaDatos()
|
||||
CreaGrid("Req")
|
||||
CargaGridEstatusUsuarios()
|
||||
ViewState("Orden") = ""
|
||||
|
||||
'CreaGrid()
|
||||
'CargaGridEstatusUsuarios()
|
||||
AsociarEstatusUsuarios()
|
||||
CargarUsuarioConEstatus()
|
||||
CveEstatuOS = -1
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -171,79 +187,65 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
#End Region
|
||||
|
||||
#Region "Configuracion"
|
||||
Private Sub CreaGrid(Tipo As String)
|
||||
Dim i As Integer = 1
|
||||
|
||||
For Each Row As DataRow In GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).Rows
|
||||
|
||||
GvEstatusUsuarios.Columns(i).HeaderText = Row("EstatusOrdenServicio").ToString.ToUpper
|
||||
GvEstatusUsuarios.Columns(i).FooterText = Row("CveEstatusOrdenServicio").ToString
|
||||
|
||||
i += 1
|
||||
Private Sub AsociarEstatusUsuarios()
|
||||
Dim tableResultado As DataTable = DTUsuarios
|
||||
For Each Estatus As DataRow In DtEstatusOS.Rows
|
||||
Dim CveColumnaEstatus As String = Estatus.Item("CveEstatusOrdenServicio").ToString
|
||||
tableResultado.Columns.Add(CveColumnaEstatus, Type.GetType("System.Boolean"))
|
||||
For Each Usuario As DataRow In tableResultado.Rows
|
||||
Usuario.Item(CveColumnaEstatus) = Not IsNothing(DTEstatusUsuarios.FiltroPrimero(String.Format("CveUsuario = {0} and CveEstatusOrdenServicio = {1}", Usuario.Item("CveUsuario"), CveColumnaEstatus)))
|
||||
Next
|
||||
Next
|
||||
|
||||
While i <= 10
|
||||
GvEstatusUsuarios.Columns(i).Visible = False
|
||||
i += 1
|
||||
End While
|
||||
DtEstatusUsuariosAsociados = tableResultado
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaGridEstatusUsuarios()
|
||||
GvEstatusUsuarios.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
GvEstatusUsuarios.DataBind()
|
||||
'UPPEmp.Update()
|
||||
Private Sub CargarUsuarioConEstatus()
|
||||
For Each Estatus As DataRow In DtEstatusOS.Rows
|
||||
Dim test As New CheckBoxField
|
||||
test.HeaderText = Estatus.Item("EstatusOrdenServicio").ToString
|
||||
test.DataField = Estatus.Item("CveEstatusOrdenServicio").ToString
|
||||
Prueba.Columns.Add(test)
|
||||
Next
|
||||
Prueba.DataSource = DtEstatusUsuariosAsociados
|
||||
Prueba.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub btnGuardarEstatusUsuariosREQ_Click(sender As Object, e As EventArgs) Handles btnGuardarEstatusUsuariosREQ.Click
|
||||
Private Sub Prueba_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Prueba.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios.FiltraParametros(String.Format("CveUsuario = {0}", e.Row.DBCampo("CveUsuario").ToString))
|
||||
For i As Integer = 1 To e.Row.Cells.Count - 1
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim checkBox As CheckBox = TryCast(e.Row.Cells(i).Controls(0), CheckBox)
|
||||
checkBox.Enabled = True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GuardarDatosPrueba(sender As Object, e As EventArgs) Handles BtnGuardarPruebas.Click
|
||||
Dim objEstatusOC As New ClsOS
|
||||
objEstatusOC.IniciaTransacSQL()
|
||||
Dim HuboErrores As Boolean = False
|
||||
Dim CveSubProyecto = 59
|
||||
|
||||
For Each Row As GridViewRow In GvEstatusUsuarios.Rows
|
||||
Dim r As Integer = 1
|
||||
For i = 0 To Row.Cells.Count - 1
|
||||
|
||||
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuarios.Columns(i).FooterText), GvEstatusUsuarios.Columns(i).FooterText.ToEntero, 0)
|
||||
|
||||
If CveEstatus > 0 Then
|
||||
|
||||
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False Then
|
||||
'Eliminar el registro existente
|
||||
If Not objEstatusOC.RemoveEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
ElseIf Row.FCCheckBox("chkEstatus" + r.ToString).Checked = True Then
|
||||
'Guardado masivo cuando sea SubProyecto "Todos"
|
||||
If CveSubProyecto = -2 Then
|
||||
For Each dr As DataRow In GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).Rows
|
||||
If Not objEstatusOC.AddEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero, CveSubProyecto) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If HuboErrores Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'Insertar el nuevo registro
|
||||
Else
|
||||
If Not objEstatusOC.AddEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero, CveSubProyecto) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
For Each Row As GridViewRow In Prueba.Rows
|
||||
Dim controles As Integer = Row.Controls.Count
|
||||
For i = 1 To Row.Cells.Count - 1
|
||||
Dim chk As CheckBox = CType(Row.Cells(i).Controls(0), CheckBox)
|
||||
Dim CveEstatus As Integer = DtEstatusOS.FiltroPrimeroValor("CveEstatusOrdenServicio", String.Format("EstatusOrdenServicio = '{0}'", Prueba.Columns(i).HeaderText)).ToEntero
|
||||
If Not chk.Checked Then
|
||||
If Not objEstatusOC.RemoveEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
ElseIf chk.Checked Then
|
||||
'Guardado masivo cuando sea SubProyecto "Todos"
|
||||
If Not objEstatusOC.AddEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero, CveSubProyecto) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
r += 1
|
||||
End If
|
||||
Next
|
||||
|
||||
'Si tubo algun error terminamos el proceso (FOR)
|
||||
If HuboErrores Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not HuboErrores Then
|
||||
@@ -253,27 +255,7 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
objEstatusOC.RollBack()
|
||||
Alert("Ocurrió un error al guardar los cambios. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
objEstatusOC.Dispose()
|
||||
CargaDatos()
|
||||
CargaGridEstatusUsuarios()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvEstatusUsuarios_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuarios.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios.FiltraParametros(String.Format("CveUsuario = {0}", e.Row.DBCampo("CveUsuario").ToString))
|
||||
Dim CveUsuario As String = e.Row.DBCampo("CveUsuario").ToString
|
||||
For i As Integer = 1 To 10
|
||||
Dim CveEstatus As Integer = GvEstatusUsuarios.Columns(i).FooterText.ToEntero
|
||||
If CveEstatus > 0 Then
|
||||
Dim auxiliarBandera As DataRow = PermisosDeUsuario.FiltroPrimero(String.Format("CveEstatusOrdenServicio = {0}", CveEstatus.ToString))
|
||||
If auxiliarBandera IsNot Nothing Then
|
||||
Dim chkEstatus As CheckBox = e.Row.FCCheckBox(String.Format("chkEstatus{0}", i))
|
||||
chkEstatus.Checked = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
@@ -14845,8 +14845,9 @@ Partial Class Ventas
|
||||
If (CveAlmacenEntrada > 0 AndAlso CveTipoAlmacen <> 1) Or RemisionesLista.Count = 0 Then 'Con remisiones parciales ignoramos las surtidas ya realizadas
|
||||
|
||||
Dim MovDetalle As New DataTable
|
||||
|
||||
Dim AplicaMovimientoDetalleEntrada As Boolean = False
|
||||
If RemisionesLista.Count > 0 Then
|
||||
AplicaMovimientoDetalleEntrada = True
|
||||
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND TieneSalidaxFactura IS NULL"))
|
||||
Else
|
||||
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
|
||||
@@ -14855,8 +14856,9 @@ Partial Class Ventas
|
||||
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
|
||||
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
||||
|
||||
|
||||
'Le damos salida de apartado por traspaso
|
||||
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision)
|
||||
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada)
|
||||
|
||||
If Not CveMovimientoSalidaPorTraspaso > 0 Then
|
||||
OcurrioError = True
|
||||
@@ -14993,7 +14995,7 @@ Partial Class Ventas
|
||||
|
||||
Return Not OcurrioError
|
||||
End Function
|
||||
Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1) As Integer
|
||||
Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False) As Integer
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ContadorMovtosDetalles = 0
|
||||
|
||||
@@ -15037,7 +15039,13 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle) Then
|
||||
'CUANDO SEA REMISION FACTURADA DEBE RELACIONAR LOS NUEVOS MOVIMIENTOS POR EL DETALLE
|
||||
Dim CveMovimientoDetalleEntrada As Integer = -1
|
||||
If AplicaMovimientoDetalleEntrada Then
|
||||
CveMovimientoDetalleEntrada = MovDet("CveMovimientoDetalle").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
|
||||
ContadorMovtosDetalles += 1
|
||||
Else
|
||||
OcurrioError = True
|
||||
@@ -17563,40 +17571,42 @@ Partial Class Ventas
|
||||
|
||||
Private Sub LbCancelarDocumento_Click(sender As Object, e As EventArgs) Handles LbCancelarDocumento.Click
|
||||
|
||||
If VentaSaldoAlmacen <> 0 Then
|
||||
Alert("El pedido no se puede cancelar ya que tiene movimientos de almacén.<br/>Nota: Primero hay que hacer la devolución al almacén", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
||||
Dim sb As New StringBuilder()
|
||||
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
||||
'If VentaSaldoAlmacen <> 0 Then
|
||||
' Alert("El pedido no se puede cancelar ya que tiene movimientos de almacén.<br/>Nota: Primero hay que hacer la devolución al almacén", TipoMensaje.MsgAdvertencia)
|
||||
'Else
|
||||
|
||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||
If Vigencia IsNot Nothing Then
|
||||
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||
Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
Else
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
End If
|
||||
'End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
||||
Dim sb As New StringBuilder()
|
||||
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
||||
|
||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||
If Vigencia IsNot Nothing Then
|
||||
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||
Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
Else
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
End If
|
||||
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
|
||||
LblCancelarDocumento.Text = sb.ToString()
|
||||
|
||||
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
||||
UpCancelarDocumento.Update()
|
||||
'Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnCancelarDocumentoConfirmar()", TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||
Else
|
||||
CancelarDocumento()
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
End If
|
||||
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
|
||||
LblCancelarDocumento.Text = sb.ToString()
|
||||
|
||||
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
||||
UpCancelarDocumento.Update()
|
||||
|
||||
Else
|
||||
CancelarDocumento()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user