Devoluciones Agregar Comprobante
This commit is contained in:
@@ -247,6 +247,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" >
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="col-md-6" runat="server" id="DvComprobante">
|
||||||
|
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row text-center">
|
<div class="row text-center">
|
||||||
|
|||||||
@@ -108,7 +108,10 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
divTipoDevolucion.Visible = false;
|
divTipoDevolucion.Visible = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComprobanteMuestraOculta();
|
||||||
CargaTipoTransaccion(tipo);
|
CargaTipoTransaccion(tipo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e)
|
protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
@@ -125,6 +128,23 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComprobanteMuestraOculta();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void ComprobanteMuestraOculta()
|
||||||
|
{
|
||||||
|
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
|
||||||
|
{
|
||||||
|
Anexo.Text = "";
|
||||||
|
DvComprobante.Visible = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DvComprobante.Visible = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void CargaTipoTransaccion(string tipo)
|
protected void CargaTipoTransaccion(string tipo)
|
||||||
@@ -374,6 +394,19 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
}
|
}
|
||||||
//terminan validaciones
|
//terminan validaciones
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
||||||
|
string filemove = "";
|
||||||
|
string Comprobante = "";
|
||||||
|
foreach(Archivo fileItem in filesgral){
|
||||||
|
Comprobante = System.IO.Path.GetExtension(String.Format("{0}Temp\\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
|
||||||
|
filemove = fileItem.filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ClsBancos ObjIE = new ClsBancos();
|
ClsBancos ObjIE = new ClsBancos();
|
||||||
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());
|
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());
|
||||||
ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL());
|
ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL());
|
||||||
@@ -489,7 +522,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
{
|
{
|
||||||
|
|
||||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransanccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), PagueseA, TxtImporte.Text.Trim().ToDouble(), CveMoneda,
|
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransanccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), PagueseA, TxtImporte.Text.Trim().ToDouble(), CveMoneda,
|
||||||
TC, TxtObservaciones.Text.Trim(), "", false, false, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
TC, TxtObservaciones.Text.Trim(), "", false, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||||
if (CveIE > 0)
|
if (CveIE > 0)
|
||||||
{
|
{
|
||||||
//GUARDA PREPOLIZAS DETALLE DEVOLUCION
|
//GUARDA PREPOLIZAS DETALLE DEVOLUCION
|
||||||
@@ -648,6 +681,12 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
|||||||
}
|
}
|
||||||
ObjIE.Commit();
|
ObjIE.Commit();
|
||||||
|
|
||||||
|
if (filemove != "")
|
||||||
|
{
|
||||||
|
filemove.FilesMove(CveIE.ToString(), String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!Msg.ToString().Equals(""))
|
if (!Msg.ToString().Equals(""))
|
||||||
{
|
{
|
||||||
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
|
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);
|
||||||
|
|||||||
Reference in New Issue
Block a user