This commit is contained in:
Oscar Irigoyen
2023-03-04 09:46:57 -07:00
13 changed files with 404 additions and 432 deletions

View File

@@ -73,20 +73,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
ViewState["IDCtaContableAcreedorComplementaria"] = value;
}
}
private bool UsaComplementaria
{
get
{
return Convert.ToBoolean(ViewState["UsaComplementaria"]);
}
set
{
ViewState["UsaComplementaria"] = value;
}
}
private int CveMonedaCuentaPago
{
get
@@ -110,10 +97,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
UsaComplementaria = true;
{
CveMonedaCuentaPago = 0;
rowComisiones.Visible = UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122);
rowComisiones.Visible = true;
CargaTipoTransaccion();
CargaCuentas();
@@ -318,17 +304,13 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (CveIE > 0)
{
//GUARDA COMPROBANTE
if (!filemove.Equals(""))
{
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
}
decimal Importe;
decimal ImporteMN;
decimal ImporteComision;
decimal ImporteComisionMN;
decimal AcumImporteMN = 0;
decimal ImportePago, ImporteAcreedor;
decimal ImporteBancosMN, ImporteAcreedorMN;
bool TipoMovtoComision = false;
int IdCtaContableOtrosGastos = 0;
int CveConceptoDiferenciaCambiaria = 0;
@@ -339,7 +321,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
Importe = gvr.FCTextBox("TxtAbonar").Text.ToDecimal();
ImporteComision = gvr.FCTextBox("TxtComision").Text.ToDecimal();
ImporteMN = Importe;
ImporteAcreedor = Importe; ImportePago = Importe;
ImporteAcreedorMN = Importe;
ImporteBancosMN = Importe;
ImporteComisionMN = ImporteComision;
ImporteComplementaria = 0;
@@ -354,63 +337,47 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{
TipoMovtoComision = false;
IdCtaContableOtrosGastos = UsuarioActual.Empresa.Funcionalidad(266).ToEntero();
}
Decimal TC = gvr.DataKey("TipoCambio").ToDecimal();
if (gvr.DataKey("FechaDocumento").ToDate().Month != TxtFechaDocumento.Text.ToDate().Month || gvr.DataKey("FechaDocumento").ToDate().Year != TxtFechaDocumento.Text.ToDate().Year)
{
TC = get_GlobalTipoCambio(TxtFechaDocumento.Text.ToDate().AddMonths(-1).LastDayOfMonth()).ToDecimal();
}
}
if (gvr.FCCheckBox("Chk").Checked)
{
int tCveMoneda = gvr.DataKey("CveMoneda").ToEntero();
if (CveMonedaPago == 1 && tCveMoneda == 1)
Decimal TC = gvr.DataKey("TipoCambio").ToDecimal();
int tCveMoneda = gvr.DataKey("CveMoneda").ToEntero();
//Verifica Fluctuación mensual
if (tCveMoneda > 1 && gvr.DataKey("FechaDocumento").ToDate() < TxtFechaDocumento.Text.ToDate().FirstDayOfMonth())
{
ImporteMN = Importe;
ImporteComisionMN = ImporteComision;
ImportePago = Importe;
TC = get_GlobalTipoCambio(TxtFechaDocumento.Text.ToDate().AddMonths(-1).LastDayOfMonth()).ToDecimal();//obtengo el TC del mes anterior del pago
}
else if (CveMonedaPago == 1 && tCveMoneda == 2)
{
ImporteComisionMN = ImporteComision;
ImportePago = (Importe * TCPago).RoundSQL();
if (UsaComplementaria)
{
ImporteMN = Importe;
ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
}
else
{
ImporteMN = Importe * TC;
ImporteComplementaria = 0;
}
}
else if (CveMonedaPago == 2 && tCveMoneda == 1)
{
ImporteBancosMN = (Importe * TCPago).RoundSQL();
ImporteAcreedorMN = (Importe * TC).RoundSQL();
ImporteMN = Importe;
ImporteComisionMN = ImporteComision;
ImporteComplementaria = 0;
}
else if (CveMonedaPago == 2 && tCveMoneda == 2)
{
ImporteComisionMN = ImporteComision;
if (UsaComplementaria)
{
ImporteMN = Importe;
ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
}
else
{
ImporteMN = (Importe * TC).RoundSQL();
ImporteComplementaria = 0;
}
}
//if (CveMonedaPago == 1 && tCveMoneda == 1)
//{
// ImporteMN = Importe;
// ImporteComisionMN = ImporteComision;
//}
//else if (CveMonedaPago == 1 && tCveMoneda == 2)
//{
// ImporteComisionMN = ImporteComision;
// ImporteMN = Importe;
// ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
//}
//else if (CveMonedaPago == 2 && tCveMoneda == 1)
//{
// ImporteMN = Importe;
// ImporteComisionMN = ImporteComision;
// ImporteComplementaria = 0;
//}
//else if (CveMonedaPago == 2 && tCveMoneda == 2)
//{
// ImporteComisionMN = ImporteComision;
// ImporteMN = Importe;
// ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
//}
ImporteMN = ImporteMN.RoundSQL();
ImporteComplementaria = ImporteComplementaria.RoundSQL();
//ImporteMN = ImporteMN.RoundSQL();
//ImporteComplementaria = ImporteComplementaria.RoundSQL();
ImporteComisionMN = ImporteComisionMN.RoundSQL();
ImporteComision = ImporteComision.RoundSQL();
AcumImporteMN += ImporteMN;
@@ -426,13 +393,14 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
break;
}
if (UsaComplementaria && tCveMoneda > 1 && MsgError == "")
if (tCveMoneda > 1 && MsgError == "")
{
ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePrestamoComplementario, Conc, DateTime.Now, IDCtaContableAcreedorComplementaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
MsgError = "No se pudo insertar concepto de acreedor complementaria";
}
if (ImportePago != ImporteAcreedor && MsgError == "")
if (ImporteBancosMN != ImporteAcreedorMN && MsgError == "")
{
bool TipoMovto = false;
int IdCtaContableDiferenciaCambiaria = 0;
@@ -440,24 +408,23 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{
CveConceptoDiferenciaCambiaria = 65;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
TipoMovto = false;
Importe = (Importe * TCPago) - (Importe * TC);
TipoMovto = false;
}
else if (TCPago < TC)
{
CveConceptoDiferenciaCambiaria = 64;
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
TipoMovto = true;
Importe = (Importe * TC) - (Importe * TCPago);
}
ImporteMN = Importe;
Importe = ((Importe * TCPago) - (Importe * TC)).Abs();
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Ref, CveConceptoDiferenciaCambiaria, Conc, DateTime.Now, IdCtaContableDiferenciaCambiaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Ref, CveConceptoDiferenciaCambiaria, Conc, DateTime.Now, IdCtaContableDiferenciaCambiaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: Importe, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
MsgError = "No se pudo insertar concepto de diferencia cambiaria";
}
if (ImporteComisionMN > 0 && MsgError == "")
if (ImporteComision != 0 && MsgError == "")
{
ImporteComisionMN = (ImporteComision * TCPago).RoundSQL();
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, Ref, 255, Conc, DateTime.Now, IdCtaContableOtrosGastos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComisionMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de pago acreedor";
@@ -468,46 +435,18 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
}
if (CveMonedaPago != 1)
{
if (UsaComplementaria)
{
ImporteMNBanco = ImporteBanco;
{
ImporteComplementaria = (ImporteBanco * TCPago - ImporteBanco).RoundSQL();
}
else
{
ImporteMNBanco = (ImporteBanco * TCPago).RoundSQL();
ImporteComplementaria = 0;
}
}
if (MsgError == "" && !ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 30, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMNBanco, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos";
if (MsgError == "" && !ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 30, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteBanco, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos";
//movimiento de ajuste por sino se aplicó en el proceso anterior
if (MsgError == "" && CveMonedaPago != 1 && UsaComplementaria )
if (MsgError == "" && CveMonedaPago != 1 )
{
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 204, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos complementaria";
}
if (AcumImporteMN != (ImporteBanco + ImporteComplementaria) && CveConceptoDiferenciaCambiaria == 0)
{
int tCveConceptoOtIngresos = 0;
bool TipoMovtoOt = false;
decimal Dif = AcumImporteMN - (ImporteBanco + ImporteComplementaria);
if (Dif < 0)
{
tCveConceptoOtIngresos = 65; TipoMovtoOt = false;
}
else
{
tCveConceptoOtIngresos = 64; TipoMovtoOt = true;
}
if (MsgError == "" && !ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOt, Dif.Abs(), Ref, tCveConceptoOtIngresos, Conc, DateTime.Now, 0, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: Dif.Abs(), ImporteME: Dif.Abs(), TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de ajuste en redondeo";
}
}
}
}
else
@@ -561,6 +500,11 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
Msg.AppendFormat("El Documento se guardo correctamente. Folio <b><a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>{1}</a></b> <br/>", CveIE, ObjIE.Folio);
}
//GUARDA COMPROBANTE
if (!filemove.Equals(""))
{
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
}
System.IO.FileInfo archivo = null;
if (DdlTipoTransaccion.SelectedValue.ToEntero().Contiene(2, 8, 9))
@@ -726,18 +670,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (CveMoneda != 1)
{
if (UsaComplementaria)
{
ImporteMN = Importe;
ImporteComplementaria = Importe * TC - Importe;
}
else
{
ImporteMN = Importe * TC;
ImporteComplementaria = 0;
}
ImporteComplementaria = Importe * TC - Importe;
}
@@ -761,18 +695,16 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePrestamo, Conc, DateTime.Now, IDCtaContableAcreedorExtranjera, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteMN, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de acreedor";
}
if (UsaComplementaria)
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de bancos complementaria";
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePrestamoComplementario, Conc, DateTime.Now, IDCtaContableAcreedorComplementaria, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de acreedor complementaria";
}
MsgError = "No se pudo insertar concepto de bancos complementaria";
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePrestamoComplementario, Conc, DateTime.Now, IDCtaContableAcreedorComplementaria, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de acreedor complementaria";
}
}
else
{

View File

@@ -8,10 +8,10 @@
display: none;
}
.page-bar .page-breadcrumb{
.page-bar .page-breadcrumb {
display: none !important;
}
.portlet-title .font-green, .portlet-title .font-green a {
color: #3598dc !important;
}
@@ -42,90 +42,89 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upDatosTipo" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet light bordered" style="margin-bottom: 0px; padding: 0px;" id="form_wizard_1">
<ContentTemplate>
<div class="portlet light xspadding bordered" style="margin-bottom: 0px; padding: 8px;" id="form_wizard_1">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject font-green bold uppercase">Información
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject font-green bold uppercase">Información
<asp:Literal ID="LtlPeriodoseleccionado" runat="server"></asp:Literal></span>
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<%--<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>--%>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div style="float: right;">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEmpaque.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEmpaque.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<%--<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>--%>
</div>
<div class="actions">
<div class="btn-group">
<div>
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEmpaque.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEmpaque.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
</div>
<div class="portlet-body form">
<asp:GridView ID="GvEmpaque" runat="server" GridLines="None" CssClass="table table-hover table-striped GvEmpaque ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
DataKeyNames="CveEmpaque,Empaque,Estatus,FechaIng,CveUsuario,Usuario,CveEmpresa,Empresa,CostoXTonelada,CostoPreEnfriado,Lleno,Sencillo,TermoLleno,TermoSencillo">
<Columns>
<asp:TemplateField HeaderText="Empaque" ItemStyle-HorizontalAlign="Left" Visible="true">
<ItemTemplate>
<asp:Label ID="lbltipoEtiqueta" runat="server" Text='<%# Eval("Empaque")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Costo X Tonelada" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblCostoXTonelada" runat="server" Text='<%# Eval("CostoXTonelada")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Costo PreEnfriado" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblCostoPreEnfriado" runat="server" Text='<%# Eval("CostoPreEnfriado")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Full" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblFull" runat="server" Text='<%# Eval("Lleno")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sencillo" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblSencillo" runat="server" Text='<%# Eval("Sencillo")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TermoFull" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblTermoFull" runat="server" Text='<%# Eval("TermoLleno")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TermoSencillo" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblTermoSencillo" runat="server" Text='<%# Eval("TermoSencillo")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="100px" >
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-CssClass="centerclass" ItemStyle-Width="100px" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:TemplateField HeaderText="Usuario" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblusuario" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px" HeaderText="Comandos">
<ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditarTipo_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
<asp:LinkButton ID="imgD" runat="server" OnClick="LnkEliminarTipo_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el TiposEtiqueta?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:GridView ID="GvEmpaque" runat="server" GridLines="None" CssClass="table table-hover table-striped GvEmpaque ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
DataKeyNames="CveEmpaque,Empaque,Estatus,FechaIng,CveUsuario,Usuario,CveEmpresa,Empresa,CostoXTonelada,CostoPreEnfriado,Lleno,Sencillo,TermoLleno,TermoSencillo">
<Columns>
<asp:TemplateField HeaderText="Empaque" ItemStyle-HorizontalAlign="Left" Visible="true">
<ItemTemplate>
<asp:Label ID="lbltipoEtiqueta" runat="server" Text='<%# Eval("Empaque")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Costo X Tonelada" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblCostoXTonelada" runat="server" Text='<%# Eval("CostoXTonelada")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Costo PreEnfriado" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblCostoPreEnfriado" runat="server" Text='<%# Eval("CostoPreEnfriado")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Full" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblFull" runat="server" Text='<%# Eval("Lleno")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sencillo" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblSencillo" runat="server" Text='<%# Eval("Sencillo")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TermoFull" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblTermoFull" runat="server" Text='<%# Eval("TermoLleno")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TermoSencillo" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblTermoSencillo" runat="server" Text='<%# Eval("TermoSencillo")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="100px">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-CssClass="centerclass" ItemStyle-Width="100px" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:TemplateField HeaderText="Usuario" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblusuario" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px" HeaderText="Comandos">
<ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditarTipo_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
<asp:LinkButton ID="imgD" runat="server" OnClick="LnkEliminarTipo_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el TiposEtiqueta?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div></div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DModalTiposEtiqueta" class="modal ADS fade" role="dialog">

View File

@@ -8,9 +8,22 @@
display: none;
}
.page-bar .page-breadcrumb{
.page-bar .page-breadcrumb {
display: none !important;
}
.portlet-title .font-green, .portlet-title .font-green a {
color: #3598dc !important;
}
.GVCGame_TipoMaduracion th {
text-align: left !important;
}
.GVCGame_TipoMaduracion th.centerclass {
text-align: center !important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
@@ -31,77 +44,89 @@
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upDatosHuer" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet light" style="margin-bottom: 0px; padding: 0px;" id="form_wizard_1">
<div class="portlet-title">
<div class="caption ">
<i class="fa fa-bookmark font-green"></i>
<span class="caption-subject font-green bold uppercase">Información
<asp:Literal ID="LtlPeriodoseleccionado" runat="server"></asp:Literal></span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<%--<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>--%>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div style="float: right;">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVHuerta.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVHuerta.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="portlet light xspadding bordered" style="margin-bottom: 0px; padding: 8px;" id="form_wizard_1">
<div class="portlet-title">
<div class="caption ">
<i class="fa fa-bookmark font-green"></i>
<span class="caption-subject font-green bold uppercase">Información
<asp:Literal ID="LtlPeriodoseleccionado" runat="server"></asp:Literal></span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<%--<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>--%>
</div>
<div class="actions">
<div class="btn-group">
<div>
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVHuerta.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVHuerta.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
</div>
<div class="portlet-body form">
<asp:GridView ID="GVHuerta" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
DataKeyNames="CveHuerta,Huerta,CveProveedor,RazonSocial,FechaIng,Estatus,CveUsuario,Usuario,CveEmpresa,Empresa,TipoCobro,Importe,CostoXTonelada" OnRowDataBound="GvHuerta_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="Huerta" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblhuerta" runat="server" Text='<%# Eval("Huerta")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" Visible="false">
<ItemTemplate>
<asp:Label ID="lblrazonsocial" runat="server" Text='<%# Eval("RazonSocial")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Cobro" ItemStyle-HorizontalAlign="Left" Visible="false">
<ItemTemplate>
<asp:Label ID="LblTipoCobro" runat="server" Text='<%# Eval("TipoCobro")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblImporte" runat="server" Text='<%# Eval("Importe")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Costo X Tonelada E.M.P." ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblCostoXTonelada" runat="server" Text='<%# Eval("CostoXTonelada")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-Width="15%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblusuario" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
<ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditarHuer_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
<asp:LinkButton ID="imgD" runat="server" OnClick="LnkEliminarHuer_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Huerta?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView></div></div>
<asp:GridView ID="GVHuerta" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD GVCGame_TipoMaduracion mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
DataKeyNames="CveHuerta,Huerta,CveProveedor,RazonSocial,FechaIng,Estatus,CveUsuario,Usuario,CveEmpresa,Empresa,TipoCobro,Importe,CostoXTonelada" OnRowDataBound="GvHuerta_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="Huerta" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblhuerta" runat="server" Text='<%# Eval("Huerta")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre de Registro" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblhuerta2" runat="server" Text='<%# Eval("NombreRegistro")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Número de Registro" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblhuerta3" runat="server" Text='<%# Eval("NumeroRegistro")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" Visible="false">
<ItemTemplate>
<asp:Label ID="lblrazonsocial" runat="server" Text='<%# Eval("RazonSocial")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Cobro" ItemStyle-HorizontalAlign="Left" Visible="false">
<ItemTemplate>
<asp:Label ID="LblTipoCobro" runat="server" Text='<%# Eval("TipoCobro")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblImporte" runat="server" Text='<%# Eval("Importe")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Costo X Tonelada E.M.P." ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:Label ID="LblCostoXTonelada" runat="server" Text='<%# Eval("CostoXTonelada")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-Width="15%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblusuario" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
<ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditarHuer_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
<asp:LinkButton ID="imgD" runat="server" OnClick="LnkEliminarHuer_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el Huerta?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DModalHuerta" class="modal ADS fade" role="dialog">
@@ -119,6 +144,14 @@
<ajax:ValidatorCalloutExtender ID="VcoHuerhuerta" runat="server" HighlightCssClass="vco" TargetControlID="RfvHuerhuerta"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtHuerhuerta.ClientID.ToString()%>">Productor:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreRegistro" CssClass="form-control" runat="server"></asp:TextBox>
<label for="<%= TxtNombreRegistro.ClientID.ToString()%>">Nombre de Registro:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroRegistro" CssClass="form-control" runat="server"></asp:TextBox>
<label for="<%= TxtNumeroRegistro.ClientID.ToString()%>">Número de Registro:</label>
</div>
<div class="form-group form-md-line-input input-iconright ocultar">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control select2me " runat="server" DataTextField="RazonSocial" AppendDataBoundItems="true" DataValueField="CveProveedor" Style="width: 100%"></asp:DropDownList>
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor:</label>

View File

@@ -21,8 +21,19 @@
{
if (!IsPostBack){
CargaProveedor();
CargaHuerta();
}
CargaHuerta();
}
}
protected void CargaHuerta()
{
ClsCGame ObjHuer =new ClsCGame();
if (ObjHuer.GetHuerta(UsuarioActual.CveEmpresa))
{
GVHuerta.DataSource = ObjHuer.DtResultados;
GVHuerta.DataBind();
}
ObjHuer.Dispose();
upDatosHuer.Update();
}
protected void CargaProveedor()
{
@@ -47,12 +58,12 @@
TxtCostoXTonelada.Text = "";
DdlProveedor.SelectedIndex = 0;
if (DdlProveedor.Items.Count > 2)
}
{
DdlProveedor.SelectedIndex = 2;
}
DdlTipoCobro.SelectedIndex = 0;
UPModalHuer.Update();
{
}
protected void LnkEditarHuer_Click(object sender, EventArgs e)
{
LimpiaHuerta();

View File

@@ -11,12 +11,15 @@
.GVProductos th {
text-align: left !important;
}
.GVProductos th {
text-align: left !important;
}
.GVProductos th.centerclass {
text-align: center !important;
}
.portlet-title .font-green, .portlet-title .font-green a {
.portlet-title .font-green, .portlet-title .font-green a {
color: #3598dc !important;
}
</style>
@@ -40,7 +43,7 @@
<asp:UpdatePanel ID="upDatosProd" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet light portlet bordered " style="margin-bottom: 0px; padding: 0px;" id="form_wizard_1">
<div class="portlet light portlet xspadding bordered " style="margin-bottom: 0px; padding: 8px;" id="form_wizard_1">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
@@ -54,15 +57,13 @@
</div>
<div class="actions">
<div class="btn-group">
<div>
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVProductos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVProductos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div style="float: right;">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVProductos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVProductos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<div class="portlet-body form">
@@ -74,12 +75,12 @@
<asp:Label ID="lblpS" runat="server" Text='<%# Eval("PS")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="100px" >
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" HeaderStyle-CssClass="centerclass" ItemStyle-Width="100px" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="FechaIng" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="Fecha de Ingreso" DataFormatString="{0:d}" />
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="200px">
<ItemTemplate>
<asp:Label ID="lblusuario" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>

View File

@@ -114,12 +114,12 @@ public partial class CATProductos : ClsPaginas
if (Convert.ToBoolean(e.Row.DBCampo("Estatus")) == true)
{
e.Row.FCLabel("lblestatus").Text = "Activo";
e.Row.FCLabel("lblestatus").ForeColor = System.Drawing.Color.Green;
//e.Row.FCLabel("lblestatus").ForeColor = System.Drawing.Color.Green;
}
else
{
e.Row.FCLabel("lblestatus").Text = "Inactivo";
e.Row.FCLabel("lblestatus").ForeColor = System.Drawing.Color.Red;
//e.Row.FCLabel("lblestatus").ForeColor = System.Drawing.Color.Red;
}
}
}

View File

@@ -41,7 +41,7 @@
<asp:UpdatePanel ID="upDatosCGam" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet light bordered" style="margin-bottom: 0px; padding: 0px;" id="form_wizard_1">
<div class="portlet light xspadding bordered" style="margin-bottom: 0px; padding: 8px;" id="form_wizard_1">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
@@ -55,14 +55,12 @@
</div>
<div class="actions">
<div class="btn-group">
<div>
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVCGame_TipoMaduracion.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVCGame_TipoMaduracion.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div style="float: right;">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVCGame_TipoMaduracion.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVCGame_TipoMaduracion.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<div class="portlet-body form">
<asp:GridView ID="GVCGame_TipoMaduracion" EmptyDataText="No hay tipos de maduración registrados." runat="server" GridLines="None"
@@ -79,12 +77,12 @@
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("PS")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="100px" >
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="left" ItemStyle-Width="100px">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# If(CBool(Eval("Estatus")), "Activo", "Inactivo")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Fecha Ingreso" ItemStyle-CssClass="centerclass" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" />
<asp:BoundField HeaderText="Fecha Ingreso" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="left" DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" />
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="200px">
<ItemTemplate>
<asp:Label ID="lblusuario" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>

View File

@@ -526,6 +526,7 @@
<asp:ListItem Text="Apoyo Logístico" Value="9"></asp:ListItem>
<asp:ListItem Text="NC Por Devolución" Value="11"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="form-group proveedoreespes" runat="server" id="divImportacion" visible="false">
@@ -540,6 +541,7 @@
<asp:DropDownList ID="DdlFolioGarantia" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="FolioGarantia" DataValueField="CveFolioGarantia" OnSelectedIndexChanged="DdlFolioGarantia_SelectedIndexChanged" CssClass="form-control input-sm input-small select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Button ID="BtnFolioGarantiaRestantes" runat="server" Text="Resta" CssClass="default" OnClick="BtnFolioGarantiaRestantes_Click" />
</div>
</div>
</div>

View File

@@ -1248,15 +1248,6 @@ Partial Class Compras_Compras
btnProrateo2.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then 'cuando es emp acumuladora AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV")
divFolioGarantia.Visible = True
Using objAcum As New ClsAcumuladores
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=-1, TipoFolio:="-1", Area:=-1, CveSubProyecto:=-1) Then
DdlFolioGarantia.DataSource = objAcum.DtResultados.FiltraParametros("", "FechaIng DESC")
DdlFolioGarantia.DataBind()
End If
End Using
End If
'****************************************************************
'If UsuarioActual.CveEmpresa = 72 Then
' LiRecepcion.Visible = True
@@ -1960,7 +1951,15 @@ Partial Class Compras_Compras
TxtSerie.Enabled = False
End If
'DdlTipoComprobante.Enabled = False
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then 'cuando es emp acumuladora
divFolioGarantia.Visible = True
Using objAcum As New ClsAcumuladores
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=2, TipoFolio:="-1", Area:=-1, CveSubProyecto:=-1) Then
DdlFolioGarantia.DataSource = objAcum.DtResultados.FiltraParametros("", "FechaIng DESC")
DdlFolioGarantia.DataBind()
End If
End Using
End If
'PERMISO PARA MODIFICACIÓN DE FECHA AUN CON FACTURA
TxtFecha.Enabled = UsuarioActual.TienePermisoProceso(216)
@@ -2842,6 +2841,12 @@ Partial Class Compras_Compras
TxtRembolsoNumero.Enabled = If(IdPoliza > 0, False, True)
If dr("CveFolioGarantia").ToString <> "" Then
divFolioGarantia.Visible = True
DdlFolioGarantia.Items.Insert(0, New ListItem(dr("FolioGarantia").ToString, dr("CveFolioGarantia").ToString))
DdlFolioGarantia.SelectedValue = dr("CveFolioGarantia").ToString
End If
'CargaDetalle
If ObjCompra.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then
TmpDT = ObjCompra.DtResultados
@@ -8137,9 +8142,9 @@ Partial Class Compras_Compras
End If
If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>. ", CvePrePoliza)
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>&nbsp;&nbsp; ", CvePrePoliza)
Dim TempParametros = Encripta(String.Format("OP=PREPO&CvePrePoliza={0}", CvePrePoliza))
Msg.Append($" <a class='Texto' target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={TempParametros}""> Imprimir PDF <i class='fa fa-file-pdf-o' aria-hidden='true'></i></a>")
Msg.Append($" <a class='Texto' target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={TempParametros}""> <i class='fa fa-file-pdf-o' aria-hidden='true'></i> Imprimir </a>")
@@ -9333,8 +9338,10 @@ Partial Class Compras_Compras
PSS.Dispose()
End If
Dim CvePersonal = GvPersonal.Rows(Cont).FCDropDownList("DdlPersonalGv").SelectedValue.ToEntero
Dim Referencia = GvPersonal.Rows(Cont).FCTextBox("TxtReferencia").Text
Dim CvePersonal As Integer = 0
If Cont < GvPersonal.Rows.Count Then CvePersonal = GvPersonal.Rows(Cont).FCDropDownList("DdlPersonalGv").SelectedValue.ToEntero
Dim Referencia As String
If Cont < GvPersonal.Rows.Count Then Referencia = GvPersonal.Rows(Cont).FCTextBox("TxtReferencia").Text
Cont = Cont + 1
'Si es AF-INSUMO se guarda en CveActivoFIjo
@@ -9391,8 +9398,6 @@ Partial Class Compras_Compras
End If
End If
End If
Next
For Each item As String In ClavesBorradas
@@ -9413,20 +9418,14 @@ Partial Class Compras_Compras
If Not ObjContabilidad.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa, UsuarioActual.Empresa, MinFecha, String.Format("{0}-{1}", Serie, Folio), ObjContaAC, pIDPoliza:=ViewState("IdPoliza").ToString.ToEntero) Then
Retorno = False
End If
End If
End If
Else
Retorno = False
End If
'Retorno = True
'Alert("La Compra se actualizó correctamente.")
Else
If IdPoliza > 0 Then
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
Retorno = False
@@ -9436,7 +9435,6 @@ Partial Class Compras_Compras
Retorno = False
End If
End If
End If
@@ -9685,9 +9683,27 @@ Partial Class Compras_Compras
'OBTIENE METODO DE CONTABILIZACIÓN AL GUARDAR
Dim ConceptoContabilizacionAlmacen = 0
Dim CveConceptoContableAlmacen = 0
If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
ConceptoContabilizacionAlmacen = ObjCompra.DtResultados.FiltroPrimeroValor("CveConceptoContableAlmacen").ToEntero
CveConceptoContableAlmacen = ObjCompra.DtResultados.FiltroPrimeroValor("CveConceptoContableAlmacen").ToEntero
If CveConceptoContableAlmacen = 0 Then
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
If (CveImportacion > 0 Or CveFlete > 0) Then
CveConceptoContableAlmacen = CveConceptoContableAlmacen
Else
CveConceptoContableAlmacen = 205
End If
If OCVinculada AndAlso DdlOCVinculaInv.Visible AndAlso Not (CveImportacion > 0 Or CveFlete > 0) Then
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
End If
If UsuarioActual.CveEmpresa.Contiene(72, 80, 140, 141, 152) And Not (CveImportacion > 0 Or CveFlete > 0) Then 'se comento, RMF. 2020.08.19, no le hallo sentido
CveConceptoContableAlmacen = 205
End If
Else
CveConceptoContableAlmacen = 225
End If
End If
End If
'AF
@@ -9716,7 +9732,7 @@ Partial Class Compras_Compras
'COSTO ALMACEN
Dim DtAlmacenes = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Or DdlTipoCompra.SelectedValue.ToEntero = 10 Then
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And CveConceptoContableAlmacen = 0 Or DdlTipoCompra.SelectedValue.ToEntero = 10 Then
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
@@ -9757,11 +9773,11 @@ Partial Class Compras_Compras
'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ]
If DdlTipoCompra.SelectedValue.ToEntero <> 10 AndAlso UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then
If DdlTipoCompra.SelectedValue.ToEntero <> 10 AndAlso UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And CveConceptoContableAlmacen.Contiene(176, 205) Then
importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
If ObjConta.GetRetCuenta(ConceptoContabilizacionAlmacen, UsuarioActual.CveEmpresa) Then
If ObjConta.GetRetCuenta(CveConceptoContableAlmacen, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
End If
@@ -9769,7 +9785,7 @@ Partial Class Compras_Compras
If importeMovimiento <> 0 Then
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, CveConceptoContableAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
ErrorPrepoliza = True
End If
End If
@@ -9778,11 +9794,11 @@ Partial Class Compras_Compras
'NC CON PRODUCTOS - CUENTA PUENTE
If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(225) Then
If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And CveConceptoContableAlmacen.Contiene(225) Then
importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
If ObjConta.GetRetCuenta(ConceptoContabilizacionAlmacen, UsuarioActual.CveEmpresa) Then
If ObjConta.GetRetCuenta(CveConceptoContableAlmacen, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
End If
@@ -9790,7 +9806,7 @@ Partial Class Compras_Compras
If importeMovimiento <> 0 Then
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, CveConceptoContableAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
ErrorPrepoliza = True
End If
End If
@@ -9813,7 +9829,7 @@ Partial Class Compras_Compras
If DdlTipoCompra.SelectedValue.ToEntero <> 10 Then
'QUITA 1-[MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA)] 2-[NC CON PRODUCTOS]
If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then
If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And CveConceptoContableAlmacen > 0 Then
DT = DT.FiltraParametros("CveTipoPS <> 2")
End If
End If
@@ -9960,14 +9976,14 @@ Partial Class Compras_Compras
Next
End If
'VALIDAR PREPOLIZA DE COMPRA
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
ErrorPrepoliza = True
Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia)
GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If
End If
''VALIDAR PREPOLIZA DE COMPRA
'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
' If ObjConta.ValorPolizaDescuadre > 0 Then
' ErrorPrepoliza = True
' Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia)
' GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
' End If
'End If
If Not ErrorPrepoliza Then
Retorno = True
@@ -20018,7 +20034,7 @@ Partial Class Compras_Compras
'Agrupa los CvePS iguales y suma sus cantidades
For Each row In TmpDT.AsEnumerable()
Dim cvePS As Integer = row.Field(Of Integer)("CvePS")
Dim cantidad As Decimal = row.Field(Of Decimal)("Cantidad")
Dim cantidad As Decimal = row("Cantidad").Tostring.ToDecimal
If ExistenciasPSFactura.ContainsKey(cvePS) Then
ExistenciasPSFactura(cvePS) += cantidad
Else
@@ -20733,39 +20749,30 @@ Partial Class Compras_Compras
End Sub
'Private Function ObtConceptoContableProvisionCompra(CveTipoConcepto As Integer, TipoDocto As String, CveMoneda As Integer, Optional EsComplementaria As Boolean = False) As Integer
' Dim Retorno As Integer = -1
' 'If CveTipoConcepto = 1 Then ''PROVEEDOR
' If EsComplementaria Then
' Retorno = If(TipoDocto = "Fac", 201, 234)
' Return Retorno
' End If
' If CveMoneda = 1 Then
' Retorno = If(TipoDocto = "Fac", 5, 18)
' Else
' Retorno = If(TipoDocto = "Fac", 311, 341)
' End If
' Else ''ACREEDOR
' If EsComplementaria Then
' Retorno = If(TipoDocto = "Fac", -1, -1)
' Return Retorno
' End If
' If CveMoneda = 1 Then
' Retorno = If(TipoDocto = "Fac", 305, 323)
' Else
' Retorno = If(TipoDocto = "Fac", 306, 343)
' End If
' End If
' Return Retorno
'End Function
Protected Sub BtnFolioGarantiaRestantes_Click(sender As Object, e As EventArgs)
Using ObjAcum As New ClsAcumuladores
If ObjAcum.GetFoliosGarantiasDetalleDisponibles(DdlFolioGarantia.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa) Then
Dim dtt As DataTable = ObjAcum.DtResultados.FiltraParametros("CantidadDisponible > 0")
Dim Porcentaje As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
Dim tCveSub As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
Dim tCveTipoGasto As Integer = TmpDT.MAX("CveTipoGasto").ToEntero
Dim Total As Decimal = TmpDT.SUMD("Total")
For Each drr As DataRow In TmpDT.Rows
ClavesBorradas.Add(drr("CveCompraDetalle").ToString)
Next
TmpDT.Clear()
For Each dr As DataRow In dtt.Rows
Dim pu As Decimal = Total / dtt.SUMD("CantidadDisponible")
Dim cantidad As Decimal = dr("CantidadDisponible").ToString.ToDecimal
AddPS(cantidad, dr("CveUM").ToString.ToEntero, "", dr("CveClasificacion").ToString.ToEntero, "", dr("CvePS").ToString.ToEntero, dr("PS").ToString, 2, tCveSub.ToString, "SE", "SE", "", "", pu, Total, Porcentaje, 0, 0, 0, 0, 0, PorcentajeIVA:=Porcentaje, TCalculaTotales:=True, CveTipoGasto:=tCveTipoGasto)
Next
AddPS2()
End If
End Using
End Sub
End Class

View File

@@ -475,7 +475,7 @@ Partial Class Inventarios_RecepcionAlmacen
CargaPermisos()
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True
Dim PermisoEspecialCambioFecha As Boolean = False
If UsuarioActual.CveUsuario = 1937 Then PermisoEspecialCambioFecha = True
If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 AndAlso Not PermisoEspecialCambioFecha Then

View File

@@ -404,7 +404,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
int CveLineaAdicionalActualizarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
bool errorCambioEstatus = false;
bool errorCambioEstatus = false;
//int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
ClsVentas objVentas = new ClsVentas();

View File

@@ -330,7 +330,7 @@
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" DataKeyNames="CveVenta,TipoDocumento,SerieFolio" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" DataKeyNames="CveVenta,TipoDocumento,SerieFolio" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Tipo Docto">
<ItemTemplate>
@@ -344,7 +344,7 @@
<asp:HiddenField ID="HdnFolio" runat="server" Value='<%# Eval("SerieFolio") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Docto" ItemStyle-HorizontalAlign="center">
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="center">
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
@@ -354,12 +354,12 @@
<asp:Literal ID="LtlCliente" runat="server" Text='<%# Eval("Nombre", "{0}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SubTotal">
<asp:TemplateField HeaderText="SubTotal" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descuento" Visible="True">
<asp:TemplateField HeaderText="Descuento" Visible="True" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
@@ -369,37 +369,37 @@
<asp:Literal ID="LtlMotivoDescuento" runat="server" Text='<%# Eval("MotivoDescuento", "{0}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Amortización">
<asp:TemplateField HeaderText="Amortización" Visible="false">
<ItemTemplate>
<asp:Literal ID="LtlAmortizacion" runat="server" Text='<%# Eval("Amortizacion", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="IVA">
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="IEPS">
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlIEPS" runat="server" Text='<%# Eval("IEPS", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ret. IVA" Visible="false">
<asp:TemplateField HeaderText="Ret. IVA" Visible="false" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ret. ISR" Visible="false">
<asp:TemplateField HeaderText="Ret. ISR" Visible="false" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Imp. Locales" Visible="false">
<asp:TemplateField HeaderText="Imp. Locales" Visible="false" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlImpLocales" runat="server" Text='<%# Eval("TotalImpuestos", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total">
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
@@ -444,7 +444,7 @@
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor", "{0}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus Factura">
<asp:TemplateField HeaderText="Estatus">
<ItemTemplate>
<asp:Literal ID="LtlEstatusFactura" runat="server" Text='<%# Eval("EstatusFactura", "{0}") %>'></asp:Literal>
</ItemTemplate>
@@ -505,8 +505,6 @@
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
@@ -557,8 +555,6 @@
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -289,21 +289,14 @@ Partial Class RepVentaDetalle
Private Sub CargaCombos()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
CargaClientes()
'DdlClientes.setEsWebService(False)
'Dim ObjClientes As New ClsClientes
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
' DdlClientes.DataSource = ObjClientes.DtResultados
'Else
' DdlClientes.DataSource = Nothing
'End If
'ObjClientes.Dispose()
'DdlClientes.DataBind()
'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
'Vendedor
CargaClientes()
'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
'Vendedor
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedor.DataBind()
DdlVendedor.Items.Insert(0, New ListItem("Sin Vendedor", "-2"))
@@ -493,23 +486,23 @@ Partial Class RepVentaDetalle
e.Row.FCLiteral("LtlFacturaCotizacion").Text = "<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVentaPadre") & """>" & e.Row.DBCampo("FolioVenta") & "</a>"
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(9).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(10).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(11).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(12).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(13).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(14).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(15).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(20).HorizontalAlign = HorizontalAlign.Left
'e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
'e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
'e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
'e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
'e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
'e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
'e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
'e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right
'e.Row.Cells(9).HorizontalAlign = HorizontalAlign.Right
'e.Row.Cells(10).HorizontalAlign = HorizontalAlign.Right
'e.Row.Cells(11).HorizontalAlign = HorizontalAlign.Right
'e.Row.Cells(12).HorizontalAlign = HorizontalAlign.Center
'e.Row.Cells(13).HorizontalAlign = HorizontalAlign.Left
'e.Row.Cells(14).HorizontalAlign = HorizontalAlign.Center
'e.Row.Cells(15).HorizontalAlign = HorizontalAlign.Center
'e.Row.Cells(20).HorizontalAlign = HorizontalAlign.Left
If e.Row.DBCampo("SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlSubTotal").Text = "-"