--
This commit is contained in:
@@ -143,33 +143,33 @@ Partial Class AF_ValesCombustible
|
|||||||
#Region "DDL CHANGED & CHK CHANGED & TXT CHANGUED"
|
#Region "DDL CHANGED & CHK CHANGED & TXT CHANGUED"
|
||||||
Private Sub DdlActivoFijo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlActivoFijo.SelectedIndexChanged
|
Private Sub DdlActivoFijo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlActivoFijo.SelectedIndexChanged
|
||||||
|
|
||||||
Dim ObjValesCombustible As New ClsAF
|
'Dim ObjValesCombustible As New ClsAF
|
||||||
If ObjValesCombustible.GetValesCombustible(-1, -1, -1, -1, DdlActivoFijo.SelectedValue.ToEntero, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
'If ObjValesCombustible.GetValesCombustible(-1, -1, -1, -1, DdlActivoFijo.SelectedValue.ToEntero, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||||
Dim dtAF As DataTable = ObjValesCombustible.DtResultados.FiltraParametros("", Orderby:="CveVale DESC")
|
' Dim dtAF As DataTable = ObjValesCombustible.DtResultados.FiltraParametros("", Orderby:="CveVale DESC")
|
||||||
If dtAF.Rows.Count > 0 Then
|
' If dtAF.Rows.Count > 0 Then
|
||||||
Dim dr As DataRow = dtAF.Rows(0)
|
' Dim dr As DataRow = dtAF.Rows(0)
|
||||||
LblFecha.Text = dr("Fecha").ToString
|
' LblFecha.Text = dr("Fecha").ToString
|
||||||
LblLitrosAF.Text = dr("Litros").ToString
|
' LblLitrosAF.Text = dr("Litros").ToString
|
||||||
LblCombustible.Text = dr("Combustible").ToString
|
' LblCombustible.Text = dr("Combustible").ToString
|
||||||
LblOdometro.Text = dr("Odometro").ToString
|
' LblOdometro.Text = dr("Odometro").ToString
|
||||||
|
|
||||||
If dr("CvePersonal").ToString.ToEntero > 0 Then
|
' If dr("CvePersonal").ToString.ToEntero > 0 Then
|
||||||
LbPersonal.Text = String.Format("{0}, {1}", dr("NombreCompleto").ToString, dr("Recibe").ToString)
|
' LbPersonal.Text = String.Format("{0}, {1}", dr("NombreCompleto").ToString, dr("Recibe").ToString)
|
||||||
Else
|
' Else
|
||||||
LbPersonal.Text = dr("NombreCompleto").ToString
|
' LbPersonal.Text = dr("NombreCompleto").ToString
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
' Else
|
||||||
LblFecha.Text = ""
|
' LblFecha.Text = ""
|
||||||
LblLitrosAF.Text = ""
|
' LblLitrosAF.Text = ""
|
||||||
LblCombustible.Text = ""
|
' LblCombustible.Text = ""
|
||||||
LblOdometro.Text = ""
|
' LblOdometro.Text = ""
|
||||||
LbPersonal.Text = ""
|
' LbPersonal.Text = ""
|
||||||
UpConsumo.Update()
|
' UpConsumo.Update()
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
ObjValesCombustible.Dispose()
|
'ObjValesCombustible.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Private Sub DdProveedorVinculacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdProveedorVinculacion.SelectedIndexChanged
|
'Private Sub DdProveedorVinculacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdProveedorVinculacion.SelectedIndexChanged
|
||||||
@@ -297,8 +297,8 @@ Partial Class AF_ValesCombustible
|
|||||||
|
|
||||||
'Si TipoVale es 1 = Externo
|
'Si TipoVale es 1 = Externo
|
||||||
If ChkExterno.Checked = True Then
|
If ChkExterno.Checked = True Then
|
||||||
CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToDouble, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
'CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToDouble, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Folio = ObjVales.FolioVale
|
'Folio = ObjVales.FolioVale
|
||||||
|
|
||||||
|
|
||||||
If CveVale < 0 Then
|
If CveVale < 0 Then
|
||||||
@@ -307,8 +307,8 @@ Partial Class AF_ValesCombustible
|
|||||||
|
|
||||||
ElseIf ChkInterno.Checked = True Then
|
ElseIf ChkInterno.Checked = True Then
|
||||||
|
|
||||||
CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToDouble, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
'CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToDouble, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Folio = ObjVales.FolioVale
|
'Folio = ObjVales.FolioVale
|
||||||
|
|
||||||
'AGREGAMOS LA SALIDA
|
'AGREGAMOS LA SALIDA
|
||||||
|
|
||||||
@@ -339,37 +339,37 @@ Partial Class AF_ValesCombustible
|
|||||||
'Si el odometro es mayor a la proxima recarga
|
'Si el odometro es mayor a la proxima recarga
|
||||||
Else
|
Else
|
||||||
'Si TipoVale es 1 = Externo
|
'Si TipoVale es 1 = Externo
|
||||||
If ChkExterno.Checked = True Then
|
'If ChkExterno.Checked = True Then
|
||||||
CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToEntero, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
' CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToEntero, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Folio = ObjVales.FolioVale
|
' Folio = ObjVales.FolioVale
|
||||||
|
|
||||||
If CveVale < 0 Then
|
' If CveVale < 0 Then
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
'Si TipoVale es 2 = Interno
|
' 'Si TipoVale es 2 = Interno
|
||||||
ElseIf ChkInterno.Checked = True Then
|
'ElseIf ChkInterno.Checked = True Then
|
||||||
CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToDouble, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
' CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToDouble, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Folio = ObjVales.FolioVale
|
' Folio = ObjVales.FolioVale
|
||||||
|
|
||||||
'AGREGAMOS LA SALIDA
|
' 'AGREGAMOS LA SALIDA
|
||||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFechaVale.Text.Trim.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
' CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFechaVale.Text.Trim.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||||
FolioSalida = ObjInventario.Folio
|
' FolioSalida = ObjInventario.Folio
|
||||||
|
|
||||||
If CveMovimientoSalida <= 0 Then
|
' If CveMovimientoSalida <= 0 Then
|
||||||
TextoError = "No se pudo generar el movimiento de salida correctamente"
|
' TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
Else
|
' Else
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtLitros.Text.Trim.ToEntero, CveUM, CvePS, -1, DdlActivoFijo.SelectedValue.ToEntero) Then
|
' If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtLitros.Text.Trim.ToEntero, CveUM, CvePS, -1, DdlActivoFijo.SelectedValue.ToEntero) Then
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos"
|
' TextoError = "Ocurrió un error al guardar los movimientos"
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Else
|
'Else
|
||||||
Alert("Debe Seleccionar un Tipo de Vale", TipoMensaje.MsgError)
|
' Alert("Debe Seleccionar un Tipo de Vale", TipoMensaje.MsgError)
|
||||||
End If
|
'End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
@@ -397,51 +397,51 @@ Partial Class AF_ValesCombustible
|
|||||||
|
|
||||||
Private Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
Private Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
||||||
|
|
||||||
Dim ObjValesCombustible As New ClsAF
|
'Dim ObjValesCombustible As New ClsAF
|
||||||
For Each gvr As GridViewRow In GVBuscar.Rows
|
'For Each gvr As GridViewRow In GVBuscar.Rows
|
||||||
If gvr.RowType = DataControlRowType.DataRow Then
|
' If gvr.RowType = DataControlRowType.DataRow Then
|
||||||
If gvr.FCCheckBox("Chk").Checked Then
|
' If gvr.FCCheckBox("Chk").Checked Then
|
||||||
Dim CveProveedor = If(gvr.FCDropDownList("DdlBuscarP").Visible, gvr.FCDropDownList("DdlBuscarP").SelectedValue.ToEntero, gvr.FCLiteral("LtlProveedor").Text.ToEntero)
|
' Dim CveProveedor = If(gvr.FCDropDownList("DdlBuscarP").Visible, gvr.FCDropDownList("DdlBuscarP").SelectedValue.ToEntero, gvr.FCLiteral("LtlProveedor").Text.ToEntero)
|
||||||
ObjValesCombustible.UpdateValeCombustible(gvr.DataKey("CveVale").ToEntero, gvr.DataKey("CveCompra").ToEntero, CveProveedor, gvr.FCTextBox("TxtNombreRecibe").Text, gvr.FCTextBox("TxtCantidad").Text.ToDouble, gvr.FCTextBox("TxtRecibo").Text.ToEntero, gvr.FCTextBox("TxtImporte").Text.ToEntero, UsuarioActual.CveEmpresa)
|
' ObjValesCombustible.UpdateValeCombustible(gvr.DataKey("CveVale").ToEntero, gvr.DataKey("CveCompra").ToEntero, CveProveedor, gvr.FCTextBox("TxtNombreRecibe").Text, gvr.FCTextBox("TxtCantidad").Text.ToDouble, gvr.FCTextBox("TxtRecibo").Text.ToEntero, gvr.FCTextBox("TxtImporte").Text.ToEntero, UsuarioActual.CveEmpresa)
|
||||||
Alert("Se Actualizo con exito")
|
' Alert("Se Actualizo con exito")
|
||||||
ActualizarM()
|
' ActualizarM()
|
||||||
Else
|
' Else
|
||||||
Alert("Seleccione una opcion")
|
' Alert("Seleccione una opcion")
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Next
|
'Next
|
||||||
ObjValesCombustible.Dispose()
|
'ObjValesCombustible.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BtnBuscar_Click(sender As Object, e As EventArgs) Handles BtnBuscar.Click
|
Private Sub BtnBuscar_Click(sender As Object, e As EventArgs) Handles BtnBuscar.Click
|
||||||
Dim ObjValesCombustible As New ClsAF
|
'Dim ObjValesCombustible As New ClsAF
|
||||||
|
|
||||||
If ObjValesCombustible.GetValesCombustible(-1, -1, If(TxtBuscar.Text.Equals(""), -1, TxtBuscar.Text.ToEntero), DdlBuscarProveedor.SelectedValue.ToEntero, DdlBuscarActivo.SelectedValue.ToEntero, -1, -1, -1, -1, DdlBuscarPersonal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
'If ObjValesCombustible.GetValesCombustible(-1, -1, If(TxtBuscar.Text.Equals(""), -1, TxtBuscar.Text.ToEntero), DdlBuscarProveedor.SelectedValue.ToEntero, DdlBuscarActivo.SelectedValue.ToEntero, -1, -1, -1, -1, DdlBuscarPersonal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||||
GVBuscar.DataSource = ObjValesCombustible.DtResultados
|
' GVBuscar.DataSource = ObjValesCombustible.DtResultados
|
||||||
If ObjValesCombustible.DtResultados.Rows.Count > 0 Then
|
' If ObjValesCombustible.DtResultados.Rows.Count > 0 Then
|
||||||
BtnActualizar.Visible = True
|
' BtnActualizar.Visible = True
|
||||||
End If
|
' End If
|
||||||
Else
|
'Else
|
||||||
GVBuscar.DataSource = Nothing
|
' GVBuscar.DataSource = Nothing
|
||||||
BtnActualizar.Visible = False
|
' BtnActualizar.Visible = False
|
||||||
End If
|
'End If
|
||||||
ObjValesCombustible.Dispose()
|
'ObjValesCombustible.Dispose()
|
||||||
GVBuscar.DataBind()
|
'GVBuscar.DataBind()
|
||||||
UpBuscar.Update()
|
'UpBuscar.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ActualizarM()
|
Private Sub ActualizarM()
|
||||||
Dim ObjValesCombustible As New ClsAF
|
'Dim ObjValesCombustible As New ClsAF
|
||||||
|
|
||||||
If ObjValesCombustible.GetValesCombustible(-1, -1, If(TxtBuscar.Text.Equals(""), -1, TxtBuscar.Text.ToEntero), DdlBuscarProveedor.SelectedValue.ToEntero, DdlBuscarActivo.SelectedValue.ToEntero, -1, -1, -1, -1, DdlBuscarPersonal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
'If ObjValesCombustible.GetValesCombustible(-1, -1, If(TxtBuscar.Text.Equals(""), -1, TxtBuscar.Text.ToEntero), DdlBuscarProveedor.SelectedValue.ToEntero, DdlBuscarActivo.SelectedValue.ToEntero, -1, -1, -1, -1, DdlBuscarPersonal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||||
GVBuscar.DataSource = ObjValesCombustible.DtResultados
|
' GVBuscar.DataSource = ObjValesCombustible.DtResultados
|
||||||
Else
|
'Else
|
||||||
GVBuscar.DataSource = Nothing
|
' GVBuscar.DataSource = Nothing
|
||||||
End If
|
'End If
|
||||||
ObjValesCombustible.Dispose()
|
'ObjValesCombustible.Dispose()
|
||||||
GVBuscar.DataBind()
|
'GVBuscar.DataBind()
|
||||||
UpBuscar.Update()
|
'UpBuscar.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -257,6 +257,12 @@
|
|||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtFolioGarantia" CssClass="form-control" runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtFolioGarantia" CssClass="form-control" runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtFolioGarantia" runat="server" ControlToValidate="TxtFolioGarantia" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvTxtFolioGarantia" runat="server" ControlToValidate="TxtFolioGarantia" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
||||||
|
<asp:RegularExpressionValidator ID="REVFolioGarantia"
|
||||||
|
ControlToValidate="TxtFolioGarantia" runat="server" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="solo números" ValidationGroup="GrpFolioGarantia"
|
||||||
|
ValidationExpression="\d+">
|
||||||
|
</asp:RegularExpressionValidator>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" Enabled="True" TargetControlID="TxtFolioGarantia" FilterType="Numbers" FilterMode="ValidChars"></ajax:FilteredTextBoxExtender>
|
||||||
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
|
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,16 +86,17 @@
|
|||||||
>
|
>
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="CodigoPS" HeaderText="Grupo" ReadOnly="true" ></asp:BoundField>
|
<asp:BoundField DataField="CodigoPS" HeaderText="Grupo" ReadOnly="true" ></asp:BoundField>
|
||||||
<asp:BoundField DataField="Inicial" HeaderText="Inicial" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="Inicial" HeaderText="Inicial" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
<asp:BoundField DataField="E_Almacen" HeaderText="E.Alm" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="E_Almacen" HeaderText="E.Alm" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
<asp:BoundField DataField="E_Pub" HeaderText="E.Pub" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="E_Pub" HeaderText="E.Pub" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
<asp:BoundField DataField="E_Traspaso" HeaderText="E.Tras" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="E_Traspaso" HeaderText="E.Tras" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
<asp:BoundField DataField="E_Compra" HeaderText="E.Compra" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="E_Compra" HeaderText="E.Compra" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
<asp:BoundField DataField="E_Otros" HeaderText="Otros" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="E_Recoleccion" HeaderText="E.Rec" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
<asp:BoundField DataField="S_Almacen" HeaderText="S.Alm" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="E_Otros" HeaderText="Otros" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
<asp:BoundField DataField="S_Traspaso" HeaderText="S.Tras" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="S_Almacen" HeaderText="S.Alm" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
<asp:BoundField DataField="S_Otros" HeaderText="Otros" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="S_Traspaso" HeaderText="S.Tras" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
<asp:BoundField DataField="Exist_Actual" HeaderText="Exist. Actual" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Center"></ItemStyle></asp:BoundField>
|
<asp:BoundField DataField="S_Otros" HeaderText="Otros" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
|
<asp:BoundField DataField="Exist_Actual" HeaderText="Exist. Actual" ReadOnly="true" DataFormatString="{0:N0}"><ItemStyle HorizontalAlign="Right"></ItemStyle></asp:BoundField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -13,14 +13,7 @@
|
|||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton runat="server" ID="BtnAgregarTiposUso" data-toggle="tooltip" data-placement="left" title="Agregar Tipo de Uso" Text="<i class='fa fa-plus'></i> Agregar Uso"></asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -32,7 +25,7 @@
|
|||||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||||
<div class="portlet-title portlet-filterT smalltitle">
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" Visible="true" />
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||||
<a href="javascript:;" class="expand"></a>
|
<a href="javascript:;" class="expand"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="titlefiltros caption">
|
<div class="titlefiltros caption">
|
||||||
@@ -74,6 +67,15 @@
|
|||||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="TxtFechaF" 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:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
<label class="col-md-1 " style="width: 80px;">Estatus:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlEstatus" CssClass="select2me" runat="server">
|
||||||
|
<asp:ListItem Text="Vigente" Value="0" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Clasificado" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -92,7 +94,7 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:GridView ID="GvR" runat="server" AutoGenerateColumns="False" OnRowDataBound="gvR_RowDataBound"
|
<asp:GridView ID="GvR" runat="server" AutoGenerateColumns="False" OnRowDataBound="gvR_RowDataBound"
|
||||||
DataKeyNames="CveEntregaAlmacen,Orden,CveDireccionOrigen,CveSubProyecto,Estatus,CveTimbre,CveCliente,FolioReferencia,Referencia"
|
DataKeyNames="CveEntregaAlmacen,CveSubProyecto,Estatus,CveCliente,FolioReferencia,Referencia"
|
||||||
EmptyDataText="No se encontraron registros"
|
EmptyDataText="No se encontraron registros"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
||||||
data-sort="true"
|
data-sort="true"
|
||||||
@@ -134,29 +136,29 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Referencia" >
|
<asp:TemplateField HeaderText="Referencia" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LblRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal>
|
<asp:Label ID="LblRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Label>
|
||||||
|
<asp:Label ID="Label1" runat="server" Text='<%# Eval("CveEntregaAlmacen") %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Dirección" >
|
<asp:TemplateField HeaderText="">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<div class="truncate" style="width: 150px;">
|
<asp:HyperLink ID="HplR" runat="server" Target="_blank" visible="false" AlternateText="Registrar" ToolTip="Registrar entrada" CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-location-arrow'></i>" />
|
||||||
<asp:Literal ID="LblDir" runat="server" Text='<%# Eval("Direccion") %>'></asp:Literal>
|
<asp:HyperLink ID="HplEnt" runat="server" NavigateUrl='<%# Eval("CveMovimientoEntrada", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}") %>' CssClass="Texto" Text='<%# Eval("FolioEntrada") %>' />
|
||||||
</div>
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="">
|
||||||
<asp:TemplateField HeaderText="">
|
<ItemTemplate>
|
||||||
<ItemTemplate>
|
<asp:LinkButton ID="LnkGvDatosRecoleccionEditar" runat="server" Visible="false" OnClick="LnkGvDatosRecoleccionEditar_Click" AlternateText="Editar" ToolTip="Actualizar" CssClass="btn btn-circle btn-xs blue" Text="<i class='fa fa-pencil'></i>" />
|
||||||
<asp:HyperLink ID="HplR" runat="server" visible="false" AlternateText="Registrar" ToolTip="Registrar entrada" CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-location-arrow'></i>" />
|
<asp:HyperLink ID="HplTra" runat="server" NavigateUrl='<%# Eval("CveMovimientoTraslado", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}") %>' CssClass="Texto" Text='<%# Eval("FolioTraslado") %>' />
|
||||||
<asp:LinkButton ID="LnkGvDatosRecoleccionEditar" runat="server" Visible="false" OnClick="LnkGvDatosRecoleccionEditar_Click" AlternateText="Editar" ToolTip="Actualizar" CausesValidation="False" CssClass="btn btn-circle btn-xs blue" Text="<i class='fa fa-pencil'></i>" />
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="100px" HorizontalAlign="Center"></ItemStyle>
|
</asp:TemplateField>
|
||||||
</asp:TemplateField>
|
<asp:TemplateField HeaderText="Factura" >
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HplCompra" runat="server" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>' CssClass="Texto" Text='<%# Eval("FolioCompra") %>' />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
@@ -242,21 +244,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvModalPSRecoleccion" DataKeyNames="CveEntregaAlmacenDetalle,CodigoPS,CvePS,CveUnidadMedida,Cantidad" runat="server"
|
<asp:GridView ID="GvModalPSRecoleccion" DataKeyNames="CveEntregaAlmacenDetalle,CodigoPS,CvePS,CveUnidadMedida,Cantidad" runat="server"
|
||||||
ShowHeader="true" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
ShowHeader="true" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" ItemStyle-Width="86px" HeaderStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" ItemStyle-Width="86px" HeaderStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Unidad" DataField="Abreviatura" ItemStyle-Width="86px" />
|
<asp:BoundField HeaderText="Unidad" DataField="Abreviatura" ItemStyle-Width="86px" />
|
||||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="500px" />
|
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="500px" />
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkModalGvModalPSRecoleccionEliminar" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el producto?" data-btn-ok-label="si"></asp:LinkButton>
|
<asp:LinkButton ID="LnkModalGvModalPSRecoleccionEliminar" runat="server" CommandArgument='<%# Eval("CveEntregaAlmacenDetalle") %>' CssClass="btn btn-circle btn-xs red" OnClick="LnkModalGvModalPSRecoleccionEliminar_Click" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el producto?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="160px" HorizontalAlign="Center"></ItemStyle>
|
<ItemStyle Width="160px" HorizontalAlign="Center"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -266,10 +266,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||||
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (4)")
|
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (4)")
|
||||||
DdlAlmacenOrigen.DataBind()
|
DdlAlmacenOrigen.DataBind()
|
||||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (21) and Almacen like '%sado%'")
|
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22) and Almacen like '%sado%'")
|
||||||
DdlAlmacenDestino.DataBind()
|
DdlAlmacenDestino.DataBind()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -70,7 +70,7 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
Dim ObjGeneral As New ClsGenerales
|
Dim ObjGeneral As New ClsGenerales
|
||||||
If ObjGeneral.GetInvEntregaAlmacenRuta(-1, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, 2, -1) Then
|
If ObjGeneral.GetInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, 3, DdlEstatus.SelectedValue.ToEntero) Then
|
||||||
GvR.DataSource = ObjGeneral.DtResultados
|
GvR.DataSource = ObjGeneral.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjGeneral.Dispose()
|
ObjGeneral.Dispose()
|
||||||
@@ -82,20 +82,20 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
|
|
||||||
Protected Sub gvR_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
|
Protected Sub gvR_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
Dim LnkEditar As LinkButton = e.Row.FCLinkButton("LnkGvDatosRecoleccionEditar")
|
|
||||||
|
|
||||||
If e.Row.DataKey("Estatus") = "0" OrElse e.Row.DataKey("Estatus") = "" Then
|
If e.Row.DBCampo("CveMovimientoEntrada") = "" Then
|
||||||
|
e.Row.FCHyperLink("HplR").Visible = True
|
||||||
|
e.Row.FCLabel("LblRef").ToolTip = e.Row.DBCampo("CveEntregaAlmacen")
|
||||||
|
e.Row.FCHyperLink("HplR").NavigateUrl = "/Inventarios/EntradasSalidas.aspx?CveEntregaAlmacen=" & e.Row.DBCampo("CveEntregaAlmacen")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("CveMovimientoEntrada") <> "" AndAlso e.Row.DBCampo("CveMovimientoTraslado") = "" Then
|
||||||
|
Dim LnkEditar As LinkButton = e.Row.FCLinkButton("LnkGvDatosRecoleccionEditar")
|
||||||
|
'If e.Row.DBCampo("Estatus") = "0" OrElse e.Row.DBCampo("Estatus") = "" Then
|
||||||
LnkEditar.Visible = True
|
LnkEditar.Visible = True
|
||||||
|
'End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' If e.Row.DataKey("Estatus") = "1" Then
|
|
||||||
e.Row.FCHyperLink("HplR").Visible = True
|
|
||||||
e.Row.FCHyperLink("HplR").NavigateUrl = "/Inventarios/EntradasSalidas.aspx?CveEntregaAlmacen=" & e.Row.DBCampo("CveEntregaAlmacen")
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If e.Row.DataKey("CveTimbre") <> "" Then
|
|
||||||
e.Row.FCCheckBox("Chk").Visible = False
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -103,8 +103,6 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
Dim LnkEliminar As LinkButton = CType(sender, LinkButton)
|
Dim LnkEliminar As LinkButton = CType(sender, LinkButton)
|
||||||
Dim GvRow As GridViewRow = CType(LnkEliminar.NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = CType(LnkEliminar.NamingContainer, GridViewRow)
|
||||||
CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero()
|
CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero()
|
||||||
Dim CveDireccionOrigen As Integer = GvRow.DataKey("CveDireccionOrigen").ToEntero()
|
|
||||||
|
|
||||||
|
|
||||||
CargaDatosRecoleccionDetallePS()
|
CargaDatosRecoleccionDetallePS()
|
||||||
LtlModalRecoleccionTitulo.Text = "Definición de tamaños"
|
LtlModalRecoleccionTitulo.Text = "Definición de tamaños"
|
||||||
@@ -117,7 +115,6 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
ElProductoChange()
|
ElProductoChange()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub ElProductoChange()
|
Private Sub ElProductoChange()
|
||||||
DdlModalRecoleccionUnidad.Items.Clear()
|
DdlModalRecoleccionUnidad.Items.Clear()
|
||||||
DdlModalRecoleccionUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveEmpresa)
|
DdlModalRecoleccionUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveEmpresa)
|
||||||
@@ -138,7 +135,6 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
Next
|
Next
|
||||||
LblProductosCargados.Text = Str.ToString
|
LblProductosCargados.Text = Str.ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjGenerales.Dispose()
|
ObjGenerales.Dispose()
|
||||||
|
|
||||||
GvModalPSRecoleccion.DataSource = DTRecoleccion
|
GvModalPSRecoleccion.DataSource = DTRecoleccion
|
||||||
@@ -146,8 +142,10 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
UpModalRecoleccion.Update()
|
UpModalRecoleccion.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Function InitDTRecoleccion() As DataTable
|
Private Function InitDTRecoleccion() As DataTable
|
||||||
|
Dim Columnaid = New DataColumn() With {.ColumnName = "CveEntregaAlmacenDetalle", .DataType = Type.GetType("System.Int32"), .AutoIncrement = True, .AutoIncrementSeed = 1, .AutoIncrementStep = 1}
|
||||||
|
|
||||||
Dim DT As DataTable = New DataTable()
|
Dim DT As DataTable = New DataTable()
|
||||||
DT.Columns.Add("CveEntregaAlmacenDetalle", System.Type.[GetType]("System.Int32"))
|
DT.Columns.Add(Columnaid)
|
||||||
DT.Columns.Add("CveEntregaAlmacen", System.Type.[GetType]("System.Int32"))
|
DT.Columns.Add("CveEntregaAlmacen", System.Type.[GetType]("System.Int32"))
|
||||||
DT.Columns.Add("CvePS", System.Type.[GetType]("System.Int32"))
|
DT.Columns.Add("CvePS", System.Type.[GetType]("System.Int32"))
|
||||||
DT.Columns.Add("Cantidad", System.Type.[GetType]("System.Double"))
|
DT.Columns.Add("Cantidad", System.Type.[GetType]("System.Double"))
|
||||||
@@ -182,7 +180,6 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
Protected Sub LnkModalAgregarPS_Click(ByVal sender As Object, ByVal e As EventArgs)
|
Protected Sub LnkModalAgregarPS_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
|
|
||||||
Dim dRow As DataRow = DTRecoleccion.NewRow()
|
Dim dRow As DataRow = DTRecoleccion.NewRow()
|
||||||
dRow("CveEntregaAlmacenDetalle") = -1
|
|
||||||
dRow("CveEntregaAlmacen") = CveEntregaAlmacen
|
dRow("CveEntregaAlmacen") = CveEntregaAlmacen
|
||||||
dRow("CvePS") = DdlProducto2.SelectedValue.ToEntero()
|
dRow("CvePS") = DdlProducto2.SelectedValue.ToEntero()
|
||||||
dRow("Cantidad") = TxtModalRecoleccionCantidad.Text.ToEntero()
|
dRow("Cantidad") = TxtModalRecoleccionCantidad.Text.ToEntero()
|
||||||
@@ -190,7 +187,7 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
dRow("CveUsuario") = UsuarioActual.CveUsuario
|
dRow("CveUsuario") = UsuarioActual.CveUsuario
|
||||||
dRow("FechaIng") = NowADS()
|
dRow("FechaIng") = NowADS()
|
||||||
dRow("CodigoPS") = DdlProducto2.SelectedItem.Text
|
dRow("CodigoPS") = DdlProducto2.SelectedItem.Text
|
||||||
dRow("Abreviatura") = DdlModalRecoleccionUnidad.SelectedItem.Text
|
dRow("Abreviatura") = If(DdlModalRecoleccionUnidad.SelectedItem IsNot Nothing, DdlModalRecoleccionUnidad.SelectedItem.Text, "")
|
||||||
DTRecoleccion.Rows.Add(dRow)
|
DTRecoleccion.Rows.Add(dRow)
|
||||||
|
|
||||||
LimpiarControlesPS()
|
LimpiarControlesPS()
|
||||||
@@ -207,7 +204,6 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
|
|
||||||
Private Sub BtnModalRecoleccionGuardar_Click(sender As Object, e As EventArgs) Handles BtnModalRecoleccionGuardar.Click
|
Private Sub BtnModalRecoleccionGuardar_Click(sender As Object, e As EventArgs) Handles BtnModalRecoleccionGuardar.Click
|
||||||
|
|
||||||
|
|
||||||
Dim Cantidad As Decimal = HdnCantidadRecoleccion.Value.ToDecimal
|
Dim Cantidad As Decimal = HdnCantidadRecoleccion.Value.ToDecimal
|
||||||
Dim CantidadDefinido As Decimal = 0
|
Dim CantidadDefinido As Decimal = 0
|
||||||
For Each gvr As GridViewRow In GvModalPSRecoleccion.Rows
|
For Each gvr As GridViewRow In GvModalPSRecoleccion.Rows
|
||||||
@@ -220,6 +216,7 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
|
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
||||||
|
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
|
||||||
Dim ErrorMovInv As Boolean = False
|
Dim ErrorMovInv As Boolean = False
|
||||||
Dim Fecha As DateTime = NowADS()
|
Dim Fecha As DateTime = NowADS()
|
||||||
Dim Concepto As String = "Traspaso Recolección"
|
Dim Concepto As String = "Traspaso Recolección"
|
||||||
@@ -268,22 +265,48 @@ Partial Class Acumuladores_RepRecolecciones
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
ObjGral.UpdateInvEntregaAlmacenEstatus(CveEntregaAlmacen, UsuarioActual.CveEmpresa, 1)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
ObjInventario.Commit()
|
ObjInventario.Commit()
|
||||||
|
GvModalPSRecoleccion.DataBind()
|
||||||
|
|
||||||
|
DTRecoleccion.Clear()
|
||||||
|
RegistraScript("$('#DivModalRecoleccion').modal('hide');")
|
||||||
|
|
||||||
Dim MensajeAlert As New StringBuilder
|
Dim MensajeAlert As New StringBuilder
|
||||||
|
|
||||||
MensajeAlert.Append("Se realizó con éxito el traspaso.")
|
MensajeAlert.Append("Se realizó con éxito el traspaso.")
|
||||||
|
|
||||||
MensajeAlert.AppendFormat("<br/> Folio de Salida: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" class='Texto' target=""_blank"">{0}</a></b>", FolioSalida, CveMovimientoSalida)
|
MensajeAlert.AppendFormat("<br/> Folio de Salida: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" class='Texto' target=""_blank"">{0}</a></b>", FolioSalida, CveMovimientoSalida)
|
||||||
'MensajeAlert.AppendFormat("<br/><a target='_blank' class='Texto' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
'MensajeAlert.AppendFormat("<br/><a target='_blank' class='Texto' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
||||||
Alert(MensajeAlert.ToString)
|
Alert(MensajeAlert.ToString)
|
||||||
|
CargaDatos()
|
||||||
Else
|
Else
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkModalGvModalPSRecoleccionEliminar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim LnkEliminar As LinkButton = CType(sender, LinkButton)
|
||||||
|
Dim GvRow As GridViewRow = CType(LnkEliminar.NamingContainer, GridViewRow)
|
||||||
|
Dim CveEntregaAlmacenDetalle = GvRow.DataKey("CveEntregaAlmacenDetalle").ToEntero()
|
||||||
|
Dim drss As DataRow() = DTRecoleccion.Select($"CveEntregaAlmacenDetalle = {CveEntregaAlmacenDetalle}")
|
||||||
|
If drss.Count > 0 Then
|
||||||
|
DTRecoleccion.Rows.Remove(drss(0))
|
||||||
|
End If
|
||||||
|
DTRecoleccion.AcceptChanges()
|
||||||
|
GvModalPSRecoleccion.DataSource = DTRecoleccion
|
||||||
|
GvModalPSRecoleccion.DataBind()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -3151,105 +3151,105 @@ Public Class ClsAF
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "ValesCombustible"
|
#Region "ValesCombustible"
|
||||||
Public Function AddValesCombustible(FolioUsuario As Integer, CveCompra As Integer, CveProveedor As Integer, CveAF As Integer, CvePersonal As Integer, Fecha As Date, NombreRecibe As String, CveSubProyecto As Integer, Observaciones As String, Odometro As Integer, CveCombustible As Integer, Litros As Double, TipoVale As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional Recibo As Integer = -1, Optional Importe As Integer = -1) As Integer
|
'Public Function AddValesCombustible(FolioUsuario As Integer, CveCompra As Integer, CveProveedor As Integer, CveAF As Integer, CvePersonal As Integer, Fecha As Date, NombreRecibe As String, CveSubProyecto As Integer, Observaciones As String, Odometro As Integer, CveCombustible As Integer, Litros As Double, TipoVale As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional Recibo As Integer = -1, Optional Importe As Integer = -1) As Integer
|
||||||
Dim Retorno As Integer = -1
|
' Dim Retorno As Integer = -1
|
||||||
|
|
||||||
DataAdapter("PA_AF_ValesCombustibleAdd")
|
' DataAdapter("PA_AF_ValesCombustibleAdd")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@FolioUsuario", SqlDbType.Int).Value = FolioUsuario
|
' .Add("@FolioUsuario", SqlDbType.Int).Value = FolioUsuario
|
||||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
' .Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
' .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
.Add("@NombreRecibe", SqlDbType.VarChar).Value = NombreRecibe
|
' .Add("@NombreRecibe", SqlDbType.VarChar).Value = NombreRecibe
|
||||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
' .Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
' .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
.Add("@Odometro", SqlDbType.Int).Value = Odometro
|
' .Add("@Odometro", SqlDbType.Int).Value = Odometro
|
||||||
.Add("@CveCombustible", SqlDbType.Int).Value = CveCombustible
|
' .Add("@CveCombustible", SqlDbType.Int).Value = CveCombustible
|
||||||
.Add("@Litros", SqlDbType.Float).Value = Litros
|
' .Add("@Litros", SqlDbType.Float).Value = Litros
|
||||||
.Add("@Recibo", SqlDbType.Float).Value = Recibo
|
' .Add("@Recibo", SqlDbType.Float).Value = Recibo
|
||||||
.Add("@Importe", SqlDbType.Float).Value = Importe
|
' .Add("@Importe", SqlDbType.Float).Value = Importe
|
||||||
.Add("@TipoVale", SqlDbType.Int).Value = TipoVale
|
' .Add("@TipoVale", SqlDbType.Int).Value = TipoVale
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveVale", SqlDbType.Int).Direction = ParameterDirection.Output
|
' .Add("@CveVale", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
' .Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
FolioVale = SqlAdapter.SelectCommand.Parameters("@vFolio").Value.ToString.ToEntero
|
' FolioVale = SqlAdapter.SelectCommand.Parameters("@vFolio").Value.ToString.ToEntero
|
||||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CveVale").Value.ToString.ToEntero
|
' Retorno = SqlAdapter.SelectCommand.Parameters("@CveVale").Value.ToString.ToEntero
|
||||||
Catch Ex1 As SqlException
|
' Catch Ex1 As SqlException
|
||||||
If Ex1.Message.Contains("Número: 2627;") Then
|
' If Ex1.Message.Contains("Número: 2627;") Then
|
||||||
Alert("Ya existe un Vale de Combustible con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia)
|
' Alert("Ya existe un Vale de Combustible con el mismo nombre: " & Descripcion & ".", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
' Else
|
||||||
Me.OnError("Ocurrió un error al Guardar el Vale de Combustible.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' Me.OnError("Ocurrió un error al Guardar el Vale de Combustible.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End If
|
' End If
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
|
|
||||||
End Function
|
'End Function
|
||||||
Public Function GetValesCombustible(CveCompra As Integer, CveValeCombustible As Integer, Folio As Integer, CveProveedor As Integer, CveAF As Integer, CveSubProyecto As Integer, Odometro As Integer, CveCombustible As Integer, Litros As Double, CvePersonal As Integer, CveUsuario As Integer, CveEmpresa As Integer, Recibo As Integer, Importe As Integer) As Boolean
|
'Public Function GetValesCombustible(CveCompra As Integer, CveValeCombustible As Integer, Folio As Integer, CveProveedor As Integer, CveAF As Integer, CveSubProyecto As Integer, Odometro As Integer, CveCombustible As Integer, Litros As Double, CvePersonal As Integer, CveUsuario As Integer, CveEmpresa As Integer, Recibo As Integer, Importe As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_AF_ValesCombustibleGet")
|
' DataAdapter("PA_AF_ValesCombustibleGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
.Add("@CveValeCombustible", SqlDbType.Int).Value = CveValeCombustible
|
' .Add("@CveValeCombustible", SqlDbType.Int).Value = CveValeCombustible
|
||||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
' .Add("@Folio", SqlDbType.Int).Value = Folio
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
' .Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@Odometro", SqlDbType.Int).Value = Odometro
|
' .Add("@Odometro", SqlDbType.Int).Value = Odometro
|
||||||
.Add("@CveCombustible", SqlDbType.Int).Value = CveCombustible
|
' .Add("@CveCombustible", SqlDbType.Int).Value = CveCombustible
|
||||||
.Add("@Litros", SqlDbType.Float).Value = Litros
|
' .Add("@Litros", SqlDbType.Float).Value = Litros
|
||||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
' .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@Recibo", SqlDbType.Int).Value = Recibo
|
' .Add("@Recibo", SqlDbType.Int).Value = Recibo
|
||||||
.Add("@Importe", SqlDbType.Int).Value = Importe
|
' .Add("@Importe", SqlDbType.Int).Value = Importe
|
||||||
End With
|
' End With
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener el Catálogo de Estatus de Vales Combustible.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al obtener el Catálogo de Estatus de Vales Combustible.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
Public Function UpdateValeCombustible(CveVale As Integer, CveCompra As Integer, CveProveedor As Integer, NombreRecibe As String, Litros As Double, Recibo As Integer, Importe As Integer, CveEmpresa As Integer) As Boolean
|
'Public Function UpdateValeCombustible(CveVale As Integer, CveCompra As Integer, CveProveedor As Integer, NombreRecibe As String, Litros As Double, Recibo As Integer, Importe As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_AF_ValesCombustibleUpdate")
|
' DataAdapter("PA_AF_ValesCombustibleUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveVale", SqlDbType.Int).Value = CveVale
|
' .Add("@CveVale", SqlDbType.Int).Value = CveVale
|
||||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
.Add("@NombreRecibe", SqlDbType.VarChar).Value = NombreRecibe
|
' .Add("@NombreRecibe", SqlDbType.VarChar).Value = NombreRecibe
|
||||||
.Add("@Litros", SqlDbType.Float).Value = Litros
|
' .Add("@Litros", SqlDbType.Float).Value = Litros
|
||||||
.Add("@Recibo", SqlDbType.Int).Value = Recibo
|
' .Add("@Recibo", SqlDbType.Int).Value = Recibo
|
||||||
.Add("@Importe", SqlDbType.Int).Value = Importe
|
' .Add("@Importe", SqlDbType.Int).Value = Importe
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch Ex1 As SqlException
|
' Catch Ex1 As SqlException
|
||||||
OnError("Ocurrió un error al actualizar la cuenta contable en el Activo Fijo", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al actualizar la cuenta contable en el Activo Fijo", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al actualizar la cuenta contable en el Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió un error al actualizar la cuenta contable en el Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
#End Region
|
#End Region
|
||||||
#Region "M E T R I C A S"
|
#Region "M E T R I C A S"
|
||||||
|
|
||||||
|
|||||||
@@ -3989,6 +3989,26 @@ Public Class ClsGenerales
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateInvEntregaAlmacenEstatus(CveEntregaAlmacen As Integer, CveEmpresa As Integer, Estatus As Integer, Optional CveCompra As Integer = -1) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Inv_EntregaAlmacenEstatusUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||||
|
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar estatus entrega almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function AsignaEntregaAlmacenRuta(CveCamion As Integer, CveChofer As Integer, FechaEntrega As Date, FechaLlegada As DateTime, CveEntregaAlmacen As Integer, CveEmpresa As Integer) As Boolean
|
Public Function AsignaEntregaAlmacenRuta(CveCamion As Integer, CveChofer As Integer, FechaEntrega As Date, FechaLlegada As DateTime, CveEntregaAlmacen As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_EntregaAlmacenRutaAsignar")
|
DataAdapter("PA_Inv_EntregaAlmacenRutaAsignar")
|
||||||
|
|||||||
@@ -2178,7 +2178,7 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional MostrarTodosAlmacenes As Boolean = False) As Boolean
|
Public Function GetExistenciasProductosLike(PS As String, CveClasificacion As Integer, CveSubProyecto As Integer, Estatus As Integer, AplicaParaVenta As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional MostrarTodosAlmacenes As Boolean = False, Optional CveAlmacen As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_ProductosServiciosInventario")
|
DataAdapter("PA_ProductosServiciosInventario")
|
||||||
@@ -2191,6 +2191,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
.Add("@MostrarTodosAlmacenes", SqlDbType.Bit).Value = MostrarTodosAlmacenes
|
.Add("@MostrarTodosAlmacenes", SqlDbType.Bit).Value = MostrarTodosAlmacenes
|
||||||
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -652,7 +652,7 @@ Public Class ClsOS
|
|||||||
CveUsuario As Integer, CveEmpresa As Integer, CveCotizacion As Integer, CveVenta As Integer, CveOSPadre As Integer, CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1,
|
CveUsuario As Integer, CveEmpresa As Integer, CveCotizacion As Integer, CveVenta As Integer, CveOSPadre As Integer, CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1,
|
||||||
Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1, Optional Año As String = "-1", Optional Correo As String = "",
|
Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1, Optional Año As String = "-1", Optional Correo As String = "",
|
||||||
Optional Condiciones As String = "", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha,
|
Optional Condiciones As String = "", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha,
|
||||||
Optional Paciente As String = "-1", Optional IdentificadorCliente As String = "-1") As Boolean
|
Optional Paciente As String = "-1", Optional IdentificadorCliente As String = "-1", Optional FolioAdicional As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OS_OrdenesServiciosAdd")
|
DataAdapter("PA_OS_OrdenesServiciosAdd")
|
||||||
@@ -686,6 +686,8 @@ Public Class ClsOS
|
|||||||
|
|
||||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||||
.Add("@IdentificadorCliente", SqlDbType.VarChar).Value = IdentificadorCliente
|
.Add("@IdentificadorCliente", SqlDbType.VarChar).Value = IdentificadorCliente
|
||||||
|
.Add("@FolioAdicional", SqlDbType.VarChar).Value = FolioAdicional
|
||||||
|
|
||||||
|
|
||||||
.Add("@CveOS", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@CveOS", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
@@ -732,7 +734,7 @@ Public Class ClsOS
|
|||||||
CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1, Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1,
|
CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1, Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1,
|
||||||
Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional Condiciones As String = "",
|
Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional Condiciones As String = "",
|
||||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha,
|
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha,
|
||||||
Optional Paciente As String = "-1", Optional IdentificadorCliente As String = "-1") As Boolean
|
Optional Paciente As String = "-1", Optional IdentificadorCliente As String = "-1", Optional FolioAdicional As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OS_OrdenesServiciosUpdate")
|
DataAdapter("PA_OS_OrdenesServiciosUpdate")
|
||||||
@@ -761,6 +763,7 @@ Public Class ClsOS
|
|||||||
.Add("@FechaCita", SqlDbType.DateTime).Value = FechaCita
|
.Add("@FechaCita", SqlDbType.DateTime).Value = FechaCita
|
||||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||||
.Add("@IdentificadorCliente", SqlDbType.VarChar).Value = IdentificadorCliente
|
.Add("@IdentificadorCliente", SqlDbType.VarChar).Value = IdentificadorCliente
|
||||||
|
.Add("@FolioAdicional", SqlDbType.VarChar).Value = FolioAdicional
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -7020,6 +7020,7 @@ Public Class ClsPaginas
|
|||||||
params.Add(New ReportParameter("FechaCirugia", Vta.FechaEjecucion.ToString("dd/MM/yyyy HH:mm")))
|
params.Add(New ReportParameter("FechaCirugia", Vta.FechaEjecucion.ToString("dd/MM/yyyy HH:mm")))
|
||||||
params.Add(New ReportParameter("Paciente", Vta.Paciente))
|
params.Add(New ReportParameter("Paciente", Vta.Paciente))
|
||||||
params.Add(New ReportParameter("Episodio", Vta.Episodio))
|
params.Add(New ReportParameter("Episodio", Vta.Episodio))
|
||||||
|
params.Add(New ReportParameter("Alfa1", Vta.Alfa1))
|
||||||
|
|
||||||
End If
|
End If
|
||||||
'VSH
|
'VSH
|
||||||
|
|||||||
@@ -413,7 +413,8 @@ Public Class ClsProductosServicios
|
|||||||
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
||||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||||
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0,
|
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0,
|
||||||
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1", Optional ProductoExhibicion As Boolean = False) As Integer
|
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1", Optional ProductoExhibicion As Boolean = False,
|
||||||
|
Optional Imagen As String = "") As Integer
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
|
|
||||||
DataAdapter("PA_ProductosServiciosAdd")
|
DataAdapter("PA_ProductosServiciosAdd")
|
||||||
@@ -522,7 +523,7 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@CodigoAlterno", SqlDbType.VarChar).Value = CodigoAlterno
|
.Add("@CodigoAlterno", SqlDbType.VarChar).Value = CodigoAlterno
|
||||||
.Add("@PSAlterno", SqlDbType.VarChar).Value = PSAlterno
|
.Add("@PSAlterno", SqlDbType.VarChar).Value = PSAlterno
|
||||||
.Add("@ProductoExhibicion", SqlDbType.Bit).Value = ProductoExhibicion
|
.Add("@ProductoExhibicion", SqlDbType.Bit).Value = ProductoExhibicion
|
||||||
|
.Add("@Imagen", SqlDbType.VarChar).Value = Imagen
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -658,7 +659,7 @@ Public Class ClsProductosServicios
|
|||||||
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
||||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||||
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0,
|
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0,
|
||||||
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1", Optional ProductoExhibicion As Boolean = False) As Boolean
|
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1", Optional ProductoExhibicion As Boolean = False, Optional Imagen As String = "") As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -766,6 +767,7 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@CodigoAlterno", SqlDbType.VarChar).Value = CodigoAlterno
|
.Add("@CodigoAlterno", SqlDbType.VarChar).Value = CodigoAlterno
|
||||||
.Add("@PSAlterno", SqlDbType.VarChar).Value = PSAlterno
|
.Add("@PSAlterno", SqlDbType.VarChar).Value = PSAlterno
|
||||||
.Add("@ProductoExhibicion", SqlDbType.Bit).Value = ProductoExhibicion
|
.Add("@ProductoExhibicion", SqlDbType.Bit).Value = ProductoExhibicion
|
||||||
|
.Add("@Imagen", SqlDbType.VarChar).Value = Imagen
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -214,6 +214,25 @@ Public Class ClsTransportes
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function CancelarViaje(CveViajePasajero As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Trans_ViajesPasajerosCancelarUpdate")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al cancelar el boleto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
Public Function GetRemisionBoleto(CveViajePasajero As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetRemisionBoleto(CveViajePasajero As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|||||||
@@ -5246,7 +5246,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
If Not ObjTransportes.UpdateViajesPasajeros(CveViajePasajero) Then
|
If Not ObjTransportes.CancelarViaje(CveViajePasajero) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -5259,8 +5259,10 @@ Namespace Modelos
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjEventos.AddEventoBitacora("se canceló el boleto:" & Row("Obs").ToString(), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
|
If Not ObjEventos.AddEventoBitacora("se canceló el boleto:" & Row("Obs").ToString(), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
|
||||||
ErrorList.Add("Ocurrió un error al agregar la bitacora de cancelación de boleto.")
|
ErrorList.Add("Ocurrió un error al agregar la bitacora de cancelación de boleto.")
|
||||||
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
@@ -5277,7 +5279,6 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -6275,14 +6276,17 @@ Namespace Modelos
|
|||||||
'VERIFICA LOS MOVIMIENTOS DE DEVOLUCION YA GENERADOS QUE TENGAN EXISTENCIA EN (ENTREGA POR ADELANTADO)
|
'VERIFICA LOS MOVIMIENTOS DE DEVOLUCION YA GENERADOS QUE TENGAN EXISTENCIA EN (ENTREGA POR ADELANTADO)
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
DtMovRemision = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 10")
|
DtMovRemision = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen IN (10,4)")
|
||||||
CveAlmacenGeneral = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CveTipoAlmacen IN (1,4)").ToString().ToEntero()
|
CveAlmacenGeneral = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CveTipoAlmacen IN (1,4)").ToEntero()
|
||||||
'SI ES SERVICIO A DOMICILIO DEBE REGRESAR A ESTE TIPO DE ALMACEN
|
'SI ES SERVICIO A DOMICILIO DEBE REGRESAR A ESTE TIPO DE ALMACEN
|
||||||
If Me.ServicioDomicilio Then
|
If Me.ServicioDomicilio Then
|
||||||
CveAlmacenGeneral = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CveTipoAlmacen = 29").ToString().ToEntero()
|
CveAlmacenGeneral = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CveTipoAlmacen = 29").ToEntero()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CveAlmacenExA = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CveTipoAlmacen = 10").ToString().ToEntero()
|
CveAlmacenExA = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CveTipoAlmacen = 10").ToEntero()
|
||||||
|
If CveAlmacenExA <= 0 Then
|
||||||
|
CveAlmacenExA = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CveTipoAlmacen = 4").ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
CveMovimientoUsado = ObjInventario.DtResultados.FiltroPrimeroValor("CveMovimiento", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
|
CveMovimientoUsado = ObjInventario.DtResultados.FiltroPrimeroValor("CveMovimiento", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
|
||||||
CveAlmacenUsado = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
|
CveAlmacenUsado = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
|
||||||
|
|||||||
@@ -788,6 +788,15 @@ Namespace Extensiones
|
|||||||
DateTime.TryParseExact(Str, format, System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, fecha)
|
DateTime.TryParseExact(Str, format, System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, fecha)
|
||||||
Return fecha
|
Return fecha
|
||||||
End Function
|
End Function
|
||||||
|
<Runtime.CompilerServices.Extension()>
|
||||||
|
Public Function ToBool(Str As String) As Boolean
|
||||||
|
If Str <> "" Then
|
||||||
|
Str = HttpUtility.HtmlDecode(Str).Trim
|
||||||
|
Return CBool(Str)
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
<Runtime.CompilerServices.Extension()>
|
<Runtime.CompilerServices.Extension()>
|
||||||
Public Function FormatoNumero(Str As String, Optional Decimales As Integer = 2) As String
|
Public Function FormatoNumero(Str As String, Optional Decimales As Integer = 2) As String
|
||||||
|
|||||||
@@ -927,6 +927,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
|
Dim UsoClasificacion = IfNull(context.Request("usoclasificacion"), "-1").ToString.ToEntero
|
||||||
Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "1").ToString.ToEntero
|
Dim AplicaParaVenta = IfNull(context.Request("aplicaparaventa"), "1").ToString.ToEntero
|
||||||
Dim CveMarca = IfNull(context.Request("cvemarca"), "-1").ToString.ToEntero
|
Dim CveMarca = IfNull(context.Request("cvemarca"), "-1").ToString.ToEntero
|
||||||
|
Dim CveAlmacen = IfNull(context.Request("cvealmacen"), "-1").ToString.ToEntero
|
||||||
|
|
||||||
Dim UsaGlobal As Boolean = True
|
Dim UsaGlobal As Boolean = True
|
||||||
Dim MostrarTodosAlmacenes As Boolean = False
|
Dim MostrarTodosAlmacenes As Boolean = False
|
||||||
@@ -941,7 +942,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
Dim objInv As New ClsInventarios
|
Dim objInv As New ClsInventarios
|
||||||
Try
|
Try
|
||||||
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca, MostrarTodosAlmacenes:=MostrarTodosAlmacenes) Then
|
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca, MostrarTodosAlmacenes:=MostrarTodosAlmacenes, CveAlmacen:=CveAlmacen) Then
|
||||||
|
|
||||||
' limpio los almacenes donde no tiene ningun producto existencia
|
' limpio los almacenes donde no tiene ningun producto existencia
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
DdlAnio.Items.Add(New ListItem(NowADS().Year.ToString(), NowADS().Year.ToString()))
|
DdlAnio.Items.Add(New ListItem(NowADS().Year.ToString(), NowADS().Year.ToString()))
|
||||||
'Año Anterior
|
'Año Anterior
|
||||||
DdlAnio.Items.Add(New ListItem(NowADS().AddYears(-1).Year.ToString(), NowADS().AddYears(-1).Year.ToString()))
|
DdlAnio.Items.Add(New ListItem(NowADS().AddYears(-1).Year.ToString(), NowADS().AddYears(-1).Year.ToString()))
|
||||||
|
DdlAnio.Items.Add(New ListItem(NowADS().AddYears(-2).Year.ToString(), NowADS().AddYears(-2).Year.ToString()))
|
||||||
|
|
||||||
For i As Integer = 1 To 12
|
For i As Integer = 1 To 12
|
||||||
Dim fecha As DateTime = New DateTime(DdlAnio.SelectedValue.ToEntero(), i, 1)
|
Dim fecha As DateTime = New DateTime(DdlAnio.SelectedValue.ToEntero(), i, 1)
|
||||||
|
|||||||
@@ -531,7 +531,7 @@
|
|||||||
<asp:DropDownList ID="DdlRecoleccion" runat="server" AutoPostBack="true" DataTextField="Referencia" DataValueField="CveEntregaAlmacen" OnSelectedIndexChanged="DdlFolioGarantia_SelectedIndexChanged" CssClass="form-control input-sm input-small select2me">
|
<asp:DropDownList ID="DdlRecoleccion" runat="server" AutoPostBack="true" DataTextField="Referencia" DataValueField="CveEntregaAlmacen" OnSelectedIndexChanged="DdlFolioGarantia_SelectedIndexChanged" CssClass="form-control input-sm input-small select2me">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:Button ID="BtnRecolecciónAplicar" runat="server" Text="Aplicar" CssClass="default" OnClick="BtnRecolecciónAplicar_Click" />
|
<asp:Button ID="BtnRecolecciónAplicar" runat="server" Text="Aplicar" CssClass="default" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1186,7 +1186,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpInv" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpInv" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall" Visible="false">
|
<asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
@@ -1205,7 +1205,7 @@
|
|||||||
<asp:TextBox ID="TxtDividir" Visible="false" runat="server" Width="30px"></asp:TextBox>
|
<asp:TextBox ID="TxtDividir" Visible="false" runat="server" Width="30px"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<asp:Button Text="D" ID="BtnDividirCompra" runat="server" OnClick="BtnDividirCompra_Click" Style="display: none;" />
|
<asp:Button Text="D" ID="BtnDividirCompra" runat="server" OnClick="BtnDividirCompra_Click" Style="display: none;" />
|
||||||
<asp:Button Text="SerieLote" ID="BtnSerieLote" OnClick="BtnSerieLote_Click" CssClass="btn btn-primary" runat="server" />
|
<asp:Button Text="Serie" ID="BtnSerieLote" OnClick="BtnSerieLote_Click" CssClass="btn btn-primary mysmallbtn" runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -3295,11 +3295,11 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<%-- <tr>
|
||||||
<td colspan="2" align="center">
|
<td colspan="2" align="center">
|
||||||
<asp:Button Text="Aplicar Vinculacion" CssClass="btn btn-primary" ID="BtnValesVincular" OnClick="BtnValesVincular_Click" runat="server" />
|
<asp:Button Text="Aplicar Vinculacion" CssClass="btn btn-primary" ID="BtnValesVincular" OnClick="BtnValesVincular_Click" runat="server" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>--%>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Imports System.Threading.Tasks
|
|||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports MoreLinq
|
Imports MoreLinq
|
||||||
|
Imports ClbNegBICFDv3_3
|
||||||
|
|
||||||
Partial Class Compras_Compras
|
Partial Class Compras_Compras
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -1341,7 +1342,7 @@ Partial Class Compras_Compras
|
|||||||
CambiaEjercicioAC()
|
CambiaEjercicioAC()
|
||||||
End If
|
End If
|
||||||
UpConsignaciones.Update()
|
UpConsignaciones.Update()
|
||||||
UpINV.Update()
|
UpInv.Update()
|
||||||
'DdlIVA.Visible = True ' cuando es compra manual
|
'DdlIVA.Visible = True ' cuando es compra manual
|
||||||
'If UsuarioActual.CveEmpresa = 126 Then
|
'If UsuarioActual.CveEmpresa = 126 Then
|
||||||
' CargaOrdenCorte()
|
' CargaOrdenCorte()
|
||||||
@@ -1735,6 +1736,50 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim SbValRet As New StringBuilder
|
||||||
|
For Each concepto As XmlNode In nodeconceptos
|
||||||
|
' Obtener la descripción del concepto
|
||||||
|
Dim descripcion As String = ValorXML(concepto, "Descripcion")
|
||||||
|
Dim importeValue As Decimal = Decimal.Parse(ValorXML(concepto, "Importe"))
|
||||||
|
|
||||||
|
' Seleccionar el nodo de Impuestos dentro de Concepto, si existe
|
||||||
|
Dim impuestosNode As XmlNode = concepto.SelectSingleNode("cfdi:Impuestos", namespaces)
|
||||||
|
|
||||||
|
If Not impuestosNode Is Nothing Then
|
||||||
|
' Seleccionar los nodos de Retencion dentro de Impuestos
|
||||||
|
Dim retenciones As XmlNodeList = impuestosNode.SelectNodes("cfdi:Retenciones/cfdi:Retencion", namespaces)
|
||||||
|
For Each retencion As XmlNode In retenciones
|
||||||
|
' Obtener los valores de los atributos Base e Importe
|
||||||
|
Dim baseValue As Decimal = Decimal.Parse(ValorXML(retencion, "Base"))
|
||||||
|
Dim impuesto As String = ValorXML(retencion, "Impuesto")
|
||||||
|
|
||||||
|
If impuesto = "001" Then
|
||||||
|
impuesto = "Retención ISR"
|
||||||
|
ElseIf impuesto = "002" Then
|
||||||
|
impuesto = "Retención IVA"
|
||||||
|
ElseIf impuesto = "003" Then
|
||||||
|
impuesto = "IEPS"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
' Validar si Base coincide con Importe
|
||||||
|
If baseValue <> importeValue Then
|
||||||
|
'SbValRet.Append($"La base e importe de la retención del impuesto {impuesto} no coinciden para {descripcion}. Base: {baseValue.ToString()}, Importe: {importeValue.ToString()} <br>")
|
||||||
|
SbValRet.Append($"Producto: {descripcion} La base e importe del impuesto {impuesto} no coincide Base: {baseValue.ToString()}, Importe Producto: {importeValue.ToString()} <br>")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If SbValRet.ToString.Trim.Length > 0 Then
|
||||||
|
Alert(SbValRet.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
CargaConceptosXML(XMLDoc)
|
CargaConceptosXML(XMLDoc)
|
||||||
End If
|
End If
|
||||||
@@ -1761,7 +1806,6 @@ Partial Class Compras_Compras
|
|||||||
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
||||||
DdlTipoCompra.Items.Add(New ListItem("NC Por Devolución", "11"))
|
DdlTipoCompra.Items.Add(New ListItem("NC Por Devolución", "11"))
|
||||||
DdlTipoCompra.Items.Add(New ListItem("Garantía", "12"))
|
DdlTipoCompra.Items.Add(New ListItem("Garantía", "12"))
|
||||||
DdlTipoCompra.Items.Add(New ListItem("Recolección", "14"))
|
|
||||||
Case "T"
|
Case "T"
|
||||||
DdlTipoCompra.Items.Clear()
|
DdlTipoCompra.Items.Clear()
|
||||||
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
||||||
@@ -4041,7 +4085,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If CierrePeriodo Then
|
If CierrePeriodo Then
|
||||||
Alert("El periodo de la compra actual ya se encuentra cerrado. No podra registrar la compra.", TipoMensaje.MsgAdvertencia)
|
Alert("El periodo de la compra actual ya se encuentra cerrado. No podra registrar la compra.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -4139,7 +4182,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(538).ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then
|
||||||
If TmpDT.MIN("CvePS").ToEntero <= 0 Then
|
If TmpDT.MIN("CvePS").ToEntero <= 0 Then
|
||||||
Alert("Todos los Productos/Servicios deben estar registrados o aliados a un productos ya registrado.", TipoMensaje.MsgAdvertencia)
|
Alert("Todos los Productos/Servicios deben estar registrados o aliados a un productos ya registrado.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -4190,7 +4233,7 @@ Partial Class Compras_Compras
|
|||||||
If GvInv.HeaderRow.FCCheckBox("cbAll").Checked = True Then
|
If GvInv.HeaderRow.FCCheckBox("cbAll").Checked = True Then
|
||||||
For Each Dr As DataRow In DtInv.Rows
|
For Each Dr As DataRow In DtInv.Rows
|
||||||
|
|
||||||
If Dr("CveMetodoInventario").ToString.ToEntero = 5 Then
|
If Dr("CveMetodoInventario").ToString = "5" Then
|
||||||
Cantidad = DtDatosDetalle.FiltraParametros(String.Format("CvePS = {0}", Dr("CvePS").ToString)).Rows.Count
|
Cantidad = DtDatosDetalle.FiltraParametros(String.Format("CvePS = {0}", Dr("CvePS").ToString)).Rows.Count
|
||||||
If Cantidad < Dr("Cantidad").ToString.ToEntero Then
|
If Cantidad < Dr("Cantidad").ToString.ToEntero Then
|
||||||
Alert("No hay productos a los que no se le ha asociado Serie", TipoMensaje.MsgError)
|
Alert("No hay productos a los que no se le ha asociado Serie", TipoMensaje.MsgError)
|
||||||
@@ -4347,7 +4390,7 @@ Partial Class Compras_Compras
|
|||||||
UM.Dispose()
|
UM.Dispose()
|
||||||
PSS.Dispose()
|
PSS.Dispose()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoCompra.SelectedValue.Contiene("12", "14") Then 'cuando es garantía, debe de especificar la salida de almacen
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoCompra.SelectedValue.Contiene("12") Then 'cuando es garantía, debe de especificar la salida de almacen
|
||||||
If Not GvInv.HeaderRow.FCCheckBox("cbAll").Checked OrElse GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToEntero <= 0 Then
|
If Not GvInv.HeaderRow.FCCheckBox("cbAll").Checked OrElse GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToEntero <= 0 Then
|
||||||
Alert("No ha especificado la salida de almacen en la garantía.", TipoMensaje.MsgAdvertencia)
|
Alert("No ha especificado la salida de almacen en la garantía.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -4382,28 +4425,25 @@ Partial Class Compras_Compras
|
|||||||
Dim EntradaComoGastoConAlmacen As Boolean = False
|
Dim EntradaComoGastoConAlmacen As Boolean = False
|
||||||
If GvInv.Rows.Count > 0 AndAlso GvInv.HeaderRow.FCCheckBox("cbAll").Checked Then
|
If GvInv.Rows.Count > 0 AndAlso GvInv.HeaderRow.FCCheckBox("cbAll").Checked Then
|
||||||
|
|
||||||
Dim CvealamcenSeleccionado As Integer = -1
|
Dim CvealmacenSeleccionado As Integer = -1
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvInv.Rows
|
For Each GvRow As GridViewRow In GvInv.Rows
|
||||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
CvealamcenSeleccionado = GvRow.FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero
|
CvealmacenSeleccionado = GvRow.FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero
|
||||||
If CvealamcenSeleccionado > 0 Then
|
If CvealmacenSeleccionado > 0 Then
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If CvealamcenSeleccionado > 0 Then
|
If CvealmacenSeleccionado > 0 Then
|
||||||
Dim ModalidadAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CvealamcenSeleccionado).FiltroPrimeroValor("CveModalidad").ToEntero
|
Dim ModalidadAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CvealmacenSeleccionado).FiltroPrimeroValor("CveModalidad").ToEntero
|
||||||
If ModalidadAlmacen = 0 Then
|
If ModalidadAlmacen = 0 Then
|
||||||
EntradaComoGastoConAlmacen = True
|
EntradaComoGastoConAlmacen = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'si hay necesidad de actualizar el globaldtps
|
'si hay necesidad de actualizar el globaldtps
|
||||||
If RegeneraPS Then
|
If RegeneraPS Then
|
||||||
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
||||||
@@ -4455,7 +4495,7 @@ Partial Class Compras_Compras
|
|||||||
Dim ObjAcar As New ClsAcarreos(ObjCompras.IniciaTransacSQL())
|
Dim ObjAcar As New ClsAcarreos(ObjCompras.IniciaTransacSQL())
|
||||||
Dim ObjCGame As New ClsCGame(ObjCompras.IniciaTransacSQL())
|
Dim ObjCGame As New ClsCGame(ObjCompras.IniciaTransacSQL())
|
||||||
Dim ObjProductosServicios As New ClsProductosServicios(ObjCompras.IniciaTransacSQL())
|
Dim ObjProductosServicios As New ClsProductosServicios(ObjCompras.IniciaTransacSQL())
|
||||||
|
Dim ObjGrales As New ClsGenerales(ObjCompras.IniciaTransacSQL())
|
||||||
|
|
||||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||||
|
|
||||||
@@ -5103,14 +5143,16 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Vincula Vales
|
'Vincula Vales
|
||||||
If IdVale.Count > 0 Then
|
'If IdVale.Count > 0 Then
|
||||||
For Each cve As Integer In IdVale
|
' For Each cve As Integer In IdVale
|
||||||
If Not ObjAF.UpdateValeCombustible(cve, CveCompra, -1, "", -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
' If Not ObjAF.UpdateValeCombustible(cve, CveCompra, -1, "", -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
ErrorAF = True
|
' ErrorAF = True
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'AGREGA AF COMPRA - Cuando es Compra se guarda CveCompraDetalle en AF
|
'AGREGA AF COMPRA - Cuando es Compra se guarda CveCompraDetalle en AF
|
||||||
If Row("TipoAF").ToString.ToEntero = 2 Then
|
If Row("TipoAF").ToString.ToEntero = 2 Then
|
||||||
@@ -5135,6 +5177,12 @@ Partial Class Compras_Compras
|
|||||||
Next
|
Next
|
||||||
''TERMINA: INSERTA DETALLES DE LA COMPRA
|
''TERMINA: INSERTA DETALLES DE LA COMPRA
|
||||||
|
|
||||||
|
If DdlTipoCompra.SelectedValue = "14" Then 'recolección
|
||||||
|
If Not ObjGrales.UpdateInvEntregaAlmacenEstatus(DdlRecoleccion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2, CveCompra) Then
|
||||||
|
ErrorDetalles = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'QUEMA SALDOS DE INV-COMPRA | MERCANCIA RECIBIDA POR ADELANTADO (OC) | PP 176
|
'QUEMA SALDOS DE INV-COMPRA | MERCANCIA RECIBIDA POR ADELANTADO (OC) | PP 176
|
||||||
If OCVinculada And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
If OCVinculada And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||||
For Each Row As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
For Each Row As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
||||||
@@ -5290,11 +5338,11 @@ Partial Class Compras_Compras
|
|||||||
CveConceptoMovimiento = 13
|
CveConceptoMovimiento = 13
|
||||||
tCveFolioGarantia = DdlFolioGarantia.SelectedValue.ToEntero
|
tCveFolioGarantia = DdlFolioGarantia.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
'recolección
|
''recolección
|
||||||
If DdlTipoCompra.SelectedValue = "14" Then 'recolección
|
'If DdlTipoCompra.SelectedValue = "14" Then 'recolección
|
||||||
CveConceptoMovimiento = 42
|
' CveConceptoMovimiento = 42
|
||||||
tCveEntregaAlmacen = DdlRecoleccion.SelectedValue.ToEntero
|
' tCveEntregaAlmacen = DdlRecoleccion.SelectedValue.ToEntero
|
||||||
End If
|
'End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (DdlTipoComprobante.SelectedValue = "Fac" AndAlso CveCompraRefacturacion <= 0) OrElse CveConceptoMovimiento = 13 Then
|
If (DdlTipoComprobante.SelectedValue = "Fac" AndAlso CveCompraRefacturacion <= 0) OrElse CveConceptoMovimiento = 13 Then
|
||||||
@@ -6323,7 +6371,7 @@ Partial Class Compras_Compras
|
|||||||
Dim RegistroCuentaPuente As Boolean = False
|
Dim RegistroCuentaPuente As Boolean = False
|
||||||
'NC CON PRODUCTOS - CUENTA PUENTE
|
'NC CON PRODUCTOS - CUENTA PUENTE
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "NC" And DdlTipoCompra.SelectedValue.Contiene("9", "12", "14") Then
|
If DdlTipoComprobante.SelectedValue = "NC" And DdlTipoCompra.SelectedValue.Contiene("9", "12") Then
|
||||||
RegistraConcepto225 = True
|
RegistraConcepto225 = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -10229,7 +10277,7 @@ Partial Class Compras_Compras
|
|||||||
If UsuarioActual.Empresa.UsaAC Then e.Row.FCCheckBox("cbInv").Enabled = False
|
If UsuarioActual.Empresa.UsaAC Then e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
|
|
||||||
Dim StrTipo As String = "CveTipoAlmacen IN (1,2,7,14,19)"
|
Dim StrTipo As String = "CveTipoAlmacen IN (1,2,7,14,19)"
|
||||||
If DdlTipoCompra.SelectedValue.Contiene("9", "12", "14") Then StrTipo = "CveTipoAlmacen IN (21)"
|
If DdlTipoCompra.SelectedValue.Contiene("9", "12") Then StrTipo = "CveTipoAlmacen IN (21)"
|
||||||
If EsDevolucionApoyoLogistico Then StrTipo = "CveTipoAlmacen = 27"
|
If EsDevolucionApoyoLogistico Then StrTipo = "CveTipoAlmacen = 27"
|
||||||
e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrTipo)
|
e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrTipo)
|
||||||
|
|
||||||
@@ -13553,44 +13601,23 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub BtnValesCombustibleVer_Click(sender As Object, e As EventArgs) Handles BtnValesCombustibleVer.Click
|
'Private Sub BtnValesCombustibleVer_Click(sender As Object, e As EventArgs) Handles BtnValesCombustibleVer.Click
|
||||||
|
|
||||||
Dim AF As New ClsAF
|
' Dim AF As New ClsAF
|
||||||
|
|
||||||
If AF.GetValesCombustible(-1, -1, -1, CveProveedor, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, -1, -1) Then
|
' If AF.GetValesCombustible(-1, -1, -1, CveProveedor, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||||
GvVales.DataSource = AF.DtResultados
|
' GvVales.DataSource = AF.DtResultados
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
AF.Dispose()
|
' AF.Dispose()
|
||||||
GvVales.DataBind()
|
' GvVales.DataBind()
|
||||||
DivValesCombustible.Visible = True
|
' DivValesCombustible.Visible = True
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show')", DivValesCombustible.ClientID))
|
' RegistraScript(String.Format("$('#{0}').modal('show')", DivValesCombustible.ClientID))
|
||||||
UPPValesCombustible.Update()
|
' UPPValesCombustible.Update()
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " VALES COMBUSTIBLES "
|
|
||||||
Protected Sub BtnValesVincular_Click(sender As Object, e As EventArgs)
|
|
||||||
IdVale = New List(Of Integer)
|
|
||||||
|
|
||||||
For Each row As GridViewRow In GvVales.Rows
|
|
||||||
If row.FCCheckBox("ChkVale").Checked Then
|
|
||||||
IdVale.Add(row.DataKey("CveVale").ToEntero)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
If IdVale.Count <= 0 Then
|
|
||||||
Alert("Debe elegir por lo menos un vale de combustible. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Else
|
|
||||||
Alert("Los vales selecciondos están listos para vincular")
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide')", DivValesCombustible.ClientID))
|
|
||||||
'For Each cve In IdVale
|
|
||||||
' Alert(cve.ToString)
|
|
||||||
'Next
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
#Region " VINCULAR OC "
|
#Region " VINCULAR OC "
|
||||||
Private Sub InicializaOC()
|
Private Sub InicializaOC()
|
||||||
@@ -14286,7 +14313,7 @@ Partial Class Compras_Compras
|
|||||||
If DrTipoGasto IsNot Nothing Then
|
If DrTipoGasto IsNot Nothing Then
|
||||||
CveTipoGasto = DrTipoGasto("CveTipoGasto").ToString.ToEntero
|
CveTipoGasto = DrTipoGasto("CveTipoGasto").ToString.ToEntero
|
||||||
TipoGasto = DrTipoGasto("TipoGasto").ToString
|
TipoGasto = DrTipoGasto("TipoGasto").ToString
|
||||||
End IfclsVa
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False,
|
AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False,
|
||||||
@@ -16749,7 +16776,7 @@ Partial Class Compras_Compras
|
|||||||
If DrPS IsNot Nothing Then
|
If DrPS IsNot Nothing Then
|
||||||
Row("PSCodigo") = If(PSCodigo = "", DrPS("PSCodigo").ToString, PSCodigo)
|
Row("PSCodigo") = If(PSCodigo = "", DrPS("PSCodigo").ToString, PSCodigo)
|
||||||
Row("CveMetodoInventario") = DrPS("Inv_CveMetodoInventario").ToString.ToEntero
|
Row("CveMetodoInventario") = DrPS("Inv_CveMetodoInventario").ToString.ToEntero
|
||||||
If Not DdlTipoCompra.SelectedValue.Contiene("12", "14") AndAlso DrPS("AplicaSerie").ToString = "True" Then
|
If Not DdlTipoCompra.SelectedValue.Contiene("12") AndAlso DrPS("AplicaSerie").ToString = "True" Then
|
||||||
Row("CveMetodoInventario") = "1"
|
Row("CveMetodoInventario") = "1"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -18969,42 +18996,40 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Protected Sub DdlTipoCompra_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoCompra_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then 'cuando es emp acumuladora
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'cuando es emp acumuladora
|
||||||
If DdlTipoCompra.SelectedValue.Contiene("9", "10", "12") Then 'Al seleccionar apoyo logístico se cargan los amancenes de devoculcion proveedor para dar entrada
|
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||||
|
If DdlTipoCompra.SelectedValue.Contiene("9", "10", "12") Then 'Al seleccionar apoyo logístico se cargan los amancenes de devoculcion proveedor para dar entrada
|
||||||
|
|
||||||
If DdlTipoCompra.SelectedValue = "12" Then 'cuando es emp acumuladora
|
If DdlTipoCompra.SelectedValue = "12" Then
|
||||||
divFolioGarantia.Visible = True
|
divFolioGarantia.Visible = True
|
||||||
Using objAcum As New ClsAcumuladores
|
Using objAcum As New ClsAcumuladores
|
||||||
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=2, TipoFolio:="-1", Area:=-1, CveSubProyecto:=-1) Then
|
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=2, TipoFolio:="-1", Area:=-1, CveSubProyecto:=-1) Then
|
||||||
DdlFolioGarantia.DataSource = objAcum.DtResultados.FiltraParametros("", "FechaIng DESC")
|
DdlFolioGarantia.DataSource = objAcum.DtResultados.FiltraParametros("", "FechaIng DESC")
|
||||||
DdlFolioGarantia.DataBind()
|
DdlFolioGarantia.DataBind()
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'cambia si hay ps con uso de serie
|
|
||||||
For Each dr As DataRow In TmpDT.Rows
|
|
||||||
dr("CveMetodoInventario") = 1
|
|
||||||
Next
|
|
||||||
CargaGvInv()
|
|
||||||
Else
|
|
||||||
If DdlTipoCompra.SelectedValue.Contiene("14") Then 'Recolección
|
|
||||||
divRecoleccion.Visible = True
|
|
||||||
Using objAcum As New ClsGenerales
|
|
||||||
If objAcum.GetInvEntregaAlmacenRuta(-1, MinFecha, MaxFecha, UsuarioActual.Empresa.CveEmpresa, 2, Estatus:=0) Then
|
|
||||||
DdlRecoleccion.DataSource = objAcum.DtResultados.FiltraParametros("", "Referencia DESC")
|
|
||||||
DdlRecoleccion.DataBind()
|
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
'cambia si hay ps con uso de serie
|
'cambia si hay ps con uso de serie
|
||||||
For Each dr As DataRow In TmpDT.Rows
|
For Each dr As DataRow In TmpDT.Rows
|
||||||
dr("CveMetodoInventario") = 1
|
dr("CveMetodoInventario") = 1
|
||||||
Next
|
Next
|
||||||
CargaGvInv()
|
CargaGvInv()
|
||||||
End If
|
End If
|
||||||
|
ElseIf DdlTipoComprobante.SelectedValue.Contiene("Fac") Then
|
||||||
|
If DdlTipoCompra.SelectedValue.Contiene("14") Then 'Recolección
|
||||||
|
divRecoleccion.Visible = True
|
||||||
|
Using objAcum As New ClsGenerales
|
||||||
|
If objAcum.GetInvEntregaAlmacenRuta(-1, MinFecha, MaxFecha, UsuarioActual.Empresa.CveEmpresa, 3, Estatus:=1) Then
|
||||||
|
DdlRecoleccion.DataSource = objAcum.DtResultados.FiltraParametros("", "Referencia DESC")
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
DdlRecoleccion.DataBind()
|
||||||
|
CargaGvInv()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -19764,6 +19789,10 @@ Partial Class Compras_Compras
|
|||||||
Dim cantidad As Decimal = dr("CantidadDisponible").ToString.ToDecimal
|
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)
|
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
|
Next
|
||||||
|
'cambia si hay ps con uso de serie
|
||||||
|
For Each dr As DataRow In TmpDT.Rows
|
||||||
|
dr("CveMetodoInventario") = 1
|
||||||
|
Next
|
||||||
AddPS2()
|
AddPS2()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -20107,6 +20136,10 @@ Partial Class Compras_Compras
|
|||||||
DdlRefacturacionFacturas.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlRefacturacionFacturas.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnRecolecciónAplicar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4575,32 +4575,32 @@ Partial Class PopUpVerFactura
|
|||||||
#Region "OP = 'VAL' - IMPRIME PDF VAL"
|
#Region "OP = 'VAL' - IMPRIME PDF VAL"
|
||||||
Private Sub GenerarPDFVale(CveVale As Integer)
|
Private Sub GenerarPDFVale(CveVale As Integer)
|
||||||
|
|
||||||
Dim ObjAF As New ClsAF
|
'Dim ObjAF As New ClsAF
|
||||||
If ObjAF.GetValesCombustible(-1, CveVale, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
'If ObjAF.GetValesCombustible(-1, CveVale, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||||
Dim dtVC As DataTable = ObjAF.DtResultados
|
' Dim dtVC As DataTable = ObjAF.DtResultados
|
||||||
Dim dr As DataRow = dtVC.Rows(0)
|
' Dim dr As DataRow = dtVC.Rows(0)
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
' Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("Folio", dr("Folio").ToString))
|
' params.Add(New ReportParameter("Folio", dr("Folio").ToString))
|
||||||
params.Add(New ReportParameter("Proveedor", dr("RazonSocial").ToString))
|
' params.Add(New ReportParameter("Proveedor", dr("RazonSocial").ToString))
|
||||||
params.Add(New ReportParameter("Obra", dr("SubProyecto").ToString))
|
' params.Add(New ReportParameter("Obra", dr("SubProyecto").ToString))
|
||||||
params.Add(New ReportParameter("NoEconomico", dr("Codigo").ToString))
|
' params.Add(New ReportParameter("NoEconomico", dr("Codigo").ToString))
|
||||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString))
|
' params.Add(New ReportParameter("Fecha", dr("Fecha").ToString))
|
||||||
params.Add(New ReportParameter("Operador", dr("NombreCompleto").ToString))
|
' params.Add(New ReportParameter("Operador", dr("NombreCompleto").ToString))
|
||||||
params.Add(New ReportParameter("Combustible", dr("Combustible").ToString))
|
' params.Add(New ReportParameter("Combustible", dr("Combustible").ToString))
|
||||||
params.Add(New ReportParameter("LitrosCombustible", dr("Litros").ToString))
|
' params.Add(New ReportParameter("LitrosCombustible", dr("Litros").ToString))
|
||||||
ImprimirPDF(String.Format(UsuarioActual.Empresa.Ruta & "/Formatos/ValesCombustible.rdlc", UsuarioActual.Empresa.Ruta), dtVC, params)
|
' ImprimirPDF(String.Format(UsuarioActual.Empresa.Ruta & "/Formatos/ValesCombustible.rdlc", UsuarioActual.Empresa.Ruta), dtVC, params)
|
||||||
|
|
||||||
'ImprimirPDFview(String.Format(UsuarioActual.Empresa.Ruta & "/Formatos/ValesCombustible.rdlc", UsuarioActual.Empresa.Ruta), lrds, params, "formato", "pdf", ReportViewer1)
|
' 'ImprimirPDFview(String.Format(UsuarioActual.Empresa.Ruta & "/Formatos/ValesCombustible.rdlc", UsuarioActual.Empresa.Ruta), lrds, params, "formato", "pdf", ReportViewer1)
|
||||||
'Dim Archivo As New System.IO.FileInfo(String.Format("Empresas\1\Formatos\ValesCombustible.rdlc", UsuarioActual.Empresa.Rulrdsta))
|
' 'Dim Archivo As New System.IO.FileInfo(String.Format("Empresas\1\Formatos\ValesCombustible.rdlc", UsuarioActual.Empresa.Rulrdsta))
|
||||||
'If Archivo.Exists Then
|
' 'If Archivo.Exists Then
|
||||||
|
|
||||||
'Else
|
' 'Else
|
||||||
' 'params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
' ' 'params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
' ImprimirPDF("/Empresas/1/Formatos/ValesCombustible.rdlc", dtVC, params, "ValeCombustible")
|
' ' ImprimirPDF("/Empresas/1/Formatos/ValesCombustible.rdlc", dtVC, params, "ValeCombustible")
|
||||||
'End If
|
' 'End If
|
||||||
End If
|
'End If
|
||||||
ObjAF.Dispose()
|
'ObjAF.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -6040,6 +6040,9 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
If DtPrecios IsNot Nothing Then
|
If DtPrecios IsNot Nothing Then
|
||||||
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||||
|
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
||||||
|
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
||||||
|
End If
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
<Relations isList="true" count="0" />
|
<Relations isList="true" count="0" />
|
||||||
<Report isRef="0" />
|
<Report isRef="0" />
|
||||||
<Resources isList="true" count="0" />
|
<Resources isList="true" count="0" />
|
||||||
<Variables isList="true" count="93">
|
<Variables isList="true" count="94">
|
||||||
<value>ReportParameters,ClienteCodigo,ClienteCodigo,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C__x002F_StiSerializer_x003E_,_x0035_4a879e0a10d464ba2f01e0372efb9ca</value>
|
<value>ReportParameters,ClienteCodigo,ClienteCodigo,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C__x002F_StiSerializer_x003E_,_x0035_4a879e0a10d464ba2f01e0372efb9ca</value>
|
||||||
<value>ReportParameters,ClienteTelefono,ClienteTelefono,ReportParameter1,System.String,,False,False,True,False,,_x0036_22a3a61b2f247a6ab5d7dc6c66568db</value>
|
<value>ReportParameters,ClienteTelefono,ClienteTelefono,ReportParameter1,System.String,,False,False,True,False,,_x0036_22a3a61b2f247a6ab5d7dc6c66568db</value>
|
||||||
<value>ReportParameters,ClienteContacto,ClienteContacto,ReportParameter1,System.String,,False,False,True,False,,_x0035_c52eccfce4d4681a1c62017e690c7c1</value>
|
<value>ReportParameters,ClienteContacto,ClienteContacto,ReportParameter1,System.String,,False,False,True,False,,_x0035_c52eccfce4d4681a1c62017e690c7c1</value>
|
||||||
@@ -179,6 +179,7 @@
|
|||||||
<value>ReportParameters,FechaCirugia,FechaCirugia,,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C__x002F_StiSerializer_x003E_,_x0039_11bc963c59b4b6cb4b0ce36a86c40e1</value>
|
<value>ReportParameters,FechaCirugia,FechaCirugia,,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C__x002F_StiSerializer_x003E_,_x0039_11bc963c59b4b6cb4b0ce36a86c40e1</value>
|
||||||
<value>ReportParameters,Paciente,Paciente,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C_CheckedColumn_x003E_null_x003B__x003C__x002F_CheckedColumn_x003E__x003C__x002F_StiSerializer_x003E_</value>
|
<value>ReportParameters,Paciente,Paciente,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C_CheckedColumn_x003E_null_x003B__x003C__x002F_CheckedColumn_x003E__x003C__x002F_StiSerializer_x003E_</value>
|
||||||
<value>ReportParameters,Episodio,Episodio,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C_CheckedColumn_x003E_null_x003B__x003C__x002F_CheckedColumn_x003E__x003C__x002F_StiSerializer_x003E_</value>
|
<value>ReportParameters,Episodio,Episodio,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C_CheckedColumn_x003E_null_x003B__x003C__x002F_CheckedColumn_x003E__x003C__x002F_StiSerializer_x003E_</value>
|
||||||
|
<value>ReportParameters,Alfa1,Alfa1,ReportParameter1,System.String,,False,False,True,False,_x003C__x003F_xml_x0020_version_x003D__x0022_1.0_x0022__x0020_encoding_x003D__x0022_utf-16_x0022__x0020_standalone_x003D__x0022_yes_x0022__x003F__x003E__x003C_StiSerializer_x0020_version_x003D__x0022_1.02_x0022__x0020_type_x003D__x0022_Net_x0022__x0020_application_x003D__x0022_State_x0022__x003E__x003C_SortDirection_x003E_None_x003C__x002F_SortDirection_x003E__x003C_BindingVariable_x0020_isNull_x003D__x0022_true_x0022__x0020__x002F__x003E__x003C_Keys_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_Values_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_CheckedStates_x0020_isList_x003D__x0022_true_x0022__x0020_count_x003D__x0022_0_x0022__x0020__x002F__x003E__x003C_DateTimeType_x003E_DateAndTime_x003C__x002F_DateTimeType_x003E__x003C_CheckedColumn_x003E_null_x003B__x003C__x002F_CheckedColumn_x003E__x003C__x002F_StiSerializer_x003E_</value>
|
||||||
</Variables>
|
</Variables>
|
||||||
</Dictionary>
|
</Dictionary>
|
||||||
<EngineVersion>EngineV2</EngineVersion>
|
<EngineVersion>EngineV2</EngineVersion>
|
||||||
@@ -1488,7 +1489,8 @@ Sello digital del SAT:
|
|||||||
<Page isRef="7" />
|
<Page isRef="7" />
|
||||||
<Parent isRef="62" />
|
<Parent isRef="62" />
|
||||||
<Text>Paciente: {Paciente}
|
<Text>Paciente: {Paciente}
|
||||||
Episodio: {Episodio}</Text>
|
Episodio: {Episodio}
|
||||||
|
Folio Remisión: {Alfa1}</Text>
|
||||||
<TextBrush>Black</TextBrush>
|
<TextBrush>Black</TextBrush>
|
||||||
<Type>Expression</Type>
|
<Type>Expression</Type>
|
||||||
</Text9>
|
</Text9>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -39,6 +39,8 @@
|
|||||||
<asp:RadioButtonList runat="server" ID="RblFormato">
|
<asp:RadioButtonList runat="server" ID="RblFormato">
|
||||||
<asp:ListItem Value="1" Text="Proveedores" Selected="True"></asp:ListItem>
|
<asp:ListItem Value="1" Text="Proveedores" Selected="True"></asp:ListItem>
|
||||||
<asp:ListItem Value="3" Text="Factura - Proveedor"></asp:ListItem>
|
<asp:ListItem Value="3" Text="Factura - Proveedor"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="18" Text="Factura - Proveedor Detalle"></asp:ListItem>
|
||||||
|
|
||||||
<asp:ListItem Value="13" Text="Anticipo Proveedores"></asp:ListItem>
|
<asp:ListItem Value="13" Text="Anticipo Proveedores"></asp:ListItem>
|
||||||
<asp:ListItem Value="2" Text="Clientes"></asp:ListItem>
|
<asp:ListItem Value="2" Text="Clientes"></asp:ListItem>
|
||||||
<asp:ListItem Value="4" Text="Factura - Cliente"></asp:ListItem>
|
<asp:ListItem Value="4" Text="Factura - Cliente"></asp:ListItem>
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Or RblFormato.SelectedValue = "17" Then
|
ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Or RblFormato.SelectedValue = "17" Or RblFormato.SelectedValue = "18" Then
|
||||||
If Not dt.Columns(0).ColumnName = "Sucursal" Then
|
If Not dt.Columns(0).ColumnName = "Sucursal" Then
|
||||||
Alert("El nombre de la primera columna debe ser 'Sucursal'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la primera columna debe ser 'Sucursal'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -293,54 +293,84 @@ Partial Class General_SaldosIniciales
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not dt.Columns(15).ColumnName = "Folio Fiscal" Then
|
|
||||||
Alert("El nombre de la decimosexta columna debe ser 'Folio Fiscalo'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not dt.Columns(16).ColumnName = "PorcentajeIVA" Then
|
If RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "18" Then
|
||||||
Alert("El nombre de la decimoséptima columna debe ser 'PorcentajeIVA'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If RblFormato.SelectedValue = "4" Then
|
If Not dt.Columns(15).ColumnName = "PorcentajeIVA" Then
|
||||||
' If Not dt.Columns(15).ColumnName = "ImpuestoLocal" Then
|
Alert("El nombre de la quinceava columna debe ser 'PorcentajeIVA'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
' Alert("El nombre de la diesciseisava columna debe ser 'ImpuestoLocal'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not dt.Columns(16).ColumnName = "Amort.Ant" Then
|
|
||||||
' Alert("El nombre de la diescisieteava columna debe ser 'Amort.Ant'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If RblFormato.SelectedValue = "17" Then
|
|
||||||
|
|
||||||
|
|
||||||
If Not dt.Columns(17).ColumnName = "Cantidad" Then
|
|
||||||
Alert("El nombre de la Decimoctava columna debe ser 'Cantidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not dt.Columns(18).ColumnName = "PU" Then
|
If Not dt.Columns(16).ColumnName = "ImpuestosLocales" Then
|
||||||
Alert("El nombre de la Decimonovena columna debe ser 'PU'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la quinceava columna debe ser 'ImpuestosLocales'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not dt.Columns(19).ColumnName = "IVA" Then
|
If RblFormato.SelectedValue = "18" Then
|
||||||
Alert("El nombre de la Vigésima columna debe ser 'IVA'. Favor de corregirlo", TipoMensaje.MsgError)
|
If Not dt.Columns(17).ColumnName = "Cantidad" Then
|
||||||
Exit Sub
|
Alert("El nombre de la Decimoctava columna debe ser 'Cantidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
End If
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(18).ColumnName = "Codigo" Then
|
||||||
If Not dt.Columns(20).ColumnName = "IEPS" Then
|
Alert("El nombre de la Decimonovena columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Alert("El nombre de la Vigésimo primera columna debe ser 'IEPS'. Favor de corregirlo", TipoMensaje.MsgError)
|
Exit Sub
|
||||||
Exit Sub
|
End If
|
||||||
|
If Not dt.Columns(19).ColumnName = "PU" Then
|
||||||
|
Alert("El nombre de la Vigésima columna debe ser 'PU'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(20).ColumnName = "IVADetalle" Then
|
||||||
|
Alert("El nombre de la Vigésimo primera columna debe ser 'IVADetalle'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(21).ColumnName = "IEPS" Then
|
||||||
|
Alert("El nombre de la Vigésimo segunda columna debe ser 'IEPS'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If RblFormato.SelectedValue = "4" Or RblFormato.SelectedValue = "17" Then
|
||||||
|
If Not dt.Columns(15).ColumnName = "Folio Fiscal" Then
|
||||||
|
Alert("El nombre de la decimosexta columna debe ser 'Folio Fiscalo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(16).ColumnName = "PorcentajeIVA" Then
|
||||||
|
Alert("El nombre de la decimoséptima columna debe ser 'PorcentajeIVA'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If RblFormato.SelectedValue = "17" Then
|
||||||
|
If Not dt.Columns(17).ColumnName = "Cantidad" Then
|
||||||
|
Alert("El nombre de la Decimoctava columna debe ser 'Cantidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(18).ColumnName = "Codigo" Then
|
||||||
|
Alert("El nombre de la Decimonovena columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(19).ColumnName = "PU" Then
|
||||||
|
Alert("El nombre de la Vigésima columna debe ser 'PU'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(20).ColumnName = "IVADetalle" Then
|
||||||
|
Alert("El nombre de la Vigésimo primera columna debe ser 'IVADetalle'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(21).ColumnName = "IEPS" Then
|
||||||
|
Alert("El nombre de la Vigésimo segunda columna debe ser 'IEPS'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ElseIf RblFormato.SelectedValue = "5" Then
|
ElseIf RblFormato.SelectedValue = "5" Then
|
||||||
|
|
||||||
If Not dt.Columns(0).ColumnName = "Codigo" Then
|
If Not dt.Columns(0).ColumnName = "Codigo" Then
|
||||||
@@ -1444,7 +1474,7 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
|
|
||||||
'P R O V E E D O R E S - F A C T U R A S
|
'P R O V E E D O R E S - F A C T U R A S
|
||||||
ElseIf RblFormato.SelectedValue = "3" Then
|
ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "18" Then
|
||||||
|
|
||||||
#Region "P R O V E E D O R E S - F A C T U R A S"
|
#Region "P R O V E E D O R E S - F A C T U R A S"
|
||||||
|
|
||||||
@@ -1469,6 +1499,9 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
||||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim CountRow As Integer = 1
|
||||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||||
Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'")
|
Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'")
|
||||||
RFC = Row("RFC").ToString().Trim
|
RFC = Row("RFC").ToString().Trim
|
||||||
@@ -1529,6 +1562,45 @@ Partial Class General_SaldosIniciales
|
|||||||
TipoCambio = GlobalTipoCambio(Fecha).ToString
|
TipoCambio = GlobalTipoCambio(Fecha).ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim IEPSDetalle As Decimal = 0
|
||||||
|
Dim CantidadDetalle As Decimal = 0
|
||||||
|
Dim PUDetalle As Decimal = 0
|
||||||
|
Dim IVADetalle As Decimal = 0
|
||||||
|
|
||||||
|
If RblFormato.SelectedValue = "18" Then
|
||||||
|
|
||||||
|
Dim CodigoDetalle As String = Row("Codigo").ToString
|
||||||
|
If CodigoDetalle.Trim.Length > 0 Then
|
||||||
|
Dim DrDetalles As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"Codigo = '{CodigoDetalle}'")
|
||||||
|
|
||||||
|
If DrDetalles IsNot Nothing Then
|
||||||
|
CvePS = DrDetalles("CvePS").ToString().ToEntero()
|
||||||
|
CveUnidadMedida = DrDetalles("CveUnidadMedida").ToString().ToEntero()
|
||||||
|
CveClasificacion = DrDetalles("CveClasificacion").ToString().ToEntero()
|
||||||
|
Else
|
||||||
|
Alert($"El código del producto no se encontro, error en registro {CountRow}")
|
||||||
|
ErrorCompras = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert($"El código es requerido, error en registro {CountRow}")
|
||||||
|
ErrorCompras = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
IEPSDetalle = Row("IEPS").ToString.ToDecimal
|
||||||
|
CantidadDetalle = Row("Cantidad").ToString.ToDecimal
|
||||||
|
PUDetalle = Row("PU").ToString.ToDecimal
|
||||||
|
IVADetalle = Row("IVA").ToString.ToDecimal
|
||||||
|
|
||||||
|
If CantidadDetalle = 0 Then
|
||||||
|
Alert($"No se especifico la cantidad, error en registro {CountRow}")
|
||||||
|
ErrorCompras = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
'PrePóliza
|
'PrePóliza
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Compras/SaldoInicial", 1, Total, Total, CveMoneda, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Compras/SaldoInicial", 1, Total, Total, CveMoneda, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
If Not CvePrePoliza > 0 Then
|
If Not CvePrePoliza > 0 Then
|
||||||
@@ -1548,10 +1620,30 @@ Partial Class General_SaldosIniciales
|
|||||||
CveCompra = ObjCompras.CveCompra
|
CveCompra = ObjCompras.CveCompra
|
||||||
|
|
||||||
'Compra Detalle
|
'Compra Detalle
|
||||||
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, CveSubProyecto, -1, 0, 1, SubTotal, SubTotal * PorcentajeIVA, SubTotal, 0, "Carga Inicial", -1, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=RetIVAPorcentaje, RetISRPorcentaje:=RetISRPorcentaje) Then
|
If RblFormato.SelectedValue = "18" Then
|
||||||
ErrorCompras = True
|
|
||||||
Exit For
|
Dim TotalDetalles As Decimal = SubTotal
|
||||||
|
If PUDetalle > 0 Then
|
||||||
|
TotalDetalles = (CantidadDetalle * PUDetalle) + IVA - RetIVA - RetISR + IEPSDetalle
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Math.Abs(TotalDetalles - Total) > 0.01 Then
|
||||||
|
ErrorCompras = True
|
||||||
|
Alert($"Registro {CountRow} El total no councide con el calculo de los detalles, total: {Total.ToString("###,###,###.00")} calculo detatalles: {TotalDetalles.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, CveSubProyecto, -1, 0, CantidadDetalle, PUDetalle, (CantidadDetalle * PUDetalle) * PorcentajeIVA, TotalDetalles, 0, "Carga Inicial", -1, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=RetIVAPorcentaje, RetISRPorcentaje:=RetISRPorcentaje, IEPSPS:=IEPSDetalle) Then
|
||||||
|
ErrorCompras = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, CveSubProyecto, -1, 0, 1, SubTotal, SubTotal * PorcentajeIVA, SubTotal, 0, "Carga Inicial", -1, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=RetIVAPorcentaje, RetISRPorcentaje:=RetISRPorcentaje) Then
|
||||||
|
ErrorCompras = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ImpuestosLocales > 0 Then 'se agrega como parte de la partida, sin iva.
|
If ImpuestosLocales > 0 Then 'se agrega como parte de la partida, sin iva.
|
||||||
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, CveSubProyecto, -1, 0, 1, ImpuestosLocales, ImpuestosLocales, ImpuestosLocales, 0, "Carga Inicial", -1, IVAPorcentaje:=0, RetIVAPorcentaje:=0, RetISRPorcentaje:=0) Then
|
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, CveSubProyecto, -1, 0, 1, ImpuestosLocales, ImpuestosLocales, ImpuestosLocales, 0, "Carga Inicial", -1, IVAPorcentaje:=0, RetIVAPorcentaje:=0, RetISRPorcentaje:=0) Then
|
||||||
ErrorCompras = True
|
ErrorCompras = True
|
||||||
@@ -1580,6 +1672,7 @@ Partial Class General_SaldosIniciales
|
|||||||
End If
|
End If
|
||||||
Encontrados = Encontrados + 1
|
Encontrados = Encontrados + 1
|
||||||
|
|
||||||
|
CountRow = CountRow + 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -1669,6 +1762,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString(), "")
|
Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString(), "")
|
||||||
Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString().ToDecimal, 4), 0)
|
Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString().ToDecimal, 4), 0)
|
||||||
Dim PorcentajeRetIVA As Decimal = If(dt.Columns.Contains("PorcentajeRetIVA"), Round(Row("PorcentajeRetIVA").ToString().ToDecimal, 4), 0)
|
Dim PorcentajeRetIVA As Decimal = If(dt.Columns.Contains("PorcentajeRetIVA"), Round(Row("PorcentajeRetIVA").ToString().ToDecimal, 4), 0)
|
||||||
|
Dim PorcentajeRetISR As Decimal = If(dt.Columns.Contains("PorcentajeRetISR"), Round(Row("PorcentajeRetISR").ToString().ToDecimal, 4), 0)
|
||||||
|
|
||||||
Dim PedidoContrato As String = If(dt.Columns.Contains("Pedido"), Row("Pedido").ToString(), "")
|
Dim PedidoContrato As String = If(dt.Columns.Contains("Pedido"), Row("Pedido").ToString(), "")
|
||||||
|
|
||||||
@@ -1688,7 +1782,7 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
Dim CodigoDetalle As String = Row("Codigo").ToString
|
Dim CodigoDetalle As String = Row("Codigo").ToString
|
||||||
If CodigoDetalle.Trim.Length > 0 Then
|
If CodigoDetalle.Trim.Length > 0 Then
|
||||||
Dim DrDetalles As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"Codigo = {CodigoDetalle}")
|
Dim DrDetalles As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"Codigo = '{CodigoDetalle}'")
|
||||||
|
|
||||||
If DrDetalles IsNot Nothing Then
|
If DrDetalles IsNot Nothing Then
|
||||||
CvePS = DrDetalles("CvePS").ToString().ToEntero()
|
CvePS = DrDetalles("CvePS").ToString().ToEntero()
|
||||||
@@ -1795,9 +1889,14 @@ Partial Class General_SaldosIniciales
|
|||||||
TotalDetalles = (CantidadDetalle * PUDetalle) + IVA - RetIVA - RetISR + IEPSDetalle
|
TotalDetalles = (CantidadDetalle * PUDetalle) + IVA - RetIVA - RetISR + IEPSDetalle
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Math.Abs(TotalDetalles - Total) > 0.01 Then
|
||||||
|
ErrorVentas = True
|
||||||
|
Alert($"Registro {CountRow} El total no councide con el calculo de los detalles, total: {Total.ToString("###,###,###.00")} calculo detatalles: {TotalDetalles.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, CantidadDetalle, CveUnidadMedida, PUDetalle * CantidadDetalle, IVADetalle, TotalDetalles, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0,
|
If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, CantidadDetalle, CveUnidadMedida, PUDetalle * CantidadDetalle, IVADetalle, TotalDetalles, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0,
|
||||||
PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=IEPSDetalle) Then
|
PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=IEPSDetalle, PorcentajeRetISR:=PorcentajeRetISR) Then
|
||||||
ErrorVentas = True
|
ErrorVentas = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1811,9 +1910,6 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ConceptoContable As Integer = 1
|
Dim ConceptoContable As Integer = 1
|
||||||
Dim ConceptoContablePago As Integer = 2
|
Dim ConceptoContablePago As Integer = 2
|
||||||
If TipoDocto = "Egs" Then
|
If TipoDocto = "Egs" Then
|
||||||
@@ -1842,8 +1938,13 @@ Partial Class General_SaldosIniciales
|
|||||||
'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString(), 38, String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For
|
'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString(), 38, String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For
|
||||||
|
|
||||||
If RetIVA > 0 Then
|
If RetIVA > 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, RetIVA, 8, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, RetIVA, 8, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeRetIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If RetISR > 0 Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetISR, RetISR, 9, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeRetISR, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
If ImpuestoLocal > 0 Then
|
If ImpuestoLocal > 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImpuestoLocal, ImpuestoLocal, 27, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImpuestoLocal, ImpuestoLocal, 27, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||||
End If
|
End If
|
||||||
@@ -2387,7 +2488,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim AlmacenRef As DataTable = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
Dim AlmacenRef As DataTable = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||||
Dim contadorMovimientos As Integer = 0
|
Dim contadorMovimientos As Integer = 0
|
||||||
Dim listadoMovimientos As String = ""
|
Dim listadoMovimientos As String = ""
|
||||||
Dim mensajeError As String = ""
|
Dim mensajeError As New StringBuilder
|
||||||
Dim Fecha As DateTime = (TxtFecha.Text).ToDate
|
Dim Fecha As DateTime = (TxtFecha.Text).ToDate
|
||||||
Try
|
Try
|
||||||
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("Almacen <> ''", DistinctColumns:={"Almacen"}).Rows
|
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("Almacen <> ''", DistinctColumns:={"Almacen"}).Rows
|
||||||
@@ -2403,6 +2504,7 @@ Partial Class General_SaldosIniciales
|
|||||||
contadorMovimientos += 1
|
contadorMovimientos += 1
|
||||||
Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' ")
|
Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' ")
|
||||||
If RowPS IsNot Nothing Then
|
If RowPS IsNot Nothing Then
|
||||||
|
|
||||||
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero()
|
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero()
|
||||||
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
|
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
|
||||||
If CveUM > 0 Then
|
If CveUM > 0 Then
|
||||||
@@ -2415,47 +2517,47 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim PU As Decimal = If(Valor = 0, 0, (Valor / Cantidad))
|
Dim PU As Decimal = If(Valor = 0, 0, (Valor / Cantidad))
|
||||||
|
|
||||||
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then
|
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||||
mensajeError = "No se logró generar el detalle del movimiento"
|
mensajeError.Append("No se logró generar el detalle del movimiento")
|
||||||
Throw New Exception()
|
Throw New Exception()
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
mensajeError = $"La unidad de medida no se reconoce para el producto servicio:{nuevaEntrada("CodigoPS")}"
|
mensajeError.Append($"La unidad de medida no se reconoce para el producto servicio:{nuevaEntrada("CodigoPS")}")
|
||||||
Throw New Exception()
|
Throw New Exception()
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
mensajeError = "" '$"No se encontró el producto o servicio con código ""{nuevaEntrada("CodigoPS")}"""
|
mensajeError.Append($"No se encontró el producto o servicio con código ""{nuevaEntrada("CodigoPS")}"" <br>")
|
||||||
'Throw New Exception()
|
' Throw New Exception()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
If contadorMovimientos = 0 Then
|
If contadorMovimientos = 0 Then
|
||||||
mensajeError = $"No se encontraros registros del almacen: ""{almacenActual}"""
|
mensajeError.Append($"No se encontraros registros del almacen: ""{almacenActual}""")
|
||||||
Throw New Exception()
|
Throw New Exception()
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
mensajeError = $"No se registró el encabezado ""{almacenActual}"""
|
mensajeError.Append($"No se registró el encabezado ""{almacenActual}""")
|
||||||
Throw New Exception()
|
Throw New Exception()
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
mensajeError = $"No se encontró el almacén con nombre ""{almacenActual}"""
|
mensajeError.Append($"No se encontró el almacén con nombre ""{almacenActual}""")
|
||||||
Throw New Exception()
|
Throw New Exception()
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
If mensajeError = "" Then
|
If mensajeError.ToString = "" Then
|
||||||
mensajeError = "Error técnico, informar a soporte" & ex.Message
|
mensajeError.Append("Error técnico, informar a soporte" & ex.Message)
|
||||||
End If
|
End If
|
||||||
ObjMovimientos.RollBack()
|
ObjMovimientos.RollBack()
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If mensajeError = "" Then
|
If mensajeError.ToString = "" Then
|
||||||
ObjMovimientos.Commit()
|
ObjMovimientos.Commit()
|
||||||
Alert($"Se cargaron correctamente {contadorMovimientos} movimientos<br/><br/>{listadoMovimientos}")
|
Alert($"Se cargaron correctamente {contadorMovimientos} movimientos<br/><br/>{listadoMovimientos}")
|
||||||
Else
|
Else
|
||||||
Alert(mensajeError, TipoMensaje.MsgError)
|
Alert(mensajeError.ToString, TipoMensaje.MsgError)
|
||||||
ObjMovimientos.RollBack()
|
ObjMovimientos.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3083,6 +3185,8 @@ Partial Class General_SaldosIniciales
|
|||||||
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClasificaciones.xlsx"
|
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClasificaciones.xlsx"
|
||||||
ElseIf RblFormato.SelectedValue = "17" Then
|
ElseIf RblFormato.SelectedValue = "17" Then
|
||||||
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClientes-Facturas-Detalles.xlsx"
|
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClientes-Facturas-Detalles.xlsx"
|
||||||
|
ElseIf RblFormato.SelectedValue = "18" Then
|
||||||
|
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoProveedores-Facturas-Detalles.xlsx"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not (Directorio = "") Then
|
If Not (Directorio = "") Then
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Public Property CveEntregaAlmacen() As Integer
|
Public Property CveEntregaAlmacen() As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveEntregaAlmacen").ToString.ToEntero
|
Return IfNull(ViewState("CveEntregaAlmacen"), "-1", ViewState("CveEntregaAlmacen")).ToString().ToEntero()
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveEntregaAlmacen") = value
|
ViewState("CveEntregaAlmacen") = value
|
||||||
@@ -5982,7 +5982,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
MensajeAlert.Append("<br/><br/>")
|
MensajeAlert.Append("<br/><br/>")
|
||||||
|
|
||||||
If ObjTimbres.Timbrar() Then
|
If ObjTimbres.Timbrar(4) Then
|
||||||
|
|
||||||
Try
|
Try
|
||||||
PdfFactura(ObjTimbres.ObjFactura)
|
PdfFactura(ObjTimbres.ObjFactura)
|
||||||
|
|||||||
@@ -2133,6 +2133,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row ">
|
||||||
<div class="col-md-4 col-md-offset-1 form-group">
|
<div class="col-md-4 col-md-offset-1 form-group">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
@@ -2152,14 +2154,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Usuario:</label>
|
<label class="col-md-2">Solicitar a:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList ID="DdlSAUsuario" CssClass="form-control input-sm select2me" DataTextField="Nombre" DataValueField="CveUsuario" runat="server"></asp:DropDownList>
|
<asp:DropDownList ID="DdlSAUsuario" CssClass="form-control input-sm select2me" DataTextField="Nombre" DataValueField="CveUsuario" runat="server" Width="100%"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVSAUsuario" runat="server" InitialValue="-1" ControlToValidate="DdlSAUsuario" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Usuario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalSolicitarAnticipo"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVSAUsuario" runat="server" InitialValue="-1" ControlToValidate="DdlSAUsuario" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Usuario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalSolicitarAnticipo"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCESAUsuario" runat="server" HighlightCssClass="vco" TargetControlID="RFVSAUsuario" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCESAUsuario" runat="server" HighlightCssClass="vco" TargetControlID="RFVSAUsuario" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Observaciones:</label>
|
<label class="col-md-2">Observaciones:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
|
|||||||
@@ -8359,7 +8359,7 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
If GlobalDTOCEstatus(CveEmpresaActual).FiltroPrimeroValor("TipoTermino", $"CveEstatus = {CveEstatus}").ToEntero.Contiene(0, 3) Then
|
If GlobalDTOCEstatus(CveEmpresaActual).FiltroPrimeroValor("TipoTermino", $"CveEstatus = {CveEstatus}").ToEntero.Contiene(0, 3) Then
|
||||||
BtnSolicitudAnticipo.Visible = True
|
BtnSolicitudAnticipo.Visible = True
|
||||||
DdlSAUsuario.DataSource = GlobalDTUsuarios(-1, CveEmpresaActual)
|
DdlSAUsuario.DataSource = GlobalDTUsuarios(-1, CveEmpresaActual).FiltraParametros("", "Nombre")
|
||||||
DdlSAUsuario.DataBind()
|
DdlSAUsuario.DataBind()
|
||||||
DdlSAUsuario.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlSAUsuario.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -297,7 +297,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4" style="margin-top: 5px; text-align: left">
|
<div class="col-md-4" style="margin-top: 5px; text-align: left">
|
||||||
<asp:Label runat="server" ID="LblFolioAdicional"></asp:Label>
|
<asp:TextBox runat="server" ID="TxtFolioAdicional" MaxLength="50"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2" style="margin-top: 5px">
|
<div class="col-md-2" style="margin-top: 5px">
|
||||||
|
|||||||
@@ -473,7 +473,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
DVFechaCita2.Visible = True
|
DVFechaCita2.Visible = True
|
||||||
|
|
||||||
DVEpisodioPaciente.Visible = True
|
DVEpisodioPaciente.Visible = True
|
||||||
|
DivFolioAdicional.Visible = True
|
||||||
DvTxtPacienteModal.Visible = True
|
DvTxtPacienteModal.Visible = True
|
||||||
DvTxtEpisodioModal.Visible = True
|
DvTxtEpisodioModal.Visible = True
|
||||||
DvTxtFolioRemisionModal.Visible = True
|
DvTxtFolioRemisionModal.Visible = True
|
||||||
@@ -733,8 +733,8 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
TxtPaciente.Text = ObjOS.Paciente
|
TxtPaciente.Text = ObjOS.Paciente
|
||||||
TxtIdentificadorCliente.Text = ObjOS.IdentificadorCliente
|
TxtIdentificadorCliente.Text = ObjOS.IdentificadorCliente
|
||||||
LblFolioAdicional.Text = ObjOS.FolioAdicional
|
TxtFolioAdicional.Text = ObjOS.FolioAdicional
|
||||||
DivFolioAdicional.Visible = If(ObjOS.FolioAdicional.Trim.Length > 0, True, False)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1351,7 +1351,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCotizacion, -1, -1, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCotizacion, -1, -1, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||||
Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text, CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text, CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero, FechaCita:=FechaCita,
|
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero, FechaCita:=FechaCita,
|
||||||
Paciente:=TxtPaciente.Text.Trim, IdentificadorCliente:=TxtIdentificadorCliente.Text.Trim) Then
|
Paciente:=TxtPaciente.Text.Trim, IdentificadorCliente:=TxtIdentificadorCliente.Text.Trim, FolioAdicional:=TxtFolioAdicional.Text.Trim) Then
|
||||||
Errores = True
|
Errores = True
|
||||||
End If
|
End If
|
||||||
CargaCliente(CveCliente)
|
CargaCliente(CveCliente)
|
||||||
@@ -1455,7 +1455,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text,
|
DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, Direccion:=TxtDireccion.Text, Telefono:=TxtTelefono.Text,
|
||||||
CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
CveModeloAuto:=DdlModeloAuto.SelectedValue.ToEntero, Año:=TxtAnio.Text, CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero, FechaCita:=FechaCita,
|
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero, FechaCita:=FechaCita,
|
||||||
Paciente:=TxtPaciente.Text.Trim, IdentificadorCliente:=TxtIdentificadorCliente.Text.Trim) Then
|
Paciente:=TxtPaciente.Text.Trim, IdentificadorCliente:=TxtIdentificadorCliente.Text.Trim, FolioAdicional:=TxtFolioAdicional.Text.Trim) Then
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
If Not Errores Then
|
If Not Errores Then
|
||||||
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
||||||
@@ -3037,7 +3037,10 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
|
|
||||||
Select Case DdlTipoVenta.SelectedValue.ToEntero
|
Select Case DdlTipoVenta.SelectedValue.ToEntero
|
||||||
Case 2, 3
|
Case 1, 2
|
||||||
|
Opcion = 1
|
||||||
|
Exit Select
|
||||||
|
Case 3 ' por el momento ya no se usa
|
||||||
Opcion = 2
|
Opcion = 2
|
||||||
Exit Select
|
Exit Select
|
||||||
Case 5
|
Case 5
|
||||||
@@ -3074,6 +3077,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
TxtPacienteModal.Text = TxtPaciente.Text
|
TxtPacienteModal.Text = TxtPaciente.Text
|
||||||
TxtEpisodioModal.Text = TxtIdentificadorCliente.Text
|
TxtEpisodioModal.Text = TxtIdentificadorCliente.Text
|
||||||
|
TxtFolioRemisionModal.Text = TxtFolioAdicional.Text
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||||
|
|||||||
@@ -1274,7 +1274,8 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) {
|
|||||||
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'),
|
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'),
|
||||||
cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca'),
|
cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca'),
|
||||||
esdistribuidor: (!(DdlWS.data('esdistribuidor')) || DdlWS.data('esdistribuidor') == '') ? -1 : DdlWS.data('esdistribuidor'),
|
esdistribuidor: (!(DdlWS.data('esdistribuidor')) || DdlWS.data('esdistribuidor') == '') ? -1 : DdlWS.data('esdistribuidor'),
|
||||||
cveclienteclasificacion: (!(DdlWS.data('cveclienteclasificacion')) || DdlWS.data('cveclienteclasificacion') == '') ? -1 : DdlWS.data('cveclienteclasificacion')
|
cveclienteclasificacion: (!(DdlWS.data('cveclienteclasificacion')) || DdlWS.data('cveclienteclasificacion') == '') ? -1 : DdlWS.data('cveclienteclasificacion'),
|
||||||
|
cvealmacen: (!(DdlWS.data('cvealmacen')) || DdlWS.data('cvealmacen') == '') ? -1 : DdlWS.data('cvealmacen')
|
||||||
|
|
||||||
|
|
||||||
//Metodo: metodo
|
//Metodo: metodo
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ div
|
|||||||
background-color: #EBF4E4; padding: 1px; color: #3C3C3C; vertical-align: middle;
|
background-color: #EBF4E4; padding: 1px; color: #3C3C3C; vertical-align: middle;
|
||||||
font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; height:25px;
|
font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; height:25px;
|
||||||
}
|
}
|
||||||
|
input.fechahora {
|
||||||
|
width: 130px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
.contenido {
|
.contenido {
|
||||||
background-color: #FFFFFF; font-size: 10px;
|
background-color: #FFFFFF; font-size: 10px;
|
||||||
@@ -727,4 +731,4 @@ ul.treeviewarbol li input[type=checkbox]:checked + div:before{
|
|||||||
}
|
}
|
||||||
.form-line .catcuentas.right{
|
.form-line .catcuentas.right{
|
||||||
width:230px;
|
width:230px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,10 +34,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<asp:UpdatePanel ID="UPPD" runat="server">
|
<asp:UpdatePanel ID="UPPD" runat="server">
|
||||||
|
<Triggers>
|
||||||
|
</Triggers>
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||||
<asp:GridView ID="GvBoletos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
|
<asp:GridView ID="GvBoletos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
|
||||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||||
|
OnRowDataBound="GvBoletos_RowDataBound"
|
||||||
data-sort="true" DataKeyNames="CveViajePasajero,Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe,FechaIng, Agencia, TelefonoAgencia">
|
data-sort="true" DataKeyNames="CveViajePasajero,Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe,FechaIng, Agencia, TelefonoAgencia">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="No. Asiento">
|
<asp:TemplateField HeaderText="No. Asiento">
|
||||||
@@ -89,8 +92,8 @@
|
|||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
<%--<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />--%>
|
||||||
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
|
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
|
||||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
|
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
|
||||||
|
|||||||
@@ -1,88 +1,88 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports ADSNetLibrary.Helpers
|
Imports ADSNetLibrary.Helpers
|
||||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||||
Imports Extensiones.ModExtensiones
|
Imports Extensiones.ModExtensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class ListadoBoletos
|
Partial Class ListadoBoletos
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
Private Property CveViaje As Integer
|
Private Property CveViaje As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveViaje").ToString().ToEntero
|
Return ViewState("CveViaje").ToString().ToEntero
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveViaje") = value
|
ViewState("CveViaje") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property Ruta As String
|
Private Property Ruta As String
|
||||||
Get
|
Get
|
||||||
Return ViewState("Ruta").ToString()
|
Return ViewState("Ruta").ToString()
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
ViewState("Ruta") = value
|
ViewState("Ruta") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
If Request.QueryString("CveViaje") Is Nothing Then
|
If Request.QueryString("CveViaje") Is Nothing Then
|
||||||
Response.Redirect("/Transportes/RepViajes.aspx")
|
Response.Redirect("/Transportes/RepViajes.aspx")
|
||||||
End If
|
End If
|
||||||
CveViaje = Request.QueryString("CveViaje").ToEntero
|
CveViaje = Request.QueryString("CveViaje").ToEntero
|
||||||
Ruta = IfNull(Request("Ruta"), "").ToString
|
Ruta = IfNull(Request("Ruta"), "").ToString
|
||||||
LblViaje.Text = Ruta
|
LblViaje.Text = Ruta
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim ObjTransportes As New ClsTransportes
|
Dim ObjTransportes As New ClsTransportes
|
||||||
If ObjTransportes.GetViajesPasajeros(CveViaje) Then
|
If ObjTransportes.GetViajesPasajeros(CveViaje) Then
|
||||||
GvBoletos.DataSource = ObjTransportes.DtResultados
|
GvBoletos.DataSource = ObjTransportes.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjTransportes.Dispose()
|
ObjTransportes.Dispose()
|
||||||
GvBoletos.DataBind()
|
GvBoletos.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
|
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
|
||||||
Dim dtResult As New DataTable()
|
Dim dtResult As New DataTable()
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
Dim Fecha As Date = GvRow.DataKey("FechaIng").ToDate
|
Dim Fecha As Date = GvRow.DataKey("FechaIng").ToDate
|
||||||
Dim Importe As Decimal = GvRow.DataKey("Importe").ToDecimal
|
Dim Importe As Decimal = GvRow.DataKey("Importe").ToDecimal
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter) From {
|
Dim params As New List(Of ReportParameter) From {
|
||||||
New ReportParameter("Ruta", Ruta),
|
New ReportParameter("Ruta", Ruta),
|
||||||
New ReportParameter("Origen", GvRow.DataKey("Partida")),
|
New ReportParameter("Origen", GvRow.DataKey("Partida")),
|
||||||
New ReportParameter("Destino", GvRow.DataKey("Destino")),
|
New ReportParameter("Destino", GvRow.DataKey("Destino")),
|
||||||
New ReportParameter("FechaSalida", Fecha.ToShortDateString()),
|
New ReportParameter("FechaSalida", Fecha.ToShortDateString()),
|
||||||
New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")),
|
New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")),
|
||||||
New ReportParameter("Nombre", GvRow.DataKey("Nombre")),
|
New ReportParameter("Nombre", GvRow.DataKey("Nombre")),
|
||||||
New ReportParameter("Visa", GvRow.DataKey("Visa")),
|
New ReportParameter("Visa", GvRow.DataKey("Visa")),
|
||||||
New ReportParameter("Celular", GvRow.DataKey("Celular")),
|
New ReportParameter("Celular", GvRow.DataKey("Celular")),
|
||||||
New ReportParameter("Importe", Math.Round(Importe, 1).ToString),
|
New ReportParameter("Importe", Importe.FormatoNumero(2)),
|
||||||
New ReportParameter("TipoBoleto", "Tipo Boleto"),
|
New ReportParameter("TipoBoleto", "Tipo Boleto"),
|
||||||
New ReportParameter("Agencia", GvRow.DataKey("Agencia")),
|
New ReportParameter("Agencia", GvRow.DataKey("Agencia")),
|
||||||
New ReportParameter("TelefonoAgencia", GvRow.DataKey("TelefonoAgencia")),
|
New ReportParameter("TelefonoAgencia", GvRow.DataKey("TelefonoAgencia")),
|
||||||
New ReportParameter("Asiento", GvRow.DataKey("Asiento"))
|
New ReportParameter("Asiento", GvRow.DataKey("Asiento"))
|
||||||
}
|
}
|
||||||
|
|
||||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", dtResult, params, NombreArchivo:="Boleto")
|
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", dtResult, params, NombreArchivo:="Boleto")
|
||||||
'Empresas/Grales/Formatos/EntradaSalida.mrt
|
'Empresas/Grales/Formatos/EntradaSalida.mrt
|
||||||
'Empresas/188/Formatos/Boleto.mrt
|
'Empresas/188/Formatos/Boleto.mrt
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
Dim CveViajePasajero As Integer = GvRow.DataKey("CveViajePasajero").ToEntero()
|
Dim CveViajePasajero As Integer = GvRow.DataKey("CveViajePasajero").ToEntero()
|
||||||
Dim Estatus As String = GvRow.DataKey("Estatus")
|
Dim Estatus As String = GvRow.DataKey("Estatus")
|
||||||
Dim cambiarEstatus As Boolean = Not Estatus.ToBool
|
Dim cambiarEstatus As Boolean = Not Estatus.ToBool
|
||||||
|
|
||||||
|
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
Try
|
Try
|
||||||
Dim DtRem As DataTable = Nothing
|
Dim DtRem As DataTable = Nothing
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ Partial Class ListadoBoletos
|
|||||||
Else
|
Else
|
||||||
'SI NO TIENE VENTA, SOLO CANCELAR EL BOLETO
|
'SI NO TIENE VENTA, SOLO CANCELAR EL BOLETO
|
||||||
Dim ObjTran2 As New ClsTransportes
|
Dim ObjTran2 As New ClsTransportes
|
||||||
If Not ObjTran2.UpdateViajesPasajeros(CveViajePasajero) Then
|
If Not ObjTran2.CancelarViaje(CveViajePasajero) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
ObjTran2.Dispose()
|
ObjTran2.Dispose()
|
||||||
@@ -129,16 +129,21 @@ Partial Class ListadoBoletos
|
|||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
TieneError = True
|
TieneError = True
|
||||||
GuardaLog(ex.ToString())
|
GuardaLog(ex.ToString())
|
||||||
Finally
|
Finally
|
||||||
If TieneError Then
|
If TieneError Then
|
||||||
Alert($"Ocurrió un error al cancelar el boleto.", TipoMensaje.MsgError)
|
Alert($"Ocurrió un error al cancelar el boleto.", TipoMensaje.MsgError)
|
||||||
Else
|
Else
|
||||||
Alert($"El boleto ha sido cancelado correctamente.")
|
Alert($"El boleto ha sido cancelado correctamente.")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvBoletos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("BtnImprimir"))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
Inherits="ListadoContratos" %>
|
Inherits="ListadoContratos" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||||
Listado de Contratos
|
Contratos
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ Partial Class ListadoContratos
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub InicializaCombos()
|
Private Sub InicializaCombos()
|
||||||
'Lista Tipo AF
|
'Lista Tipo AF
|
||||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
||||||
DdlTipoAF.DataBind()
|
DdlTipoAF.DataBind()
|
||||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
||||||
|
|
||||||
DdlTipoUnidad.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
DdlTipoUnidad.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
|
||||||
DdlTipoUnidad.DataBind()
|
DdlTipoUnidad.DataBind()
|
||||||
DdlTipoUnidad.Items.Insert(0, New ListItem("-", ""))
|
DdlTipoUnidad.Items.Insert(0, New ListItem("-", ""))
|
||||||
'Lista Chofer'
|
'Lista Chofer'
|
||||||
|
|||||||
@@ -539,12 +539,12 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim ExistePDF As Boolean = False
|
Dim ExistePDF As Boolean = False
|
||||||
Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||||
|
|
||||||
If System.IO.File.Exists(ArchivoPDF) Then
|
If ObjFactura.TipoDocto = "Rem" AndAlso System.IO.File.Exists(ArchivoPDF) Then
|
||||||
ExistePDF = True
|
ExistePDF = True
|
||||||
Else
|
Else
|
||||||
'REGENERAR EL PDF
|
'REGENERAR EL PDF
|
||||||
Try
|
Try
|
||||||
GenerarPDFVenta(CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False)
|
GenerarPDFVenta(CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False, EsTicket:=True)
|
||||||
If System.IO.File.Exists(ArchivoPDF) Then
|
If System.IO.File.Exists(ArchivoPDF) Then
|
||||||
ExistePDF = True
|
ExistePDF = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -209,6 +209,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HplDownPDF" Target="_blank" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Imprimir PDF</asp:HyperLink>
|
<asp:HyperLink ID="HplDownPDF" Target="_blank" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Imprimir PDF</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink ID="HplImprimirTicket" Target="_blank" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Imprimir Ticket</asp:HyperLink>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkDescargaDirecta" runat="server" Visible="false" OnClick="LnkDescargaDirecta_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Impresión directa</asp:LinkButton>
|
<asp:LinkButton ID="LnkDescargaDirecta" runat="server" Visible="false" OnClick="LnkDescargaDirecta_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Impresión directa</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
@@ -305,7 +308,6 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LBCancelarPedido" runat="server" CausesValidation="False" CommandName="Delete" Text="<i class='fa fa-ban'></i> Cancelar Pedido" OnClick="LBCancelarPedido_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Estás seguro que deseas cancelar el Pedido?" data-btn-ok-label="si" Visible="false" />
|
<asp:LinkButton ID="LBCancelarPedido" runat="server" CausesValidation="False" CommandName="Delete" Text="<i class='fa fa-ban'></i> Cancelar Pedido" OnClick="LBCancelarPedido_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Estás seguro que deseas cancelar el Pedido?" data-btn-ok-label="si" Visible="false" />
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<asp:Panel runat="server" ID="PnlImprimir" Visible="False">
|
<asp:Panel runat="server" ID="PnlImprimir" Visible="False">
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton runat="server" ID="LnkImprimir"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
<asp:LinkButton runat="server" ID="LnkImprimir"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||||
@@ -604,7 +606,7 @@
|
|||||||
<b>Fecha de Cirugia:</b>
|
<b>Fecha de Cirugia:</b>
|
||||||
</td>
|
</td>
|
||||||
<td runat="server" id="TdFechaOS2" visible="true">
|
<td runat="server" id="TdFechaOS2" visible="true">
|
||||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CausesValidation="true" CssClass="fechahora" Style="width: 130px; line-height: 22px;"></asp:TextBox>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr runat="server" id="TrVentasMedicas3" visible="false">
|
<tr runat="server" id="TrVentasMedicas3" visible="false">
|
||||||
@@ -970,6 +972,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" class=" xspadding .nolineheight bordered whitoutcol" style="color: white;">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="DivBloqueoAcceso" runat="server" style="width: 100%; text-align: center;" visible="false">
|
||||||
|
<asp:Button ID="BtnBloquearAcceso" ClientIDMode="Static" CssClass="btn red-haze btn-outline btn-circle btn-sm" runat="server" Text="Bloquear Turno" OnClick="BtnBloquearAcceso_Click" />
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="Updatetabs" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="Updatetabs" runat="server" UpdateMode="Conditional">
|
||||||
@@ -1604,7 +1613,7 @@
|
|||||||
<td style="border: 1px none white"><b>Amort. Ant.:</b></td>
|
<td style="border: 1px none white"><b>Amort. Ant.:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:Label ID="LblAmortizacion" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00" Width="78px"></asp:Label></td>
|
<asp:Label ID="LblAmortizacion" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00" Width="78px"></asp:Label></td>
|
||||||
<td align="right"> <asp:LinkButton ID="ImgAntiPend" runat="server" Text=" <i class='fa fa-money font-green'></i> " AlternateText="Cancelación de Anticipos" Style="cursor: pointer;" />
|
<td align="right"> <asp:LinkButton ID="ImgAntiPend" runat="server" OnClick="ImgAntiPend_Click" Text=" <i class='fa fa-money font-green'></i> " AlternateText="Cancelación de Anticipos" Style="cursor: pointer;" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -4358,9 +4367,10 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCEPorPS" runat="server" HighlightCssClass="vco" TargetControlID="CVPorPS" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEPorPS" runat="server" HighlightCssClass="vco" TargetControlID="CVPorPS" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
(%)
|
(%)
|
||||||
</td>
|
</td>
|
||||||
<td><label style="display:none;">IVA</label></td>
|
|
||||||
<td>
|
<td>
|
||||||
<asp:Label ID="LblIVADescPS" runat="server" ClientIDMode="Static" Text="0.00" style="display:none;"></asp:Label>
|
<label style="display: none;">IVA</label></td>
|
||||||
|
<td>
|
||||||
|
<asp:Label ID="LblIVADescPS" runat="server" ClientIDMode="Static" Text="0.00" Style="display: none;"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -4378,7 +4388,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td><b>
|
<td><b>
|
||||||
<asp:Label ID="LblUtilidadPorcentaje" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></b>
|
<asp:Label ID="LblUtilidadPorcentaje" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></b>
|
||||||
 
|
 
|
||||||
<asp:Label ID="LblPrecioCompra" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></td>
|
<asp:Label ID="LblPrecioCompra" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -4401,6 +4411,50 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="ModalPermisoDesc" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:Panel runat="server" ID="UpAutorizarDesc" DefaultButton="BtnAutorizarDescuento">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Autorizar descuento"></asp:Label>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 v-center" style="display: flex">
|
||||||
|
<i class="fa fa-user fa-2 icontxt" style="font-size: 20px!important;"></i>
|
||||||
|
|
||||||
|
<asp:TextBox ID="txtUserDesc" runat="server" CssClass="form-control" placeholder="Usuario" ClientIDMode="Static" AutoComplete="off"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvUsuario" runat="server" ControlToValidate="txtUserDesc" Display="Static" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Usuario''</b> es necesario.</span></span>" ValidationGroup="GrpAutorizarDesc"></asp:RequiredFieldValidator>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 v-center" style="display: flex">
|
||||||
|
<i class="fa fa-lock fa-2 icontxt" style="font-size: 20px!important;"></i>
|
||||||
|
|
||||||
|
<asp:TextBox ID="txtPassDesc" runat="server" CssClass="form-control" placeholder="Contraseña" type="password" ClientIDMode="Static" AutoComplete="off"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvContraseña" runat="server" ControlToValidate="txtPassDesc" Display="Static" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Contraseña''</b> es necesario.</span></span>" ValidationGroup="GrpAutorizarDesc"></asp:RequiredFieldValidator>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnAutorizarDescuento" runat="server" Text="Aplicar" ValidationGroup="GrpAutorizarDesc" CssClass="btn btn-primary" OnClick="BtnAutorizarDescuento_Click" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
</div>
|
||||||
<div id="DivAnticipos" class="modal ADS fade" role="dialog">
|
<div id="DivAnticipos" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" class="modal-dialog">
|
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" class="modal-dialog">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -8631,7 +8685,41 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<asp:Button ID="BtnShowBloqueoAcceso" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||||
|
<asp:Button ID="BtnCloseBloqueoAcceso" runat="server" CssClass="btn btn-danger" Style="visibility: hidden; display: none;" Text="Cancelar" />
|
||||||
|
|
||||||
|
<!-- ModalPopupExtender -->
|
||||||
|
<cc1:ModalPopupExtender ID="mpeBloque" runat="server" PopupControlID="PanelBloqueoAcceso" TargetControlID="BtnShowBloqueoAcceso"
|
||||||
|
BackgroundCssClass="modalBackground">
|
||||||
|
</cc1:ModalPopupExtender>
|
||||||
|
|
||||||
|
<asp:Panel ID="PanelBloqueoAcceso" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||||
|
<table border="0" width="250px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||||
|
<tr style="background-color: #3598dc; color: #FFFFFF; font-size: 14px; text-align: center">
|
||||||
|
<td colspan="2">
|
||||||
|
<asp:Label runat="server" Text="<i class='fa fa-lock fa-2 icontxt'></i> Acceso Restringido" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1">
|
||||||
|
<asp:Label runat="server" Text="Código de Acceso:" Font-Bold="true" Width="120px" />
|
||||||
|
</td>
|
||||||
|
<td colspan="1" style="text-align: center">
|
||||||
|
<asp:TextBox ID="TxtCodigoAcceso" runat="server" type="password"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCodigoAcceso" runat="server" ControlToValidate="TxtCodigoAcceso" Display="None" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Código de Acceso''</b> es necesario.</span></span>" ValidationGroup="GrpValidarCodigo"></asp:RequiredFieldValidator>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><span class='has-error'><span id='username-error' class='help-block'>
|
||||||
|
<asp:Literal ID="LtlMensajeBloqueo" runat="server" Text=""></asp:Literal></span></span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<asp:Button ID="BtnCambiar" runat="server" CssClass="btn btn-success btn-sm" Text="Desbloquear" ValidationGroup="GrpValidarCodigo" OnClick="BtnCambiar_Click" />
|
||||||
|
|
||||||
|
</asp:Panel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -9749,45 +9837,57 @@
|
|||||||
|
|
||||||
|
|
||||||
function CalculaDescPS() {
|
function CalculaDescPS() {
|
||||||
|
console.log("evento descuento");
|
||||||
if ($get("TxtPorPS").value != "") {
|
if ($get("TxtPorPS").value != "") {
|
||||||
var PorcentajeDescuento = parseFloat($get("TxtPorPS").value);
|
let PorcentajeDescuento = parseFloat($get("TxtPorPS").value);
|
||||||
if (PorcentajeDescuento < 0 || PorcentajeDescuento > 99) {
|
if (PorcentajeDescuento < 0 || PorcentajeDescuento > 99) {
|
||||||
alert("No se puede aplicar ese porcentaje de descuento");
|
alert("No se puede aplicar ese porcentaje de descuento");
|
||||||
$get("TxtPorPS").value = "0";
|
$get("TxtPorPS").value = "0";
|
||||||
|
recalcularUtilidad(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var ivaPor = parseFloat($get("HdnIVADescPS").value) ;
|
let ivaPor = parseFloat($get("HdnIVADescPS").value) ;
|
||||||
|
|
||||||
var subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
|
|
||||||
$get("LblDescPS").innerText = formato_numero(((subTotal * PorcentajeDescuento) / 100), 2, '.', ',');
|
$get("LblDescPS").innerText = formato_numero(((subTotal * PorcentajeDescuento) / 100), 2, '.', ',');
|
||||||
|
|
||||||
var descuento = parseFloat($get("LblDescPS").innerText.replace(",", "").replace(",", ""));
|
let descuento = parseFloat($get("LblDescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
|
|
||||||
$get("LblIVADescPS").innerText = formato_numero(((subTotal - descuento) * ivaPor), 2, '.', ',');
|
$get("LblIVADescPS").innerText = formato_numero(((subTotal - descuento) * ivaPor), 2, '.', ',');
|
||||||
|
|
||||||
var importeIVA =parseFloat($get("LblIVADescPS").innerText.replace(",", "").replace(",", ""));
|
let importeIVA =parseFloat($get("LblIVADescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
|
|
||||||
var Total = (subTotal - descuento) + importeIVA;
|
let Total = (subTotal - descuento) + importeIVA;
|
||||||
|
|
||||||
$get("LblTotalFinalDescPS").innerText = formato_numero(Total, 2, '.', ',');
|
$get("LblTotalFinalDescPS").innerText = formato_numero(Total, 2, '.', ',');
|
||||||
|
|
||||||
$get("HdnDescPS").value = descuento;
|
$get("HdnDescPS").value = descuento;
|
||||||
|
|
||||||
var totalCompra = parseFloat($get("HdnTotalCompra").value);
|
recalcularUtilidad(descuento)
|
||||||
if (totalCompra > 0) {
|
} else {
|
||||||
var totalRedondeado = parseFloat($get("LblTotalFinalDescPS").innerText.replace(",", "").replace(",", ""));
|
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
var utilidad = ((totalRedondeado - totalCompra) / totalRedondeado) * 100;
|
$get("LblIVADescPS").innerText = formato_numero((subTotal * ivaPor), 2, '.', ',');
|
||||||
|
let importeIVA =parseFloat($get("LblIVADescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
|
let Total = (subTotal) + importeIVA;
|
||||||
|
|
||||||
$get("LblUtilidadPorcentaje").innerText = formato_numero(utilidad, 2, '.', ',');
|
$get("LblTotalFinalDescPS").innerText = formato_numero(Total, 2, '.', ',');
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$get("LblTotalFinalDescPS").innerText = "0.00";
|
|
||||||
$get("LblDescPS").innerText = "0.00";
|
$get("LblDescPS").innerText = "0.00";
|
||||||
$get("LblIVADescPS").innerText = "0.00";
|
|
||||||
$get("LblUtilidadPorcentaje").innerText = "0.00";
|
$get("LblUtilidadPorcentaje").innerText = "0.00";
|
||||||
$get("HdnDescPS").innerText = "0.00";
|
$get("HdnDescPS").innerText = "0.00";
|
||||||
|
|
||||||
|
recalcularUtilidad(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function recalcularUtilidad(descuento){
|
||||||
|
let totalCompra = parseFloat($get("HdnTotalCompra").value);
|
||||||
|
if (totalCompra > 0) {
|
||||||
|
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
|
let subTotal2 = subTotal - descuento;
|
||||||
|
let utilidad = ((subTotal2 - totalCompra) / subTotal2) * 100;
|
||||||
|
|
||||||
|
$get("LblUtilidadPorcentaje").innerText = formato_numero(utilidad, 2, '.', ',');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10147,7 +10247,7 @@
|
|||||||
|
|
||||||
$get("HdnTipoDescuento").value = "3";
|
$get("HdnTipoDescuento").value = "3";
|
||||||
//si es con.nc,es.el.total
|
//si es con.nc,es.el.total
|
||||||
var Total = ToDouble($get(TipoAnticipo == 2 ? 'TxtTotal' : 'TxtSubTotal').value);
|
var Total = ToDouble($get((TipoAnticipo == 2 || TipoAnticipo == 4) ? 'TxtTotal' : 'TxtSubTotal').value);
|
||||||
|
|
||||||
var SaldoCompra = parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
|
var SaldoCompra = parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
|
||||||
if (ToDouble($get('HdnCveVenta').value) == 0) SaldoCompra = Total;
|
if (ToDouble($get('HdnCveVenta').value) == 0) SaldoCompra = Total;
|
||||||
|
|||||||
@@ -157,6 +157,15 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property TmpDTAnticiposNCIxCCliente As DataTable
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("TmpDTAnticiposNCIxCCliente")), Nothing, CType(ViewState("TmpDTAnticiposNCIxCCliente"), DataTable))
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("TmpDTAnticiposNCIxCCliente") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property TmpDTError As DataTable
|
Private Property TmpDTError As DataTable
|
||||||
Get
|
Get
|
||||||
Return If(IsNothing(ViewState("TmpDTError")), Nothing, CType(ViewState("TmpDTError"), DataTable))
|
Return If(IsNothing(ViewState("TmpDTError")), Nothing, CType(ViewState("TmpDTError"), DataTable))
|
||||||
@@ -2311,6 +2320,21 @@ Partial Class Ventas
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property CveAlamcenFiltroDdl As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveAlamcenFiltroDdl") Is Nothing Then
|
||||||
|
ViewState("CveAlamcenFiltroDdl") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CveAlamcenFiltroDdl").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveAlamcenFiltroDdl") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "VENTA MEDICA"
|
#Region "VENTA MEDICA"
|
||||||
|
|
||||||
Property EsVentaMedica As Boolean
|
Property EsVentaMedica As Boolean
|
||||||
@@ -2485,7 +2509,7 @@ Partial Class Ventas
|
|||||||
TxtFechaFRem.Text = NowADS().ToShortDateString
|
TxtFechaFRem.Text = NowADS().ToShortDateString
|
||||||
TxtFechaFPedido.Text = NowADS().ToShortDateString
|
TxtFechaFPedido.Text = NowADS().ToShortDateString
|
||||||
TxtFechaFOC.Text = NowADS().ToShortDateString
|
TxtFechaFOC.Text = NowADS().ToShortDateString
|
||||||
|
ValidaUsuarioAcceso()
|
||||||
|
|
||||||
TrSinExistencia.Visible = UsuarioActual.TienePermisoProceso(276)
|
TrSinExistencia.Visible = UsuarioActual.TienePermisoProceso(276)
|
||||||
|
|
||||||
@@ -2572,7 +2596,7 @@ Partial Class Ventas
|
|||||||
ImgDescTotal.Visible = False
|
ImgDescTotal.Visible = False
|
||||||
|
|
||||||
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
|
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
|
||||||
ImgAntiPend.Attributes.Add("onclick", "$get('HdnTipoDescuento').value = '3'; MuestraAnticipos();")
|
'ImgAntiPend.Attributes.Add("onclick", "$get('HdnTipoDescuento').value = '3'; MuestraAnticipos();")
|
||||||
ImgOtrosConceptos.Attributes.Add("onclick", "javascript:$('#ModalOtrosConceptos').modal();")
|
ImgOtrosConceptos.Attributes.Add("onclick", "javascript:$('#ModalOtrosConceptos').modal();")
|
||||||
'LkbAgregarComplementos.Attributes.Add("onclick", "javascript:$('#ModalComplementos').modal();")
|
'LkbAgregarComplementos.Attributes.Add("onclick", "javascript:$('#ModalComplementos').modal();")
|
||||||
'ImgCerrar.Attributes.Add("OnClick", "$('#DivAnticipos').hide();")
|
'ImgCerrar.Attributes.Add("OnClick", "$('#DivAnticipos').hide();")
|
||||||
@@ -3528,7 +3552,135 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "Bloqueo Pantalla"
|
||||||
|
Private Sub ValidaUsuarioAcceso()
|
||||||
|
'VERIFICAR SI LA SESION SE ENCUENTRA BLOQUEADA
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
|
||||||
|
Dim DrUsuario As DataRow = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||||
|
|
||||||
|
If DrUsuario IsNot Nothing AndAlso DrUsuario("CodigoAcceso").ToString() <> "" Then
|
||||||
|
If UsuarioActual.SesionBloqueada Then
|
||||||
|
DivBloqueoAcceso.Visible = False
|
||||||
|
Dim strScript As New StringBuilder
|
||||||
|
strScript.Append("window.onload = function MuestraBloqueo() { document.getElementById(""C_BtnShowBloqueoAcceso"").click(); setTimeout(function(){ $('#C_TxtCodigoAcceso').focus(); ")
|
||||||
|
If UsuarioActual.ErrorDesbloqueo Then
|
||||||
|
LtlMensajeBloqueo.Text = UsuarioActual.MsgErrorDesbloqueo
|
||||||
|
'strScript.AppendFormat("alert('{0}');", UsuarioActual.MsgErrorDesbloqueo)
|
||||||
|
End If
|
||||||
|
strScript.Append("}, 500); }")
|
||||||
|
RegistraScript(strScript.ToString())
|
||||||
|
|
||||||
|
UsuarioActual.SesionBloqueada = True
|
||||||
|
UsuarioActual.ErrorDesbloqueo = False
|
||||||
|
UsuarioActual.MsgErrorDesbloqueo = ""
|
||||||
|
|
||||||
|
BtnEmitirImprimir.Visible = False
|
||||||
|
Exit Sub
|
||||||
|
Else
|
||||||
|
DivBloqueoAcceso.Visible = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
DivBloqueoAcceso.Visible = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
DivBloqueoacceso.Visible = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnCambiar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
UsuarioActual.ErrorDesbloqueo = False
|
||||||
|
UsuarioActual.MsgErrorDesbloqueo = ""
|
||||||
|
|
||||||
|
If String.IsNullOrEmpty(TxtCodigoAcceso.Text.Trim) Then
|
||||||
|
UsuarioActual.SesionBloqueada = True
|
||||||
|
UsuarioActual.ErrorDesbloqueo = True
|
||||||
|
UsuarioActual.MsgErrorDesbloqueo = "Es necesario un código de acceso"
|
||||||
|
|
||||||
|
Response.Redirect($"~/Ventas/Ventas.aspx")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveUsuarioNuevo As Integer = -1
|
||||||
|
|
||||||
|
Using ObjUsuarios As New ClsSisUsuarios
|
||||||
|
CveUsuarioNuevo = ObjUsuarios.ValidaUsuarioCodigoAcceso(TxtCodigoAcceso.Text.Trim, UsuarioActual.CveEmpresa)
|
||||||
|
End Using
|
||||||
|
|
||||||
|
Dim DrUsuario As DataRow = Nothing
|
||||||
|
|
||||||
|
If CveUsuarioNuevo > 0 Then
|
||||||
|
DrUsuario = GlobalDTUsuarios(CveUsuarioNuevo, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 1", "", {"CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol"}).Rows(0)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DrUsuario IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim tUsuario, tContraseña As String
|
||||||
|
Dim tCveEmpresa As Integer
|
||||||
|
tUsuario = DrUsuario("Usuario").ToString
|
||||||
|
tContraseña = DrUsuario("Contraseña").ToString
|
||||||
|
tCveEmpresa = DrUsuario("CveEmpresa").ToString.ToEntero
|
||||||
|
|
||||||
|
Dim ObjUsuario As New ClsSisUsuarios
|
||||||
|
Dim Usuario As Usuario
|
||||||
|
|
||||||
|
Usuario = ObjUsuario.ValidaUsuario(tUsuario, tContraseña, IMEI, tCveEmpresa)
|
||||||
|
|
||||||
|
ObjUsuario.Dispose()
|
||||||
|
|
||||||
|
If Usuario IsNot Nothing Then
|
||||||
|
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||||
|
ADSSession.ADSSessionConfig.sessionUser = Usuario
|
||||||
|
ADSSession.ADSSessionConfig.sessionUser.CvePlataforma = 1
|
||||||
|
ADSSession.ADSSessionConfig.sessionDpage = False
|
||||||
|
ADSSession.ADSSessionConfig.sessionUser.ModoSimulacion = False
|
||||||
|
|
||||||
|
If dt IsNot Nothing Then
|
||||||
|
If dt.Rows.Count >= 1 Then
|
||||||
|
If dt.Rows.Count > 1 Then ADSSession.ADSSessionConfig.sessionUser.MultipleEmpresa = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
dt.Dispose()
|
||||||
|
|
||||||
|
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||||
|
If ObjEmpresa.GetEmpresas(tCveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||||
|
If ObjEmpresa.GetEmpresasFuncionalidades(tCveEmpresa) Then
|
||||||
|
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
||||||
|
|
||||||
|
Dim EmpresasFuncionalidades As New HybridDictionary
|
||||||
|
For Each Row As Data.DataRow In dttmp.Rows
|
||||||
|
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
||||||
|
Next
|
||||||
|
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||||
|
ADSSession.ADSSessionConfig.sessionUser.CveEmpresa = ObjEmpresa.Empresa.CveEmpresa
|
||||||
|
|
||||||
|
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, ObjEmpresa.Empresa.CveEmpresa)
|
||||||
|
End If
|
||||||
|
ObjEmpresa.Dispose()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Response.Redirect($"~/Ventas/Ventas.aspx")
|
||||||
|
Else
|
||||||
|
UsuarioActual.SesionBloqueada = True
|
||||||
|
UsuarioActual.ErrorDesbloqueo = True
|
||||||
|
UsuarioActual.MsgErrorDesbloqueo = "El código de acceso no es correcto"
|
||||||
|
|
||||||
|
Response.Redirect($"~/Ventas/Ventas.aspx")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnBloquearAcceso_Click(sender As Object, e As EventArgs)
|
||||||
|
UsuarioActual.SesionBloqueada = True
|
||||||
|
|
||||||
|
Response.Redirect($"~/Ventas/Ventas.aspx")
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Private Sub CargaListasPrecios()
|
Private Sub CargaListasPrecios()
|
||||||
DivPrecioLista.Visible = True
|
DivPrecioLista.Visible = True
|
||||||
@@ -4784,6 +4936,13 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
TxtAlfa1.Text = DbRowVenta("Alfa1").ToString
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Using
|
End Using
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -4937,7 +5096,10 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Case "Rem"
|
Case "Rem"
|
||||||
'IPP 15 Julio 2017
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
TxtAtencionA.Text = DbRowVenta("AtencionA").ToString()
|
||||||
|
End If
|
||||||
|
|
||||||
Trsaldo.Visible = True
|
Trsaldo.Visible = True
|
||||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||||
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||||
@@ -7909,8 +8071,16 @@ Partial Class Ventas
|
|||||||
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
||||||
Objeto.ddlWS.Attributes.Add("data-AplicaparaVenta", "1")
|
Objeto.ddlWS.Attributes.Add("data-AplicaparaVenta", "1")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
Objeto.Attributes.Add("data-CveAlmacen", $"{CveAlamcenFiltroDdl}")
|
||||||
|
Objeto.ddlWS.Attributes.Add("data-CveAlmacen", $"{CveAlamcenFiltroDdl}")
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaPSRemision(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
|
Private Sub CargaPSRemision(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
|
||||||
@@ -8279,7 +8449,7 @@ Partial Class Ventas
|
|||||||
e.Row.FCLinkButton("imgE").Visible = True
|
e.Row.FCLinkButton("imgE").Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso UsuarioActual.TienePermisoProceso(374) Then
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
e.Row.FCLinkButton("LnkDescuentos").Visible = True
|
e.Row.FCLinkButton("LnkDescuentos").Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -9643,6 +9813,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
HplImprimirPDFStimulsoft.Visible = True
|
HplImprimirPDFStimulsoft.Visible = True
|
||||||
HplImprimirPDFStimulsoft.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=0&STIMULSOFT=1", CveVenta)))
|
HplImprimirPDFStimulsoft.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=0&STIMULSOFT=1", CveVenta)))
|
||||||
|
|
||||||
|
HplImprimirTicket.Visible = True
|
||||||
|
HplImprimirTicket.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1&TICKET=1®ENERAR=1", CveVenta)))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -10685,7 +10858,13 @@ Partial Class Ventas
|
|||||||
Liga = $"document.location.href=""/CRM/Acercamiento.aspx?CveAcercamiento={CveAcercamientoCRM}&OPTAB=COT"";"
|
Liga = $"document.location.href=""/CRM/Acercamiento.aspx?CveAcercamiento={CveAcercamientoCRM}&OPTAB=COT"";"
|
||||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga, TextoConfirmacion:="Aceptar", TextoSegundoBoton:=Nothing, JSBtn2:=Nothing, ShowCloseButton:=False)
|
Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga, TextoConfirmacion:="Aceptar", TextoSegundoBoton:=Nothing, JSBtn2:=Nothing, ShowCloseButton:=False)
|
||||||
Else
|
Else
|
||||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
'SI TIENE MODULO DE COBRANZA, NO MARDAR AL CLIENTE, DEBE SEGUIR REGISTRANDO
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga, TextoConfirmacion:="Seguir Registrando", ShowCloseButton:=False)
|
||||||
|
Else
|
||||||
|
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
MensajeAlert.Clear()
|
MensajeAlert.Clear()
|
||||||
@@ -10700,9 +10879,9 @@ Partial Class Ventas
|
|||||||
OnError("Ocurrió un error al limpiar los datos", ex)
|
OnError("Ocurrió un error al limpiar los datos", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
ImpresionDirectaPDF()
|
' ImpresionDirectaPDF()
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjVentas.RollBack()
|
ObjVentas.RollBack()
|
||||||
@@ -10928,7 +11107,7 @@ Partial Class Ventas
|
|||||||
ObjFacturaDevolucion.Alfa1 = TxtAlfa1.Text.Trim
|
ObjFacturaDevolucion.Alfa1 = TxtAlfa1.Text.Trim
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjFacturaDevolucion.AtencionA = If(ObjFacturaDevolucion.TipoDocto = "Cot" Or (ObjFacturaDevolucion.TipoDocto.Contiene("Ing", "Rem") AndAlso LblRFC.Text = "XAXX010101000"), TxtAtencionA.Text, "-1")
|
ObjFacturaDevolucion.AtencionA = ""
|
||||||
ObjFacturaDevolucion.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
ObjFacturaDevolucion.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
||||||
ObjFacturaDevolucion.Observaciones = TxtObsFact.Text.Trim
|
ObjFacturaDevolucion.Observaciones = TxtObsFact.Text.Trim
|
||||||
ObjFacturaDevolucion.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
|
ObjFacturaDevolucion.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
|
||||||
@@ -11211,7 +11390,7 @@ Partial Class Ventas
|
|||||||
ObjFacturaBonificacion.Alfa1 = TxtAlfa1.Text.Trim
|
ObjFacturaBonificacion.Alfa1 = TxtAlfa1.Text.Trim
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjFacturaBonificacion.AtencionA = If(ObjFacturaBonificacion.TipoDocto = "Cot" Or (ObjFacturaBonificacion.TipoDocto.Contiene("Ing", "Rem") AndAlso LblRFC.Text = "XAXX010101000"), TxtAtencionA.Text, "-1")
|
ObjFacturaBonificacion.AtencionA = ""
|
||||||
ObjFacturaBonificacion.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
ObjFacturaBonificacion.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
||||||
ObjFacturaBonificacion.Observaciones = TxtObsFact.Text.Trim
|
ObjFacturaBonificacion.Observaciones = TxtObsFact.Text.Trim
|
||||||
ObjFacturaBonificacion.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
|
ObjFacturaBonificacion.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
|
||||||
@@ -11728,7 +11907,7 @@ Partial Class Ventas
|
|||||||
ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||||
ObjFactura.CveSubProyectoCobranza = DdlSubProyectoCobranza.SelectedValue.ToEntero()
|
ObjFactura.CveSubProyectoCobranza = DdlSubProyectoCobranza.SelectedValue.ToEntero()
|
||||||
ObjFactura.CveSubProyectoEjecucion = DdlSubProyectoEjecucion.SelectedValue.ToEntero()
|
ObjFactura.CveSubProyectoEjecucion = DdlSubProyectoEjecucion.SelectedValue.ToEntero()
|
||||||
ObjFactura.AtencionA = If(ObjFactura.TipoDocto = "Cot" Or (ObjFactura.TipoDocto.Contiene("Ing", "Rem") AndAlso LblRFC.Text = "XAXX010101000"), TxtAtencionA.Text, "-1")
|
ObjFactura.AtencionA = TxtAtencionA.Text
|
||||||
ObjFactura.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
ObjFactura.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
||||||
ObjFactura.Observaciones = TxtObsFact.Text.Trim
|
ObjFactura.Observaciones = TxtObsFact.Text.Trim
|
||||||
ObjFactura.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
|
ObjFactura.Det_OrdenCompra = TxtDet_OrdenCompra.Text.Trim
|
||||||
@@ -13323,7 +13502,17 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
|
||||||
|
|
||||||
CveAlmacenTraspasoDestino = CveAlmacenAsignado
|
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
||||||
|
Dim objclientes As New ClsClientes
|
||||||
|
If objclientes.GetSucursales(CveCliente, -1) Then
|
||||||
|
CveAlmacenTraspasoDestino = objclientes.DtResultados.FiltroPrimeroValor("CveAlmacenAsignado", $" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}").ToEntero
|
||||||
|
End If
|
||||||
|
objclientes.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not CveAlmacenTraspasoDestino > 0 Then
|
||||||
|
CveAlmacenTraspasoDestino = CveAlmacenAsignado
|
||||||
|
End If
|
||||||
|
|
||||||
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
|
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
|
||||||
If Not ChkRequiereTecnico.Checked Then
|
If Not ChkRequiereTecnico.Checked Then
|
||||||
@@ -14637,6 +14826,11 @@ Partial Class Ventas
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
|
'If DdlTipoAmortizacionAnticipo.SelectedValue <> "4" Then
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
For Each row2 As GridViewRow In GVAnticipos.Rows
|
For Each row2 As GridViewRow In GVAnticipos.Rows
|
||||||
|
|
||||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 12 Then
|
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 12 Then
|
||||||
@@ -15222,6 +15416,49 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'If Not ErrorPrepoliza AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso ObjFactura.TipoDocto = "Ing" AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" AndAlso ObjFactura.CveMoneda = 1 Then
|
||||||
|
|
||||||
|
' For Each row2 As GridViewRow In GVAnticipos.Rows
|
||||||
|
' If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 12 Then
|
||||||
|
' If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
||||||
|
|
||||||
|
' importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
|
||||||
|
|
||||||
|
' Dim ImporteAnticipo As Decimal = importeMovimiento
|
||||||
|
' Dim CveMonedaAnticipo As Integer = row2.DataKey("CveMoneda").ToString().ToEntero()
|
||||||
|
|
||||||
|
' Dim ObjFacturaRef As New Modelos.Factura(UsuarioActual, row2.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa, CargaDTDetalle:=False, VerificaAlmacen:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
|
||||||
|
|
||||||
|
' Dim ventaRef As New Venta(ObjFacturaRef, UsuarioActual)
|
||||||
|
|
||||||
|
' ObjFacturaRef.Dispose()
|
||||||
|
|
||||||
|
' If ventaRef.TipoDocto = "Dev" Then
|
||||||
|
' Dim Pago As New VentaPago
|
||||||
|
' Pago.Fecha = ObjFactura.Fecha
|
||||||
|
' Pago.FechaDocumentoRelacionado = ObjFactura.Fecha
|
||||||
|
' Pago.ImportePagoVenta = importeMovimiento
|
||||||
|
' Pago.ImportePago = importeMovimiento
|
||||||
|
' Pago.CveMonedaPago = ObjFactura.CveMoneda
|
||||||
|
' Pago.TCPago = ObjFactura.TipoCambio
|
||||||
|
' Pago.TipoPago = "NC"
|
||||||
|
' Pago.CveVentaAmortizacion = ObjFactura.CveVenta 'Dr("CveVenta").ToString().ToEntero()
|
||||||
|
' Pago.AplicaTraslado = False
|
||||||
|
' Pago.Referencia = Concepto
|
||||||
|
' 'Pago.CveConceptoPago = 251
|
||||||
|
' ErrorPrepoliza = AplicaPrePolizaPagoVenta(ventaRef, Pago, ObjFactura.CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
|
' Else
|
||||||
|
' ErrorPrepoliza = True
|
||||||
|
' ErrorList.Add("No se puede aplicar un documento diferente a una devolución")
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
'End If
|
||||||
|
|
||||||
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
|
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
If ObjConta.ValorPolizaDescuadre = 2 Then
|
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||||
@@ -15906,7 +16143,9 @@ Partial Class Ventas
|
|||||||
Dim ObjMovtos As New ClsMovimientos()
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
|
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
|
||||||
|
|
||||||
Dim DtMovtos As DataTable = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
Me.TmpDTAnticiposNCIxCCliente = ObjMovtos.DtResultados.Copy()
|
||||||
|
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||||
DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}")
|
DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}")
|
||||||
End If
|
End If
|
||||||
@@ -16013,7 +16252,7 @@ Partial Class Ventas
|
|||||||
saldo = e.Row.DataKey("Saldo").ToString().ToDecimal
|
saldo = e.Row.DataKey("Saldo").ToString().ToDecimal
|
||||||
|
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then 'cuando es por NC, debe de tomar el total de su saldo respectivo
|
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("2") Then 'cuando es por NC, debe de tomar el total de su saldo respectivo
|
||||||
saldo = e.Row.DataKey("SaldoConImpuestos").ToString().ToDecimal
|
saldo = e.Row.DataKey("SaldoConImpuestos").ToString().ToDecimal
|
||||||
Else
|
Else
|
||||||
saldo = e.Row.DataKey("SaldoSubTotal").ToString().ToDecimal
|
saldo = e.Row.DataKey("SaldoSubTotal").ToString().ToDecimal
|
||||||
@@ -16025,6 +16264,10 @@ Partial Class Ventas
|
|||||||
e.Row.FCLiteral("LtlAnticipos").Text = saldo.FormatoNumero
|
e.Row.FCLiteral("LtlAnticipos").Text = saldo.FormatoNumero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CveVenta <= 0 AndAlso DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("4") Then
|
||||||
|
saldo = e.Row.DataKey("Saldo").ToString().ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
saldo = saldo.RoundSQL()
|
saldo = saldo.RoundSQL()
|
||||||
|
|
||||||
@@ -16318,7 +16561,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'cuando no se ha registrado la venta
|
'cuando no se ha registrado la venta
|
||||||
|
|
||||||
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("1", "2", "3") Then
|
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("1", "2", "3", "4") Then
|
||||||
|
|
||||||
Dim Amortizacion As Decimal = 0
|
Dim Amortizacion As Decimal = 0
|
||||||
Dim ImpuestosLocalesTemporal As Decimal = 0
|
Dim ImpuestosLocalesTemporal As Decimal = 0
|
||||||
@@ -16464,6 +16707,27 @@ Partial Class Ventas
|
|||||||
HdnTieneAnticiposVinculados.Value = "1"
|
HdnTieneAnticiposVinculados.Value = "1"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'cuando es PAGO CON DEVOLUCION
|
||||||
|
If DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||||
|
|
||||||
|
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||||
|
If gvr.FCCheckBox("Chk" & gvr.RowIndex) IsNot Nothing AndAlso gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked AndAlso gvr.DataKey("CveConceptoContable").ToEntero().Contiene(12) Then
|
||||||
|
Amortizacion += gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text.ToDecimal ' - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
LblAntAplicados.Text = String.Format("Pago con devolución: {0:C}", Amortizacion) : LblAntAplicados.Visible = True
|
||||||
|
HdnAnticipos.Value = Amortizacion.RoundSQL(2).ToString()
|
||||||
|
Amortizacion = 0
|
||||||
|
HdnTipoDescuento.Value = "-1"
|
||||||
|
HdnDescuento.Value = "0"
|
||||||
|
RegistraScript("BorraDescuentos();")
|
||||||
|
HdnTieneAnticiposVinculados.Value = "1"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
CalculaTotalesVenta(ValidarDescuentos:=True)
|
CalculaTotalesVenta(ValidarDescuentos:=True)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -21357,22 +21621,24 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjContrato As New ClsContratos
|
If DdlContrato.SelectedValue.ToEntero() > 0 Then
|
||||||
If ObjContrato.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then
|
Dim ObjContrato As New ClsContratos
|
||||||
GvEst.DataSource = ObjContrato.DtResultados
|
If ObjContrato.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjContrato.DtResultados.Rows.Count > 0 Then
|
GvEst.DataSource = ObjContrato.DtResultados
|
||||||
'BtnEstimacion.Visible = True
|
If ObjContrato.DtResultados.Rows.Count > 0 Then
|
||||||
DdlContrato.Items.Clear()
|
'BtnEstimacion.Visible = True
|
||||||
DdlContrato.Items.Add(New ListItem("Todos", "-1"))
|
DdlContrato.Items.Clear()
|
||||||
DdlContrato.DataSource = ObjContrato.DtResultados.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"})
|
DdlContrato.Items.Add(New ListItem("Todos", "-1"))
|
||||||
|
DdlContrato.DataSource = ObjContrato.DtResultados.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"})
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjContrato.Dispose()
|
||||||
|
|
||||||
|
DdlContrato.DataBind()
|
||||||
|
GvEst.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjContrato.Dispose()
|
|
||||||
|
|
||||||
DdlContrato.DataBind()
|
|
||||||
GvEst.DataBind()
|
|
||||||
|
|
||||||
UPEstimaciones.Update()
|
UPEstimaciones.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -24047,20 +24313,29 @@ Partial Class Ventas
|
|||||||
Using ObjPS As New ClsProductosServicios
|
Using ObjPS As New ClsProductosServicios
|
||||||
Dim PrecioCompra = ObjPS.GetUltimoPrecioCompra(UsuarioActual.CveEmpresa, GvRow.DataKey("CvePS").ToEntero())
|
Dim PrecioCompra = ObjPS.GetUltimoPrecioCompra(UsuarioActual.CveEmpresa, GvRow.DataKey("CvePS").ToEntero())
|
||||||
If PrecioCompra > 0 Then
|
If PrecioCompra > 0 Then
|
||||||
Dim TotalCompra = (PrecioCompra * GvRow.DataKey("Cantidad").ToDouble() * (1 + GvRow.DataKey("IVA").ToDecimal()))
|
Dim SubTotalCompra = (PrecioCompra * GvRow.DataKey("Cantidad").ToDouble())
|
||||||
HdnTotalCompra.Value = TotalCompra.ToString()
|
HdnTotalCompra.Value = SubTotalCompra.ToString()
|
||||||
LblPrecioCompra.Text = $"PU Compra: {(PrecioCompra).FormatoNumero(2)}"
|
LblPrecioCompra.Text = $"PU Compra: {(PrecioCompra).FormatoNumero(2)}"
|
||||||
|
|
||||||
Dim TotalRedondeado = GvRow.DataKey("Total").ToDecimal() + GvRow.DataKey("ImporteIVA").ToDecimal()
|
Dim SubTotal = GvRow.DataKey("Total").ToDecimal()
|
||||||
|
|
||||||
Dim PorUtilidad = ((TotalRedondeado - TotalCompra) / TotalRedondeado) * 100D
|
Dim PorUtilidad = ((SubTotal - SubTotalCompra) / SubTotal) * 100D
|
||||||
LblUtilidadPorcentaje.Text = PorUtilidad.FormatoNumero(2)
|
LblUtilidadPorcentaje.Text = PorUtilidad.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
UpDescPS.Update()
|
UpDescPS.Update()
|
||||||
|
|
||||||
RegistraScript("$('#ModalDescPS').modal({backdrop: 'static', keyboard: false});")
|
If UsuarioActual.TienePermisoProceso(374) Then
|
||||||
|
RegistraScript("$('#ModalDescPS').modal({backdrop: 'static', keyboard: false});")
|
||||||
|
Else
|
||||||
|
txtUserDesc.Text = ""
|
||||||
|
txtPassDesc.Text = ""
|
||||||
|
'UpAutorizarDesc.Update()
|
||||||
|
txtUserDesc.Focus()
|
||||||
|
RegistraScript("$('#ModalPermisoDesc').modal({backdrop: 'static', keyboard: false});$('#txtUserDesc').focus();", "A2")
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||||
End If
|
End If
|
||||||
@@ -24667,7 +24942,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'LOS PEDIDOS SE DEBE CANCELAR EN UN PROCESO DISTINTO
|
'LOS PEDIDOS SE DEBE CANCELAR EN UN PROCESO DISTINTO
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Ped" Then
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Ped" Then
|
||||||
ChkDevAlm.Checked = False
|
ChkDevAlm.Checked = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
||||||
@@ -30345,6 +30620,22 @@ Partial Class Ventas
|
|||||||
|
|
||||||
divAnticipoMsg.Visible = False
|
divAnticipoMsg.Visible = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||||
|
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'NC' ", "")}")
|
||||||
|
divAmortizacionTipoRelacion.Visible = False
|
||||||
|
GVAnticipos.DataSource = DtMovtos
|
||||||
|
GVAnticipos.DataBind()
|
||||||
|
Else
|
||||||
|
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||||
|
divAmortizacionTipoRelacion.Visible = True
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||||
|
DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("1", "2") Then
|
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("1", "2") Then
|
||||||
'cuando es amortización por descuento, debe tener seleccionado descuentos previamente registrados
|
'cuando es amortización por descuento, debe tener seleccionado descuentos previamente registrados
|
||||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "1" AndAlso LblDescuentos.Text.ToDecimal <= 0 Then
|
If DdlTipoAmortizacionAnticipo.SelectedValue = "1" AndAlso LblDescuentos.Text.ToDecimal <= 0 Then
|
||||||
@@ -36304,9 +36595,10 @@ Partial Class Ventas
|
|||||||
DdlProcedimiento.SelectedValueExist(dRow("CveProcedimiento").ToString.ToEntero)
|
DdlProcedimiento.SelectedValueExist(dRow("CveProcedimiento").ToString.ToEntero)
|
||||||
TxtPaciente.Text = dRow("Paciente").ToString
|
TxtPaciente.Text = dRow("Paciente").ToString
|
||||||
TxtEpisodio.Text = dRow("Episodio").ToString
|
TxtEpisodio.Text = dRow("Episodio").ToString
|
||||||
SeEstaFActurandoVentaMedica = True
|
TxtAlfa1.Text = dRow("Alfa1").ToString
|
||||||
CveTipoVenta = dRow("CveTipoVenta").ToString.ToEntero
|
CveTipoVenta = dRow("CveTipoVenta").ToString.ToEntero
|
||||||
ChkRequiereTecnico_CheckedChanged(Nothing, Nothing)
|
ChkRequiereTecnico_CheckedChanged(Nothing, Nothing)
|
||||||
|
SeEstaFActurandoVentaMedica = True
|
||||||
End If
|
End If
|
||||||
objVenta.Dispose()
|
objVenta.Dispose()
|
||||||
End If
|
End If
|
||||||
@@ -36376,34 +36668,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Private Sub CargaSucursalesModal(CveClienteSeleccionado As Integer)
|
|
||||||
|
|
||||||
' DdlSucursalClienteModal.Items.Clear()
|
|
||||||
' DdlSucursalClienteModal.ClearSelection()
|
|
||||||
' DdlSucursalClienteModal.SelectedValue = Nothing
|
|
||||||
|
|
||||||
' Dim ObjCliente As New ClsClientes
|
|
||||||
' If ObjCliente.GetSucursales(CveClienteSeleccionado) Then
|
|
||||||
' DdlSucursalClienteModal.DataSource = ObjCliente.DtResultados
|
|
||||||
' If ObjCliente.DtResultados.Rows.Count > 0 Then
|
|
||||||
' DvModalClientesucursal.Visible = True
|
|
||||||
' Else
|
|
||||||
' DvModalClientesucursal.Visible = False
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' DvModalClientesucursal.Visible = False
|
|
||||||
' DdlSucursalClienteModal.DataSource = Nothing
|
|
||||||
' End If
|
|
||||||
' ObjCliente.Dispose()
|
|
||||||
|
|
||||||
' DdlSucursalClienteModal.DataBind()
|
|
||||||
' DdlSucursalClienteModal.Items.Insert(0, New ListItem("Matriz", "-1"))
|
|
||||||
|
|
||||||
' UpDvModalTipoVenta.FindDataSourceControl
|
|
||||||
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaDdlClientesSucursal()
|
Private Sub CargaDdlClientesSucursal()
|
||||||
|
|
||||||
@@ -36500,13 +36764,6 @@ Partial Class Ventas
|
|||||||
UpDvModalTipoVenta.Update()
|
UpDvModalTipoVenta.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
|
|
||||||
|
|
||||||
' CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClientesWS.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
|
||||||
' 'CargaSucursalesModal(DdlClientesWS.SelectedValue.ToEntero)
|
|
||||||
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
Dim CveClienteSplit As Integer = -1
|
Dim CveClienteSplit As Integer = -1
|
||||||
@@ -36570,9 +36827,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ChkRequiereTecnicoModal.Enabled = True
|
ChkRequiereTecnicoModal.Enabled = True
|
||||||
|
|
||||||
'DdlClientesWS.txtText.Value = ""
|
|
||||||
'DdlClientesWS.txtValue.Value = ""
|
|
||||||
'DdlClientesWS.ddl.SelectedValueExist(-1)
|
|
||||||
DdlClienteSucursal.SelectedValueExist(-1)
|
DdlClienteSucursal.SelectedValueExist(-1)
|
||||||
|
|
||||||
DvModalRequiereOSFecha.Visible = False
|
DvModalRequiereOSFecha.Visible = False
|
||||||
@@ -36634,8 +36889,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||||
@@ -36717,6 +36970,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DdlTipoComprobante.Enabled = False
|
DdlTipoComprobante.Enabled = False
|
||||||
|
|
||||||
CargaCliente(CveCliente)
|
CargaCliente(CveCliente)
|
||||||
@@ -36769,10 +37025,17 @@ Partial Class Ventas
|
|||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If RBLTipoVenta.SelectedValue.Contiene("5", "6") Then
|
||||||
|
AsignaAlamacenWS()
|
||||||
|
CargaPS(-1, DdlPS)
|
||||||
|
End If
|
||||||
|
|
||||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub GvProductosProcedimiento_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvProductosProcedimiento_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.DataKey("Precio").ToDecimal = 0 Then
|
If e.Row.DataKey("Precio").ToDecimal = 0 Then
|
||||||
@@ -36932,6 +37195,27 @@ Partial Class Ventas
|
|||||||
CargaProcedimientos(HdnCveProcedimientoNuevo.Value.ToEntero)
|
CargaProcedimientos(HdnCveProcedimientoNuevo.Value.ToEntero)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AsignaAlamacenWS()
|
||||||
|
|
||||||
|
CveAlamcenFiltroDdl = -1
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
|
||||||
|
Dim objclientes As New ClsClientes
|
||||||
|
If objclientes.GetSucursales(CveCliente, -1) Then
|
||||||
|
CveAlamcenFiltroDdl = objclientes.DtResultados.FiltroPrimeroValor("CveAlmacenAsignado", $" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}").ToEntero
|
||||||
|
End If
|
||||||
|
objclientes.Dispose()
|
||||||
|
End If
|
||||||
|
If Not CveAlamcenFiltroDdl > 0 Then
|
||||||
|
CveAlamcenFiltroDdl = If(CveAlmacenAsignado > 0, CveAlmacenAsignado, -1)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
'Protected Sub LnkCancelarSoloCFDI_Click(sender As Object, e As EventArgs)
|
'Protected Sub LnkCancelarSoloCFDI_Click(sender As Object, e As EventArgs)
|
||||||
@@ -37038,5 +37322,46 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAutorizarDescuento_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim UsuarioAutorizar As Usuario = Nothing
|
||||||
|
|
||||||
|
Using ObjUsuario As New ClsSisUsuarios
|
||||||
|
UsuarioAutorizar = ObjUsuario.ValidaUsuario(txtUserDesc.Text.Trim, Encripta(txtPassDesc.Text), ModExtensiones.IMEI, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
If UsuarioAutorizar IsNot Nothing Then
|
||||||
|
If UsuarioAutorizar.TienePermisoProceso(374) Then
|
||||||
|
txtUserDesc.Text = ""
|
||||||
|
txtPassDesc.Text = ""
|
||||||
|
'UpAutorizarDesc.Update()
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalPermisoDesc').modal('hide');$('#ModalDescPS').modal({backdrop: 'static', keyboard: false});", "AUT")
|
||||||
|
Else
|
||||||
|
Alert("El usuario no tiene permiso para autorizar", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("No se encontro el usuario para autorizar", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End Sub
|
||||||
|
Protected Sub ImgAntiPend_Click(sender As Object, e As EventArgs)
|
||||||
|
' $get('HdnTipoDescuento').value = '3'; MuestraAnticipos();
|
||||||
|
HdnTipoDescuento.Value = "3"
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
If DdlTipoAmortizacionAnticipo.Items.FindByValue("4") Is Nothing Then
|
||||||
|
DdlTipoAmortizacionAnticipo.Items.Insert(1, New ListItem("Pago con devolución", "4"))
|
||||||
|
End If
|
||||||
|
DdlTipoAmortizacionAnticipo.SelectedValueExist("4")
|
||||||
|
|
||||||
|
DdlTipoRelacionAnticipo.SelectedValueExist("-1")
|
||||||
|
|
||||||
|
DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
|
||||||
|
|
||||||
|
divAmortizacionTipoRelacion.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpAnticipos.Update()
|
||||||
|
|
||||||
|
RegistraScript("MuestraAnticipos();", "AE")
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Reference in New Issue
Block a user