Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="portlet box blue-hoki">
|
||||
@@ -58,7 +58,7 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:TextBox ID="hdnTotal" runat="server" Style="text-align: right; display: none;" AutoComplete="off" Width="145px"></asp:TextBox>
|
||||
<hr />
|
||||
<div class="row" id="divTipoDevolucion" runat="server" visible="false" style="margin-top: -20px;">
|
||||
<div class="col-md-12">
|
||||
@@ -333,9 +333,10 @@
|
||||
} else {
|
||||
txt.value = "";
|
||||
}
|
||||
|
||||
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
|
||||
|
||||
let valor = FormatoNumero(SumaValores(), 2);
|
||||
$('#hdnTotal').val(valor);
|
||||
$get('TxtImporte').value = valor;
|
||||
|
||||
}
|
||||
|
||||
function FnCambia(chk, txt, saldo, op, text) {
|
||||
@@ -353,7 +354,9 @@
|
||||
}
|
||||
}
|
||||
var Suma = SumaValores();
|
||||
$get('TxtImporte').value = FormatoNumero(Suma, 2);
|
||||
let valor = FormatoNumero(SumaValores(), 2);
|
||||
$('#C_hdnTotal').val(valor);
|
||||
$get('TxtImporte').value = valor;
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtComisiones').value * -1)), 2);
|
||||
|
||||
@@ -344,12 +344,26 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
return;
|
||||
}
|
||||
|
||||
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2 && TxtValor.Text == "")
|
||||
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
|
||||
{
|
||||
Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
if (TxtValor.Text == "")
|
||||
{
|
||||
Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
int valor = (TxtValor.Text.ToEntero() * TxtVecesAplicar.Text.ToEntero()).ToEntero();
|
||||
int total = hdnTotal.Text.ToEntero();
|
||||
if (valor <> total)
|
||||
{
|
||||
Alert("La cantidad total debe ser igual a lo seleccionado");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
ClsBancos ObjIE = new ClsBancos();
|
||||
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());
|
||||
ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL());
|
||||
|
||||
@@ -183,20 +183,26 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), DdlEjercicio.SelectedValue).ToDate
|
||||
Dim FechaF = FechaI.LastDayOfMonth
|
||||
Dim DtCuentas As New DataTable
|
||||
|
||||
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then
|
||||
DtCuentas = ObjConpaq.DtResultados
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Dim objconta As New ClsContabilidad
|
||||
If objconta.GetBalanzaComprobacion(FechaI, FechaF, UsuarioActual.CveEmpresa) Then
|
||||
DtCuentas = objconta.DtResultados
|
||||
End If
|
||||
objconta.Dispose()
|
||||
Else
|
||||
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then
|
||||
DtCuentas = ObjConpaq.DtResultados
|
||||
End If
|
||||
ObjConpaq.Dispose()
|
||||
End If
|
||||
ObjConpaq.Dispose()
|
||||
|
||||
|
||||
If DtCuentas IsNot Nothing AndAlso DtCuentas.Rows.Count > 0 Then
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
'CABECERA
|
||||
Str.Append("<?xml version=""1.0"" encoding=""UTF-8""?>")
|
||||
Str.Append("<BCE:Balanza xsi:schemaLocation=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/BalanzaComprobacion BalanzaComprobacion_1_1.xsd"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" Version=""1.1"" ")
|
||||
Str.Append("<BCE:Balanza xsi:schemaLocation=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/BalanzaComprobacion/BalanzaComprobacion_1_1.xsd"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" Version=""1.1"" ")
|
||||
Str.AppendFormat("RFC=""{0}"" ", UsuarioActual.Empresa.RFC)
|
||||
Str.AppendFormat("Mes=""{0}"" ", DdlPeriodo.SelectedValue)
|
||||
Str.AppendFormat("Anio=""{0}"" ", DdlEjercicio.SelectedValue)
|
||||
@@ -212,11 +218,11 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
'DETALLES
|
||||
For Each Dr As DataRow In DtCuentas.Rows
|
||||
Str.Append("<BCE:Ctas ")
|
||||
Str.AppendFormat("NumCta=""{0}"" ", Dr("NumCta"))
|
||||
Str.AppendFormat("SaldoIni=""{0}"" ", Dr("SaldoIni"))
|
||||
Str.AppendFormat("Debe=""{0}"" ", Dr("Debe"))
|
||||
Str.AppendFormat("Haber=""{0}"" ", Dr("Haber"))
|
||||
Str.AppendFormat("SaldoFin=""{0}"" ", Dr("SaldoFin"))
|
||||
Str.AppendFormat("NumCta=""{0}"" ", Dr("NumCta").ToString)
|
||||
Str.AppendFormat("SaldoIni=""{0}"" ", Dr("SaldoIni").ToString)
|
||||
Str.AppendFormat("Debe=""{0}"" ", Dr("Debe").ToString)
|
||||
Str.AppendFormat("Haber=""{0}"" ", Dr("Haber").ToString)
|
||||
Str.AppendFormat("SaldoFin=""{0}"" ", Dr("SaldoFin").ToString)
|
||||
Str.Append("/>")
|
||||
Next
|
||||
|
||||
@@ -225,7 +231,6 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
'FIN
|
||||
Str.Append("</BCE:Balanza>")
|
||||
|
||||
|
||||
'GUARDA ARHIVO
|
||||
ArchivoBalanza = Server.MapPath(String.Format("~/Empresas/{0}/ContabilidadElectronica/{1}{2}{3}BN.xml", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c)))
|
||||
|
||||
|
||||
@@ -369,9 +369,14 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIFD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<div style="display: inline-block;" id="SumFiltra"></div>
|
||||
</div>
|
||||
<asp:GridView ID="GvIFD" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle, CvePS, SerieLote, Lote, FechaCaducidad, Cantidad, CveUnidadMedida" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
|
||||
<asp:GridView ID="GvIFD" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle, CvePS, SerieLote, Lote, FechaCaducidad, Cantidad, CveUnidadMedida, AplicaSerie, AplicaLote, AplicaCaducidad" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaInvFisico" DataFormatString="{0:g}"></asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" ID="ltlFecha" Text='<%#Eval("FechaInvFisico")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle Width="160px"/>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
@@ -380,15 +385,15 @@
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false" DataFormatString="{0:d}"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:BoundField HeaderText="Mal Estado" DataField="MalEstado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="No Vendible" DataField="NoVendible" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
|
||||
<asp:TemplateField HeaderText="Comandos" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Estas seguro que desea eliminar el registro?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"/>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -296,10 +296,14 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
Dim Inventario As New ClsInventarios
|
||||
If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then
|
||||
If Inventario.DtResultados.Rows.Count > 0 Then
|
||||
GvIFD.Columns(1).Visible = Inventario.DtResultados.MAX("CodigoBarras") <> ""
|
||||
GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen", "CveSeccionAlmacen IS NOT NULL").ToEntero > 0
|
||||
GvIFD.Columns(5).Visible = Inventario.DtResultados.MAX("SerieLote") <> ""
|
||||
GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> ""
|
||||
GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad", "FechaCaducidad IS NOT NULL").ToDate > MinFecha
|
||||
GvIFD.Columns(9).Visible = Inventario.DtResultados.MAX("MalEstado", "MalEstado IS NOT NULL").ToEntero > 0
|
||||
GvIFD.Columns(10).Visible = Inventario.DtResultados.MAX("NoVendible", "NoVendible IS NOT NULL").ToEntero > 0
|
||||
|
||||
GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable
|
||||
Else
|
||||
GvIFD.DataSource = Nothing
|
||||
@@ -648,15 +652,19 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
Private Sub LnkExcelUniverso_Click(sender As Object, e As EventArgs) Handles LnkExcelUniverso.Click
|
||||
Dim IncluyePS, ExcluyePS, IncluyeClasificacion, ExcluyeClasificacion, IncluyeProveedor As New StringBuilder
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
|
||||
Dim DtPS As DataTable
|
||||
If ObjInventario.GetInventarioFisicoUniversoProductos(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
DtPS = ObjInventario.DtResultados.FiltraParametros("", "", {"Codigo", "PS", "Clasificacion", "RazonSocial"})
|
||||
Else
|
||||
Alert("Error al consultar la informacion")
|
||||
End If
|
||||
End If
|
||||
Dim NombreArchivo As String
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim workbook As New ExcelFile()
|
||||
Dim worksheet = workbook.Worksheets.Add("Productos")
|
||||
worksheet.InsertDataTable(ObjInventario.DtResultados, New InsertDataTableOptions() With
|
||||
worksheet.InsertDataTable(DtPS, New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0,
|
||||
@@ -726,9 +734,13 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
HfCvePS.Value = GvRow.DataKey("CvePS").ToString
|
||||
HfCveUM.Value = GvRow.DataKey("CveUnidadMedida").ToString
|
||||
|
||||
TxtSerieLote.Text = GvRow.DataKey("SerieLote").ToString
|
||||
TxtLoteEdit.Text = GvRow.DataKey("Lote").ToString
|
||||
TxtFechaCaducida.Text = GvRow.DataKey("FechaCaducidad").ToString
|
||||
TxtSerieLote.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaSerie").ToString), GvRow.DataKey("SerieLote").ToString, "")
|
||||
TxtLoteEdit.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaLote").ToString), GvRow.DataKey("Lote").ToString, "")
|
||||
TxtFechaCaducida.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaCaducidad").ToString), If(GvRow.DataKey("FechaCaducidad").ToString <> "", GvRow.DataKey("FechaCaducidad").ToString.ToDate.ToShortDateString, ""), "")
|
||||
|
||||
TxtSerieLote.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaSerie").ToString)
|
||||
TxtLoteEdit.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaLote").ToString)
|
||||
TxtFechaCaducida.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaCaducidad").ToString)
|
||||
TxtCantidad.Text = GvRow.DataKey("Cantidad").ToString
|
||||
UpEditarPS.Update()
|
||||
|
||||
|
||||
@@ -2110,14 +2110,16 @@ Partial Class OC
|
||||
DrPSValidar("Cantidad") = TxtCant.Text.Trim.ToDecimal
|
||||
DrPSValidar("PU") = txtPrecioUnitario.Text.Trim.ToDecimal
|
||||
dttemp.Rows.Add(DrPSValidar)
|
||||
|
||||
Dim dtPSInvalidos As String = ValidarPSContrato(dttemp)
|
||||
If dtPSInvalidos <> "" Then
|
||||
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then
|
||||
Dim dtPSInvalidos As String = ValidarPSContrato(dttemp)
|
||||
If dtPSInvalidos <> "" Then
|
||||
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If DtDetalle IsNot Nothing Then
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=DdlP2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
@@ -2485,12 +2487,15 @@ Partial Class OC
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
Dim dtPSInvalidos As String = ValidarPSContrato(DtDetalle.FiltraParametros("", "", {"CveSubProyecto", "CvePS", "Cantidad", "PU"}))
|
||||
If dtPSInvalidos <> "" Then
|
||||
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
||||
TieneError = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then
|
||||
Dim dtPSInvalidos As String = ValidarPSContrato(DtDetalle.FiltraParametros("", "", {"CveSubProyecto", "CvePS", "Cantidad", "PU"}))
|
||||
If dtPSInvalidos <> "" Then
|
||||
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Return TieneError
|
||||
End Function
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
Reference in New Issue
Block a user