Complemento Prepoliza

This commit is contained in:
rakcsle
2024-09-04 12:18:50 -07:00
parent d61b7b7189
commit b82039f0ee
8 changed files with 237 additions and 42 deletions

View File

@@ -1027,7 +1027,7 @@
<asp:BoundField HeaderText="Fecha" DataField="FechaComplemento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Importe" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="XML" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" Visible="false" />
<asp:BoundField HeaderText="Estatus" Visible="false" DataField="StrEstatus" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
<asp:TemplateField HeaderText="Cancelar" Visible="false" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">

View File

@@ -362,6 +362,10 @@ Partial Class ContabilidadC_RegPrePolizaS
GvMov.Columns(5).Visible = False
End If
'Estan ocultas por que no estan funcionando OIC 2024-09-04
GvComplementoPagos.Columns(4).Visible = False
GvComplementoPagos.Columns(6).Visible = False
End If
End Sub
@@ -2148,13 +2152,12 @@ Partial Class ContabilidadC_RegPrePolizaS
dtt = ObjBancos.DtResultados
If dtt.Rows.Count > 0 Then
UpComplementoPagos.Visible = True
'GvComplementoPagos.Columns(7).Visible = True
' si tiene el permiso para eliminar IE o editar IE
If UsuarioActual.TienePermisoProceso(85) OrElse UsuarioActual.TienePermisoProceso(99) Then GvComplementoPagos.Columns(6).Visible = True
'If UsuarioActual.TienePermisoProceso(85) OrElse UsuarioActual.TienePermisoProceso(99) Then GvComplementoPagos.Columns(6).Visible = True
Else
DVGenerarComplementoModal.Visible = True
End If
GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "FolioFiscal", "SerieFolioPago", "FechaComplemento", "Importe", "CveIE"})
GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "FolioFiscal", "SerieFolioPago", "FechaComplemento", "Importe", "CveIE", "RFCReceptor", "CvePAC"})
End If
ObjBancos.Dispose()
@@ -2239,7 +2242,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Str.AppendFormat("Folio: <b>{0}</b> &nbsp;", Banco.ComplementoSerieFolio)
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML &nbsp;<i class=""fa fa-file""></i></i></a>&nbsp;&nbsp;", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF &nbsp;<i class=""fa fa-ad-pdf""></i></i></i></a>&nbsp;", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
MandaCorreo(Banco.ComplementoSerieFolio, Banco.CobranzaCorreo)
'MandaCorreo(Banco.ComplementoSerieFolio, Banco.CobranzaCorreo)
End If
Else
Banco.RollBack()
@@ -2255,7 +2258,8 @@ Partial Class ContabilidadC_RegPrePolizaS
'If e.Row.DataKey("Tipo") = "Ing" Then
e.Row.Cells(3).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-file-code-o""></i></a>", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolioPago"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
e.Row.Cells(4).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolioPago"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
'e.Row.Cells(4).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolioPago"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
'End If
End If

View File

@@ -334,6 +334,8 @@ Partial Class Contratos_ModificarPresupuesto
Dim CvePresupuesto = DdlPresupuesto.SelectedValue.ToEntero
Dim CveClasificacion As Integer = DdlModalClasificacion.SelectedValue.ToEntero
Dim dt As DataTable = GlobalDTTiposGastos(UsuarioActual.CveEmpresa, 1)
If CveClasificacion > 0 Then
Dim ObjCont As New ClsContratos

View File

@@ -288,6 +288,16 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Tipo Gasto" DataField="TipoGasto" />
<asp:TemplateField HeaderText="Amp/Reduc" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="125px">
<ItemTemplate>
<asp:Label ID="LblAmpReduc" CssClass="LabelGVTotal" runat="server" Text='<%# Eval("AmpReduc", "{0:###,###,###.00}") %>' ></asp:Label>
</ItemTemplate>
<FooterTemplate>
<b>Total:</b>
<asp:Label ID="LblAmpReducFoot" CssClass="LabelGVTotal" runat="server"></asp:Label>
</FooterTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle CssClass="Totales" />
</asp:GridView>

View File

@@ -126,7 +126,10 @@ Partial Class Contratos_Presupuestos
End If
If e.Row.RowType = DataControlRowType.Footer Then
Dim Importe As Decimal = DtClasificaciones.SUM("Importe", "CveAgrupador IS NOT NULL")
Dim AmpReduc As Decimal = DtClasificaciones.SUM("AmpReduc", "CveAgrupador IS NOT NULL")
e.Row.FCLabel("LblTotal").Text = String.Format("{0:C}", Importe)
e.Row.FCLabel("LblAmpReducFoot").Text = String.Format("{0:C}", AmpReduc)
End If
End Sub

View File

@@ -74,11 +74,19 @@ Partial Class Contratos_RepPresupuestos
Private Sub CargaSubProyecto()
DdlSubProyecto.Items.Clear()
If DdlProyecto.SelectedValue.ToEntero > 0 Or UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, 1))
If DdlProyecto.SelectedValue.ToEntero > 0 Or UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
If UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110) Then
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1)
Else
DdlSubProyecto.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, -1, DdlProyecto.SelectedValue.ToEntero, -1)
End If
'DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, 1))
End If
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSubProyecto.DataBind()
UpFiltros.Update()
End Sub
Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs)
CargaDatos()

View File

@@ -116,38 +116,77 @@
<ajax:TabPanel ID="TabPedidos" runat="server" HeaderText="Pedidos">
<ContentTemplate>
<div style="min-height: 250px; overflow-x: scroll">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" DataKeyNames="CveCliente,CveVendedor,CveSubProyecto,CvePS,CveUnidadMedida,Cantidad,PU,CveVentaDetalle,GastosEnvio" data-sort="true" GridLines="None" Width="99%">
<Columns>
<asp:TemplateField >
<ItemTemplate>
<asp:Label ID="LblCliente" runat="server" Text='<%#Eval("NombreComercial") %>'></asp:Label><br />
<asp:Label ID="LblDir" Font-Italic="true" runat="server" Text='<%#Eval("DireccionEnvio") %>'></asp:Label>
<div style="min-height: 250px; overflow-x: scroll">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
DataKeyNames="CveCliente,CveVendedor,CveSubProyecto,CvePS,CveUnidadMedida,Cantidad,PU,CveVentaDetalle,GastosEnvio,CveVenta,SerieFolio" data-sort="true" GridLines="None" Width="99%">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="LblCliente" runat="server" Text='<%#Eval("NombreComercial") %>'></asp:Label><br />
<asp:Label ID="LblDir" Font-Italic="true" runat="server" Text='<%#Eval("DireccionEnvio") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolio" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cantidad">
<EditItemTemplate>
<asp:DropDownList runat="server" ID="DdlPS" DataTextField="CodigoPS" CssClass="form-control select2me" Width="100%" DataValueField="CvePS" ></asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LblCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.####}") %>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolio" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" />
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
<asp:TemplateField ItemStyle-Width="2.5%">
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Producto">
<EditItemTemplate>
<asp:DropDownList runat="server" ID="DdlPS" DataTextField="CodigoPS" CssClass="form-control select2me" Width="100%" DataValueField="CvePS" ></asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LblProducto" Font-Italic="true" runat="server" Text='<%#Eval("CodigoPS") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Editar">
<EditItemTemplate >
<div style="width: 85px;">
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GprGV" />
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</div>
</EditItemTemplate>
<ItemTemplate>
<asp:Checkbox runat="server" ID="chk" ></asp:Checkbox>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
<div class="row">
<div class="col-md-12" style="text-align:center;">
<asp:Button ID="BtnEntregar" runat="server" Text="Entregado" class="btn btn-primary" OnClick="BtnEntregar_Click" />
</div>
</div>
</ContentTemplate>
<asp:TemplateField ItemStyle-Width="2.5%">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chk"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
<div class="row">
<div class="col-md-12" style="text-align: center;">
<asp:Button ID="BtnEntregar" runat="server" Text="Entregado" class="btn btn-primary" OnClick="BtnEntregar_Click" />
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabEntregas" runat="server" HeaderText="Entregas">
<ContentTemplate>
@@ -175,5 +214,16 @@
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
function seleccionVenta(chkId, cveVenta) {
// Obtener el estado actual del checkbox que fue clicado
var isChecked = $('#' + chkId).prop('checked');
// Seleccionar o deseleccionar todos los checkboxes que tienen la clase 'cveVenta'
$('.' + cveVenta).each(function () {
$(this).prop('checked', isChecked);
});
}
</script>
</asp:Content>

View File

@@ -7,10 +7,42 @@ Imports Extensiones
Partial Class Ventas_RepPedidosSTF
Inherits ClsPaginas
Public Property DTProductosEdicion As DataTable
Get
If ViewState("DTProductosEdicion") Is Nothing Then
ViewState("DTProductosEdicion") = New DataTable
End If
Return DirectCast(ViewState("DTProductosEdicion"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTProductosEdicion") = value
End Set
End Property
Public Property DatosGV As DataTable
Get
If ViewState("DatosGV") Is Nothing Then
ViewState("DatosGV") = New DataTable
End If
Return DirectCast(ViewState("DatosGV"), DataTable)
End Get
Set(value As DataTable)
ViewState("DatosGV") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
CargaProductosEdicion()
End If
End Sub
Private Sub CargaCombos()
@@ -34,6 +66,8 @@ Partial Class Ventas_RepPedidosSTF
Protected Sub CargaDatos()
DatosGV = New DataTable
Dim Opcion As Integer = 1
Dim FechaInicio As Date = MinFecha
Dim FechaFin As Date = MaxFecha
@@ -43,8 +77,10 @@ Partial Class Ventas_RepPedidosSTF
FechaInicio = txtFechaI.Text.ToDate
FechaFin = txtFechaF.Text.ToDate
Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion, FechaInicio, FechaFin) Then
GvE.DataSource = ObjVentas.DtResultados
End If
ObjVentas.Dispose()
GvE.DataBind()
@@ -53,7 +89,9 @@ Partial Class Ventas_RepPedidosSTF
FechaFin = txtFechaF.Text.ToDate
Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion, FechaInicio, FechaFin) Then
GvDatos.DataSource = ObjVentas.DtResultados
DatosGV = ObjVentas.DtResultados
GvDatos.DataSource = DatosGV
End If
ObjVentas.Dispose()
GvDatos.DataBind()
@@ -61,19 +99,94 @@ Partial Class Ventas_RepPedidosSTF
End Sub
Private Sub CargaProductosEdicion()
DTProductosEdicion = New DataTable
Dim ObjVentas As ClsVentas = New ClsVentas()
If ObjVentas.GetPSSubProyectosVendedores(UsuarioActual.CveEmpresa) Then
DTProductosEdicion = ObjVentas.DtResultados.FiltraParametros($" CveVendedor = {UsuarioActual.CveVendedor}")
End If
ObjVentas.Dispose()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveVendedor") = "" OrElse e.Row.DBCampo("CvePS") = "" Then e.Row.FCCheckBox("Chk").Visible = False
If e.Row.DBCampo("CveVendedor") = "" OrElse e.Row.DBCampo("CvePS") = "" Then
e.Row.FCCheckBox("Chk").InputAttributes.Add("onclick", $"seleccionVenta('{e.Row.FCCheckBox("Chk").ClientID}','{e.Row.DataKey("CveVenta")}')")
e.Row.FCLinkButton("imgE").Visible = False
Else
e.Row.FCCheckBox("Chk").InputAttributes.Add("class", e.Row.DataKey("CveVenta"))
End If
If e.Row.DBCampo("TipoRenglon") = "1" Then e.Row.CssClass = "SubTotales"
End If
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
If e.Row.DBCampo("CveVendedor") = "" OrElse e.Row.DBCampo("CvePS") = "" Then
Else
e.Row.FCDropDownList("DdlPS").DataSource = DTProductosEdicion
e.Row.FCDropDownList("DdlPS").DataBind()
e.Row.FCDropDownList("DdlPS").SelectedValueExist(e.Row.DBCampo("CvePS"))
End If
End If
End Sub
Protected Sub GvDatos_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
GvDatos.EditIndex = e.NewEditIndex
CargaGvDatos()
End Sub
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
GvDatos.EditIndex = -1
CargaGvDatos()
End Sub
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
Dim Cantidad As Decimal = GvDatos.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal
Dim CvePSNuevo As Integer = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlPS").SelectedValue.ToEntero
Dim PSNuevo As String = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlPS").SelectedItem.Text
Dim PU As Decimal = DTProductosEdicion.FiltroPrimeroValor("Precio", $"CvePS = {CvePSNuevo}").ToDecimal
DatosGV.Rows(GvDatos.EditIndex)("Cantidad") = Cantidad
DatosGV.Rows(GvDatos.EditIndex)("CvePS") = CvePSNuevo
DatosGV.Rows(GvDatos.EditIndex)("CodigoPS") = PSNuevo
DatosGV.AcceptChanges()
GvDatos.EditIndex = -1
GvDatos.DataSource = DatosGV
GvDatos.DataBind()
UPDatos.Update()
End Sub
Private Sub CargaGvDatos()
GvDatos.DataSource = DatosGV
GvDatos.DataBind()
UPDatos.Update()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos()
UPDatos.Update()
End Sub
Protected Sub BtnEntregar_Click(sender As Object, e As EventArgs)
'validar que están seleccionados
Dim TmpDTRemis As New DataTable
@@ -86,9 +199,12 @@ Partial Class Ventas_RepPedidosSTF
TmpDTRemis.Columns.Add("PU", GetType(Decimal))
TmpDTRemis.Columns.Add("CveVendedor", GetType(Decimal))
TmpDTRemis.Columns.Add("GastosEnvio", GetType(Decimal))
TmpDTRemis.Columns.Add("Observacion", GetType(String))
'agruparo por cliente
For Each gvr As GridViewRow In GvDatos.Rows
If gvr.FCCheckBox("chk").Checked Then
If gvr.DataKey("CveVendedor").ToEntero > 0 AndAlso gvr.DataKey("CvePS").ToEntero > 0 AndAlso gvr.FCCheckBox("chk").Checked Then
Dim drp As DataRow = TmpDTRemis.NewRow
drp("CvePS") = gvr.DataKey("CvePS").ToEntero
drp("Cantidad") = gvr.DataKey("Cantidad").ToDecimal
@@ -99,6 +215,8 @@ Partial Class Ventas_RepPedidosSTF
drp("CveVendedor") = gvr.DataKey("CveVendedor").ToEntero
drp("CveVentaDetalle") = gvr.DataKey("CveVentaDetalle").ToEntero
drp("GastosEnvio") = gvr.DataKey("GastosEnvio").ToDecimal
drp("Observacion") = gvr.DataKey("SerieFolio")
TmpDTRemis.Rows.Add(drp)
End If
Next
@@ -120,7 +238,7 @@ Partial Class Ventas_RepPedidosSTF
For Each dr As DataRow In TmpDTRemis.FiltraParametros($"CveCliente ={drt("CveCliente")} AND CveVendedor = {drt("CveVendedor")} AND CveSubProyecto = {drt("CveSubProyecto")}").Rows
If ObjFactura IsNot Nothing Then
If Not ObjFactura.AgregarPS(dr("CvePS").ToString.ToEntero, dr("Cantidad").ToString.ToDecimal, dr("PU").ToString.ToDecimal, 0, "", CveSubProyecto:=dr("CveSubProyecto").ToString.ToEntero, CveVentaDetallePadre:=dr("CveVentaDetalle").ToString.ToEntero) Then
If Not ObjFactura.AgregarPS(dr("CvePS").ToString.ToEntero, dr("Cantidad").ToString.ToDecimal, dr("PU").ToString.ToDecimal, 0, dr("Observacion").ToString, CveSubProyecto:=dr("CveSubProyecto").ToString.ToEntero, CveVentaDetallePadre:=dr("CveVentaDetalle").ToString.ToEntero) Then
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
TieneError = True
Exit For
@@ -133,8 +251,8 @@ Partial Class Ventas_RepPedidosSTF
Next
If drt("GastosEnvio").ToString.ToDecimal > 0 Then
Dim tCvePSEnvio As Integer = usuarioactual.empresa.Funcionalidad(160).toentero
If Not ObjFactura.AgregarPS(tCvePSEnvio, 1, drt("GastosEnvio").ToString.ToDecimal, 0, "", CveSubProyecto:=drt("CveSubProyecto").ToString.ToEntero) Then
Dim tCvePSEnvio As Integer = usuarioactual.empresa.Funcionalidad(160).ToEntero
If Not ObjFactura.AgregarPS(tCvePSEnvio, 1, drt("GastosEnvio").ToString.ToDecimal, 0, drt("Observacion").ToString, CveSubProyecto:=drt("CveSubProyecto").ToString.ToEntero) Then
TieneError = True
End If
End If