Impresion de Polizas

This commit is contained in:
Raul Pimienta
2019-09-07 14:06:36 -07:00
parent 9fe10c191f
commit f1f3414b7c
3 changed files with 21 additions and 9 deletions

View File

@@ -7362,11 +7362,12 @@ Public Class ClsContPAQi
StrSQL.Append(" SELECT P.Id,P.Fecha,T.Nombre as TipoPoliza, MP.IdPoliza, P.IdUsuario, P.Concepto AS ConceptoPoliza,P.Cargos,P.Abonos,P.Folio ,P.Folio AS Numero , SN.Nombre AS SegNeg, MP.Concepto, ")
StrSQL.Append(" CASE WHEN ISNUMERIC(C.CODIGO) = 1 THEN FORMAT(CAST (C.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE C.CODIGO END AS CuentaFormato , MP.TipoMovto ")
StrSQL.Append(" ,C.Nombre AS Cuenta ,MP.Referencia AS Referencia, CASE WHEN MP.TipoMovto=0 THEN MP.Importe ELSE 0 END AS Cargo ")
StrSQL.Append(" , CASE WHEN MP.TipoMovto=1 THEN MP.Importe ELSE 0 END AS Abono ")
StrSQL.Append(" , CASE WHEN MP.TipoMovto=1 THEN MP.Importe ELSE 0 END AS Abono,U.Nombre AS UsuarioRegistro ")
StrSQL.Append(" FROM Polizas P ")
StrSQL.Append(" LEFT JOIN MovimientosPoliza MP ON P.Id= MP.IdPoliza ")
StrSQL.Append(" LEFT JOIN SERVIDOR.Ventas.dbo.Conta_PrePolizasDetalle PPD ON PPD.CvePrePolizaDetalle = MP.CvePrePolizaDetalle ")
StrSQL.Append(" LEFT JOIN SERVIDOR.Ventas.dbo.Conta_PrePolizas PP ON PP.CvePrePoliza = PPD.CvePrePoliza ")
StrSQL.Append(" LEFT JOIN SERVIDOR.Ventas.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ")
StrSQL.Append(" LEFT JOIN Cuentas C ON C.Id = MP.IdCuenta ")
StrSQL.Append(" LEFT JOIN TiposPolizas T ON T.Id = P.TipoPol ")
StrSQL.Append(" LEFT JOIN SegmentosNegocio SN ON SN.Id = MP.IdSegNeg ")

View File

@@ -93,6 +93,10 @@
<DataField>TipoMovto</DataField>
<rd:TypeName>System.Double</rd:TypeName>
</Field>
<Field Name="UsuarioRegistro">
<DataField>UsuarioRegistro</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DataSet1</rd:DataSetName>
@@ -1292,6 +1296,11 @@
<PageBreak>
<BreakLocation>End</BreakLocation>
</PageBreak>
<Variables>
<Variable Name="UsuarioRegistro">
<Value>=Fields!UsuarioRegistro.Value</Value>
</Variable>
</Variables>
</Group>
<SortExpressions>
<SortExpression>
@@ -1364,7 +1373,7 @@
</Style>
</Textbox>
</ReportItems>
<Height>3.23618cm</Height>
<Height>3.96847cm</Height>
<Style />
</Body>
<Width>19.87995cm</Width>
@@ -1513,7 +1522,8 @@
</Style>
</PageHeader>
<PageFooter>
<Height>2.16426cm</Height>
<Height>1.99978cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
<Textbox Name="Textbox31">

View File

@@ -2115,6 +2115,7 @@ Partial Class OS_OrdenesServicios
If GvMaterialesModal.Rows.Count > 0 Then
Dim ObjInventario As New ClsInventarios
ObjInventario.IniciaTransacSQL()
Dim CveTraspasoSolicitud As Integer = 0
@@ -2146,7 +2147,7 @@ Partial Class OS_OrdenesServicios
Estatus = 3
End If
Dim Folio As Integer = ObjInventario.AddTrasladoSolicitud($"Solicitud de traspaso #{LblFolio.Text}", DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, Estatus, -1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOS:=CveOS)
Dim Folio As Integer = ObjInventario.AddTrasladoSolicitud($"Solicitud de traspaso OS#{LblFolio.Text}", DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, Estatus, -1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOS:=CveOS)
If Folio > 0 Then
CveTraspasoSolicitud = ObjInventario.CveTraspasoSolicitud
@@ -2155,10 +2156,10 @@ Partial Class OS_OrdenesServicios
End If
If Not TieneError Then
For Each Row As GridViewRow In TmpDTMaterialesDetalle.Rows
Dim CveUM As Integer = Row.DataKey("CveUM").ToEntero
Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero
Dim Cantidad As Integer = Row.DataKey("Cantidad").ToEntero
For Each Row As DataRow In TmpDTMaterialesDetalle.Rows
Dim CveUM As Integer = Row("CveUM").ToString.ToEntero
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
If Not ObjInventario.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, 0, "", -1) Then
TieneError = True
@@ -2173,7 +2174,7 @@ Partial Class OS_OrdenesServicios
Alert("Ocurrió un error en la existencia", TipoMensaje.MsgError)
End If
If TieneError = False Then
If Not TieneError Then
ObjInventario.Commit()
Alert($"El Traspaso se guardó correctamente con el folio #: <b>{Folio}</b>.", TipoMensaje.MsgInformacion, $"document.location.href=""/Inventarios/TrasladoSolicitud.aspx?CveTraspasoSolicitud={CveTraspasoSolicitud}""")
Else