-- cambios
This commit is contained in:
@@ -234,8 +234,7 @@
|
|||||||
|
|
||||||
<%--INICIA: CANCELAR - NC - DEVOLUCION [NEW]--%>
|
<%--INICIA: CANCELAR - NC - DEVOLUCION [NEW]--%>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LBNotaCredito" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Nota de Crédito"
|
<asp:LinkButton ID="LBNotaCredito" runat="server" OnClick="LBNotaCredito_Click" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Nota de Crédito" Visible="false" />
|
||||||
data-toggle="modal" data-target="#ModalAplicarNC" Visible="false" />
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkAplicarRNCDevolucion" runat="server" Visible="false" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar RNC por devolución"
|
<asp:LinkButton ID="LnkAplicarRNCDevolucion" runat="server" Visible="false" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar RNC por devolución"
|
||||||
@@ -1103,7 +1102,7 @@
|
|||||||
</th>
|
</th>
|
||||||
<th id="ThCantidadFacturada2" runat="server" visible="false"></th>
|
<th id="ThCantidadFacturada2" runat="server" visible="false"></th>
|
||||||
<th id="ThCantidadFacturadaRem2" runat="server" visible="false"></th>
|
<th id="ThCantidadFacturadaRem2" runat="server" visible="false"></th>
|
||||||
<th>
|
<th id="ThProyecto2" runat="server">
|
||||||
<asp:UpdatePanel ID="UPPProy" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPProy" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%">
|
<asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%">
|
||||||
@@ -4007,8 +4006,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-4">
|
||||||
<asp:UpdatePanel ID="UPObservaciones" runat="server" class="portlet light xspadding bordered " align="center" style="width: 300px;" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPObservaciones" runat="server" class="portlet light xspadding bordered " align="center" style="min-width: 300px;" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
@@ -4024,13 +4023,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body formnombottom">
|
<div class="portlet-body formnombottom">
|
||||||
<table border="0" width="250px">
|
<table border="0" width="100%">
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td id="TrObsGenerales" runat="server">Observaciones Generales: </td>
|
<td id="TrObsGenerales" runat="server">Observaciones Generales: </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="250px" MaxLength="800" CssClass="form-control input-sm"></asp:TextBox></td>
|
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="100%" MaxLength="800" CssClass="form-control input-sm"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="TrOC" runat="server">
|
<tr id="TrOC" runat="server">
|
||||||
<td>Orden de Compra:
|
<td>Orden de Compra:
|
||||||
@@ -4053,7 +4052,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr align="left" id="TrTxtObsAlmacen" runat="server">
|
<tr align="left" id="TrTxtObsAlmacen" runat="server">
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtObsAlmacen" runat="server" Rows="2" TextMode="MultiLine" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td>
|
<asp:TextBox ID="TxtObsAlmacen" runat="server" Rows="2" TextMode="MultiLine" Width="100%" CssClass="form-control input-sm"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left" id="TrKilometraje" runat="server" visible="false">
|
<tr align="left" id="TrKilometraje" runat="server" visible="false">
|
||||||
<td>Kilometraje
|
<td>Kilometraje
|
||||||
@@ -4130,10 +4129,10 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4" align="right">
|
<div class="col-md-3" align="right">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" align="right" style="padding-bottom: 15px;">
|
<div class="col-md-12" align="right" style="padding-bottom: 15px;">
|
||||||
<asp:UpdatePanel ID="UpFacturar" runat="server" class="portlet light xspadding bordered " style="width: 300px;" align="right" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpFacturar" runat="server" class="portlet light xspadding bordered " style=" max-width: 300px;" align="right" UpdateMode="Conditional">
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="BtnVistaPrevia" />
|
<asp:PostBackTrigger ControlID="BtnVistaPrevia" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
@@ -4209,6 +4208,10 @@
|
|||||||
|
|
||||||
<asp:Button ID="BtnEditar" runat="server" Text="Editar" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<asp:Button ID="BtnEditar" runat="server" Text="Editar" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
|
|
||||||
|
<asp:LinkButton ID="BtnAdjuntar" runat="server" Visible="false" Text="<i class='fa-upload fa' style=' color: white;'></i> Adjuntar" data-toggle="modal" data-target="#ModalAdjuntar" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
<asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" />
|
||||||
|
<asp:LinkButton ID="BtnEliminarAdjunto" runat="server" Visible="false" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -4216,50 +4219,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
<div class="col-md-12" align="right" runat="server" id="DivAdjuntar">
|
|
||||||
<asp:UpdatePanel ID="UpAdjuntar" runat="server" class="portlet light xspadding bordered " style="width: 300px;" align="right" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
|
|
||||||
<div class="portlet-title">
|
|
||||||
<div class="caption font-green">
|
|
||||||
<i class="icon-pin font-green"></i>
|
|
||||||
<span class="caption-subject bold uppercase">Adjuntos </span>
|
|
||||||
</div>
|
|
||||||
<div class="actions">
|
|
||||||
<div class="btn-group">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<a href="javascript:;" class="collapse"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body formnombottom">
|
|
||||||
<table border="0" style="text-align: center; width: 100%;">
|
|
||||||
|
|
||||||
<tr runat="server" id="Tr3">
|
|
||||||
<td align="center" style="" runat="server" id="tdAdjuntar">
|
|
||||||
<asp:LinkButton ID="BtnAdjuntar" runat="server" Text="Adjuntar" data-toggle="modal" data-target="#ModalAdjuntar" CssClass="btn myventasbutton btn-primary" />
|
|
||||||
</td>
|
|
||||||
<td align="left" style="display: none;" runat="server" id="tdAdjunto">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Text="" Font-Size="14px" />
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6" style="text-align: right;">
|
|
||||||
<asp:LinkButton ID="BtnEliminarAdjunto" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" Visible="false" />
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
<Triggers>
|
|
||||||
<asp:PostBackTrigger ControlID="BtnArchivoAdjunto" />
|
|
||||||
</Triggers>
|
|
||||||
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim ColumnaDescuento As Integer = 10
|
Dim ColumnaDescuento As Integer = 10
|
||||||
Dim ColumnaPredial As Integer = 11
|
Dim ColumnaPredial As Integer = 11
|
||||||
|
Dim ColumnaSubProyecto As Integer = 8
|
||||||
Dim ColumnaIVA As Integer = 12
|
Dim ColumnaIVA As Integer = 12
|
||||||
Dim ColumnaIEPS As Integer = 13
|
Dim ColumnaIEPS As Integer = 13
|
||||||
Dim ColumnaRetIVA As Integer = 14
|
Dim ColumnaRetIVA As Integer = 14
|
||||||
@@ -2293,31 +2294,6 @@ Partial Class Ventas
|
|||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
'#Region "AuxiliarConta"
|
|
||||||
' Property CvePrePolizaNegativa As Integer
|
|
||||||
' Get
|
|
||||||
' If ViewState("CvePrePolizaNegativa") Is Nothing Then
|
|
||||||
' Return -1
|
|
||||||
' Else
|
|
||||||
' Return ViewState("CvePrePolizaNegativa").ToString.ToEntero
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(value As Integer)
|
|
||||||
' ViewState("CvePrePolizaNegativa") = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Private Property DTDatos As DataTable
|
|
||||||
' Get
|
|
||||||
' Return CType(ViewState("DTDatos"), DataTable)
|
|
||||||
' End Get
|
|
||||||
' Set(value As DataTable)
|
|
||||||
' ViewState("DTDatos") = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
'#End Region
|
|
||||||
|
|
||||||
#Region " A C U M U L A D O R E S"
|
#Region " A C U M U L A D O R E S"
|
||||||
|
|
||||||
Private Property ClienteEsDistribuidor As Boolean
|
Private Property ClienteEsDistribuidor As Boolean
|
||||||
@@ -2477,9 +2453,16 @@ Partial Class Ventas
|
|||||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA"))
|
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
If Not (UsuarioActual.Empresa.Funcionalidad(558) = "1") Then '
|
||||||
LnkAgregarCliente.Visible = False
|
LnkAgregarCliente.Visible = False
|
||||||
End If
|
End If
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
LnkAgregarCliente.Visible = True
|
||||||
|
'ocultar la columna de subproyecto
|
||||||
|
GvPS.Columns(ColumnaSubProyecto).Visible = False
|
||||||
|
ThProyecto.Visible = False
|
||||||
|
ThProyecto2.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
||||||
|
|
||||||
@@ -2600,12 +2583,10 @@ Partial Class Ventas
|
|||||||
CargaMonedas()
|
CargaMonedas()
|
||||||
CargaVendedores()
|
CargaVendedores()
|
||||||
CargarAlmacenes()
|
CargarAlmacenes()
|
||||||
CargaFormaEntrega()
|
'CargaFormaEntrega()
|
||||||
CargaCuentasTerminal()
|
CargaCuentasTerminal()
|
||||||
CargaDdlNCPS()
|
'CargaDdlNCPS()
|
||||||
CargarCamiones()
|
CargarCamiones()
|
||||||
|
|
||||||
|
|
||||||
CargaMedicos()
|
CargaMedicos()
|
||||||
CargaProcedimientos()
|
CargaProcedimientos()
|
||||||
CargaDdlClientes()
|
CargaDdlClientes()
|
||||||
@@ -2775,17 +2756,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ImgAddObs.Visible = True
|
ImgAddObs.Visible = True
|
||||||
CargaEventoBitacora()
|
CargaEventoBitacora()
|
||||||
|
|
||||||
ConfiguraTipoDocto()
|
ConfiguraTipoDocto()
|
||||||
|
|
||||||
TrFolioFiscal.Visible = True
|
TrFolioFiscal.Visible = True
|
||||||
|
|
||||||
' Si esta cancelado el compromiso/Pedido no se puede editar el estatus
|
|
||||||
'If DdlEstatus.SelectedValue.Contiene({"9", "14", "17"}) Then
|
|
||||||
' DdlEstatus.Enabled = False
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'CargaDetalle de Almacen
|
|
||||||
'PERMISO PARA CANCELAR PEDIDO
|
'PERMISO PARA CANCELAR PEDIDO
|
||||||
If GvInv.Rows.Count = 0 Then
|
If GvInv.Rows.Count = 0 Then
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ped") And Not CveEstatus = 14 Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ped") And Not CveEstatus = 14 Then
|
||||||
@@ -2809,16 +2782,6 @@ Partial Class Ventas
|
|||||||
LnkImprimirFormatoTelcel.Visible = True
|
LnkImprimirFormatoTelcel.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
|
||||||
' Dim ObjInventario As New ClsInventarios
|
|
||||||
' If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
|
||||||
' If ObjInventario.DtResultados.Rows.Count > 0 Then
|
|
||||||
' DivDevAlm.Visible = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' ObjInventario.Dispose()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||||
CargaVentaCortePorte(Me.CveVenta)
|
CargaVentaCortePorte(Me.CveVenta)
|
||||||
End If
|
End If
|
||||||
@@ -3026,6 +2989,7 @@ Partial Class Ventas
|
|||||||
CveEstatus = 2
|
CveEstatus = 2
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
BtnAdjuntar.Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3212,7 +3176,7 @@ Partial Class Ventas
|
|||||||
TabDetalleVentas.Visible = False
|
TabDetalleVentas.Visible = False
|
||||||
'TabE.Visible = False
|
'TabE.Visible = False
|
||||||
LnkOCs.Visible = False
|
LnkOCs.Visible = False
|
||||||
GvPS.Columns(8).Visible = False
|
GvPS.Columns(ColumnaSubProyecto).Visible = False
|
||||||
DdlSubProyecto.Visible = False
|
DdlSubProyecto.Visible = False
|
||||||
TrEdit.Visible = True
|
TrEdit.Visible = True
|
||||||
|
|
||||||
@@ -3236,7 +3200,6 @@ Partial Class Ventas
|
|||||||
ThProyecto.Visible = False
|
ThProyecto.Visible = False
|
||||||
For Each Gvr As GridViewRow In GvPS.Rows
|
For Each Gvr As GridViewRow In GvPS.Rows
|
||||||
Gvr.FCLinkButton("imgE").Visible = False
|
Gvr.FCLinkButton("imgE").Visible = False
|
||||||
Gvr.FCLinkButton("imgEPyME").Visible = True
|
|
||||||
Next
|
Next
|
||||||
LnkAddVenta.Visible = True
|
LnkAddVenta.Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -4753,12 +4716,6 @@ Partial Class Ventas
|
|||||||
BtnArchivoAdjunto.Visible = True
|
BtnArchivoAdjunto.Visible = True
|
||||||
BtnEliminarAdjunto.Visible = False
|
BtnEliminarAdjunto.Visible = False
|
||||||
BtnAdjuntar.Visible = False
|
BtnAdjuntar.Visible = False
|
||||||
|
|
||||||
tdAdjuntar.Style.Item("display") = "none"
|
|
||||||
tdAdjunto.Style.Item("display") = "block"
|
|
||||||
|
|
||||||
Else
|
|
||||||
DivAdjuntar.Visible = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
||||||
@@ -7806,19 +7763,19 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaProcedimientos()
|
Private Sub CargaProcedimientos()
|
||||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
|
||||||
DdlMedico.DataBind()
|
|
||||||
|
|
||||||
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
|
||||||
DdlMedicoModal.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaMedicos()
|
|
||||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
DdlProcedimiento.DataBind()
|
DdlProcedimiento.DataBind()
|
||||||
|
|
||||||
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
DdlProcedimientoModal.DataBind()
|
DdlProcedimientoModal.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaMedicos()
|
||||||
|
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
|
DdlMedico.DataBind()
|
||||||
|
|
||||||
|
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
|
DdlMedicoModal.DataBind()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -7954,7 +7911,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim CveSATNC As String = "84111506"
|
Dim CveSATNC As String = "84111506"
|
||||||
Dim dtt As New DataTable
|
Dim dtt As New DataTable
|
||||||
dtt = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC
|
dtt = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CodigoSATPS:=CveSATNC, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC
|
||||||
|
|
||||||
If dtt IsNot Nothing Then
|
If dtt IsNot Nothing Then
|
||||||
DdlNCPS.DataSource = dtt
|
DdlNCPS.DataSource = dtt
|
||||||
@@ -15177,21 +15134,27 @@ Partial Class Ventas
|
|||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
||||||
DtCostos = ObjInventario.DtResultados
|
DtCostos = ObjInventario.DtResultados
|
||||||
TotalCosto = DtCostos.SUMD("Total").RoundSQL
|
TotalCosto = DtCostos.SUMD("Total").RoundSQL
|
||||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
'Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion", "CveSubProyecto", "SubProyecto"})
|
||||||
|
Dim GroupBycostos As String() = {"CveClasificacion", "CveSubProyecto", "SubProyecto"}
|
||||||
|
Dim tmpCostos As DataTable = DtCostos.GroupByDT("", "", {GroupBycostos}, SumColumns:={"Total"}).FiltraParametros("GroupADSType = 1")
|
||||||
|
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
Dim TotalCostoAcumulado As Decimal = 0
|
Dim TotalCostoAcumulado As Decimal = 0
|
||||||
Dim cont As Integer = 1
|
Dim cont As Integer = 1
|
||||||
|
Dim tCveSubProyecto As Integer = factura.CveSubProyecto
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
For Each RowInv As DataRow In tmpCostos.Rows
|
For Each RowInv As DataRow In tmpCostos.Rows
|
||||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL
|
ValorInventario = RowInv("Total").ToString.ToDecimal.RoundSQL
|
||||||
|
'ValorInventario =tmpCostos.SUMD("") 'DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL
|
||||||
TotalCostoAcumulado += ValorInventario
|
TotalCostoAcumulado += ValorInventario
|
||||||
|
If UsuarioActual.CveEmpresa <> 119 Then tCveSubProyecto = RowInv("CveSubProyecto").ToString.ToEntero()
|
||||||
|
|
||||||
'cuando es el último movimiento y hay diferencias en los importes
|
'cuando es el último movimiento y hay diferencias en los importes
|
||||||
If cont = tmpCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
If cont = tmpCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
||||||
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, ValorInventario, 69, factura.SerieFolio, factura.SerieFolio, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario) Then
|
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, ValorInventario, 69, factura.SerieFolio, factura.SerieFolio, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=tCveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -26938,11 +26901,6 @@ Partial Class Ventas
|
|||||||
LnkAplicarRNCDevolucion.Visible = True
|
LnkAplicarRNCDevolucion.Visible = True
|
||||||
End If
|
End If
|
||||||
'LkNotaCredito.Visible = False
|
'LkNotaCredito.Visible = False
|
||||||
DivGvCxC.Visible = True
|
|
||||||
CargaCxC()
|
|
||||||
'CARGAR RNC
|
|
||||||
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
|
|
||||||
|
|
||||||
TxtNCPorcentaje.Attributes.Add("onkeyup", "CalculaImporteNCMasivo();")
|
TxtNCPorcentaje.Attributes.Add("onkeyup", "CalculaImporteNCMasivo();")
|
||||||
TxtNCImporte.Text = "0.00"
|
TxtNCImporte.Text = "0.00"
|
||||||
TxtNCImporte.Enabled = False
|
TxtNCImporte.Enabled = False
|
||||||
@@ -26964,6 +26922,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
ObjMovtos.Dispose()
|
ObjMovtos.Dispose()
|
||||||
GvCxC.DataBind()
|
GvCxC.DataBind()
|
||||||
|
UpAplicarNC.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub RblRNCTipo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub RblRNCTipo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
@@ -31984,27 +31943,16 @@ Partial Class Ventas
|
|||||||
HabilitarControlesCartaPorte(True)
|
HabilitarControlesCartaPorte(True)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DivAdjuntar.Visible Then
|
|
||||||
Dim FolioNuevo As String = TxtFolio.Text
|
|
||||||
If FolioNuevo <> FolioOriginal Then
|
|
||||||
If Adjunto <> "" Then
|
|
||||||
Adjunto = ""
|
|
||||||
BtnArchivoAdjunto.Text = ""
|
|
||||||
BtnArchivoAdjunto.Visible = False
|
|
||||||
BtnEliminarAdjunto.Visible = False
|
|
||||||
BtnAdjuntar.Visible = True
|
|
||||||
|
|
||||||
tdAdjuntar.Style.Item("display") = "block"
|
Dim FolioNuevo As String = TxtFolio.Text
|
||||||
tdAdjunto.Style.Item("display") = "none"
|
If FolioNuevo <> FolioOriginal Then
|
||||||
Else
|
If Adjunto <> "" Then
|
||||||
DivAdjuntar.Visible = True
|
Adjunto = ""
|
||||||
End If
|
BtnArchivoAdjunto.Text = ""
|
||||||
Else
|
BtnArchivoAdjunto.Visible = False
|
||||||
DivAdjuntar.Visible = False
|
BtnEliminarAdjunto.Visible = False
|
||||||
|
BtnAdjuntar.Visible = True
|
||||||
End If
|
End If
|
||||||
UpAdjuntar.Update()
|
|
||||||
Else
|
|
||||||
DivAdjuntar.Visible = True
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||||
@@ -32836,10 +32784,10 @@ Partial Class Ventas
|
|||||||
Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray())
|
Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray())
|
||||||
If ArrayNC.Length >= 4 Then
|
If ArrayNC.Length >= 4 Then
|
||||||
Dim CvePSNC As Integer = ArrayNC(3).ToEntero()
|
Dim CvePSNC As Integer = ArrayNC(3).ToEntero()
|
||||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSNC, AplicaParaVenta:=1).FiltroPrimero("")
|
DrPS = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSNC, AplicaParaVenta:=1).FiltroPrimero("")
|
||||||
Else
|
Else
|
||||||
Dim CveSATNC As String = "84111506"
|
Dim CveSATNC As String = "84111506"
|
||||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1).Rows(0)
|
DrPS = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CodigoSATPS:=CveSATNC, AplicaParaVenta:=1).Rows(0)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DrPS Is Nothing Then
|
If DrPS Is Nothing Then
|
||||||
@@ -34408,9 +34356,6 @@ Partial Class Ventas
|
|||||||
BtnArchivoAdjunto.Text = Adjunto
|
BtnArchivoAdjunto.Text = Adjunto
|
||||||
BtnArchivoAdjunto.Visible = True
|
BtnArchivoAdjunto.Visible = True
|
||||||
BtnEliminarAdjunto.Visible = True
|
BtnEliminarAdjunto.Visible = True
|
||||||
tdAdjuntar.Style.Item("display") = "none"
|
|
||||||
tdAdjunto.Style.Item("display") = "block"
|
|
||||||
UpAdjuntar.Update()
|
|
||||||
Alert("Documento cargado", TipoMensaje.MsgInformacion)
|
Alert("Documento cargado", TipoMensaje.MsgInformacion)
|
||||||
objVentas.Dispose()
|
objVentas.Dispose()
|
||||||
|
|
||||||
@@ -34462,12 +34407,9 @@ Partial Class Ventas
|
|||||||
File.Delete(Path)
|
File.Delete(Path)
|
||||||
End If
|
End If
|
||||||
BtnAdjuntar.Visible = True
|
BtnAdjuntar.Visible = True
|
||||||
tdAdjuntar.Style.Item("display") = "block"
|
|
||||||
BtnArchivoAdjunto.Text = ""
|
BtnArchivoAdjunto.Text = ""
|
||||||
BtnArchivoAdjunto.Visible = False
|
BtnArchivoAdjunto.Visible = False
|
||||||
tdAdjunto.Style.Item("display") = "none"
|
|
||||||
BtnEliminarAdjunto.Visible = False
|
BtnEliminarAdjunto.Visible = False
|
||||||
UpAdjuntar.Update()
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkSolicitarCredito_Click(sender As Object, e As EventArgs) Handles LnkSolicitarCredito.Click
|
Protected Sub LnkSolicitarCredito_Click(sender As Object, e As EventArgs) Handles LnkSolicitarCredito.Click
|
||||||
If CveCliente <= 0 Then
|
If CveCliente <= 0 Then
|
||||||
@@ -36256,7 +36198,13 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
|
Protected Sub LBNotaCredito_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaDdlNCPS()
|
||||||
|
DivGvCxC.Visible = True
|
||||||
|
CargaCxC()
|
||||||
|
'CARGAR RNC
|
||||||
|
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
|
||||||
|
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Reference in New Issue
Block a user