Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -7,7 +7,7 @@ Public Class BundleConfig
|
||||
bundles.Add(New ScriptBundle("~/bundles/jquery").Include(
|
||||
"~/Metronic/assets/global/plugins/jquery.min.js"
|
||||
))
|
||||
ScriptManager.ScriptResourceMapping.AddDefinition("jquery", Nothing, New ScriptResourceDefinition with {.Path = "~/bundles/jquery"})
|
||||
ScriptManager.ScriptResourceMapping.AddDefinition("jquery", Nothing, New ScriptResourceDefinition With {.Path = "~/bundles/jquery"})
|
||||
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ Public Class BundleConfig
|
||||
"~/Scripts/WebForms/TreeView.js",
|
||||
"~/Scripts/WebForms/WebParts.js"))
|
||||
|
||||
ScriptManager.ScriptResourceMapping.AddDefinition("WebFormsBundle", new ScriptResourceDefinition With {.Path = "~/bundles/WebFormsJs"})
|
||||
ScriptManager.ScriptResourceMapping.AddDefinition("WebFormsBundle", New ScriptResourceDefinition With {.Path = "~/bundles/WebFormsJs"})
|
||||
|
||||
' Order is very important for these files to work, they have explicit dependencies
|
||||
bundles.Add(New ScriptBundle("~/bundles/MsAjaxJs").Include(
|
||||
|
||||
@@ -1509,7 +1509,7 @@ Public Class ClsNominas
|
||||
EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
|
||||
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer,
|
||||
ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer,
|
||||
CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0, Optional EsFormula As Integer = -1) As Integer
|
||||
CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0, Optional EsFormula As Integer = -1, Optional AplicaArt174 As Integer = 0) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Nom_ConceptosAdd")
|
||||
@@ -1544,6 +1544,7 @@ Public Class ClsNominas
|
||||
.Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB
|
||||
.Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo
|
||||
.Add("AplicaEfectivale", SqlDbType.Int).Value = AplicaEfectivale
|
||||
.Add("AplicaArt174", SqlDbType.Int).Value = AplicaArt174
|
||||
|
||||
End With
|
||||
|
||||
@@ -1571,7 +1572,7 @@ Public Class ClsNominas
|
||||
EsRetencion As Boolean, CveClasificacion As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, CveCuenta As Integer, AplicaFiniquito As Integer,
|
||||
AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, CveEmpresa As Integer, CveUsuario As Integer,
|
||||
ctaImporteNegativoProv As Integer, contabiliza As Integer, CargoOAbono As Integer, cveConceptoContableB As Integer, CveCuentaB As Integer,
|
||||
CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0, Optional EsFormula As Integer = -1) As Boolean
|
||||
CveConceptoContablePasivo As Integer, Optional AplicaEfectivale As Integer = 0, Optional EsFormula As Integer = -1, Optional AplicaArt174 As Integer = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Nom_ConceptosUpdate")
|
||||
@@ -1606,6 +1607,7 @@ Public Class ClsNominas
|
||||
.Add("CveCuentaB", SqlDbType.Int).Value = CveCuentaB
|
||||
.Add("CveConceptoContablePasivo", SqlDbType.Int).Value = CveConceptoContablePasivo
|
||||
.Add("AplicaEfectivale", SqlDbType.Int).Value = AplicaEfectivale
|
||||
.Add("AplicaArt174", SqlDbType.Int).Value = AplicaArt174
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1726,6 +1726,57 @@ Public Class ClsOC
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetOrdenesCompraCompradosRecibidosRep(Tipo As String, CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveEstatus As Integer, FechaInicio As Date,
|
||||
FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuarioRegistro As Integer, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1",
|
||||
Optional CveActivoFijo As Integer = -1, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1,
|
||||
Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveMoneda As Integer = -1,
|
||||
Optional MetodoPago As Integer = -1, Optional Serie As String = "-1", Optional TieneAnticipo As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraCompradosRecibidosRep")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveOrdenCompra", SqlDbType.Int).Value = CveOrdenCompra
|
||||
.Add("@CveUsuarioRegistro", SqlDbType.Int).Value = CveUsuarioRegistro
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@PendientePorSurtir", SqlDbType.Bit).Value = PendientePorSurtir
|
||||
.Add("@Guia", SqlDbType.VarChar).Value = Guia
|
||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||
.Add("@SoloSubProyectosConPermiso", SqlDbType.Bit).Value = SoloSubProyectosConPermiso
|
||||
.Add("@CveUsuarioAutorizo", SqlDbType.Int).Value = CveUsuarioAutorizo
|
||||
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
|
||||
.Add("@EntregaDirecta", SqlDbType.Int).Value = EntregaDirecta
|
||||
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@TieneAnticipo", SqlDbType.Int).Value = TieneAnticipo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener Ordenes de Compras Comprados Recividos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetOrdenesCompraRepReqXOC(Folio As Integer, FechaInicio As String, FechaFin As String, CveProveedor As Integer, CveVendedor As Integer, CveCliente As Integer, CveEmpresa As Integer, Grupo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -308,10 +308,12 @@
|
||||
<xs:element name="Acred16" msprop:Generator_ColumnPropNameInTable="Acred16Column" msprop:Generator_ColumnPropNameInRow="Acred16" msprop:Generator_UserColumnName="Acred16" msprop:Generator_ColumnVarNameInTable="columnAcred16" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="AcredFN" msprop:Generator_ColumnPropNameInTable="AcredFNColumn" msprop:Generator_ColumnPropNameInRow="AcredFN" msprop:Generator_UserColumnName="AcredFN" msprop:Generator_ColumnVarNameInTable="columnAcredFN" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="AcredImp16" msprop:Generator_ColumnPropNameInTable="AcredImp16Column" msprop:Generator_ColumnPropNameInRow="AcredImp16" msprop:Generator_UserColumnName="AcredImp16" msprop:Generator_ColumnVarNameInTable="columnAcredImp16" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="ActosImp16" msprop:Generator_UserColumnName="ActosImp16" msprop:Generator_ColumnPropNameInTable="ActosImp16Column" msprop:Generator_ColumnPropNameInRow="ActosImp16" msprop:Generator_ColumnVarNameInTable="columnActosImp16" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="Actos16" msprop:Generator_UserColumnName="Actos16" msprop:Generator_ColumnPropNameInTable="Actos16Column" msprop:Generator_ColumnPropNameInRow="Actos16" msprop:Generator_ColumnVarNameInTable="columnActos16" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="ActosNoDeducibles16" msprop:Generator_ColumnPropNameInRow="ActosNoDeducibles16" msprop:Generator_ColumnPropNameInTable="ActosNoDeducibles16Column" msprop:Generator_ColumnVarNameInTable="columnActosNoDeducibles16" msprop:Generator_UserColumnName="ActosNoDeducibles16" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="ActosNoDeduciblesFN" msprop:Generator_ColumnPropNameInRow="ActosNoDeduciblesFN" msprop:Generator_ColumnPropNameInTable="ActosNoDeduciblesFNColumn" msprop:Generator_ColumnVarNameInTable="columnActosNoDeduciblesFN" msprop:Generator_UserColumnName="ActosNoDeduciblesFN" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="ActosImp16" msprop:Generator_ColumnPropNameInTable="ActosImp16Column" msprop:Generator_ColumnPropNameInRow="ActosImp16" msprop:Generator_UserColumnName="ActosImp16" msprop:Generator_ColumnVarNameInTable="columnActosImp16" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="Actos16" msprop:Generator_ColumnPropNameInTable="Actos16Column" msprop:Generator_ColumnPropNameInRow="Actos16" msprop:Generator_UserColumnName="Actos16" msprop:Generator_ColumnVarNameInTable="columnActos16" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="ActosNoDeducibles16" msprop:Generator_UserColumnName="ActosNoDeducibles16" msprop:Generator_ColumnPropNameInTable="ActosNoDeducibles16Column" msprop:Generator_ColumnPropNameInRow="ActosNoDeducibles16" msprop:Generator_ColumnVarNameInTable="columnActosNoDeducibles16" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="ActosNoDeduciblesFN" msprop:Generator_UserColumnName="ActosNoDeduciblesFN" msprop:Generator_ColumnPropNameInTable="ActosNoDeduciblesFNColumn" msprop:Generator_ColumnPropNameInRow="ActosNoDeduciblesFN" msprop:Generator_ColumnVarNameInTable="columnActosNoDeduciblesFN" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="ActosFN" msprop:Generator_ColumnPropNameInRow="ActosFN" msprop:Generator_ColumnPropNameInTable="ActosFNColumn" msprop:Generator_ColumnVarNameInTable="columnActosFN" msprop:Generator_UserColumnName="ActosFN" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="ActosImpNotan16" msprop:Generator_ColumnPropNameInRow="ActosImpNotan16" msprop:Generator_ColumnPropNameInTable="ActosImpNotan16Column" msprop:Generator_ColumnVarNameInTable="columnActosImpNotan16" msprop:Generator_UserColumnName="ActosImpNotan16" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="7" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="120" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:DataTable1" ZOrder="15" X="682" Y="54" Height="143" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="139" />
|
||||
<Shape ID="DesignTable:VentaUtilidadDetalle" ZOrder="14" X="679" Y="199" Height="257" Width="187" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="253" />
|
||||
|
||||
@@ -271,6 +271,11 @@ Partial Class Bancos_DepositosCaja
|
||||
TotalImporte = TotalImporte - TxtComisionIntermediario.Text.ToDecimal - IVA
|
||||
End If
|
||||
|
||||
'SI NO SE ESPECIFICO POR FACTURA PROBAR POR LOS OTROS MEDIOS
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TotalImportePrePoliza = 0 Then
|
||||
TotalImportePrePoliza = TotalImporte
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TotalImportePrePoliza = 0 Then
|
||||
Alert("No se ha especificado un importe a depositar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
@@ -554,6 +554,7 @@ Partial Class Contabilidad_RepBalanceGeneral
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
@@ -585,6 +586,7 @@ Partial Class Contabilidad_RepBalanceGeneral
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -165,8 +165,8 @@ Partial Class AC_RepEstadoActividades
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
DtIngresos = DtDatos.FiltraParametros("Tipo ='H' ")
|
||||
DtGastos = DtDatos.FiltraParametros("Tipo ='G' ")
|
||||
DtIngresos = DtDatos.FiltraParametros("(Tipo ='H' OR Codigo like '4020%') AND NOT(Codigo like '5030%' OR Codigo like '7020%') ")
|
||||
DtGastos = DtDatos.FiltraParametros("(Tipo ='G' AND Codigo NOT like '4020%') OR (Codigo like '5030%' OR Codigo like '7020%') ")
|
||||
Dim Row As DataRow = DtIngresos.NewRow
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad2_RepEstadoResultados
|
||||
Inherits ClsPaginas
|
||||
@@ -192,8 +191,8 @@ Partial Class Contabilidad2_RepEstadoResultados
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H'")
|
||||
DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G'")
|
||||
DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H' OR Codigo like '4020%' ")
|
||||
DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G' OR (Codigo like '5030%' OR Codigo like '7020%') ")
|
||||
Dim Row As DataRow = DtIngresos.NewRow
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -813,6 +813,16 @@
|
||||
/*----------------------------------------
|
||||
ANCHO DE COLUMNAS DE IMPORTES (AÑO, MES, ETC)
|
||||
-----------------------------------------*/
|
||||
|
||||
/* Ancho libre para primeras columnas (Sucursal, Vendedor, etc.) */
|
||||
.custom-grid td:first-child,
|
||||
.custom-grid th:first-child {
|
||||
width: auto !important;
|
||||
min-width: auto !important;
|
||||
max-width: none !important;
|
||||
|
||||
}
|
||||
|
||||
.custom-grid td:nth-child(2),
|
||||
.custom-grid td:nth-child(3),
|
||||
.custom-grid td:nth-child(4),
|
||||
@@ -830,7 +840,6 @@
|
||||
.custom-grid th:nth-child(4),
|
||||
.custom-grid th:nth-child(5) {
|
||||
text-align: center !important;
|
||||
|
||||
}
|
||||
|
||||
/* Asegurar ancho libre para primera columna */
|
||||
|
||||
@@ -441,6 +441,10 @@
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkEsFormula" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
<label class="col-md-3 truncate ">Aplica Art. 174:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="chkAplicaArt174" AutoPostBack="true" OnCheckedChanged="chkAplicaArt174_CheckedChanged" CssClass="chksino" Text=" " runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -370,6 +370,8 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
int IdCtaContableB = (DdlCtaContableB.DataValueField == "Id" ? DdlCtaContableB.SelectedValue.ToEntero() : 0);
|
||||
int CveCuentaB = (DdlCtaContableB.DataValueField == "Id" ? 0 : DdlCtaContableB.SelectedValue.ToEntero());
|
||||
int AplicaEfectivale = chkAplicaEfectivale.Checked ? 1 : 0;
|
||||
int AplicaArt174 = chkAplicaArt174.Checked ? 1 : 0;
|
||||
|
||||
int EsFormula = ChkEsFormula.Checked ? 1 : 0;
|
||||
ClsNominas ObjNomina = new ClsNominas();
|
||||
ObjNomina.IniciaTransacSQL();
|
||||
@@ -380,7 +382,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, CveTipoGasto,
|
||||
tipoCalculo, CveConceptoContable, CveCuenta, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario,
|
||||
ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, CveCuentaB, CveConceptoContablePasivo, AplicaEfectivale, EsFormula);
|
||||
ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, CveCuentaB, CveConceptoContablePasivo, AplicaEfectivale, EsFormula, AplicaArt174);
|
||||
|
||||
if (!TieneError)
|
||||
{
|
||||
@@ -412,7 +414,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
retencion, CveClasificacion, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto,
|
||||
ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, CveCuentaB, CveConceptoContablePasivo, AplicaEfectivale, EsFormula);
|
||||
ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, CveCuentaB, CveConceptoContablePasivo, AplicaEfectivale, EsFormula, AplicaArt174);
|
||||
|
||||
|
||||
|
||||
@@ -513,6 +515,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
ChkSistema.Checked = drow["Sistema"].Equals("Sí");
|
||||
ChkAutomaticoLiquidacion.Checked = drow["AplicaFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
chkAplicaEfectivale.Checked = drow["AplicaEfectivale"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
chkAplicaArt174.Checked = drow["AplicaArt174"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
ChkContabiliza.Checked = drow["Contabiliza"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
chkCtaImporteNegativoProv.Checked = drow["CtaImporteNegativoProv"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
ChkAutomaticoGlobal.Checked = drow["AutomaticoGlobal"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
@@ -686,5 +689,9 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
protected void chkAplicaEfectivale_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
protected void chkAplicaArt174_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -588,7 +588,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DdlTipoPeriodo.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
private void cargaPeriodos(int tipo =0)
|
||||
private void cargaPeriodos(int tipo = 0)
|
||||
{
|
||||
int tipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero();
|
||||
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
|
||||
@@ -611,7 +611,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DdlPeriodo.DataSource = dtPeriodos;
|
||||
DdlPeriodo.DataBind();
|
||||
DdlPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
if(tipo==1 && dtPeriodos.Rows.Count > 0)
|
||||
if (tipo == 1 && dtPeriodos.Rows.Count > 0)
|
||||
{
|
||||
DdlPeriodo.SelectedValue = dtPeriodos.Rows[0]["CvePeriodo"].ToString();
|
||||
}
|
||||
@@ -4947,6 +4947,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
#endregion
|
||||
|
||||
const string COL_SUELDO_MENSUAL = "Sueldo Mensual";
|
||||
const string COL_SUELDO_DIARIO = "Sueldo diario";
|
||||
const string COL_DIAS_PEN_PAGO = "Dias Pen Pago";
|
||||
const string INCAPACIDAD_PERM_FALTAS = "Incapacidad Permisos Faltas";
|
||||
|
||||
protected void LnkPersonalizarNomina_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -4960,9 +4964,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
addcoltopersonalizar("Codigo", "0", "Codigo", "");
|
||||
addcoltopersonalizar("Nombre", "0", "Empleado", "");
|
||||
addcoltopersonalizar("Sueldo Mensual", "0", "", "");
|
||||
addcoltopersonalizar("Sueldo diario", "0", "", "");
|
||||
addcoltopersonalizar("Dias Pen Pago", "0", "", "");
|
||||
addcoltopersonalizar(COL_SUELDO_MENSUAL, "0", "0", "");
|
||||
addcoltopersonalizar(COL_SUELDO_DIARIO, "0", "0", "");
|
||||
//addcoltopersonalizar(COL_DIAS_PEN_PAGO, "0", "0", "");
|
||||
|
||||
int pos = 4;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P' ").Rows)
|
||||
@@ -4975,7 +4979,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
}
|
||||
//addcoltopersonalizar("Percepciones", "1", "Percepciones", "");
|
||||
addcoltopersonalizar("Incapacidad Permisos Faltas", "0", "", "");
|
||||
addcoltopersonalizar(INCAPACIDAD_PERM_FALTAS, "0", "0", "");
|
||||
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' AND EsPadre = 1 AND EsFormula =0").Rows)//
|
||||
@@ -5127,11 +5131,20 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
ClosedXML.Excel.XLColor colororange = ClosedXML.Excel.XLColor.FromArgb(247, 150, 70);
|
||||
ClosedXML.Excel.XLColor colororangeblue = ClosedXML.Excel.XLColor.FromArgb(79, 129, 189);
|
||||
ClosedXML.Excel.IXLCell celda;
|
||||
DataRow dtzrow = this.dtConceptos.FiltroPrimero("Codigo='D200'");
|
||||
string conceptoincpermfaltas = "";
|
||||
if (dtzrow != null)
|
||||
{
|
||||
conceptoincpermfaltas = string.Format("V_{0}", dtzrow["CveConcepto"]);
|
||||
|
||||
|
||||
}
|
||||
DataTable dtConceptos = this.dtConceptos.FiltraParametros("");
|
||||
DataTable dtFiltrado = dtConceptos.Clone(); // Clonar la estructura del DataTable
|
||||
bool colSueldoMensual = false;
|
||||
bool colSueldoDiario = false;
|
||||
bool coDiasPenPagol = false;
|
||||
bool coIncPermFaltas = false;
|
||||
|
||||
foreach (GridViewRow row in GvPersonalizarExcel.Rows)
|
||||
{
|
||||
@@ -5139,9 +5152,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string columnaDB = row.DataKey("ColumnaDB").Replace("[", "").Replace("]", ""); // Suponiendo que la columna "ColumnaDB" está en la segunda celda (index 1)
|
||||
if (columnaDB == "0")
|
||||
{
|
||||
if (columna == "Sueldo Mensual") { colSueldoMensual = true; }
|
||||
if (columna == "Sueldo diario") { colSueldoDiario = true; }
|
||||
if (columna == "Dias Pen Pago") { coDiasPenPagol = true; }
|
||||
if (columna == COL_SUELDO_MENSUAL) { colSueldoMensual = true; }
|
||||
if (columna == COL_SUELDO_DIARIO) { colSueldoDiario = true; }
|
||||
if (columna == COL_DIAS_PEN_PAGO) { coDiasPenPagol = true; }
|
||||
if (columna == INCAPACIDAD_PERM_FALTAS) { coIncPermFaltas = true; }
|
||||
|
||||
}
|
||||
|
||||
string tipoDB = row.DataKey("TipoDB"); // Suponiendo que la columna "TipoDB" está en la cuarta celda (index 3)
|
||||
@@ -5194,7 +5209,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
}
|
||||
if (colSueldoDiario)
|
||||
if (coDiasPenPagol)
|
||||
{
|
||||
column++;
|
||||
Titlecell(libro, "dias Pen", filainicio + 2, column, true, false, PercborderColor);
|
||||
@@ -5237,10 +5252,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
iniciotipe = column;
|
||||
|
||||
int finPercepciones = iniciotipe;
|
||||
if (coIncPermFaltas)
|
||||
{
|
||||
|
||||
column++;
|
||||
TitleRange(libro, "Incapacidad", filainicio + 2, column, filainicio + 2, column, false, false, PercborderColor);
|
||||
TitleRange(libro, "Perm. Faltas", filainicio + 3, column, filainicio + 3, column, false, false, PercborderColor);
|
||||
column++;
|
||||
TitleRange(libro, "Incapacidad", filainicio + 2, column, filainicio + 2, column, false, false, PercborderColor);
|
||||
TitleRange(libro, "Perm. Faltas", filainicio + 3, column, filainicio + 3, column, false, false, PercborderColor);
|
||||
}
|
||||
//column++;
|
||||
//TitleRange(libro, "Permisos", filainicio + 3, column, filainicio + 3, column, false, false, colororangeblue);
|
||||
|
||||
@@ -5392,31 +5410,31 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
oldsubproyecto = subproyecto;
|
||||
libro.Cell(Fila, column).Value = erow["Nombre"];
|
||||
|
||||
if (colSueldoMensual)
|
||||
{
|
||||
column++;
|
||||
libro.Cell(Fila, column).Value = "";
|
||||
try
|
||||
{
|
||||
libro.Cell(Fila, column).Value = erow[string.Format("V_{0}", 6817)];
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
if (colSueldoDiario)
|
||||
{
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila, column).Value = erow["SalarioDiario"];
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
if (colSueldoMensual)
|
||||
{
|
||||
column++;
|
||||
libro.Cell(Fila, column).Value = "";
|
||||
try
|
||||
{
|
||||
libro.Cell(Fila, column).Value = erow[string.Format("V_{0}", 6817)];
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
if (colSueldoDiario)
|
||||
{
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila, column).Value = erow["SalarioDiario"];
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
}
|
||||
if (coDiasPenPagol)
|
||||
{
|
||||
column++;
|
||||
libro.Cell(Fila, column).Value = "";
|
||||
}
|
||||
if (dtConceptos.FiltraParametros("Tipo ='P'").Rows.Count > 0)
|
||||
libro.Cell(Fila, column).Value = "";
|
||||
}
|
||||
if (dtConceptos.FiltraParametros("Tipo ='P'").Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' ").Rows)
|
||||
{
|
||||
@@ -5453,10 +5471,28 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
|
||||
//column++;
|
||||
//Titlecell(libro, erow["DiasIncapacidad"], Fila, column, false, false, dedcborderColor);
|
||||
column++;
|
||||
Titlecell(libro, "", Fila, column, false, false, PercborderColor);
|
||||
if (coIncPermFaltas)
|
||||
{
|
||||
|
||||
column++;
|
||||
string valuex = "";
|
||||
if (conceptoincpermfaltas.Length > 0)
|
||||
{
|
||||
valuex = erow[conceptoincpermfaltas].ToString();
|
||||
if (newsubproyecto)
|
||||
{
|
||||
string valuez = dtempleados.SUM(conceptoincpermfaltas, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)).ToString();
|
||||
libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colorperp);
|
||||
Titlecell(libro, "", Fila - 2, column, false, false, PercborderColor);
|
||||
libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colorperp);
|
||||
libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
Titlecell(libro, valuez, Fila - 3, column, true, true, PercborderColor);
|
||||
//libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
}
|
||||
Titlecell(libro, valuex, Fila, column, false, false, PercborderColor);
|
||||
}
|
||||
//column++;
|
||||
//Titlecell(libro, erow["DiasFaltados"], Fila, column, false, false, dedcborderColor);
|
||||
|
||||
|
||||
Binary file not shown.
@@ -294,9 +294,15 @@
|
||||
<asp:UpdatePanel ID="UpBusqueda" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="display:flex; justify-content:flex-end; padding-bottom: 12px; padding-right: 15px;">
|
||||
<asp:UpdatePanel class="col-md-4" style="max-width: 300px;" ID="UPPIndicadorCompradoRecibido" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div id="DivIndicadoresCompradoRecibido" align="Right" runat="server" visible="false" style="max-width:300px!important">
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel class="col-md-4" style="min-width: 450px;" ID="UPPIndicador" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<ContentTemplate>
|
||||
<div id="DivIndicadores" align="Right" runat="server" visible="false">
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -398,6 +398,7 @@ Partial Class RepOC
|
||||
If UsuarioActual.TienePermisoProceso(227) Then
|
||||
DivIndicadores.Visible = True
|
||||
DivIndicadores.InnerHtml = String.Empty
|
||||
|
||||
Dim Cantidad As Integer = DtOC.COUNT("CveOrdenCompra")
|
||||
Dim TotalPesos As Double = DtOC.SUM("Total", "CveMoneda = 1")
|
||||
Dim TotalDolares As Double = DtOC.SUM("Total", "CveMoneda = 2")
|
||||
@@ -405,6 +406,7 @@ Partial Class RepOC
|
||||
|
||||
MuestraIndicador(DivIndicadores, "green-haze", "fa fa-money", "Órdenes de Compra", Cantidad.ToString, "Cantidad", "$" + Total.FormatoNumero, "Total", "$" + TotalPesos.FormatoNumero, "Pesos", "$" + TotalDolares.FormatoNumero, "Dólares")
|
||||
UPPIndicador.Update()
|
||||
|
||||
End If
|
||||
|
||||
If DtOC IsNot Nothing AndAlso DtOC.Rows.Count > 0 Then
|
||||
@@ -432,6 +434,37 @@ Partial Class RepOC
|
||||
GvConsultar.Columns(15).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(227) And UsuarioActual.CveRol = 1 Then
|
||||
|
||||
DivIndicadoresCompradoRecibido.Visible = True
|
||||
DivIndicadoresCompradoRecibido.InnerHtml = String.Empty
|
||||
|
||||
|
||||
If OC.GetOrdenesCompraCompradosRecibidosRep(DdlTipo.SelectedValue.ToString, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, DDlClasificacion.SelectedValue.ToEntero,
|
||||
DdlEstatus.SelectedValue.ToEntero, FI, FF, -1, DdlProveedores.SelectedValue.ToEntero, If(txtFolio.Text.ToEntero = 0, -1, txtFolio.Text.ToEntero), ddlUsuario.SelectedValue.ToEntero,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), False,
|
||||
ddlclientes.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero(),
|
||||
CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero, TieneAnticipo:=DdlTieneAnticipo.SelectedValue.ToEntero) Then
|
||||
|
||||
Dim Recibidos As Decimal = 0D
|
||||
Dim Comprados As Decimal = 0D
|
||||
|
||||
If OC.DtResultados.Rows.Count > 0 Then
|
||||
Recibidos = OC.DtResultados.Rows(0)("Comprado").ToString.ToDecimal
|
||||
Comprados = OC.DtResultados.Rows(0)("Recibido").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
MuestraIndicadorCompradoRecibido(DivIndicadoresCompradoRecibido, "blue", "fa fa-truck", "Almacén", Recibidos.ToString("###,###,###.00"), "Comprados", "", "Recibidos", Comprados.ToString("###,###,###.00"), "")
|
||||
|
||||
End If
|
||||
|
||||
UPPIndicadorCompradoRecibido.Update()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
OC.Dispose()
|
||||
GvConsultar.DataBind()
|
||||
@@ -638,6 +671,7 @@ Partial Class RepOC
|
||||
#End Region
|
||||
|
||||
#Region "Indicadores"
|
||||
|
||||
Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, C1 As String, CT1 As String, C2 As String, CT2 As String, C3 As String, CT3 As String, C4 As String, CT4 As String)
|
||||
Dim htmldiv As New StringBuilder
|
||||
htmldiv.AppendFormat("{0}<div class='dashboard-stat {1}'><div class='visual'><i class='{2}' '=''></i></div>", DIV.InnerHtml, Color, Icono)
|
||||
@@ -648,6 +682,24 @@ Partial Class RepOC
|
||||
htmldiv.AppendFormat("</div></div></div>")
|
||||
DIV.InnerHtml = htmldiv.ToString
|
||||
End Sub
|
||||
|
||||
Private Sub MuestraIndicadorCompradoRecibido(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, C1 As String, CT1 As String, C2 As String, CT2 As String, C3 As String, CT3 As String)
|
||||
Dim htmldiv As New StringBuilder
|
||||
htmldiv.AppendFormat("{0}<div class='dashboard-stat {1}'><div class='visual'><i class='{2}' '=''></i></div>", DIV.InnerHtml, Color, Icono)
|
||||
htmldiv.AppendFormat("<div class='details'><div class='number'>{0}</div><div class='desc'>", Titulo)
|
||||
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", "", "")
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT1, C1)
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", "", "")
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT2, C2)
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", "", "")
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT3, C3)
|
||||
'htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT4, C4)
|
||||
htmldiv.AppendFormat("</div></div></div>")
|
||||
DIV.InnerHtml = htmldiv.ToString
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
254
OP/OP.aspx
254
OP/OP.aspx
@@ -309,6 +309,19 @@
|
||||
background: #f8f9fa;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* Alinear celda y contenido a la derecha */
|
||||
.celda-derecha {
|
||||
text-align: right !important;
|
||||
|
||||
}
|
||||
|
||||
.txt-merma {
|
||||
/* Ancho reducido al 50% */
|
||||
margin-left: 30px !important; /* Mueve el TextBox a la derecha dentro de la celda */
|
||||
display: block !important; /* Permite que margin-left:auto funcione */
|
||||
/* Alinea el texto interno a la derecha */
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
@@ -338,7 +351,7 @@
|
||||
<div class="labeltruncate labeltext labelbold">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group">
|
||||
<label for="<%= DdlClientes.ClientID.ToString()%>">Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientes" runat="server"
|
||||
CssClassDdl="form-control" DataTextField="NombreComercial"
|
||||
@@ -346,88 +359,85 @@
|
||||
DataValueField="CveCliente" Enabled="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Centro de Costo -->
|
||||
<div class="portlet-body form">
|
||||
<div class="labeltruncate labeltext labelbold">
|
||||
<div class="row">
|
||||
<div class="col-md-16">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label ID="LblProyecto" runat="server">
|
||||
<label>Proyecto:</label>
|
||||
</asp:Label>
|
||||
<div runat="server" id="DivProyecto">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="form-control select2me" Style="width: 100%;"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-2">
|
||||
<label>Subproyecto:</label>
|
||||
</asp:Label>
|
||||
<div runat="server" id="DivSubProyecto" class="col-md-4">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control select2me" Style="width: 100%;"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Descripción -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server"
|
||||
CssClass="form-control"
|
||||
Style="width: 95%; height: 40px;"
|
||||
ValidationGroup="GrpGuardar"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"
|
||||
MaxLength="1000" />
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server"
|
||||
ControlToValidate="TxtDescripcion"
|
||||
ErrorMessage="Descripción requerida"
|
||||
Display="None"
|
||||
CssClass="text-danger"
|
||||
ValidationGroup="GrpGuardar" />
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripcion</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Fecha -->
|
||||
<div class="form-section">
|
||||
<div class="row">
|
||||
<!-- Columna Fecha-->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="col-md-1">
|
||||
<label class="mb-0">Fecha</label>
|
||||
<label>Fecha</label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker" style="height: 30px;" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="Txtfecha" runat="server"
|
||||
CssClass="form-control"
|
||||
style="margin-top: -6px;"
|
||||
Width="100%"
|
||||
CausesValidation="true"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " style="margin-top: -11px; height: 29px;" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="Txtfecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="Txtfecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="Txtfecha" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="Txtfecha" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="Txtfecha" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Centro de Costo -->
|
||||
<div class="portlet-body form" style="margin-top: -15px;">
|
||||
<div class="labeltruncate labeltext labelbold">
|
||||
<div class="row">
|
||||
<div class="col-md-16">
|
||||
<div class="form-group">
|
||||
<asp:Label ID="LblProyecto" runat="server">
|
||||
<label>Proyecto:</label>
|
||||
</asp:Label>
|
||||
<div runat="server" id="DivProyecto">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="form-control select2me" Style="width: 100%;"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-2">
|
||||
<label>Subproyecto:</label>
|
||||
</asp:Label>
|
||||
<div runat="server" id="DivSubProyecto" class="col-md-4">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control select2me" Style="width: 100%;"></asp:DropDownList>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="Txtfecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="Txtfecha" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="Txtfecha" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="Txtfecha" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Descripción -->
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server"
|
||||
CssClass="form-control"
|
||||
Style="width: 95%; height: 40px;"
|
||||
ValidationGroup="GrpGuardar"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"
|
||||
MaxLength="1000" />
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server"
|
||||
ControlToValidate="TxtDescripcion"
|
||||
ErrorMessage="Descripción requerida"
|
||||
Display="None"
|
||||
CssClass="text-danger"
|
||||
ValidationGroup="GrpGuardar" />
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripcion</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
@@ -437,23 +447,17 @@
|
||||
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<asp:TextBox ID="TxtEstatus" runat="server" CssClass="form-control" Width="150px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEstatus" runat="server"
|
||||
ControlToValidate="TxtEstatus"
|
||||
Display="Dynamic"
|
||||
ErrorMessage="Estatus requerido"
|
||||
CssClass="text-danger"
|
||||
ValidationGroup="GrpGuardar" />
|
||||
<asp:Label ID="TxtEstatus" runat="server" CssClass="form-control" Width="150px"></asp:Label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<!-- GridViews -->
|
||||
<asp:UpdatePanel ID="UpGvDatosOP" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UpGvDatosOP" runat="server" UpdateMode="Conditional" style="margin-top: -170px;">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
@@ -466,13 +470,15 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="max-width: 70px;">Producto</label>
|
||||
<div id="PanelProducto" runat="server">
|
||||
<asp:label ID="LblProducto" class="col-md-1" runat="server" style="max-width: 70px;" Text="Producto"></asp:label>
|
||||
<div class="col-md-3">
|
||||
<ADS:Dropdownlost ID="DdlPS" runat="server" Width="100%" CssStyle="width: 100%;"
|
||||
CssClass="select2me"
|
||||
CssClassDdl="form-control" DataTextField="PSCodigo"
|
||||
DataValueField="CvePS" Enabled="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 d-flex align-items-center" style="gap: 10px;">
|
||||
<asp:LinkButton ID="BtnAgregarProducto" runat="server"
|
||||
CssClass="btn btn-primary"
|
||||
@@ -760,31 +766,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Área de acción: Guardar, Terminar y Cancelar -->
|
||||
<asp:UpdatePanel runat="server" ID="UpBtns" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12 d-flex justify-content-end align-items-center">
|
||||
<!-- Botón Guardar -->
|
||||
<asp:Button
|
||||
ID="BtnGuardarOP" runat="server"
|
||||
Text="Guardar Orden de Producción"
|
||||
CssClass="btn btn-success me-2"
|
||||
OnClick="BtnGuardarOP_Click"
|
||||
ValidationGroup="GrpGuardar" />
|
||||
|
||||
<!-- Botón para Guardar la OP -->
|
||||
<div class="form-group" style="margin-top: 20px;">
|
||||
<asp:Button ID="BtnGuardarOP" runat="server" Text="Guardar Orden de Producción"
|
||||
CssClass="btn btn-success" OnClick="BtnGuardarOP_Click"
|
||||
ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
<!-- Botones Derecha: Terminar y Cancelar -->
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12 d-flex justify-content-end">
|
||||
<asp:Button ID="BtnFinalizarOP" runat="server" Text="Terminar"
|
||||
CssClass="btn btn-success mr-2" OnClick="BtnFinalizarOP_Click"
|
||||
Visible="false" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12 d-flex justify-content-end">
|
||||
<asp:Button ID="BtnCancelarOP" runat="server" Text="Cancelar OP"
|
||||
CssClass="btn btn-danger" Visible="false"
|
||||
OnClick="BtnCancelarOP_Click" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:Button
|
||||
ID="BtnFinalizarOP" runat="server"
|
||||
Text="Terminar"
|
||||
CssClass="btn btn-success mr-2"
|
||||
OnClick="BtnFinalizarOP_Click"
|
||||
Visible="false" />
|
||||
|
||||
<asp:Button
|
||||
ID="BtnCancelarOP" runat="server"
|
||||
Text="Cancelar OP"
|
||||
CssClass="btn btn-danger"
|
||||
OnClick="BtnCancelarOP_Click"
|
||||
Visible="false" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DVModalFinalizarOP" class="modal ADS fade" role="dialog" data-backdrop="static">
|
||||
<div class="modal-dialog" style="width: 750px;">
|
||||
@@ -838,11 +852,13 @@
|
||||
<asp:TextBox ID="TxtCantidadPT" runat="server"
|
||||
Text='<%# Bind("Cantidad") %>'
|
||||
CssClass="form-control"
|
||||
style="text-align: right;"
|
||||
TextMode="Number"
|
||||
min="0"
|
||||
step="1"
|
||||
data-original='<%# Eval("Cantidad") %>'
|
||||
onchange="validarCantidad(this)" />
|
||||
onchange="validarCantidad(this)"
|
||||
ItemStyle-HorizontalAlign="Right"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -856,17 +872,18 @@
|
||||
CssClass="table table-striped table-hover" GridLines="None" Width="100%">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="PSCodigo" HeaderText="Producto" />
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:TemplateField HeaderText="Devolución">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtDevolucionMP" runat="server"
|
||||
Text="0"
|
||||
CssClass="form-control"
|
||||
style="width: 50%; text-align: right; margin-left: 38px; display: block;"
|
||||
TextMode="Number"
|
||||
min="0"
|
||||
step="1"
|
||||
data-original='<%# Eval("Cantidad") %>'
|
||||
onchange="validarCantidad(this)" />
|
||||
onchange="validarCantidad(this)"
|
||||
/>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
@@ -929,13 +946,17 @@
|
||||
<asp:TemplateField HeaderText="Merma">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMerma" runat="server" Text="0"
|
||||
CssClass="form-control" TextMode="Number" step="0.01" min="0" />
|
||||
CssClass="txt-merma" TextMode="Number" step="0.01" min="0"
|
||||
style="width: 50%; text-align: right;"
|
||||
onchange="calcularDevolucion(this);"
|
||||
data-original='<%# Eval("Cantidad")%>'
|
||||
/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Devolución">
|
||||
<asp:TemplateField HeaderText="Devolución" ItemStyle-CssClass="celda-derecha">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtDevolucionCancel" runat="server" Text="0"
|
||||
CssClass="form-control" TextMode="Number" step="0.01" min="0" />
|
||||
<asp:Label ID="LblDevolucion" runat="server" Text='<%# Eval("Cantidad", "{0:N2}") %>' CssClass="devolucion-label" style="text-align: right;"/>
|
||||
<asp:HiddenField ID="HfDevolucion" runat="server" Value='<%# Eval("Cantidad", "{0:N2}") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -969,7 +990,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
function calcularDevolucion(input) {
|
||||
var cantidadOriginal = parseFloat(input.dataset.original) || 0; // Usar dataset.original
|
||||
var merma = parseFloat(input.value) || 0;
|
||||
|
||||
if (merma > cantidadOriginal) {
|
||||
input.value = cantidadOriginal.toFixed(2);
|
||||
merma = cantidadOriginal;
|
||||
}
|
||||
|
||||
var devolucion = cantidadOriginal - merma;
|
||||
var row = input.closest('tr');
|
||||
row.querySelector('.devolucion-label').innerText = devolucion.toFixed(2);
|
||||
row.querySelector('[id$="HfDevolucion"]').value = devolucion.toFixed(2);
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
301
OP/OP.aspx.vb
301
OP/OP.aspx.vb
@@ -21,6 +21,15 @@ Partial Class OP_OP
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveEstatusInicial As Integer
|
||||
Get
|
||||
Return ViewState("CveEstatusInicial").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveEstatusInicial") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtPS As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtPS"), DataTable)
|
||||
@@ -103,6 +112,11 @@ Partial Class OP_OP
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CveOP = If(Request("CveOP") <> "", Request("CveOP").ToString.ToEntero, "-1".ToEntero)
|
||||
|
||||
If Not CveOP > 0 Then
|
||||
TxtEstatus.Text = GlobalDTOPEstatus(UsuarioActual.CveEmpresa).FiltroPrimeroValor("EstatusOP", "TipoEstatus=1")
|
||||
End If
|
||||
CveEstatusInicial = GlobalDTOPEstatus(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOP", "TipoEstatus=1").ToEntero()
|
||||
TipoEstatus = -1
|
||||
CreaPS()
|
||||
SetValues()
|
||||
@@ -132,8 +146,6 @@ Partial Class OP_OP
|
||||
DtMP.Columns.Add("UnidadMedida", GetType(String))
|
||||
DtMP.Columns.Add("Cantidad", GetType(Decimal))
|
||||
DtMP.Columns.Add("Surtido", GetType(Decimal))
|
||||
'DtMP.Columns.Add("CvePSProducto", GetType(Integer))
|
||||
'DtMP.Columns.Add("CveAlmacenDestino", GetType(Integer))
|
||||
|
||||
DtMO = New DataTable()
|
||||
DtMO.Columns.Add("Tipo", GetType(String)) ' Producto, MP, MO, CI
|
||||
@@ -152,7 +164,6 @@ Partial Class OP_OP
|
||||
DtCI.Columns.Add("productoMateriaPrima", GetType(String))
|
||||
DtCI.Columns.Add("CvePSProducto", GetType(Integer))
|
||||
DtCI.Columns.Add("Cantidad", GetType(Decimal))
|
||||
'DtCI.Columns.Add("Costo", GetType(Decimal))
|
||||
DtCI.Columns.Add("ImporteCostoIndirecto", GetType(Decimal))
|
||||
DtCI.Columns.Add("Total", GetType(Decimal))
|
||||
|
||||
@@ -166,7 +177,7 @@ Partial Class OP_OP
|
||||
CargarProductos()
|
||||
CargaDatos()
|
||||
|
||||
If TipoEstatus = 3 Then
|
||||
If TipoEstatus = 3 Or TipoEstatus = 4 Then
|
||||
DeshabilitarControles() ' Deshabilita todos los controles relevantes
|
||||
Else
|
||||
If CveOP = -1 Then ' Nueva OP
|
||||
@@ -199,14 +210,20 @@ Partial Class OP_OP
|
||||
|
||||
UpOP.Update()
|
||||
UpGvDatosOP.Update()
|
||||
UpBtns.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub DeshabilitarControles()
|
||||
' Deshabilitar DropDownLists
|
||||
DdlClientes.Enabled = False
|
||||
|
||||
DdlProyecto.Enabled = False
|
||||
DdlSubProyecto.Enabled = False
|
||||
DdlPS.Enabled = False
|
||||
DdlClientes.ddl.Enabled = False
|
||||
DdlClientes.ddlWS.Disabled = True
|
||||
DdlPS.ddl.Visible = False
|
||||
DdlPS.ddlWS.Visible = False
|
||||
LblProducto.Visible = False
|
||||
|
||||
|
||||
' Deshabilitar TextBox y Date
|
||||
TxtDescripcion.Enabled = False
|
||||
@@ -219,10 +236,16 @@ Partial Class OP_OP
|
||||
BtnSimularMP.Visible = False
|
||||
BtnGuardarOP.Visible = False
|
||||
BtnFinalizarOP.Visible = False
|
||||
BtnCancelarOP.Visible = False
|
||||
LnkSolicitarMP.Visible = False
|
||||
GvProductos.Columns(3).Visible = False
|
||||
|
||||
|
||||
|
||||
UpOP.Update()
|
||||
UpGvDatosOP.Update()
|
||||
UpBtns.Update()
|
||||
UpModalCancelar.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
@@ -298,7 +321,6 @@ Partial Class OP_OP
|
||||
newRow("Tipo") = "CI"
|
||||
newRow("CvePS") = rowCI("CvePS").ToString().ToEntero()
|
||||
newRow("CvePSProducto") = rowCI("CvePSProducto").ToString().ToEntero()
|
||||
'newRow("CvePSMateriaPrima") = rowCI("CvePSMateriaPrima").ToString().ToEntero()
|
||||
newRow("productoMateriaPrima") = rowCI("producto").ToString
|
||||
newRow("ImporteCostoIndirecto") = rowCI("ImporteCostoIndirecto").ToString.ToDecimal()
|
||||
newRow("Total") = rowCI("ImporteCostoIndirecto")
|
||||
@@ -306,11 +328,18 @@ Partial Class OP_OP
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
ObjOP.Dispose()
|
||||
ActualizarGrids()
|
||||
End If
|
||||
|
||||
' Validar si la OP está Terminada (3) o Cancelada (4)
|
||||
If TipoEstatus = 3 Or TipoEstatus = 4 Then
|
||||
DeshabilitarControles()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargarClientes()
|
||||
@@ -402,7 +431,6 @@ Partial Class OP_OP
|
||||
rowCI("Tipo") = "CI"
|
||||
rowCI("CvePS") = CvePS
|
||||
rowCI("CvePSProducto") = drCI("CvePSProducto").ToString()
|
||||
'rowCI("CvePSMateriaPrima") = drCI("CvePSMateriaPrima").ToString().ToEntero()
|
||||
rowCI("productoMateriaPrima") = drCI("productoMateriaPrima").ToString()
|
||||
rowCI("ImporteCostoIndirecto") = drCI("ImporteCostoIndirecto").ToString().ToDecimal()
|
||||
rowCI("Total") = rowCI("ImporteCostoIndirecto")
|
||||
@@ -912,9 +940,26 @@ Partial Class OP_OP
|
||||
DdlAlmacenMermas.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen = 1")
|
||||
DdlAlmacenMermas.DataBind()
|
||||
|
||||
' Cargar MP
|
||||
GvMPCancelacion.DataSource = DtMP.FiltraParametros("Tipo = 'MP'")
|
||||
' 1. Crear copia del DataTable
|
||||
Dim dtMPCopy As DataTable = DtMP.FiltraParametros("Tipo = 'MP'").Copy()
|
||||
|
||||
' 2. Agregar columna "Devolucion" como NO READONLY
|
||||
If Not dtMPCopy.Columns.Contains("Devolucion") Then
|
||||
Dim colDevolucion As New DataColumn("Devolucion", GetType(Decimal))
|
||||
colDevolucion.ReadOnly = False
|
||||
dtMPCopy.Columns.Add(colDevolucion)
|
||||
End If
|
||||
|
||||
' 3. Asignar valores manualmente
|
||||
For Each row As DataRow In dtMPCopy.Rows
|
||||
row("Devolucion") = row("Cantidad")
|
||||
Next
|
||||
|
||||
' 4. Configurar GridView
|
||||
GvMPCancelacion.DataSource = dtMPCopy
|
||||
GvMPCancelacion.DataBind()
|
||||
ViewState("DtMPCancelacion") = dtMPCopy
|
||||
|
||||
|
||||
RegistraScript("$('#DVModalCancelarOP').modal('show');")
|
||||
UpModalCancelar.Update()
|
||||
@@ -931,9 +976,9 @@ Partial Class OP_OP
|
||||
Dim ObjInventario As New ClsInventarios()
|
||||
Dim CveMovimientoSalida As Integer = 1
|
||||
Dim CveMovEntradaDev As Integer = 0
|
||||
Dim CveMovMerma As Integer = 1
|
||||
Dim TieneError As Boolean = False
|
||||
Dim MensajeError As String = ""
|
||||
Dim CveMovMerma As Integer = 0
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim TextoError As String = ""
|
||||
ObjInventario.IniciaTransacSQL()
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjOP As New ClsOP(ObjInventario.IniciaTransacSQL())
|
||||
@@ -942,12 +987,14 @@ Partial Class OP_OP
|
||||
Dim TotalMP As Decimal = 0
|
||||
Dim TotalDevoluciones As Decimal = 0
|
||||
Dim TotalMermas As Decimal = 0
|
||||
' Obtener folios de movimientos
|
||||
Dim folioDevolucion = 0
|
||||
Dim folioMerma = 0
|
||||
|
||||
|
||||
Dim Fecha As DateTime = NowADS()
|
||||
|
||||
Try
|
||||
|
||||
|
||||
' Validaciones
|
||||
If DdlAlmacenSalidaMP.SelectedValue = "-1" OrElse
|
||||
DdlAlmacenDevolucionCancel.SelectedValue = "-1" Then
|
||||
@@ -957,81 +1004,162 @@ Partial Class OP_OP
|
||||
' 1. Movimiento de Salida MP
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenSalidaMP.SelectedValue.ToEntero(), TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="Cancelación OP #" & LblFolio.Text, Modulo:="OP/CancelanciónSalida")
|
||||
|
||||
' 2. Registrar detalles y obtener PU (Igual que en Finalizar)
|
||||
Dim DtMPCancelacion As DataTable = Nothing
|
||||
If CveMovimientoSalida > 0 Then
|
||||
For Each row As GridViewRow In GvMPCancelacion.Rows
|
||||
Dim CvePS As Integer = row.DataKey("CvePSMateriaPrima").ToEntero
|
||||
Dim CveUM As Integer = row.DataKey("CveUMMateriaPrima").ToEntero
|
||||
Dim Cantidad As Decimal = CDec(row.Cells(2).Text)
|
||||
|
||||
|
||||
' Registrar con PU=0 temporalmente
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, 0) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
|
||||
' Obtener PU reales del movimiento
|
||||
If Not ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
DtMPCancelacion = ObjInventario.DtResultados.Copy()
|
||||
|
||||
' 3. Recalcular totales con PU reales (Clave)
|
||||
TotalMP = DtMPCancelacion.SUMD("Total")
|
||||
|
||||
' 2. Movimiento de Entrada Devoluciones
|
||||
CveMovEntradaDev = ObjInventario.AddMovimiento(DdlAlmacenDevolucionCancel.SelectedValue.ToEntero(), TipoMovimientoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Modulo:="OP/CancelaciónEntrada", CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
|
||||
folioDevolucion = ObjInventario.Folio
|
||||
' 3. Procesar cada material
|
||||
For Each row As GridViewRow In GvMPCancelacion.Rows
|
||||
Dim Cantidad As Decimal = CDec(row.Cells(2).Text)
|
||||
Dim Merma As Decimal = row.FCTextBox("TxtMerma").Text.ToDecimal()
|
||||
Dim Devolucion As Decimal = row.FCTextBox("TxtDevolucionCancel").Text.ToDecimal()
|
||||
|
||||
If (Merma + Devolucion) > Cantidad Then
|
||||
Throw New Exception("La suma de merma y devolución no puede exceder la cantidad")
|
||||
End If
|
||||
|
||||
TotalMP += Cantidad
|
||||
TotalDevoluciones += Devolucion
|
||||
TotalMermas += Merma
|
||||
|
||||
Dim CvePS As Integer = row.DataKey("CvePSMateriaPrima").ToEntero
|
||||
Dim CveUM As Integer = row.DataKey("CveUMMateriaPrima").ToEntero
|
||||
|
||||
|
||||
' Registrar salida
|
||||
ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, 0)
|
||||
|
||||
' Registrar devolución
|
||||
If Devolucion > 0 Then
|
||||
ObjInventario.AddMovimientoDetalle(CveMovEntradaDev, Devolucion, CveUM, CvePS, 0)
|
||||
End If
|
||||
Next
|
||||
|
||||
' 4. Registrar mermas si existen
|
||||
|
||||
If DdlAlmacenMermas.SelectedValue <> "-1" Then
|
||||
CveMovMerma = ObjInventario.AddMovimiento(DdlAlmacenMermas.SelectedValue.ToEntero(), TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Modulo:="OP/CancelaciónMerma", CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
For Each row As GridViewRow In GvMPCancelacion.Rows
|
||||
|
||||
Dim CvePS As Integer = row.DataKey("CvePSMateriaPrima").ToEntero
|
||||
Dim CveUM As Integer = row.DataKey("CveUMMateriaPrima").ToEntero
|
||||
Dim Merma As Decimal = row.FCTextBox("TxtMerma").Text.ToDecimal()
|
||||
If Merma > 0 Then
|
||||
Dim CvePS As Integer = row.DataKey("CvePSMateriaPrima").ToEntero
|
||||
Dim CveUM As Integer = row.DataKey("CveUMMateriaPrima").ToEntero
|
||||
ObjInventario.AddMovimientoDetalle(CveMovMerma, Merma, CveUM, CvePS, 0)
|
||||
TotalMermas += Merma
|
||||
Dim Cantidad As Decimal = CDec(row.Cells(2).Text)
|
||||
Dim Devolucion As Decimal = Cantidad - Merma ' Cálculo automático
|
||||
|
||||
Dim PU As Decimal = DtMPCancelacion.FiltroPrimeroValor("PU", $"CvePS = {CvePS} AND CveUM = {CveUM}").ToDecimal()
|
||||
|
||||
' Actualizar devoluciones con PU correcto
|
||||
If Devolucion > 0 Then
|
||||
ObjInventario.AddMovimientoDetalle(CveMovEntradaDev, Devolucion, CveUM, CvePS, PU)
|
||||
TotalDevoluciones += Devolucion * PU
|
||||
End If
|
||||
|
||||
If Devolucion < 0 Then
|
||||
Throw New Exception($"Devolución negativa en {row.Cells(0).Text}")
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim TieneMerma As Boolean = False
|
||||
For Each row As GridViewRow In GvMPCancelacion.Rows
|
||||
If row.FCTextBox("TxtMerma").Text.ToDecimal() > 0 Then
|
||||
TieneMerma = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
' 4. Registrar mermas si existen
|
||||
If TieneMerma Then
|
||||
If DdlAlmacenMermas.SelectedValue = "-1" Then
|
||||
Alert("Seleccione almacén para mermas", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim GeneraSalidaMerma As Boolean = False
|
||||
If GeneraSalidaMerma = True Then
|
||||
CveMovMerma = ObjInventario.AddMovimiento(DdlAlmacenMermas.SelectedValue.ToEntero(), TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Modulo:="OP/CancelaciónMerma", CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
folioMerma = ObjInventario.Folio
|
||||
If CveMovMerma > 0 Then
|
||||
For Each row As GridViewRow In GvMPCancelacion.Rows
|
||||
Dim CvePS As Integer = row.DataKey("CvePSMateriaPrima").ToEntero
|
||||
Dim CveUM As Integer = row.DataKey("CveUMMateriaPrima").ToEntero
|
||||
Dim PU As Decimal = DtMPCancelacion.FiltroPrimeroValor("PU", $"CvePS = {CvePS} AND CveUM = {CveUM}").ToDecimal()
|
||||
Dim Merma As Decimal = row.FCTextBox("TxtMerma").Text.ToDecimal()
|
||||
Dim Cantidad As Decimal = CDec(row.Cells(2).Text)
|
||||
|
||||
If Merma > 0 Then
|
||||
ObjInventario.AddMovimientoDetalle(CveMovMerma, Merma, CveUM, CvePS, PU)
|
||||
End If
|
||||
|
||||
' Validaciones
|
||||
If Merma > Cantidad Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
If Not ObjInventario.GetMovimientosDetalle(CveMovMerma, UsuarioActual.CveEmpresa) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
TotalMermas = DtMPCancelacion.SUMD("Total")
|
||||
|
||||
End If
|
||||
Else
|
||||
TotalMermas = TotalMP - TotalDevoluciones
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
' 5. Generar pólizas contables
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OP/Cancelacion", 53, 0, 0, 1, Fecha,
|
||||
If Not ErrorMovInv Then
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OP/Cancelacion", 53, 0, 0, 1, Fecha,
|
||||
"Cancelación OP #" & LblFolio.Text,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
' Salida MP (Abono 68)
|
||||
ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalMP, TotalMP, 68, "Cancelación MP OP #" & LblFolio.Text, "Cancelación MP OP #" & LblFolio.Text, CveMovimientoAlmacen:=CveMovimientoSalida)
|
||||
' Salida MP (Abono 68)
|
||||
If CvePrePoliza > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalMP, TotalMP, 68, "Cancelación MP OP #" & LblFolio.Text, "Cancelación MP OP #" & LblFolio.Text, CveMovimientoAlmacen:=CveMovimientoSalida) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
' Entrada Devoluciones (Cargo 68)
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalDevoluciones, TotalDevoluciones, 68, "Devoluciones Cancelación OP #" & LblFolio.Text, "Devoluciones Cancelación OP #" & LblFolio.Text, CveMovimientoAlmacen:=CveMovEntradaDev) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
' Entrada Devoluciones (Cargo 68)
|
||||
ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalDevoluciones, TotalDevoluciones, 68, "Devoluciones Cancelación OP #" & LblFolio.Text, "Devoluciones Cancelación OP #" & LblFolio.Text, CveMovimientoAlmacen:=CveMovEntradaDev)
|
||||
|
||||
If TotalMermas > 0 Then
|
||||
' Salida Mermas (Abono 68)
|
||||
ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalMermas, TotalMermas, 68, "Mermas Cancelación OP #" & LblFolio.Text, "Mermas Cancelación OP #" & LblFolio.Text, CveMovimientoAlmacen:=CveMovMerma)
|
||||
' Cargo Mermas (95)
|
||||
ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalMermas, TotalMermas, 95, "Ajuste Mermas Cancelación OP #" & LblFolio.Text, "Ajuste Mermas Cancelación OP #" & LblFolio.Text)
|
||||
If TotalMermas > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalMermas, TotalMermas, 95, "Mermas Cancelación OP #" & LblFolio.Text, "Mermas Cancelación OP #" & LblFolio.Text, CveMovimientoAlmacen:=CveMovMerma) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
' 6. Actualizar estatus OP
|
||||
' 6. Actualizar estatus OP
|
||||
If Not ErrorMovInv Then
|
||||
If ObjOP.UpdateEstatusOP(CveOP, CveEstatusCancelacion, UsuarioActual.CveEmpresa) Then
|
||||
ObjInventario.Commit()
|
||||
TxtEstatus.Text = EstatusCancelacion
|
||||
PanelProducto.Visible = False
|
||||
DeshabilitarControles()
|
||||
|
||||
If ObjOP.UpdateEstatusOP(CveOP, CveEstatusCancelacion, UsuarioActual.CveEmpresa) Then
|
||||
ObjInventario.Commit()
|
||||
TxtEstatus.Text = "Cancelado"
|
||||
BtnCancelarOP.Visible = False
|
||||
UpOP.Update()
|
||||
RegistraScript("$('#DVModalCancelarOP').modal('hide');")
|
||||
Alert("OP cancelada correctamente", TipoMensaje.MsgInformacion)
|
||||
|
||||
Dim linkDevolucion = $"<a class='Texto' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={CveMovEntradaDev}'>{folioDevolucion}</a>"
|
||||
|
||||
Dim mensaje = $"OP cancelada correctamente.<br/>Devolución: {linkDevolucion}"
|
||||
|
||||
' Validar si existe movimiento de merma
|
||||
If CveMovMerma > 0 Then
|
||||
Dim linkMerma = $"<a class='Texto' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={CveMovMerma}'>{folioMerma}</a>"
|
||||
mensaje &= $"<br/>Merma: {linkMerma}"
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DVModalCancelarOP').modal('hide');")
|
||||
Alert(mensaje, TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
Alert("Error al actualizar el estatus.", TipoMensaje.MsgError)
|
||||
|
||||
End If
|
||||
Else
|
||||
Throw New Exception("Error al actualizar el estatus de la OP")
|
||||
ObjInventario.RollBack()
|
||||
Alert($"Error contable: {TextoError}", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -1112,10 +1240,6 @@ Partial Class OP_OP
|
||||
Dim CveMovimientoEntrada As Integer = 0
|
||||
Dim IDPoliza As Integer = 0
|
||||
Dim FolioSalida As Integer = 0
|
||||
'Dim CveMovimientoVirtualEntrada As Integer = 0
|
||||
'Dim CveMovimientoVirtualSalida As Integer = 0
|
||||
'Dim FolioVirtualEntrada As Integer = 0
|
||||
'Dim FolioVirtualSalida As Integer = 0
|
||||
Dim FolioEntrada As Integer = 0
|
||||
Dim Fecha As DateTime = NowADS()
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
@@ -1124,7 +1248,6 @@ Partial Class OP_OP
|
||||
Dim TipoMovimientoDev As Integer = 33
|
||||
Dim CveConceptoEntrada As Integer = 9
|
||||
Dim TotalCostoMP As Decimal = 0
|
||||
'Dim TotalDevoluciones As Decimal = 0
|
||||
Dim CveMovimientoDev As Integer = 0
|
||||
Dim CostoDevoluciones As Decimal = 0
|
||||
|
||||
@@ -1222,8 +1345,8 @@ Partial Class OP_OP
|
||||
For Each row As GridViewRow In GvMPUtilizada.Rows
|
||||
Dim Devolucion As Decimal = row.FCTextBox("TxtDevolucionMP").Text.ToDecimal()
|
||||
If Devolucion > 0 Then
|
||||
Dim CvePS As Integer = row.DataKey("CvePSMateriaPrima").ToEntero 'GvMPUtilizada.DataKeys(row.RowIndex)("CvePSMateriaPrima").ToString.ToEntero()
|
||||
Dim CveUM As Integer = row.DataKey("CveUMMateriaPrima").ToEntero 'GvMPUtilizada.DataKeys(row.RowIndex)("CveUMMateriaPrima").ToString.ToEntero()
|
||||
Dim CvePS As Integer = row.DataKey("CvePSMateriaPrima").ToEntero
|
||||
Dim CveUM As Integer = row.DataKey("CveUMMateriaPrima").ToEntero
|
||||
|
||||
|
||||
Dim PU As Decimal = DtMPAlmacen.FiltroPrimeroValor("PU", $"CvePS = {CvePS} AND CveUM = {CveUM}").ToDecimal()
|
||||
@@ -1253,8 +1376,7 @@ Partial Class OP_OP
|
||||
If CveMovimientoEntrada > 0 AndAlso Not ErrorMovInv Then
|
||||
Dim CostoTotalProduccion As Decimal = TotalMPProducto + TotalMOProducto + TotalCIProducto
|
||||
Dim CostoPTAjustado As Decimal = CostoTotalProduccion - CostoDevoluciones
|
||||
'Dim CantidadPT As Decimal = DtPS.AsEnumerable().Sum(Function(r) r.Field(Of Decimal)("Cantidad"))
|
||||
'Dim PU_PT As Decimal = If(CantidadPT > 0, CostoPTAjustado / CantidadPT, 0)
|
||||
|
||||
|
||||
For Each rowPT As DataRow In DtPS.Select("Tipo = 'Producto'")
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, rowPT("Cantidad").ToString.ToDecimal(), rowPT("CveUM").ToString.ToEntero(), rowPT("CvePS").ToString.ToEntero(), rowPT("Costo").ToString.ToDecimal()) Then
|
||||
@@ -1288,14 +1410,6 @@ Partial Class OP_OP
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'If Not ErrorMovInv Then
|
||||
'If Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||
'ErrorMovInv = True : TextoError = "Error en validación de póliza"
|
||||
'ElseIf ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
' ErrorMovInv = True : TextoError = "Descuadre en póliza contable"
|
||||
'End If
|
||||
'End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1306,16 +1420,12 @@ Partial Class OP_OP
|
||||
ObjInventario.Commit()
|
||||
TxtEstatus.Text = EstatusFinalizar
|
||||
DeshabilitarControles()
|
||||
UpOP.Update()
|
||||
UpGvDatosOP.Update()
|
||||
|
||||
Alert("Orden de producción finalizada.<br/>" & "<a class='Texto' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento=" & CveMovimientoEntrada & "'>" & FolioEntrada & "</a>",
|
||||
TipoMensaje.MsgInformacion)
|
||||
|
||||
|
||||
|
||||
RegistraScript("$('#DVModalFinalizarOP').modal('hide');")
|
||||
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
Alert("Error al actualizar el estatus.", TipoMensaje.MsgError)
|
||||
@@ -1326,9 +1436,6 @@ Partial Class OP_OP
|
||||
Alert($"Error contable: {TextoError}", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
ObjInventario.RollBack()
|
||||
Alert($"Error crítico: {ex.Message}", TipoMensaje.MsgError)
|
||||
|
||||
156
RH/Personal.aspx
156
RH/Personal.aspx
@@ -1795,84 +1795,6 @@
|
||||
<div class="col-md-8">
|
||||
|
||||
|
||||
<div id="DModalPersonalRefs" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModalPers" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content" >
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title"><asp:Literal ID="ltlPerstitulo" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:Panel runat="server" ID="PanelMostrarpersonalcampos">
|
||||
<div class="portlet light xspadding bordered " id="pnlListrefs">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Referenca Nomina</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkAgregarPersonalRefs" OnClick="LnkAgregarPers_Click" CssClass="btn yellow-gold" runat="server">Agregar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:GridView ID="GVPersonalRefs" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" ShowHeaderWhenEmpty ="True"
|
||||
datakeynames="CveReferencia,CvePersonal,Valor">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Referencia">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblreferencia" runat="server" Text='<%# Eval("Referencia")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblvalor" runat="server" Text='<%# Eval("Valor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="36">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarPers" runat="server" OnClick="LnkEliminarPers_Click" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el PersonalRefs?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="PanelADDpersonalcampos">
|
||||
<div class="row">
|
||||
<div class="col-md-4 truncate ">Referencia</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlPersreferencia" CssClass="form-control input-sm select2me " runat="server" DataTextField="Referencia" DataValueField="CveReferencia" style="width: 100%" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 truncate ">Valor</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPersvalor" CssClass="form-control input-sm " runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvPersvalor" runat="server" ControlToValidate="TxtPersvalor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Valor''</b> es necesario, por favor ingréselo." ValidationGroup="VGMPers"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoPersvalor" runat="server" HighlightCssClass="vco" TargetControlID="RfvPersvalor"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<div class="modal-btn">
|
||||
<asp:Button ID="BtnPersADD" OnClick="BtnPersADD_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGMPers" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpMovtosPermanentes" UpdateMode="Conditional" runat="server">
|
||||
@@ -6336,7 +6258,85 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DModalPersonalRefs" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UPModalPers" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content" >
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title"><asp:Literal ID="ltlPerstitulo" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:Panel runat="server" ID="PanelMostrarpersonalcampos">
|
||||
<div class="portlet light xspadding bordered " id="pnlListrefs">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Referenca Nomina</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkAgregarPersonalRefs" OnClick="LnkAgregarPers_Click" CssClass="btn yellow-gold" runat="server">Agregar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<asp:GridView ID="GVPersonalRefs" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" ShowHeaderWhenEmpty ="True"
|
||||
datakeynames="CveReferencia,CvePersonal,Valor">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Referencia">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblreferencia" runat="server" Text='<%# Eval("Referencia")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblvalor" runat="server" Text='<%# Eval("Valor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="36">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarPers" runat="server" OnClick="LnkEliminarPers_Click" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el PersonalRefs?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="PanelADDpersonalcampos">
|
||||
<div class="row">
|
||||
<div class="col-md-4 truncate ">Referencia</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlPersreferencia" CssClass="form-control input-sm select2me " runat="server" DataTextField="Referencia" DataValueField="CveReferencia" style="width: 100%" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 truncate ">Valor</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPersvalor" CssClass="form-control input-sm " runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvPersvalor" runat="server" ControlToValidate="TxtPersvalor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Valor''</b> es necesario, por favor ingréselo." ValidationGroup="VGMPers"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoPersvalor" runat="server" HighlightCssClass="vco" TargetControlID="RfvPersvalor"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<div class="modal-btn">
|
||||
<asp:Button ID="BtnPersADD" OnClick="BtnPersADD_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VGMPers" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<iframe id="my_iframe" style="display: none;"></iframe>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -1051,7 +1051,6 @@ Partial Class RH_Personal
|
||||
CargaGvBitacora()
|
||||
CarcaConceptosNomina()
|
||||
CargaFonacot()
|
||||
CargaPersonalRefs()
|
||||
End If
|
||||
|
||||
ValidaDeudorAcreedor()
|
||||
@@ -7646,6 +7645,27 @@ Partial Class RH_Personal
|
||||
TxtSRINCfechaInicio.Text = ""
|
||||
TxtSRINCdiasAutorizados.Text = ""
|
||||
TxtDiasPagoEmpresa.Text = If(UsuarioActual.CveEmpresa = 141, "3", "")
|
||||
If Not (DdlSRINCcveTipodeIncidencia.Items.Count > 1) Then
|
||||
|
||||
Using objnom As New ClsNominas()
|
||||
If (objnom.PersonalIncapacidadCatalogos()) Then
|
||||
|
||||
Dim dtperinc As DataTable = objnom.DtResultados
|
||||
DdlSRINCcveTipodeIncidencia.DataSource = dtperinc.FiltraParametros("Tipo = -1 OR Tipo =1 ")
|
||||
DdlSRINCcveRamoSeguro.DataSource = dtperinc.FiltraParametros("Tipo = -1 OR Tipo =2 ")
|
||||
DdlSRINCcveTipoRiesgo.DataSource = dtperinc.FiltraParametros("Tipo = -1 OR Tipo =3 ")
|
||||
DdlSRINCcveSecuelaConsecuencia.DataSource = dtperinc.FiltraParametros("Tipo = -1 OR Tipo =4 ")
|
||||
DdlSRINCcveControlIncapacidad.DataSource = dtperinc.FiltraParametros("Tipo = -1 OR Tipo =5 ")
|
||||
|
||||
DdlSRINCcveTipodeIncidencia.DataBind()
|
||||
DdlSRINCcveRamoSeguro.DataBind()
|
||||
DdlSRINCcveTipoRiesgo.DataBind()
|
||||
DdlSRINCcveSecuelaConsecuencia.DataBind()
|
||||
DdlSRINCcveControlIncapacidad.DataBind()
|
||||
End If
|
||||
|
||||
End Using
|
||||
End If
|
||||
DdlSRINCcveTipodeIncidencia.SelectedValue = "-1"
|
||||
DdlSRINCcveRamoSeguro.SelectedValue = "-1"
|
||||
DdlSRINCcveTipoRiesgo.SelectedValue = "-1"
|
||||
@@ -8355,7 +8375,7 @@ Partial Class RH_Personal
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaPersonalRefs()
|
||||
Protected Sub CargaPersonalCamposValoresGet()
|
||||
Dim ObjPers As New ClsNominas()
|
||||
ObjPers.PersonalCamposValoresGet(-1, CvePersonal)
|
||||
GVPersonalRefs.DataSource = ObjPers.DtResultados
|
||||
@@ -8379,7 +8399,7 @@ Partial Class RH_Personal
|
||||
Protected Sub LnkMostrarCamposValor_Click(sender As Object, e As EventArgs)
|
||||
ltlPerstitulo.Text = "Campos valores"
|
||||
LimpiaPersonalRefs()
|
||||
|
||||
CargaPersonalCamposValoresGet()
|
||||
RegistraScript("$('#DModalPersonalRefs').modal()")
|
||||
BtnPersADD.Visible = False
|
||||
PanelMostrarpersonalcampos.Visible = True
|
||||
@@ -8403,6 +8423,11 @@ Partial Class RH_Personal
|
||||
Dim Continuar As Boolean = ObjPers.PersonalCamposValoresAddUp(cveReferencia, CvePersonal, valor)
|
||||
ObjPers.Dispose()
|
||||
If (Continuar) Then
|
||||
BtnPersADD.Visible = False
|
||||
PanelMostrarpersonalcampos.Visible = True
|
||||
PanelADDpersonalcampos.Visible = False
|
||||
|
||||
CargaPersonalCamposValoresGet()
|
||||
LimpiaPersonalRefs()
|
||||
UPModalPers.Update()
|
||||
Alert("El campo valor se ha agregado")
|
||||
@@ -8415,7 +8440,7 @@ Partial Class RH_Personal
|
||||
Dim Continuar As Boolean = ObjPers.PersonalCamposValoresRemove(CcveReferencia, CvePersonal)
|
||||
ObjPers.Dispose()
|
||||
If (Continuar) Then
|
||||
CargaPersonalRefs()
|
||||
CargaPersonalCamposValoresGet()
|
||||
Alert("El campo valor se ha eliminado")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
<div class="divContainerads">
|
||||
<asp:GridView ID="GvMultiple" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false"
|
||||
CssClass="table table-striped table-advance table-hover adssigscroll" data-cols="2" data-heightmenos="300" data-sort="true" EmptyDataText="No se encontraron registros"
|
||||
OnRowCreated="GvMultiple_RowCreated" OnRowDataBound="GvMultiple_RowDataBound">
|
||||
OnRowCreated="GvMultiple_RowCreated" OnRowDataBound="GvMultiple_RowDataBound" HeaderStyle-CssClass="ADtr">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="35px">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -1579,7 +1579,7 @@
|
||||
|
||||
let total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia;
|
||||
|
||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||
if (<%= If(UsuarioActual.Empresa.Funcionalidad(382) = "1", 1, 0)%> == 1) {
|
||||
let totalAnticipos = $get("TxtNCDev") ? ToDouble($get("TxtNCDev").value) : 0;
|
||||
TotalOtrosContado = $get("TxtImporteOtrosContado") ? ToDouble($get("TxtImporteOtrosContado").value) : 0;
|
||||
|
||||
|
||||
@@ -8857,7 +8857,7 @@ Partial Class Ventas
|
||||
|
||||
If Not EsCreaApartirDe Then
|
||||
'Si es una devolucion
|
||||
If NuevaFactura <= 0 Then
|
||||
If NuevaFactura = 0 Then
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").Enabled = False
|
||||
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
||||
e.Row.FCDropDownLost("DdlPS").Enabled = False
|
||||
@@ -17006,7 +17006,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa <> 189 AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Rem") AndAlso DivAlmacen.Visible AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
|
||||
If (Not UsuarioActual.CveEmpresa.Contiene(189, 197)) AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Rem") AndAlso DivAlmacen.Visible AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
|
||||
|
||||
Dim DebeGenerarMovimiento As Boolean = TmpDTDetalle.COUNT("CvePS", "CveTipoPS = 2") > 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user