Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3131,14 +3131,16 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("FechaFactura", If(CveCompra > 0, dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy"), "")))
|
||||
params.Add(New ReportParameter("SerieFolio", If(CveCompra > 0, dr("SerieFolio").ToString, "")))
|
||||
params.Add(New ReportParameter("Moneda", If(CveCompra > 0, dr("Moneda").ToString, "")))
|
||||
|
||||
params.Add(New ReportParameter("Condicion", If(CveCompra > 0, (((dr("FechaVencimiento").ToString.ToDate - dr("Fecha").ToString.ToDate)).TotalDays).ToString, "")))
|
||||
|
||||
params.Add(New ReportParameter("Saldo", If(CveCompra > 0, dr("Saldo").ToString.ToDouble.FormatoNumero(2), "")))
|
||||
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("NombreEntrego", String.Format("REVISÓ ALMACÉN{0}{1}", vbCrLf, Recibio)))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ ALMACÉN{0}{1}", vbCrLf, Recibio)))
|
||||
|
||||
params.Add(New ReportParameter("FechaVencimiento", If(CveCompra > 0, dr("FechaVencimiento").ToString.ToDate().ToString("dd/MM/yyyy"), "")))
|
||||
params.Add(New ReportParameter("NombreCapturo", If(CveCompra > 0, dr("NombreCapturo").ToString, "")))
|
||||
|
||||
Else
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format(Recibio)))
|
||||
params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
|
||||
@@ -1581,7 +1581,7 @@
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=IIf(
|
||||
Fields!Cargo.Value = 0,
|
||||
Sum(Fields!Cargo.Value) = 0,
|
||||
"",
|
||||
Format(Sum(Fields!Cargo.Value), "###,###,###.00")
|
||||
)</Value>
|
||||
@@ -1618,7 +1618,7 @@
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=IIf(
|
||||
Fields!Abono.Value = 0,
|
||||
Sum(Fields!Abono.Value) = 0,
|
||||
"",
|
||||
Format(Sum(Fields!Abono.Value), "###,###,###.00")
|
||||
)</Value>
|
||||
@@ -1992,7 +1992,6 @@
|
||||
<Value>Folio</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro Light</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2000,7 +1999,6 @@
|
||||
<Value>: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2008,7 +2006,6 @@
|
||||
<Value>=Parameters!Folio.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>Red</Color>
|
||||
</Style>
|
||||
@@ -2043,13 +2040,21 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>Capturo:</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!NombreCapturo.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
@@ -2059,7 +2064,7 @@
|
||||
<rd:DefaultName>Textbox50</rd:DefaultName>
|
||||
<Top>0.74112cm</Top>
|
||||
<Left>6.60454cm</Left>
|
||||
<Height>1.14659cm</Height>
|
||||
<Height>1.25419cm</Height>
|
||||
<Width>14.64707cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
@@ -2104,6 +2109,19 @@
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha Vencimiento:</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
@@ -2179,9 +2197,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>2.13642cm</Top>
|
||||
<Left>15.21318cm</Left>
|
||||
<Left>14.8163cm</Left>
|
||||
<Height>2.87013cm</Height>
|
||||
<Width>2.98794cm</Width>
|
||||
<Width>3.38481cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Parameters!CveTipoAlmacen.Value = "19"</Hidden>
|
||||
@@ -2215,6 +2233,20 @@
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FechaVencimiento.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
@@ -2862,6 +2894,18 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="FechaVencimiento">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="NombreCapturo">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="Logo">
|
||||
|
||||
@@ -175,14 +175,20 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" Width="100%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None" DataKeyNames="CveMovimiento,FechaMovto">
|
||||
<asp:GridView ID="GvDatos" Width="100%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False" OnRowDataBound="GvDatos_RowDataBound"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None" DataKeyNames="CveMovimiento,FechaMovto,CveVenta,CveCompra,FolioDocto">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="FechaMovto" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}" ItemStyle-Width="90px" HeaderText="Fecha" />
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Concepto" HeaderText="Movimiento" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="TipoMovimiento" HeaderText="Tipo" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="FolioDocto" HeaderText="Referencia" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--<asp:TemplateField ItemStyle-Width="70px" HeaderText="Referencia">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="hlFolio" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveMovimiento", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}")%>' Target="_blank" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField ItemStyle-Width="70px" HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="hlFolio" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveMovimiento", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}")%>' Target="_blank" />
|
||||
|
||||
@@ -72,4 +72,22 @@ Partial Class Inventarios_RepResumenMovimientosDiario
|
||||
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs)
|
||||
GenerarPDF("PDF")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'veVenta,CveCompra,FolioDocto
|
||||
Dim CveVenta As Integer = e.Row.DataKey("CveVenta").ToEntero
|
||||
Dim CveCompra As Integer = e.Row.DataKey("CveCompra").ToEntero
|
||||
Dim FolioDocto As String = e.Row.DataKey("FolioDocto")
|
||||
|
||||
If CveVenta > 0 Then
|
||||
e.Row.Cells(5).Text = $"<a href='../Ventas/Ventas.aspx?CveVenta={CveVenta}' class='Texto' target='_blank' >{FolioDocto}<a>"
|
||||
ElseIf CveCompra > 0 Then
|
||||
e.Row.Cells(5).Text = $"<a href='../Compras/Compras.aspx?CveCompra={CveCompra}' class='Texto' target='_blank' >{FolioDocto}<a>"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -869,7 +869,7 @@
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<ADS:Dropdownlost runat="server" ID="DdlP2" CssClassDdl="select2me" CssStyle="width: 100%;" DataTextField="PSCodigo" DataValueField="CvePS" data-estatus="1" />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlP2" IncluyeTodos="false" CssClassDdl="select2me" CssStyle="width: 100%;" DataTextField="PSCodigo" DataValueField="CvePS" data-estatus="1" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="CboUnidadMedida" CssClass="form-control input-sm " runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Style="width: 100%; max-width: 150px;"></asp:DropDownList>
|
||||
|
||||
@@ -3148,7 +3148,10 @@ Partial Class OC_OC
|
||||
ViewState("LigaOCs") = If(CveEstatusNuevo <> CboE.SelectedValue.ToEntero, String.Format("<a href='/OC/OC.aspx?OC={0}'>{1}</a>", CveOrdenCompra, SerieFolio), "")
|
||||
|
||||
If CveOrdenCompra > 0 Then
|
||||
Dim ImprimirOC As String = String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Orden de Compra</a> ", Encripta(String.Format("OP=OC&CVEOC={0}", CveOrdenCompra)))
|
||||
|
||||
Dim ImprimirOC As String = String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> ", Encripta(String.Format("OP=OC&CVEOC={0}", CveOrdenCompra)), If(TipoOC = "OC", "Orden de Compra", "Requisición"))
|
||||
|
||||
|
||||
Dim Msg As New StringBuilder
|
||||
|
||||
'Cuando Estatus = "Autorizada"
|
||||
@@ -3164,11 +3167,24 @@ Partial Class OC_OC
|
||||
End If
|
||||
|
||||
If LigaOCs = "" Then
|
||||
Msg.AppendFormat("La {0} No. <b><font size=""3"" >{1}</font></b>.<br/> Ha sido guardada correctamente <br/> {2}", TipoLargo, SerieFolio, If(TipoOC = "OC", ImprimirOC, ""))
|
||||
If TipoOC.ToUpper = "REQ" Then
|
||||
Msg.AppendFormat("La {0} No. <b><font size=""3"" >{1}</font></b>.<br/> Ha sido guardada correctamente <br/> {2}", TipoLargo, SerieFolio, ImprimirOC)
|
||||
Else
|
||||
Msg.AppendFormat("La {0} No. <b><font size=""3"" >{1}</font></b>.<br/> Ha sido guardada correctamente <br/> {2}", TipoLargo, SerieFolio, If(TipoOC = "OC", ImprimirOC, ""))
|
||||
End If
|
||||
|
||||
Else
|
||||
Msg.AppendFormat("La {0} No. <b><font size=""3"" >{1}</font></b>.<br/> Ha sido guardada correctamente<br><br>Orden de Compra:{2} <br/> {3}", TipoLargo, SerieFolio, LigaOCs, If(TipoOC = "OC", ImprimirOC, ""))
|
||||
|
||||
If TipoOC.ToUpper = "REQ" Then
|
||||
Msg.AppendFormat("La {0} No. <b><font size=""3"" >{1}</font></b>.<br/> Ha sido guardada correctamente<br><br>Orden de Compra:{2} <br/> {3}", TipoLargo, SerieFolio, LigaOCs, ImprimirOC)
|
||||
Else
|
||||
Msg.AppendFormat("La {0} No. <b><font size=""3"" >{1}</font></b>.<br/> Ha sido guardada correctamente<br><br>Orden de Compra:{2} <br/> {3}", TipoLargo, SerieFolio, LigaOCs, If(TipoOC = "OC", ImprimirOC, ""))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'IMPRIME LIGA A POLIZAS
|
||||
If IDPolizasGeneradas.Count > 0 Then
|
||||
Msg.Append("<br/><br/> <b>Polizas generadas:</b>")
|
||||
|
||||
@@ -1338,7 +1338,7 @@
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Literal ID="LtlPSEdit" runat="server" Visible="false" Text='<%# Eval("PS") %>'></asp:Literal>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" data-onresult="CargaExistenciaAlmacenes" Onselectedindexchange="DdlPSEdit_SelectedIndexChanged" />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" data-onresult="CargaExistenciaAlmacenes" Onselectedindexchange="DdlPSEdit_SelectedIndexChanged" />
|
||||
<%--<asp:RequiredFieldValidator ID="RFVPS" runat="server" ControlToValidate="DdlPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto o Servicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GprGV" CssClass="select2me"></asp:RequiredFieldValidator>--%>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCOPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVPS" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</EditItemTemplate>
|
||||
|
||||
@@ -9159,7 +9159,11 @@ Partial Class Ventas
|
||||
|
||||
Dim DrProducto = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSNuevo).FiltroPrimero("")
|
||||
|
||||
If Not ValidaAgregarPS(Cantidad, CvePSNuevo, DdlUM.SelectedValue.ToEntero(), PU, DrProducto("CveTipoPS").ToString().ToEntero(), DdlCla.SelectedValue.ToEntero(), DdlSP.SelectedValue.ToEntero(), ObjDescuento, CantidadOriginal:=CantidadOriginal) Then
|
||||
Dim CveUMPS As Integer = DrProducto("CveUnidadMedida").ToString().ToEntero()
|
||||
|
||||
DdlUM.SelectedValueExist(CveUMPS)
|
||||
|
||||
If Not ValidaAgregarPS(Cantidad, CvePSNuevo, DdlUM.SelectedValue.ToEntero(), PU, DrProducto("CveTipoPS").ToString().ToEntero(), DdlCla.SelectedValue.ToEntero(), DdlSubProyectoDatos.SelectedValue.ToEntero(), ObjDescuento, CantidadOriginal:=CantidadOriginal) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -9176,6 +9180,8 @@ Partial Class Ventas
|
||||
If TmpDT.Rows(e.RowIndex)("CvePS").ToString() <> GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue Then
|
||||
'eliminar y cargar el ps ***
|
||||
|
||||
Dim ConsecutivoActual As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
|
||||
|
||||
If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then
|
||||
ObjDescuento = CalcularDescuentos(GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero(), Cantidad, PU)
|
||||
End If
|
||||
@@ -9214,7 +9220,7 @@ Partial Class Ventas
|
||||
GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedValue.ToEntero(), GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem.Text,
|
||||
GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text,
|
||||
CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
|
||||
ObjDescuento:=ObjDescuento, NumTurnos:=NumTurnos, CvePrecioLista:=CvePrecioLista, PrecioLista:=PrecioLista)
|
||||
ObjDescuento:=ObjDescuento, NumTurnos:=NumTurnos, CvePrecioLista:=CvePrecioLista, PrecioLista:=PrecioLista, ConsecutivoManual:=ConsecutivoActual)
|
||||
|
||||
' TmpDT.Rows(e.RowIndex)("CveUM") = Ddl.SelectedValue
|
||||
' TmpDT.Rows(e.RowIndex)("UM") = Ddl.SelectedItem.Text
|
||||
@@ -18603,6 +18609,25 @@ Partial Class Ventas
|
||||
|
||||
Dim DdlPrecioListaEdit = GvRow.FCDropDownList("DdlPrecioListaEdit")
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") AndAlso GvRow.FCHtmlGenericControl("DivPrecioLista").Visible Then
|
||||
Using ObjVta As New ClsVentas
|
||||
If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), CvePSParametro, UsuarioActual.CveEmpresa) Then
|
||||
Dim Dt As DataTable = Nothing
|
||||
If UsuarioActual.TienePermisoProceso(384) Then
|
||||
Dt = ObjVta.DtResultados.Copy()
|
||||
Else
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'")
|
||||
End If
|
||||
|
||||
GvRow.FCDropDownList("DdlPrecioListaEdit").DataSource = Dt
|
||||
GvRow.FCDropDownList("DdlPrecioListaEdit").DataBind()
|
||||
GvRow.FCDropDownList("DdlPrecioListaEdit").SelectedValueExist(GvRow.DataKey("CvePrecioLista"))
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing Then
|
||||
'SUGIERE PRECIO
|
||||
@@ -19939,7 +19964,7 @@ Partial Class Ventas
|
||||
ObjDescuento = ObjDescuentoGral
|
||||
End If
|
||||
|
||||
If ValidaAgregarPS(Cantidad, CvePS, DdlUnidadMedida.SelectedValue.ToEntero(), PU, HdnTipoPS.Value.ToEntero(), DdlClasificacion.SelectedValue.ToEntero(), DdlSubProyecto.SelectedValue.ToEntero(), ObjDescuento) Then
|
||||
If ValidaAgregarPS(Cantidad, CvePS, DdlUnidadMedida.SelectedValue.ToEntero(), PU, HdnTipoPS.Value.ToEntero(), DdlClasificacion.SelectedValue.ToEntero(), DdlSubProyectoDatos.SelectedValue.ToEntero(), ObjDescuento) Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(507) = DdlPS.SelectedValue Then
|
||||
CvePSAmortizacion = DdlPS.SelectedValue.ToEntero().ToEntero()
|
||||
@@ -20271,7 +20296,7 @@ Partial Class Ventas
|
||||
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
||||
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "",
|
||||
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D, Optional CantidadConversion As Decimal = 0,
|
||||
Optional Costo As Decimal = 0, Optional PorcentajeIVAFijo As Decimal = -1) As Boolean
|
||||
Optional Costo As Decimal = 0, Optional PorcentajeIVAFijo As Decimal = -1, Optional ConsecutivoManual As Integer = 0) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Try
|
||||
@@ -20314,16 +20339,22 @@ Partial Class Ventas
|
||||
Row("SubProyecto") = SubProyecto
|
||||
Row("Serie") = Serie
|
||||
Row("TiempoEntrega") = TiempoEntrega
|
||||
If Modalidad = "U" Then
|
||||
Row("Orden") = Index
|
||||
|
||||
If ConsecutivoManual > 0 Then
|
||||
Row("Orden") = ConsecutivoManual
|
||||
Else
|
||||
Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
|
||||
If ConsecutivoActual < 0 Then
|
||||
ConsecutivoActual = 0
|
||||
If Modalidad = "U" Then
|
||||
Row("Orden") = Index
|
||||
Else
|
||||
Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
|
||||
If ConsecutivoActual < 0 Then
|
||||
ConsecutivoActual = 0
|
||||
End If
|
||||
Row("Orden") = ConsecutivoActual + 1
|
||||
End If
|
||||
Row("Orden") = ConsecutivoActual + 1
|
||||
End If
|
||||
|
||||
|
||||
Dim DrPS As DataRow = Nothing
|
||||
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||
@@ -20428,16 +20459,22 @@ Partial Class Ventas
|
||||
Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
|
||||
Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
|
||||
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
||||
If Modalidad = "U" Then
|
||||
Row("Consec") = Index
|
||||
|
||||
If ConsecutivoManual > 0 Then
|
||||
Row("Consec") = ConsecutivoManual
|
||||
Else
|
||||
Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
|
||||
If ConsecutivoActual < 0 Then
|
||||
ConsecutivoActual = 0
|
||||
If Modalidad = "U" Then
|
||||
Row("Consec") = Index
|
||||
Else
|
||||
Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
|
||||
If ConsecutivoActual < 0 Then
|
||||
ConsecutivoActual = 0
|
||||
End If
|
||||
Row("Consec") = ConsecutivoActual + 1
|
||||
End If
|
||||
Row("Consec") = ConsecutivoActual + 1
|
||||
End If
|
||||
|
||||
|
||||
Row("PS") = DrPS("PS")
|
||||
Row("CodigoPS") = DrPS("PSCodigo").ToString()
|
||||
Row("CveTipoPS") = DrPS("CveTipoPS")
|
||||
@@ -25423,6 +25460,16 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlMetodoCliente.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("El 'Método Pago' es requerido.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlFormaCliente.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("El 'Forma Pago' es requerido.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
|
||||
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -25467,7 +25514,7 @@ Partial Class Ventas
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
||||
TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero(), DdlFormaCliente.SelectedValue.ToEntero(), CvePrecioLista:=CvePrecioLista,
|
||||
RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI, CveClienteClasificacion:=DdlGiro.SelectedValue.ToEntero()) Then
|
||||
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user