This commit is contained in:
2019-10-28 16:22:44 -07:00
15 changed files with 11360 additions and 261 deletions

View File

@@ -637,7 +637,7 @@ Partial Class Bancos_ProveedoresAbonar
e.Row.FCTextBox("TxtAbonar").Enabled = False
' si tiene un porcentaje mayor ingresado, que este halla sido por OC, debe de permitirlo
If e.Row.DBCampo("ImporteAlmacenPorcentaje").ToDecimal >= 100 Then 'si ya se recibió el 100%
If e.Row.DBCampo("ImporteAlmacenPorcentaje").ToDecimal >= 99.0 Then 'si ya se recibió el 100%
e.Row.FCCheckBox("Chk").Enabled = True
e.Row.FCTextBox("TxtAbonar").Enabled = True
End If

View File

@@ -890,6 +890,7 @@ Partial Class PopUpVerFactura
Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
Vta.RefDocto = dtVentas(0)("Ref").ToString
Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
Vta.NumeroCuenta = dtVentas(0)("NumCtaPago").ToString
Vta.Version = dtVentas(0)("Version").ToString
Vta.NumeroContrato = dtVentas(0)("NumeroContrato").ToString
@@ -2991,34 +2992,24 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("LogoPath", ""))
End If
If ObjOS.GetOrdenesServiciosDetalle(CveOS) Then
TmpDTOS = ObjOS.DtResultados
End If
If ObjOS.GetDetalleMateriales(-1, CveOS) Then
TmpDTMaterialesOS = ObjOS.DtResultados
End If
Dim lrds As New List(Of ReportDataSource)
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}
lrds.Add(rds)
lrds.Add(rds2)
ObjOS.Dispose()
ImprimirPDF("Empresas/Grales/Formatos/OrdenServicio.rdlc", lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
Else
Dim lrds As New List(Of ReportDataSource)
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}
lrds.Add(rds)
lrds.Add(rds2)
ObjOS.Dispose()
ImprimirPDF(String.Format("Empresas/{0}/Formatos/OrdenServicio.rdlc", UsuarioActual.CveEmpresa), lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
End If
If ObjOS.GetOrdenesServiciosDetalle(CveOS) Then
TmpDTOS = ObjOS.DtResultados
End If
If ObjOS.GetDetalleMateriales(-1, CveOS) Then
TmpDTMaterialesOS = ObjOS.DtResultados
End If
Dim lrds As New List(Of ReportDataSource)
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}
lrds.Add(rds)
lrds.Add(rds2)
ObjOS.Dispose()
ImprimirPDF(String.Format("Empresas/{0}/Formatos/OrdenServicio.rdlc", UsuarioActual.CveEmpresa), lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
End Sub
Private Sub CreaDT()
TmpDTOS = New DataTable

View File

@@ -83,7 +83,7 @@
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<%-- <li>
<%-- <li>
<asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>--%>
<li>
@@ -121,7 +121,7 @@
<div class="row">
<label class="col-md-1 truncate" data-toggle="tooltip" title="Almacén Destino">Proveedor:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlProveedor" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="form-control input-sm input-small select2me" Width="150px" runat="server"></asp:DropDownList>
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
</div>
</div>
</div>
@@ -141,18 +141,17 @@
</div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="True" EmptyDataText="No se encontró información"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" Style="text-align: center;" GridLines="None" ShowHeader="true" DataKeyNames="CvePS">
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True"
ShowFooter="True" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Texto" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
<Columns>
<%-- <asp:TemplateField HeaderText="PS" ItemStyle-HorizontalAlign="Left">
<%-- <asp:TemplateField HeaderText="PS" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Literal ID="HplREQ" runat="server" Text='<%# Eval("PS") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>--%>
<%-- <asp:TemplateField HeaderText="Ultima Compra" ItemStyle-HorizontalAlign="Right">
<%-- <asp:TemplateField HeaderText="Ultima Compra" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="HplOC" runat="server" Text='<%# Eval("UltCompra", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
@@ -163,9 +162,8 @@
<asp:Literal ID="HplOC2" runat="server" Text='<%# Eval("PrecioLista", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
<%-- <HeaderStyle CssClass="Titulos" />
<%-- <HeaderStyle CssClass="Titulos" />
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />--%>
</asp:GridView>

View File

@@ -33,11 +33,12 @@ Partial Class RepComprasPrecios
If ObjCompras.GetRepComprasPrecios(DdlProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjCompras.DtResultados
DtCompras = ObjCompras.DtResultados
GvDatos.DataBind()
UPDatos.Update()
End If
ObjCompras.Dispose()
GvDatos.DataBind()
UPDatos.Update()
End Sub
#End Region
@@ -45,11 +46,14 @@ Partial Class RepComprasPrecios
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
'GvDatos.Columns(1).ItemStyle.Width = New Unit("500px")
GvDatos.HeaderRow.Cells(0).Visible = False
e.Row.Cells(0).Visible = False
e.Row.HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(1).Width = Unit.Pixel(125)
If e.Row.DBCampo("CvePS") = "" Then
e.Row.CssClass = "Totales"
@@ -70,24 +74,15 @@ Partial Class RepComprasPrecios
End If
Next
'Cuando es titulo
'If e.Row.DBCampo("PS").ToString.Trim = "" Then
' e.Row.CssClass = "Totales"
' e.Row.Cells(0).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida"))
' e.Row.Cells(1).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString)
' e.Row.Cells(3).Text = String.Format("Almacen Destino: {0} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Responsable: {1}", e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio"))
'End If
End If
End Sub
#End Region
#Region "CARGA COMBOS FILTRO"
Private Sub CargaProveedor()
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
DdlProveedor.setEsWebService(True)
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
DdlProveedor.SelectedText = "Todos"
DdlProveedor.SelectedValue = "-1"
End Sub
#End Region
@@ -99,27 +94,8 @@ Partial Class RepComprasPrecios
Private Sub Imprime(Formato As String)
If DtCompras IsNot Nothing Then
Dim StrFiltro As New StringBuilder
If DdlProveedor.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Proveedor:</b> {0}", DdlProveedor.SelectedItem.Text)
StrFiltro.AppendFormat("Proveedor: {0},", DdlProveedor.SelectedText)
GvDatos.ExportToExcelG("RepComprasPrecios.xlsx", "Reporte de Precios de Compras", UsuarioActual, StrFiltro.ToString, 100, 200)
'Dim StrFiltro As New StringBuilder
'If DdlProveedor.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Proveedor:</b> {0}", DdlProveedor.SelectedItem.Text)
'Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
'Dim params As New List(Of ReportParameter)
'params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
'params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
'params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
'If Imagen.Exists Then
' params.Add(New ReportParameter("LogoPath", logouri))
'Else
' params.Add(New ReportParameter("LogoPath", ""))
'End If
'ImprimirPDF("Empresas/Grales/Formatos/RepComprasPrecios.rdlc", DtCompras, params, String.Format("RepComprasPrecios-{0}", Now.ToDateTime.ToShortDateString), Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
@@ -132,4 +108,6 @@ Partial Class RepComprasPrecios
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
Imprime("Excel")
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
End Class

View File

@@ -152,7 +152,7 @@
</div>
</div>
<label class="col-md-1">Sucursal:</label>
<label class="col-md-1">SubProyecto:</label>
<div class="col-md-3">
<asp:DropDownList ID="DdlSucursal" Width="150px" AppendDataBoundItems="true" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm input-small select2me"></asp:DropDownList>
</div>
@@ -165,7 +165,7 @@
<div class="row">
<label class="col-md-1 truncate" data-toggle="tooltip" title="Almacén Destino">Proveedor:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlProveedor" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="form-control input-sm input-small select2me" Width="150px" runat="server"></asp:DropDownList>
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
</div>
<%-- <label class="col-md-1 truncate">Recibido:</label>

View File

@@ -100,15 +100,15 @@ Partial Class RepReqOCCompraInv
#Region "CARGA COMBOS FILTRO"
Private Sub CargaSucursal()
DdlSucursal.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
DdlSucursal.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSucursal.DataBind()
DdlSucursal.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSucursal.SelectedValue = "-1"
End Sub
Private Sub CargaProveedor()
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
DdlProveedor.setEsWebService(True)
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
DdlProveedor.SelectedText = "Todos"
DdlProveedor.SelectedValue = "-1"
End Sub
#End Region

View File

@@ -1819,15 +1819,19 @@ Partial Class RegPoliza
Dim Referencia As String = Row("Referencia").ToString
Dim Cuenta As String = Row("Código Cuenta").ToString + " - " + Row("Nombre Cuenta").ToString
Dim Cuenta2 = AgregaComilla(Cuenta) 'Agregar otra comilla simple adicional cuando contenga una
Dim CveCuenta As String = ""
If DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta & "'") IsNot Nothing Then
CveCuenta = DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta & "'")("Id").ToString
If DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta2 & "'") IsNot Nothing Then
CveCuenta = DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta2 & "'")("Id").ToString
End If
Dim SegNeg As String = Row("SegNeg").ToString
Dim SegNeg2 = AgregaComilla(SegNeg) 'Agregar otra comilla simple adicional cuando contenga una
Dim IdSegNeg As String = ""
If DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg & "'") IsNot Nothing Then
IdSegNeg = DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg & "'")("Id").ToString
If DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg2 & "'") IsNot Nothing Then
IdSegNeg = DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg2 & "'")("Id").ToString
End If
Dim Concepto As String = Row("Nombre/Concepto").ToString
@@ -1884,4 +1888,18 @@ Partial Class RegPoliza
DescargarFormato()
End Sub
Private Function AgregaComilla(str As String) As String
If str.Contains("'") Then
Dim arr = Split(str, "'")
str = ""
For i = 0 To arr.Length() - 1
If i = arr.Length - 1 Then
str += arr(i)
Else
str += arr(i) + "''"
End If
Next
End If
Return str
End Function
End Class

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>3.63358cm</Top>
<Left>0.07cm</Left>
<Left>0.11767cm</Left>
<Height>0.47364cm</Height>
<Width>18.64497cm</Width>
<Style>
@@ -78,7 +78,7 @@
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>0.5338cm</Top>
<Left>8.84441cm</Left>
<Left>8.89208cm</Left>
<Height>0.47364cm</Height>
<Width>4.43083cm</Width>
<ZIndex>1</ZIndex>
@@ -134,7 +134,7 @@
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>6.93966cm</Top>
<Left>0.07344cm</Left>
<Left>0.12111cm</Left>
<Height>0.48cm</Height>
<Width>18.65153cm</Width>
<ZIndex>2</ZIndex>
@@ -190,7 +190,7 @@
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>2.08369cm</Top>
<Left>8.84441cm</Left>
<Left>8.89208cm</Left>
<Height>0.47364cm</Height>
<Width>4.43083cm</Width>
<ZIndex>3</ZIndex>
@@ -246,7 +246,7 @@
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>0.5338cm</Top>
<Left>13.45163cm</Left>
<Left>13.4993cm</Left>
<Height>0.47364cm</Height>
<Width>5.24334cm</Width>
<ZIndex>4</ZIndex>
@@ -302,7 +302,7 @@
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>1.00743cm</Top>
<Left>13.45163cm</Left>
<Left>13.4993cm</Left>
<Height>0.97042cm</Height>
<Width>5.26334cm</Width>
<ZIndex>5</ZIndex>
@@ -358,7 +358,7 @@
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>2.62788cm</Top>
<Left>13.45163cm</Left>
<Left>13.4993cm</Left>
<Height>0.89986cm</Height>
<Width>5.26334cm</Width>
<ZIndex>6</ZIndex>
@@ -414,7 +414,7 @@
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>2.15424cm</Top>
<Left>13.45163cm</Left>
<Left>13.4993cm</Left>
<Height>0.47364cm</Height>
<Width>5.25334cm</Width>
<ZIndex>7</ZIndex>
@@ -454,7 +454,7 @@
<Value>Logo1</Value>
<Sizing>FitProportional</Sizing>
<Top>0.1546in</Top>
<Left>0.07918in</Left>
<Left>0.09795in</Left>
<Height>1.2065in</Height>
<Width>1.21875in</Width>
<ZIndex>8</ZIndex>
@@ -503,7 +503,7 @@
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>1.00743cm</Top>
<Left>3.29673cm</Left>
<Left>3.3444cm</Left>
<Height>2.52032cm</Height>
<Width>5.37129cm</Width>
<ZIndex>9</ZIndex>
@@ -560,8 +560,8 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>9.69619cm</Top>
<Left>0.07cm</Left>
<Top>10.0666cm</Top>
<Left>0.13112cm</Left>
<Height>0.44775cm</Height>
<Width>18.65497cm</Width>
<ZIndex>10</ZIndex>
@@ -616,8 +616,8 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>13.43126cm</Top>
<Left>0.07cm</Left>
<Top>13.97806cm</Top>
<Left>0.13112cm</Left>
<Height>0.99688cm</Height>
<Width>18.64497cm</Width>
<ZIndex>11</ZIndex>
@@ -672,8 +672,8 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>12.95762cm</Top>
<Left>0.07cm</Left>
<Top>13.39858cm</Top>
<Left>0.13112cm</Left>
<Height>0.47364cm</Height>
<Width>18.64497cm</Width>
<ZIndex>12</ZIndex>
@@ -744,8 +744,8 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>15.56836cm</Top>
<Left>0.20112cm</Left>
<Top>16.28274cm</Top>
<Left>0.13112cm</Left>
<Height>0.89754cm</Height>
<Width>6.17587cm</Width>
<ZIndex>13</ZIndex>
@@ -816,8 +816,8 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>15.56836cm</Top>
<Left>6.67991cm</Left>
<Top>16.28274cm</Top>
<Left>6.48338cm</Left>
<Height>0.89754cm</Height>
<Width>6.17587cm</Width>
<ZIndex>14</ZIndex>
@@ -873,10 +873,10 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>15.56836cm</Top>
<Left>13.29827cm</Left>
<Top>16.28274cm</Top>
<Left>12.96369cm</Left>
<Height>0.89754cm</Height>
<Width>5.28334cm</Width>
<Width>5.54792cm</Width>
<ZIndex>15</ZIndex>
<Style>
<Border>
@@ -929,8 +929,8 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>16.4659cm</Top>
<Left>0.20112cm</Left>
<Top>17.68299cm</Top>
<Left>0.13112cm</Left>
<Height>0.47421cm</Height>
<Width>18.64497cm</Width>
<ZIndex>16</ZIndex>
@@ -999,8 +999,8 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox165</rd:DefaultName>
<Top>16.94011cm</Top>
<Left>0.20112cm</Left>
<Top>18.58053cm</Top>
<Left>0.13112cm</Left>
<Height>7.1417cm</Height>
<Width>17.72549cm</Width>
<ZIndex>17</ZIndex>
@@ -1052,8 +1052,8 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Copia</rd:DefaultName>
<Top>24.08181cm</Top>
<Left>0.20112cm</Left>
<Top>25.72223cm</Top>
<Left>0.13112cm</Left>
<Height>0.6cm</Height>
<Width>18.38049cm</Width>
<ZIndex>18</ZIndex>
@@ -1466,8 +1466,8 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>4.10722cm</Top>
<Left>0.07cm</Left>
<Height>2.26772cm</Height>
<Left>0.11767cm</Left>
<Height>2.26771cm</Height>
<Width>18.62496cm</Width>
<ZIndex>19</ZIndex>
<Style>
@@ -1525,7 +1525,7 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
</Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName>
<Top>6.37494cm</Top>
<Left>0.07cm</Left>
<Left>0.11767cm</Left>
<Height>0.49417cm</Height>
<Width>18.64497cm</Width>
<ZIndex>20</ZIndex>
@@ -1712,7 +1712,7 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>1.00743cm</Top>
<Left>8.84441cm</Left>
<Left>8.89208cm</Left>
<Height>0.97042cm</Height>
<Width>4.43082cm</Width>
<ZIndex>21</ZIndex>
@@ -1895,7 +1895,7 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>2.55733cm</Top>
<Left>8.84441cm</Left>
<Left>8.89208cm</Left>
<Height>0.97042cm</Height>
<Width>4.43082cm</Width>
<ZIndex>22</ZIndex>
@@ -2106,9 +2106,9 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>7.41966cm</Top>
<Left>0.07344cm</Left>
<Height>1.09417cm</Height>
<Width>18.65497cm</Width>
<Left>0.12111cm</Left>
<Height>1.09416cm</Height>
<Width>18.65498cm</Width>
<ZIndex>23</ZIndex>
<Style>
<Border>
@@ -2117,113 +2117,6 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
<FontSize>9pt</FontSize>
</Style>
</Tablix>
<Tablix Name="Tablix3">
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>9.30904cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.6cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox23">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Equipo</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox23</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.44125cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox29">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Equipo.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox29</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixRowHierarchy>
<Top>8.58438cm</Top>
<Left>0.07344cm</Left>
<Height>1.04125cm</Height>
<Width>9.30904cm</Width>
<ZIndex>24</ZIndex>
<Style>
<Border>
<Style>Solid</Style>
</Border>
</Style>
</Tablix>
<Textbox Name="Textbox32">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
@@ -2318,11 +2211,11 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox32</rd:DefaultName>
<Top>10.32033cm</Top>
<Left>0.20112cm</Left>
<Top>10.5849cm</Top>
<Left>0.13112cm</Left>
<Height>2.63729cm</Height>
<Width>3.53804cm</Width>
<ZIndex>25</ZIndex>
<ZIndex>24</ZIndex>
<Style>
<Border />
<PaddingLeft>2pt</PaddingLeft>
@@ -2331,11 +2224,315 @@ Compuproveeores no se hace responsable por el resguardo de su equipo.</Value>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Tablix Name="Tablix4">
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>1.64066cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.82591cm</Width>
</TablixColumn>
<TablixColumn>
<Width>8.24827cm</Width>
</TablixColumn>
<TablixColumn>
<Width>6.93013cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.6cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox14">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cantidad</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox18">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>UM</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox18</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox25">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Descripcion</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox25</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox27">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Observaciones</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox27</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Cantidad">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Cantidad.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Cantidad</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="UM">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!UM.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>UM</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="PS">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!PS.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>PS</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Observaciones">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Observaciones.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Observaciones</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<KeepWithGroup>After</KeepWithGroup>
</TablixMember>
<TablixMember>
<Group Name="Details1" />
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>8.69021cm</Top>
<Left>0.13112cm</Left>
<Height>1.2cm</Height>
<Width>18.64497cm</Width>
<ZIndex>25</ZIndex>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<FontSize>7pt</FontSize>
</Style>
</Tablix>
</ReportItems>
<Height>9.8435in</Height>
<Height>10.79142in</Height>
<Style />
</Body>
<Width>7.48268in</Width>
<Width>7.54841in</Width>
<Page>
<PageHeight>27.94cm</PageHeight>
<PageWidth>21.59cm</PageWidth>

View File

@@ -84,6 +84,7 @@
</div>
</div>
<div class="row">
<asp:HiddenField ID="HdnCveProveedor" runat="server" />
<label class="col-md-3">Almacén:</label>
<div class="col-md-9">
<asp:DropDownList ID="DdlAlmacenOrigen" Width="150px" AppendDataBoundItems="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me"></asp:DropDownList>

View File

@@ -6,12 +6,8 @@ Partial Class Inventarios_PrestamosdeProveedor
Private Sub Inventarios_PrestamosdeProveedor_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaCombos()
Dim a As New ClsValidaCFDi("EBFD0EF4-F7D2-4243-9A79-9C484D6C1323", "FRU880930R72", "AJA850608L7A", 39)
Alert(a.EsValida)
Dim lista As New List(Of String)
lista.Add("93")
lista.Add("100")
Notificaciones.AlertaVentana("hola", lista)
CargaDatos()
End If
End Sub
@@ -45,6 +41,11 @@ Partial Class Inventarios_PrestamosdeProveedor
If ObjInv.PrestamosdeProveedorGet(tCveProveedor, tFolio, UsuarioActual.CveEmpresa) Then
GvD.DataSource = ObjInv.DtResultados
Dim Dr As Data.DataRow = ObjInv.DtResultados.FiltroPrimero("")
If Dr IsNot Nothing Then
HdnCveProveedor.Value = Dr("CveProveedor")
End If
End If
ObjInv.Dispose()
@@ -128,7 +129,7 @@ Partial Class Inventarios_PrestamosdeProveedor
Dim Fecha As Date = TxtFechaEntrega.Text.ToDate
Dim CveMovimientoSalida As Integer
Dim tCveProveedor As Integer = ddlProveedor.SelectedValue.ToEntero
Dim tCveProveedor As Integer = HdnCveProveedor.Value.ToEntero
Dim CvePS As Integer = 0
'AGREGAMOS LA SALIDA
@@ -173,8 +174,7 @@ Partial Class Inventarios_PrestamosdeProveedor
Dim CveConceptoContable As Integer = 69
Dim CveClasifCosto As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("CvePS ={0} ", CvePS))
idCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {CveClasifCosto}").ToEntero
IdCtaContableOtro = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasifCosto}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservacionesEntrega.Text.Trim, 68, TxtObservacionesEntrega.Text.Trim, Fecha, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=tValorInventario) Then
ErrorMovInv = True
@@ -196,6 +196,7 @@ Partial Class Inventarios_PrestamosdeProveedor
TxtRecibio.Text = ""
TxtFechaEntrega.Text = Now.ToShortDateString
TxtObservacionesEntrega.Text = ""
HdnCveProveedor.Value = ""
Dim Mensaje As StringBuilder = New StringBuilder
Mensaje.AppendFormat("Se realizo correctamente la recepción. <br/> Folio de Salida: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoSalida)

View File

@@ -498,21 +498,21 @@ Partial Class OS_OrdenesServicios
' LnkTecnico.Visible = True
'End If
'If TipoEstatus = 3 Then
' DisableAll()
If TipoEstatus = 3 Then
DisableAll()
' If SeFacturara = "True" Then
' HplFacturar.Visible = True
' If ObjOS.CveCotizacion > 0 Then
' HplFacturar.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", ObjOS.CveCotizacion)
' Else
' HplFacturar.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveOS={0}", CveOS)
' End If
' End If
If SeFacturara = "True" Then
HplFacturar.Visible = True
If ObjOS.CveCotizacion > 0 Then
HplFacturar.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", ObjOS.CveCotizacion)
Else
HplFacturar.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveOS={0}", CveOS)
End If
End If
'ElseIf TipoEstatus = 4 Then
' DisableAll()
'End If
ElseIf TipoEstatus = 4 Then
DisableAll()
End If
DivCliente.Attributes.Add("class", "col-md-8")
DivFolio.Visible = True
@@ -2410,6 +2410,7 @@ Partial Class OS_OrdenesServicios
#Region "I M P R I M I R PDF"
Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
Dim mensajeImprimir As New StringBuilder
mensajeImprimir.AppendFormat(String.Format("<br/>Descargar Orden de Servicio con Folio: <a class=""Texto"" href='/OS/OrdenesServicios.aspx?CveOS={0}'>{1}</a><br/>", CveOS, CveFolio))
mensajeImprimir.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", CveOS)))
Alert(mensajeImprimir.ToString, TipoMensaje.MsgInformacion)
End Sub

View File

@@ -5632,6 +5632,125 @@ Partial Class Ventas
End If
End If
'si es remisión, ingreso, anticipo debe de considerar el preciominimo
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
Dim CvePS As Integer = DatarowPS("CvePS").ToString.ToEntero
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
If UsuarioActual.Empresa.UsaInventarios AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then
Dim ObjInventarios As New ClsInventarios
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
If Costo = 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1)
ObjInventarios.Dispose()
Dim PrecioMinimo As Decimal = 0
'RMF. condicion temporal, para reubicación, precio mínimo
If UsuarioActual.CveEmpresa = 119 Then
'Dim CvePrecioLista As Integer = 38
Dim objPS As New ClsProductosServicios
If objPS.GetPSSucursalesALL(CvePS, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero) Then
PrecioMinimo = objPS.DtResultados.FiltroPrimeroValor("PrecioMinimo", "").ToDecimal
If PrecioMinimo > 0 Then
Costo = PrecioMinimo
End If
End If
objPS.Dispose()
End If
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
'VALIDA EXISTENCIA
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS}") < TxtCantidad.Text.ToDouble Then
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
End If
End If
End If
'VALIDA COSTOS
If Not CveContrato > 0 Then
'BANDERAS PARA VALIDACIONES
Dim EsValido = False
Dim EsValidoMayor = False
Dim CostoMenor = 0.0D
Dim CostoMayor = 0.0D
'PRECIO MINIMO
If UsuarioActual.Empresa.Funcionalidad(129).ToEntero > 0 AndAlso UsuarioActual.CveUsuario <> 1560 Then
CostoMenor = Costo + ((UsuarioActual.Empresa.Funcionalidad(129).ToDecimal / 100) * Costo)
If PrecioMinimo > 0 Then CostoMenor = PrecioMinimo
'SI EL PRECIO ES MAYOR AL COSTO, SI PASA
If PU * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal) >= CostoMenor Then
EsValido = True
End If
Else
EsValido = True
End If
'PRECIO MAXIMO
If UsuarioActual.Empresa.Funcionalidad(133).ToEntero > 0 AndAlso UsuarioActual.CveUsuario <> 1560 Then
CostoMayor = Costo + ((UsuarioActual.Empresa.Funcionalidad(133).ToDecimal / 100) * Costo)
'SI EL PRECIO ES MAYOR AL COSTO MAXIMO, SI PASA
If PU * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal) <= CostoMayor Then
EsValidoMayor = True
End If
Else
EsValidoMayor = True
End If
''VALIDA PROMOCION: SI TIENE PROMOCION Y EL PRECIO ES MENOR AL PRECIO DE PROMOCION, NO PASA | SI YA CUMPLE NO VUELVE A VALIDAR
''SIRVE PARA VALIDAR PRECIOS DEBAJO DEL PRECIO MINIMO PERMITIDO
'If Not EsValido Then
' If DtPromociones.FiltraParametros($"CvePS = {CvePS}").Rows.Count > 0 Then
' If PU * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal) >= DtPromociones.FiltroPrimeroValor("PUPromocion", $"CvePS = {CvePS}").ToDecimal Then
' EsValido = True
' End If
' End If
'End If
'NO DEJA REGISTRAR MENOS AL PRECIO MINIMO
Dim MensajeCosto As New StringBuilder
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
If Not EsValido Then
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo <br/>", DatarowPS("PS").ToString)
If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>${0}</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango menor aceptado es: {0}% <b>${1}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero, CostoMenor)
MensajeCosto.AppendFormat("El precio indicado es: <b>${0}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero)
End If
Alert(String.Format(MensajeCosto.ToString), TipoMensaje.MsgAdvertencia)
e.Cancel = True
Exit Sub
End If
'NO DEJA REGISTRAR MAS AL PRECIO MAXIMO
If Not EsValidoMayor Then
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", HdnPS.Value)
If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>${0}</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango mayor aceptado es: {0}% <b>${1}</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero, CostoMayor)
MensajeCosto.AppendFormat("El precio indicado es: <b>${0}</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, (If(Costo > 0, ((PU - Costo) * 100) / Costo, 0)).FormatoNumero)
End If
Alert(MensajeCosto.ToString, TipoMensaje.MsgAdvertencia)
e.Cancel = True
Exit Sub
End If
End If
End If
End If
If TmpDT.Rows(e.RowIndex)("CvePS").ToString <> GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue Then
'eliminar y cargar el ps ***
Dim DdlUM As DropDownList = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida")
@@ -7311,6 +7430,8 @@ Partial Class Ventas
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
DtVentasNC.Rows(0)("Importe") = Total
DtVentasNC.Rows(0)("TC") = factura.TipoCambio
DtVentasNC.Rows(0)("TCCambioValuacion") = factura.TipoCambio
End If
ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion)
@@ -7859,16 +7980,19 @@ Partial Class Ventas
ObjFactura.AplicaDevolucion = Me.AplicaDevolucion
ObjFactura.CveTipoAmortizacionAnticipo = DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero
ObjFactura.Timbre.Comprobante.TipoComprobante = If(ObjFactura.TipoDocto.Contiene("Ing", "Ant"), "I", If(ObjFactura.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
If ObjFactura.Timbre.Comprobante.TipoComprobante = "E" Then
If ObjFactura.TipoDocumento.Contiene("Nota de Crédito") Then
If ObjFactura.TipoDocto = "Egs" Then
ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "01"
ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
End If
If ObjFactura.TipoDocumento.Contiene("Nota de Devolución") Then
If ObjFactura.TipoDocto = "Dev" Then
ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "03"
ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
End If
ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero
ObjFactura.Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value)
End If
' cuando es refacturacoin es cfdirelacionado, con relacion 04
@@ -7879,12 +8003,6 @@ Partial Class Ventas
End If
If ObjFactura.TipoDocto = "Egs" Then
ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero
End If
If ObjFactura.TipoDocto = "Dev" Then
ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero
End If
If ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso NuevaFactura = 1 Then ' refacturación
ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero
End If
@@ -8288,7 +8406,7 @@ Partial Class Ventas
Else
'SI LA FACTURA VIENE DE SER CANCELADA SISTEMA CUANDO SE REFACTURO NO HAY QUE RELACIONAR
If (CveEstatusFacturaPadre > 0 AndAlso CveEstatusFacturaPadre <> 4) OrElse (DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0) Then
If (CveEstatusFacturaPadre > 0 AndAlso CveEstatusFacturaPadre <> 4) OrElse (DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0) OrElse HdnFolioFiscalNC.Value.ToString <> "" Then
If Obj.CveTipoRelacion > 0 Then
Select Case Obj.CveTipoRelacion
@@ -9901,6 +10019,13 @@ Partial Class Ventas
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
End If
''Cuando se está amortizando con un anticipo y es la modalidad de NC
'If ObjFactura.TipoDocto.Contiene("Ing") AndAlso CveAnticipo > 0 AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then
' ConceptoContableAplicar = 11
' CveVentaAplicar = CveAnticipo
' CveVentaAmortizacionAplicar = ObjFactura.CveVenta
'End If
' If UsuarioActual.CveEmpresa = 119 Then
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
@@ -20872,6 +20997,8 @@ Partial Class Ventas
Gv.DataKey("SATClaveProdServ").ToString, Gv.DataKey("SATClaveUM").ToString, -1, Gv.DataKey("CveVentaDetalle").ToString.ToEntero, -1, -1, -1, -1)
End If
Next
TrTipoRelacion.Visible = True
DdlTiposRelacion.SelectedValueExist("3")
LimpiaDocumentoDEV()