Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -261,7 +261,7 @@ Public Class ClsClientes
|
||||
End Sub
|
||||
Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer,
|
||||
CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1,
|
||||
Optional TipoCliente As Integer = 1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1) As Boolean
|
||||
Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_ClientesGet")
|
||||
|
||||
@@ -247,10 +247,8 @@
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
<div id="DivOtrosIngresosEgresos" runat="server" visible="false" class="row">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-4"></div>
|
||||
<label class="col-md-1 control-label text-right">Otr:</label>
|
||||
|
||||
<label class="col-md-2 control-label ">Otros:</label>
|
||||
<div class="col-md-2 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtOtrosIngresosEgresos" runat="server" CssClass="form-control input-sm" ClientIDMode="Static" Style="text-align: right;" AutoComplete="off"></asp:TextBox>
|
||||
|
||||
@@ -2266,16 +2266,11 @@ Partial Class Bancos_IE
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim ObjComp As New ClsCompras(ObjIE.IniciaTransacSQL)
|
||||
Dim ObjOC As New ClsOC(ObjIE.IniciaTransacSQL)
|
||||
|
||||
' Dim ObjContabilidad As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
|
||||
Dim MsgError As String = ""
|
||||
Dim CveConceptoContable As Integer = 30
|
||||
Dim CveConceptoCompra As Integer = 10
|
||||
@@ -2286,6 +2281,7 @@ Partial Class Bancos_IE
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim Msg As New StringBuilder
|
||||
|
||||
Try
|
||||
If CveIE = -1 Then
|
||||
|
||||
Dim CveCuentaDeposito As Integer = 0
|
||||
@@ -2686,30 +2682,6 @@ Partial Class Bancos_IE
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
'OTROS INGRESOS/EGRESOS
|
||||
|
||||
If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then
|
||||
Dim Impo As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal
|
||||
Dim TipoMovtoIE As Boolean = False
|
||||
Dim CveConcIE As Integer = 78
|
||||
If Impo > 0 Then
|
||||
TipoMovtoIE = True
|
||||
Impo = Math.Abs(Impo)
|
||||
CveConcIE = 78
|
||||
Else
|
||||
TipoMovtoIE = False
|
||||
Impo = Math.Abs(Impo)
|
||||
CveConcIE = 211
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=Impo, ImporteME:=0) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
||||
Exit Select
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'IMPUESTOS
|
||||
If ObjMov.GetPrePolizasDetalle(CvePrePolizaDevDin) Then
|
||||
Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
|
||||
@@ -2849,8 +2821,6 @@ Partial Class Bancos_IE
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'IMPUESTOS
|
||||
@@ -2876,14 +2846,18 @@ Partial Class Bancos_IE
|
||||
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
|
||||
Dim CveCuentaIVAxAcreditarDevDinC = 0
|
||||
Dim CveCuentaIVAAcreditableDevDinC = 0
|
||||
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
|
||||
Dim IdCtaIVAXAcreditarDevDinC = 0
|
||||
Dim IdCtaIVAAcreditableDevDinC = 0
|
||||
|
||||
If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
|
||||
IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Dim IVADevMN As Decimal = 0
|
||||
Dim IEPSDevMN As Decimal = 0
|
||||
|
||||
|
||||
Dim PorcentajeDevolucion As Decimal = ((TxtImporte.Text.ToDecimal * 100D / TotalCompraDev) / 100).RoundSQL(2)
|
||||
|
||||
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
||||
@@ -2892,7 +2866,6 @@ Partial Class Bancos_IE
|
||||
Dim CveCuentaDevolucionIMPUESTOS As Integer = -1
|
||||
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
||||
|
||||
|
||||
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||
IVADevMN = IVADev
|
||||
IEPSDevMN = IEPSDev
|
||||
@@ -2901,7 +2874,6 @@ Partial Class Bancos_IE
|
||||
IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2)
|
||||
End If
|
||||
|
||||
|
||||
Dim ErrorDevolucionImpuestos As Boolean = False
|
||||
|
||||
If IVADev > 0 Then
|
||||
@@ -2973,8 +2945,6 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Case "EGSCREDITO"
|
||||
|
||||
Dim ConceptoContable As Integer
|
||||
@@ -3015,8 +2985,6 @@ Partial Class Bancos_IE
|
||||
importeMovimiento = TxtImporte.Text.ToDecimal
|
||||
importeMX = importeMovimiento
|
||||
|
||||
|
||||
|
||||
Case 46
|
||||
If TxtInteresMoratorio.Text.ToDecimal > 0 Then
|
||||
importeMovimiento = TxtInteresMoratorio.Text.ToDecimal
|
||||
@@ -3088,8 +3056,6 @@ Partial Class Bancos_IE
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Opcion.Contiene("EGSSINFACT") AndAlso CveSolicitudViatico > 0 AndAlso MsgError = "" Then
|
||||
If Not ObjIE.UpdateSolicitudesViaticosIE(CveSolicitudViatico, CveIE) Then
|
||||
MsgError = "Ocurrió un error al vincular el egreso con la solicitud de viatico."
|
||||
@@ -3262,10 +3228,19 @@ Partial Class Bancos_IE
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=IE&CVEIE={0}", CveIE))}'", String.Format("Imprimir {0}", DdlTipoTransaccion.SelectedItem))
|
||||
End If
|
||||
End If
|
||||
ObjIE.Commit()
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgError = "Ocurrió un error al guardar el IE"
|
||||
ex.ToString().GuardaLog()
|
||||
End Try
|
||||
|
||||
If MsgError = "" Then
|
||||
ObjIE.Commit()
|
||||
Else
|
||||
ObjIE.RollBack()
|
||||
|
||||
Alert(MsgError, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
If Msg.ToString <> "" Then
|
||||
@@ -3288,7 +3263,6 @@ Partial Class Bancos_IE
|
||||
AccionJS = String.Format("document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery)
|
||||
End If
|
||||
|
||||
|
||||
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then
|
||||
AccionJS = $"document.location.href=""/Bancos/Creditos.aspx?CveCredito={Request("CveCredito")}"";"
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion, AccionJS)
|
||||
@@ -3296,18 +3270,15 @@ Partial Class Bancos_IE
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion, String.Format("document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
RecargaGlobalCuentasBancarias()
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
ObjOC.Dispose()
|
||||
If ObjComp IsNot Nothing Then ObjComp.Dispose()
|
||||
|
||||
|
||||
RecargaGlobalCuentasBancarias()
|
||||
End Sub
|
||||
|
||||
#Region " NOTIFICACION PAGO "
|
||||
|
||||
Binary file not shown.
@@ -5574,17 +5574,18 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
If TipoCambioCompra > 1 Then Concepto += $" TC:{TipoCambioCompra} ${importeMovimiento.FormatoNumero(2)}"
|
||||
If TipoCambioCompra > 1 AndAlso DdlMoneda.SelectedValue.ToEntero <> 1 Then Concepto += $" TC:{TipoCambioCompra} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If TipoCambioCompra = 1 Then
|
||||
If TipoCambioCompra = 1 Or DdlMoneda.SelectedValue.ToEntero = 1 Then
|
||||
IdCtaContable = CtaProveedor
|
||||
CveCuenta = CveCuentaProveedor
|
||||
importeMovimiento = importeMN
|
||||
Else
|
||||
IdCtaContable = CtaProveedorComplementaria
|
||||
CveCuenta = CveCuentaProveedorComplementaria
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
||||
importeMN = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 201, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TipoCambioCompra - importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=TipoCambioCompra) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento * TipoCambioCompra - importeMovimiento, Referencia, 206, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TipoCambioCompra - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=TipoCambioCompra) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -5600,9 +5601,9 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
importeMN = importeMovimiento * TCPago * Multiplicador
|
||||
|
||||
If TCPago > 1 Then Concepto += $" TC:{TCPago} ${importeMovimiento.FormatoNumero(2)}"
|
||||
If TCPago > 1 AndAlso CveMonedaPago <> 1 Then Concepto += $" TC:{TCPago} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If TCPago = 1 Then
|
||||
If TCPago = 1 Or CveMonedaPago = 1 Then
|
||||
IdCtaContable = IdCuentaBancaria
|
||||
CveCuenta = CveCuentaBancaria
|
||||
Else
|
||||
@@ -5610,7 +5611,7 @@ Partial Class Compras_Compras
|
||||
CveCuenta = CveCuentaBancariaComplementaria
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
||||
importeMN = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 201, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TCPago - importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento * TCPago - importeMovimiento, Referencia, 204, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TCPago - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=TCPago) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -5656,7 +5657,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 14, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVA, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 14, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVA, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -5717,7 +5718,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 25, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIEPS, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIEPS, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 25, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIEPS, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIEPS, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -5747,7 +5748,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'Agregamos el Opuesto del 22 -> 15
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -5801,7 +5802,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'Agregamos el Opuesto del 184 -> 183
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 183, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 183, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -5877,7 +5878,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'Agregamos el Opuesto del 186 -> 185
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 185, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 185, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -5932,35 +5933,35 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
End If
|
||||
Case 23 'RetISR Acreditable
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then
|
||||
importeMovimiento = importeRetISRAcreditable
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If CtaProveedorRetISR > 0 Then
|
||||
IdCtaContable = CtaProveedorRetISR
|
||||
CveCuenta = CveCuentaProveedorRetISR
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'Case 23 'RetISR Acreditable
|
||||
' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
' If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then
|
||||
' importeMovimiento = importeRetISRAcreditable
|
||||
' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
' If CtaProveedorRetISR > 0 Then
|
||||
' IdCtaContable = CtaProveedorRetISR
|
||||
' CveCuenta = CveCuentaProveedorRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
|
||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero
|
||||
' Else
|
||||
' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
'Agregamos el Opuesto del 23 -> 16
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
' 'Agregamos el Opuesto del 23 -> 16
|
||||
' If importeMovimiento <> 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
End If
|
||||
' If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
' End If
|
||||
' End If
|
||||
Case 16 'Ret ISR X Acreditar
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then
|
||||
@@ -6004,33 +6005,33 @@ Partial Class Compras_Compras
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
End If
|
||||
Case 244 'RetISR Acreditable Terceros y Arrendamiento
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
|
||||
importeMovimiento = importeRetISRAcreditable
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If CtaProveedorRetISR > 0 Then
|
||||
IdCtaContable = CtaProveedorRetISR
|
||||
CveCuenta = CveCuentaProveedorRetISR
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'Agregamos el Opuesto del 244 -> 243
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 243, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
End If
|
||||
'Case 244 'RetISR Acreditable Terceros y Arrendamiento
|
||||
' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
' If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
|
||||
' importeMovimiento = importeRetISRAcreditable
|
||||
' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
' If CtaProveedorRetISR > 0 Then
|
||||
' IdCtaContable = CtaProveedorRetISR
|
||||
' CveCuenta = CveCuentaProveedorRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
|
||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
|
||||
' Else
|
||||
' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' 'Agregamos el Opuesto del 244 -> 243
|
||||
' If importeMovimiento <> 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 243, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
' End If
|
||||
' If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
' End If
|
||||
' End If
|
||||
Case 64 'Ganancia
|
||||
If TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
@@ -6227,8 +6228,8 @@ Partial Class Compras_Compras
|
||||
CostoIndirectoAcum176 += ImporteCI176
|
||||
'se considera costoindirecto, para que la factura tiene en un concepto tipo servicio
|
||||
SumatoriaOCINV += (Dr(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")).ToString.ToDecimal * tipoCambioActual) - (ImporteMN228 + ImporteMN229 - ImporteCI176)
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN228, ImporteME:=ImporteME228, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=Dr("CveMovimientoAlmacen").ToString.ToEntero, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN229, ImporteME:=ImporteME229, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=Dr("CveMovimientoAlmacen").ToString.ToEntero, Contabilizable:=SeContabiliza) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN228, ImporteME:=ImporteME228, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN229, ImporteME:=ImporteME229, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -6301,7 +6302,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
|
||||
If importeMovimiento > 0 And ChkNCInvNC.Checked Or TxtTotal.Text.ToDecimal = 0 And ChkNCInvNC.Checked Then
|
||||
If importeMovimiento > 0 Or TxtTotal.Text.ToDecimal = 0 Then
|
||||
RegistroCuentaPuente = True
|
||||
'Conta ContPAQ
|
||||
If IdCtaContable = 0 Then
|
||||
|
||||
@@ -2941,9 +2941,11 @@ Partial Class PopUpVerFactura
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim CveFolio = ""
|
||||
CreaDT()
|
||||
Dim ReporteEmpresa As New System.IO.FileInfo(String.Format("{0}Formatos/OrdenServicio.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
If ObjOS.GetOrdenesServicios(CveOS, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjOS.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Dim dtOS As DataTable = ObjOS.DtResultados
|
||||
Dim dr As DataRow = dtOS.Rows(0)
|
||||
params.Add(New ReportParameter("Cliente", dr("Cliente").ToString))
|
||||
@@ -2958,12 +2960,26 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("ClienteCiudad", dr("Ciudad").ToString))
|
||||
params.Add(New ReportParameter("ClienteEstado", dr("Estado").ToString))
|
||||
CveFolio = dr("Folio").ToString
|
||||
|
||||
If ReporteEmpresa.Exists Then
|
||||
params.Add(New ReportParameter("NoDeCliente", dr("CveCliente").ToString))
|
||||
params.Add(New ReportParameter("RFC", dr("RFC").ToString))
|
||||
params.Add(New ReportParameter("Vendedor", " "))
|
||||
params.Add(New ReportParameter("Correo", dr("Correo").ToString))
|
||||
params.Add(New ReportParameter("CodigoDeServicio", dr("CveOS").ToString))
|
||||
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
|
||||
params.Add(New ReportParameter("TipoServicio", dr("TipoServicio").ToString))
|
||||
params.Add(New ReportParameter("TipoEquipo", dr("TipoEquipo").ToString))
|
||||
params.Add(New ReportParameter("Descripcion", dr("Descripcion").ToString))
|
||||
params.Add(New ReportParameter("Copia", "Copia: Original"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
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)
|
||||
|
||||
If Not ReporteEmpresa.Exists Then
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
@@ -2988,10 +3004,20 @@ Partial Class PopUpVerFactura
|
||||
|
||||
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
|
||||
End Sub
|
||||
Private Sub CreaDT()
|
||||
TmpDTOS = New DataTable
|
||||
|
||||
Binary file not shown.
@@ -18,6 +18,7 @@
|
||||
.pac-container.pac-logo {
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
.modalPopup {
|
||||
top: 132px !important;
|
||||
}
|
||||
@@ -25,7 +26,7 @@
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="H" ID="Content9" runat="server">
|
||||
<li>
|
||||
<a ID="BtnDir" OnClick="$('#dvConsulta').modal({ backdrop: 'static', keyboard: false });">
|
||||
<a id="BtnDir" onclick="$('#dvConsulta').modal({ backdrop: 'static', keyboard: false });">
|
||||
<i class='fa fa-search'></i><span>Ver Remisiones</span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -126,9 +127,9 @@
|
||||
<asp:Button ID="BtnMostrarContrato" runat="server" Style="visibility: hidden; display: none;" />
|
||||
<asp:Button ID="BtnCerrarContrato" runat="server" CssClass="btn btn-danger" Style="visibility: hidden; display: none;" />
|
||||
|
||||
<Ajax:ModalPopupExtender ID="MPContrato" runat="server" PopupControlID="PanelContrato" TargetControlID="BtnMostrarContrato"
|
||||
<ajax:ModalPopupExtender ID="MPContrato" runat="server" PopupControlID="PanelContrato" TargetControlID="BtnMostrarContrato"
|
||||
CancelControlID="BtnCerrarContrato" BackgroundCssClass="modalBackground">
|
||||
</Ajax:ModalPopupExtender>
|
||||
</ajax:ModalPopupExtender>
|
||||
<asp:Panel ID="PanelContrato" runat="server" CssClass="modalPopup" align="center" Style="display: none; padding: 10px;">
|
||||
|
||||
<asp:UpdatePanel ID="UpContratos" runat="server" UpdateMode="Conditional">
|
||||
@@ -145,22 +146,15 @@
|
||||
<label for="<%= TxtNoRemolque.ClientID.ToString()%>">Número remolque:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<asp:Label style=" top: 0;margin-bottom: 0;font-size: 13px;color: #888888; opacity: 1;" runat="server" Text="Estatus"></asp:Label>
|
||||
<asp:Label Style="top: 0; margin-bottom: 0; font-size: 13px; color: #888888; opacity: 1;" runat="server" Text="Estatus"></asp:Label>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlEstatus" DataValueField="CveEstatus" DataTextField="Estatus" runat="server" CssClass="form-control" Width="80%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<%--<asp:RadioButtonList ID="RblOpcionContrato" runat="server" CssClass="rbl" RepeatDirection="Horizontal" RepeatLayout="Table">
|
||||
<asp:ListItem Text="Si" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="1"></asp:ListItem>
|
||||
</asp:RadioButtonList>--%>
|
||||
<br />
|
||||
|
||||
<asp:LinkButton ID="BtnActualizarEstatus" onclick="BtnActualizarEstatus_Click" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
||||
<asp:LinkButton ID="BtnCancelar" onclick="BtnCancelar_Click" runat="server" CssClass="btn btn-danger" Text="Cancelar" />
|
||||
<asp:LinkButton ID="BtnActualizarEstatus" OnClick="BtnActualizarEstatus_Click" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
||||
<asp:LinkButton ID="BtnCancelar" OnClick="BtnCancelar_Click" runat="server" CssClass="btn btn-danger" Text="Cancelar" />
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -42,14 +42,12 @@ Partial Class GPS_CatRemisionesVehiculos
|
||||
Dim ObjTSoft As New ClsTSoft
|
||||
If ObjTSoft.GetRemisiones(UsuarioActual.CveCliente) Then
|
||||
GvRemisiones.DataSource = ObjTSoft.DtResultados
|
||||
Else
|
||||
GvRemisiones.DataSource = Nothing
|
||||
End If
|
||||
If ObjTSoft.GetEstatusRemisiones() Then
|
||||
DdlEstatus.DataSource = ObjTSoft.DtResultados
|
||||
End If
|
||||
|
||||
ObjTSoft.Dispose()
|
||||
|
||||
DdlEstatus.DataBind()
|
||||
GvRemisiones.DataBind()
|
||||
UPConsulta.Update()
|
||||
@@ -91,16 +89,16 @@ Partial Class GPS_CatRemisionesVehiculos
|
||||
UpContratos.Update()
|
||||
End Sub
|
||||
Protected Sub BtnActualizarEstatus_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjSoft As New ClsTSoft
|
||||
|
||||
Dim TrackingNo As String = If(TxtTracking.Text <> "", TxtTracking.Text, "-1")
|
||||
Dim NumRemolque As String = If(TxtNoRemolque.Text <> "", TxtNoRemolque.Text, "-1")
|
||||
|
||||
Dim ObjSoft As New ClsTSoft
|
||||
If ObjSoft.UpdateEstatusRemisiones(CveRemision, DdlEstatus.SelectedValue.ToEntero, TrackingNo, NumRemolque) Then
|
||||
Alert("El estatus se actualizó correctamente")
|
||||
End If
|
||||
ObjSoft.Dispose()
|
||||
TxtNoRemolque.Text = ""
|
||||
TxtTracking.Text = ""
|
||||
ObjSoft.Dispose()
|
||||
CargaDatos()
|
||||
RegistraScript("$('#C_BtnCerrarContrato').click();")
|
||||
End Sub
|
||||
@@ -108,17 +106,19 @@ Partial Class GPS_CatRemisionesVehiculos
|
||||
RegistraScript("$('#C_BtnCerrarContrato').click();")
|
||||
End Sub
|
||||
Protected Sub imgHistorial_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjSoft As New ClsTSoft
|
||||
Dim Boton = CType(sender, LinkButton)
|
||||
Dim GvRow As GridViewRow = DirectCast(Boton.NamingContainer, GridViewRow)
|
||||
CveRemision = Boton.CommandArgument.ToEntero
|
||||
|
||||
Dim ObjSoft As New ClsTSoft
|
||||
If ObjSoft.GETRemisionesHistorial(GvRow.DataKey("FolioRemision").ToString, GvRow.DataKey("NoEconomico").ToString) Then
|
||||
GVHistorico.DataSource = ObjSoft.DtResultados
|
||||
End If
|
||||
ObjSoft.Dispose()
|
||||
|
||||
H1.InnerText = $"Histórico Remisión: {GvRow.DataKey("FolioRemision").ToString} "
|
||||
GVHistorico.DataBind()
|
||||
UpHistorico.Update()
|
||||
RegistraScript("$('#dvHistorico').modal();")
|
||||
RegistraScript("$('#dvHistorico').modal('show');")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1524,6 +1524,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & DdlConcepto.SelectedValue).ToEntero
|
||||
If OrigenMov = 1 Then TipoMovtoAlmacen = False Else TipoMovtoAlmacen = True
|
||||
TipoMovtoOtro = Not TipoMovtoAlmacen
|
||||
|
||||
Dim CveConceptoContable As Integer = 78
|
||||
Dim CveClasificacion As Integer = -1
|
||||
@@ -1538,6 +1539,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Case 30
|
||||
CveConceptoContable = 181
|
||||
TipoMovtoOtro = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(342).ToEntero > 0 Then
|
||||
IdCtaContableOtro = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
<div class="row" id="DivFactura" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Factura:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlFactura" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="SerieFolio" DataValueField="CveVenta">
|
||||
<asp:DropDownList ID="DdlFactura" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="SerieFolio" DataValueField="CveVenta" OnSelectedIndexChanged="DdlFactura_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -557,9 +557,6 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div style="width: 70%" align="right">
|
||||
<asp:Label ID="LbTotalMovimientos" Text="Total de Movimientos: 0" runat="server" />
|
||||
@@ -567,15 +564,12 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:GridView ID="GvM" runat="server" GridLines="none" Width="70%"
|
||||
CssClass="table table-hover ADScroller btn-xs" ShowHeader="True"
|
||||
EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle"
|
||||
EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CvePS,PU,Cantidad"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||
@@ -597,12 +591,16 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="73px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblObservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="PU">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbPU" runat="server" Text='<%# Eval("PU", "{0:#,##0.######}")%>'> </asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="43px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -612,13 +610,22 @@
|
||||
<ItemStyle Width="140px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div id="DivTotal" runat="server" visible="false">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">$</span>
|
||||
<asp:TextBox ID="TxtTotal" ClientIDMode="Static" Text="0.00" CssClass="form-control input-sm" runat="server" Enabled="false" />
|
||||
</div>
|
||||
<ajax:FilteredTextBoxExtender ID="FTIRNC" runat="server" TargetControlID="TxtTotal" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8"></div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
@@ -628,10 +635,8 @@
|
||||
<asp:Button ID="BtnContabilizar" runat="server" ValidationGroup="" Text="Contabilizar" Visible="False" CssClass="btn btn-primary" />
|
||||
<asp:Button ID="BtnNuevo" runat="server" ValidationGroup="" Text="Nuevo" CssClass="btn btn-success" />
|
||||
<asp:Button ID="BtnGeneraPrepoliza" runat="server" Visible="false" ValidationGroup="" Text="GeneraPrePoliza" CssClass="btn btn-success" />
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div runat="server" id="DivMensaje" visible="false">
|
||||
<p>
|
||||
<code>
|
||||
@@ -642,14 +647,9 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<%-- EMPIEZA: BITACORA --%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
@@ -691,9 +691,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div id="ModalBitacora" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -732,7 +730,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<%-- TERMINA: BITACORA --%>
|
||||
@@ -741,7 +738,6 @@
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:Panel runat="server" DefaultButton="BtnGuardarCantidadEspecial">
|
||||
<div id="ModalCantidad" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@@ -758,7 +754,6 @@
|
||||
<div class="row">
|
||||
<div class="col-md-5" style="text-align: right;">
|
||||
Cantidad
|
||||
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
||||
@@ -779,13 +774,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalAgregar" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
@@ -857,10 +848,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Button ID="BtnGenerarRNC" runat="server" ClientIDMode="Static" Text="RNC" Style="display: none;" />
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
function GenerarRNC() {
|
||||
$('#BtnGenerarRNC').click();
|
||||
}
|
||||
|
||||
function CargaActivoFijo(CveAF, Codigo) {
|
||||
$get("HdnCveActivoFijo").value = CveAF;
|
||||
$get("HdnCodigoAF").value = Codigo;
|
||||
|
||||
@@ -23,6 +23,14 @@ Partial Class Inventarios_RecepcionUsados
|
||||
ViewState("DtMovimientos") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DtTamaños() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtTamaños"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtTamaños") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DtMovimientosEntradaInvFisico() As DataTable
|
||||
|
||||
@@ -261,6 +269,22 @@ Partial Class Inventarios_RecepcionUsados
|
||||
ViewState("FolioCorreo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ObjRemisionNC As Modelos.Factura
|
||||
Get
|
||||
Return CType(ViewState("ObjRemisionNC"), Modelos.Factura)
|
||||
End Get
|
||||
Set(value As Modelos.Factura)
|
||||
ViewState("ObjRemisionNC") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ObjFactura As Modelos.Factura
|
||||
Get
|
||||
Return CType(ViewState("ObjFactura"), Modelos.Factura)
|
||||
End Get
|
||||
Set(value As Modelos.Factura)
|
||||
ViewState("ObjFactura") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -337,6 +361,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
PermisoVerImportes()
|
||||
End If
|
||||
|
||||
CargaTamaños()
|
||||
'DdlProducto2.setEsWebService(True)
|
||||
'DdlProducto2.Attributes.Add("data-metodo", "getpsusados")
|
||||
|
||||
@@ -854,6 +879,29 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
If Valido And AgregarUsado Then
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso Not EsDistribuidor Then
|
||||
Dim RowDetalle As DataRow = ObjFactura.DtDetalle.FiltroPrimero($"CvePS={CvePS}")
|
||||
|
||||
If RowDetalle IsNot Nothing Then
|
||||
|
||||
'If RowDetalle("PU").ToString.ToDecimal().RoundSQL <> PU.RoundSQL Then
|
||||
' Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
Dim Puntos As Decimal = DtTamaños.FiltroPrimeroValor("Puntos", $"CvePSCargo={CvePS}").ToDecimal()
|
||||
Dim CantidadPermitida As Double = Math.Ceiling(RowDetalle("Cantidad").ToString.ToDecimal() * Puntos)
|
||||
|
||||
If Cantidad > CantidadPermitida Then
|
||||
Alert($"La cantidad es mayor a la permitida", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert($"El producto no se encuentra en la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
|
||||
If SerieLote <> "" And (SerieLote.ToUpper = dr("Codigo").ToString.ToUpper Or SerieLote.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then
|
||||
@@ -931,10 +979,25 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
If GvM.Rows.Count > 0 Then
|
||||
|
||||
'Dim CveMovimiento As Integer
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
If ObjRemisionNC IsNot Nothing Then
|
||||
Dim sb As New StringBuilder()
|
||||
sb.Append($"Se va a generar un documento de tipo 'Remisión de nota de crédito'.<br> Serie-Folio:<b>{ObjRemisionNC.SerieFolio}</b>.<br> ¿Esta seguro que desea guardar?:<br/>")
|
||||
|
||||
Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, JSBtnAceptar:="GenerarRNC();", TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||
Else
|
||||
Guardar()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BtnGenerarRNC_Click(sender As Object, e As EventArgs) Handles BtnGenerarRNC.Click
|
||||
Guardar(True)
|
||||
End Sub
|
||||
|
||||
Protected Sub Guardar(Optional GenerarRNC As Boolean = False)
|
||||
If GvM.Rows.Count > 0 Then
|
||||
Dim Msg As New StringBuilder()
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
Dim ObjAcum As New ClsAcumuladores(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL())
|
||||
@@ -955,7 +1018,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Dim CveCliente As Integer = CInt(IIf((DdlClientes.SelectedValue.ToEntero <= 0), -1, DdlClientes.SelectedValue.ToEntero))
|
||||
Dim CveClienteSucursal As Integer = CInt(IIf((DdlClientesSucursales.SelectedValue.ToEntero <= 0), -1, DdlClientesSucursales.SelectedValue.ToEntero))
|
||||
|
||||
|
||||
'cuando es APH
|
||||
Dim tFolio As Integer = -1
|
||||
If UsuarioActual.CveEmpresa = 48 And EsConsumoInterno = False Then tFolio = TxtFolio.Text.ToEntero
|
||||
@@ -968,11 +1030,10 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
If CveRemisionRecibida > 0 Then
|
||||
CveVenta = CveRemisionRecibida
|
||||
ElseIf EsDistribuidor AndAlso DdlFactura.SelectedValue.ToEntero() > 0 Then
|
||||
ElseIf DdlFactura.SelectedValue.ToEntero() > 0 Then
|
||||
CveVenta = DdlFactura.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
'Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.ToDate, $" {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, CveConcepto, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta,
|
||||
CveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero,
|
||||
Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text,
|
||||
@@ -1010,9 +1071,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
If EsDistribuidor Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
'CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
'CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String
|
||||
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -1023,17 +1081,13 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
Dim Msg As New StringBuilder
|
||||
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.AjustaPoliza(IDPoliza)
|
||||
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
||||
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
'If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
|
||||
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
'Limpia Valores cuando inserta de campos especiales
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
@@ -1042,38 +1096,49 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
EnvioCorreo()
|
||||
|
||||
|
||||
UPDatos.Update()
|
||||
LimpiarMovimiento()
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack() 'deshace lo insertado
|
||||
CveMovimiento = 0
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
|
||||
' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjInventario.RollBack() 'deshace lo insertado
|
||||
CveMovimiento = 0
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
Alert("Ocurrió un Error inesperado en el registro" & ex.Message, TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
End Try
|
||||
|
||||
ObjInventario.Dispose() 'elimino la instancia
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
ObjInventario.Dispose()
|
||||
ObjAcum.Dispose()
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If Not ErrorMovInv AndAlso GenerarRNC AndAlso ObjRemisionNC IsNot Nothing Then
|
||||
|
||||
CargaDTDetalleRNC()
|
||||
|
||||
Dim Resp = ObjRemisionNC.EmitirFactura(False)
|
||||
For Each mensaje As String In Resp.Mensajes
|
||||
Msg.AppendFormat("<br>{0}", mensaje)
|
||||
Next
|
||||
Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia))
|
||||
|
||||
ElseIf Not ErrorMovInv Then
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
End If
|
||||
|
||||
LimpiarMovimiento()
|
||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -1183,17 +1248,13 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
|
||||
Private Sub VisualizaPU(Opcion As Boolean)
|
||||
|
||||
|
||||
txtPrecio.Visible = Opcion
|
||||
|
||||
End Sub
|
||||
Private Sub VisualizaPUExtranjero(Opcion As Boolean)
|
||||
|
||||
End Sub
|
||||
Private Sub VisualizaAF(Opcion As Boolean)
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub SiguienteFolio()
|
||||
Dim Inv As New ClsInventarios
|
||||
@@ -1205,50 +1266,24 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlProducto2_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ElProductoChange()
|
||||
CambiarProducto()
|
||||
End Sub
|
||||
Private Sub ElProductoChange()
|
||||
|
||||
|
||||
Private Sub CambiarProducto()
|
||||
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
|
||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim MetodoInventario As Integer = GlobalDTPS(UsuarioActual.CveEmpresa, DdlProducto2.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario", "").ToEntero ' ("Inv_CveMetodoInventario = 6", "PS")
|
||||
|
||||
End If
|
||||
|
||||
DdlUnidad.Items.Clear()
|
||||
DdlUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidad.DataBind()
|
||||
|
||||
HdnCveTamaño.Value = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTamaño", $"CvePS = { DdlProducto2.SelectedValue.ToEntero }")
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
Dim CveTamaño As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTamaño", $"CvePS = { DdlProducto2.SelectedValue.ToEntero }").ToEntero
|
||||
HdnCveTamaño.Value = CveTamaño.ToString
|
||||
|
||||
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||
Dim DtTamaños As DataTable = ObjAcum.DtResultados
|
||||
|
||||
HdnCveTamaño.Value = DtTamaños.FiltroPrimeroValor("CveTamaño", $"CvePSCargo = { DdlProducto2.SelectedValue }")
|
||||
|
||||
'LblMoldalCveTamanio.Text = DtTamaños.FiltroPrimeroValor("CveTamaño", $"CvePSCargo = { DdlProducto2.SelectedValue }")
|
||||
'LblMoldalTamanio.Text = DtTamaños.FiltroPrimeroValor("Tamaño", $"CvePSCargo = { DdlProducto2.SelectedValue }")
|
||||
|
||||
|
||||
HdnCveTamaño.Value = ObjAcum.DtResultados.FiltroPrimeroValor("CveTamaño", $"CvePSCargo = { DdlProducto2.SelectedValue }")
|
||||
End If
|
||||
|
||||
'123123123
|
||||
|
||||
|
||||
|
||||
|
||||
'If ObjAcum.TamañoGet(CveTamaño, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
'End If
|
||||
|
||||
ObjAcum.Dispose()
|
||||
UPDatos.Update()
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -1261,9 +1296,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End Sub
|
||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||
|
||||
|
||||
Dim TienePermisoImportes = UsuarioActual.TienePermisoProceso(201)
|
||||
|
||||
'Dim TienePermisoImportes = UsuarioActual.TienePermisoProceso(201)
|
||||
|
||||
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
||||
If DtTemp.MAX("SerieLote").ToString <> "" Then
|
||||
@@ -1280,6 +1313,10 @@ Partial Class Inventarios_RecepcionUsados
|
||||
If DtTemp.SUM("CostoIndirecto") > 0 Then
|
||||
|
||||
End If
|
||||
|
||||
Dim Total = DtTemp.SUM("Total")
|
||||
|
||||
TxtTotal.Text = Total.FormatoNumero(2)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -1643,9 +1680,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
#Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED"
|
||||
Private Sub InicializaClientes()
|
||||
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros("EsDistribuidor = 1")
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) '.FiltraParametros("EsDistribuidor = 1")
|
||||
DdlClientes.DataBind()
|
||||
|
||||
DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClientes.SelectedValue = "-1"
|
||||
|
||||
@@ -1666,6 +1702,9 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Private Sub CambiaCliente()
|
||||
DivClienteSucursal.Visible = False
|
||||
DdlClientesSucursales.Items.Clear()
|
||||
|
||||
Me.EsDistribuidor = CBool(GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("EsDistribuidor", $"CveCliente = {DdlClientes.SelectedValue.ToEntero()}"))
|
||||
|
||||
CargaSucursalesCliente()
|
||||
CargaFacturasCliente()
|
||||
|
||||
@@ -1675,11 +1714,10 @@ Partial Class Inventarios_RecepcionUsados
|
||||
DivFactura.Visible = True
|
||||
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
|
||||
If CveCliente > 0 Then
|
||||
Me.EsDistribuidor = True
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
DdlFactura.DataSource = ObjVentas.DtResultados.Copy()
|
||||
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "Ing", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
DdlFactura.DataSource = ObjVentas.DtResultados.FiltraParametros("", "", {"CveVenta", "SerieFolio"})
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
@@ -1842,7 +1880,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
'DdlClasificacion.SelectedValueExist(DtMovimientos.Rows(GvRow.RowIndex)("CveClasificacion").ToString)
|
||||
DdlProducto2.SelectedValueExist(DtMovimientos.Rows(GvRow.RowIndex)("CvePS").ToString)
|
||||
|
||||
ElProductoChange()
|
||||
CambiarProducto()
|
||||
|
||||
'LblMoldalTamanio.Text = DtMovimientos.Rows(GvRow.RowIndex)("Tamaño").ToString
|
||||
DdlUnidad.SelectedValueExist(DtMovimientos.Rows(GvRow.RowIndex)("UnidadMedida").ToString)
|
||||
@@ -1944,4 +1982,433 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlFactura_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If Not EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then
|
||||
|
||||
If ObjRemisionNC IsNot Nothing Then
|
||||
ObjRemisionNC.Dispose()
|
||||
ObjRemisionNC = Nothing
|
||||
End If
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
ObjFactura.Dispose()
|
||||
ObjFactura = Nothing
|
||||
End If
|
||||
|
||||
Dim CveVenta As Integer = DdlFactura.SelectedValue.ToEntero()
|
||||
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, DirectorioServidor:=Server.MapPath("/"))
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
CreaRemisionNC(ObjFactura.CveCliente, ObjFactura.CveSubProyecto, ObjFactura.CveMoneda)
|
||||
DivTotal.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
UPDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CreaRemisionNC(CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer)
|
||||
ObjRemisionNC = New Modelos.Factura(UsuarioActual)
|
||||
|
||||
Dim Folio As String = ""
|
||||
Dim Serie As String = ""
|
||||
|
||||
Dim ObjFolios As New ClsGralFolios()
|
||||
If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' AND CveSubProyecto = {0}", CveSubProyecto))
|
||||
If DT.Rows.Count > 0 Then
|
||||
Serie = DT.Rows(0)("Serie").ToString()
|
||||
Folio = DT.Rows(0)("FActual").ToString()
|
||||
End If
|
||||
DT.Dispose()
|
||||
End If
|
||||
ObjFolios.Dispose()
|
||||
|
||||
ObjRemisionNC.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML
|
||||
ObjRemisionNC.Serie = Serie
|
||||
ObjRemisionNC.Folio = Folio.ToEntero()
|
||||
ObjRemisionNC.Version = "3.3"
|
||||
ObjRemisionNC.FolioFiscal = ""
|
||||
ObjRemisionNC.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjRemisionNC.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
ObjRemisionNC.TipoCambio = 1
|
||||
ObjRemisionNC.ConvertirPesos = False
|
||||
ObjRemisionNC.CveMoneda = CveMoneda
|
||||
ObjRemisionNC.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda))
|
||||
ObjRemisionNC.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
|
||||
ObjRemisionNC.TipoDocto = "RNC"
|
||||
ObjRemisionNC.RefDocto = ""
|
||||
ObjRemisionNC.CveMesa = -1
|
||||
ObjRemisionNC.Fecha = Now
|
||||
ObjRemisionNC.CvePrePoliza = -1
|
||||
ObjRemisionNC.FechaPago = Now
|
||||
ObjRemisionNC.MotivoDescuento = ""
|
||||
ObjRemisionNC.FechaEjecucion = Now
|
||||
ObjRemisionNC.UsuarioCreo = UsuarioActual.Usuario
|
||||
ObjRemisionNC.CveCondicionEntrega = -1
|
||||
ObjRemisionNC.CondicionEntrega = ""
|
||||
ObjRemisionNC.NumeroCuenta = ""
|
||||
ObjRemisionNC.CondicionesPago = 0
|
||||
ObjRemisionNC.FormaPago = 0
|
||||
ObjRemisionNC.PedidoContrato = ""
|
||||
ObjRemisionNC.NumeroContrato = ""
|
||||
ObjRemisionNC.DescripcionContrato = ""
|
||||
ObjRemisionNC.CveCorte = -1
|
||||
ObjRemisionNC.TipoDocumento = "Remisión"
|
||||
ObjRemisionNC.Alfa1 = ""
|
||||
ObjRemisionNC.Alfa2 = ""
|
||||
ObjRemisionNC.Alfa3 = ""
|
||||
ObjRemisionNC.CveContrato = -1
|
||||
ObjRemisionNC.ConvertirPesos = False
|
||||
ObjRemisionNC.CveSubProyecto = CveSubProyecto
|
||||
ObjRemisionNC.CveSubProyectoCobranza = CveSubProyecto
|
||||
ObjRemisionNC.CveSubProyectoEjecucion = CveSubProyecto
|
||||
ObjRemisionNC.SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto)))
|
||||
ObjRemisionNC.SubProyectoMatriz = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1"))
|
||||
|
||||
'CLIENTE
|
||||
ObjRemisionNC.CveCliente = CveCliente
|
||||
ObjRemisionNC.SetCliente()
|
||||
ObjRemisionNC.CveAlmacen = -1
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
ObjRemisionNC.CveFormaPago33 = ObjCliente.CveFormaPago33
|
||||
ObjRemisionNC.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
|
||||
ObjRemisionNC.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
|
||||
|
||||
ObjRemisionNC.CveMetodoPago33 = ObjCliente.CveMetodoPago33
|
||||
ObjRemisionNC.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
|
||||
ObjRemisionNC.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
|
||||
|
||||
ObjRemisionNC.CveUsoCFDI = ObjCliente.CveUsoCFDI
|
||||
ObjRemisionNC.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||
ObjRemisionNC.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||
|
||||
ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago
|
||||
|
||||
If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then
|
||||
ObjRemisionNC.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString
|
||||
Else
|
||||
ObjRemisionNC.CveMetodoPago = 1
|
||||
ObjRemisionNC.MetodoPago = "Efectivo"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjCliente.GetSucursales(CveCliente) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
ObjRemisionNC.CveClienteSucursal = If(String.IsNullOrEmpty(ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'")), -1, ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'").ToEntero())
|
||||
Else
|
||||
ObjRemisionNC.CveClienteSucursal = -1
|
||||
End If
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
|
||||
'DETALLES
|
||||
ObjRemisionNC.DtDetalle = CreaDTDetalleRNC()
|
||||
|
||||
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, ObjRemisionNC.CveCliente, ObjRemisionNC.CveVendedor, UsuarioActual.CveEmpresa) Then
|
||||
ObjRemisionNC.DtPromociones = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
ObjRemisionNC.Observaciones = ""
|
||||
ObjRemisionNC.OrdenCompra = ""
|
||||
ObjRemisionNC.PedidoContrato = ""
|
||||
ObjRemisionNC.ObservacionesAlmacen = ""
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function AddPSRNC(ByRef TmpDT As DataTable, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
||||
PU As Decimal, Descuento As Decimal,
|
||||
CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
|
||||
Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
|
||||
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
|
||||
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False, Optional PorcentajeIVA As Decimal = 0D) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
If Not CvePS > 0 Then
|
||||
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
If (Obs.Length + PS.Length > 1000) Then
|
||||
Alert(String.Format("El Nombre y observación del producto tiene longitud de {0} caracteres y excede los 1000 caracteres permitidos.", Obs.Length + PS.Length), TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
Dim TotalCalculableImpuestos As Decimal = 0
|
||||
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||
|
||||
Row = TmpDT.NewRow()
|
||||
Row("CveProyecto") = CveProyecto
|
||||
Row("Proyecto") = Proyecto
|
||||
Row("CveSubProyecto") = CveSubProyecto
|
||||
Row("SubProyecto") = SubProyecto
|
||||
Row("SerieLote") = SerieLote
|
||||
Row("TiempoEntrega") = TiempoEntrega
|
||||
Row("Orden") = TmpDT.Rows.Count + 1
|
||||
Row("Cantidad") = Cantidad
|
||||
Row("CveUM") = CveUM
|
||||
Row("UM") = UM
|
||||
Row("CveClasificacion") = CveClasificacion
|
||||
Row("Clasificacion") = Clasificacion
|
||||
Row("CvePS") = CvePS
|
||||
Row("Obs") = Obs
|
||||
|
||||
|
||||
|
||||
Dim DrPS As DataRow = Nothing
|
||||
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
DrPS("IEPSPorcentaje") = 0
|
||||
|
||||
'verifica si tiene ventaminima
|
||||
If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString.ToDecimal > 0 Then
|
||||
'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15...
|
||||
If Cantidad Mod DrPS("VentaMinima").ToString.ToDecimal <> 0 Then
|
||||
Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString))
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
||||
|
||||
Row("PU") = PU
|
||||
Row("Codigo") = DrPS("Codigo")
|
||||
Row("NoIdentificacion") = DrPS("Codigo")
|
||||
Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria")
|
||||
Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
|
||||
Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
|
||||
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
||||
Row("Consec") = TmpDT.Rows.Count + 1
|
||||
|
||||
Row("PS") = DrPS("PS")
|
||||
Row("CodigoPS") = DrPS("PSCodigo").ToString
|
||||
Row("CveTipoPS") = DrPS("CveTipoPS")
|
||||
Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
|
||||
Row("CveTamaño") = DrPS("CveTamaño")
|
||||
|
||||
If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
|
||||
If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
|
||||
|
||||
Row("PorcentajeIVA") = PorcentajeIVA
|
||||
|
||||
Row("IVA") = Row("PorcentajeIVA")
|
||||
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, 2)
|
||||
|
||||
|
||||
Row("ImporteRetIVA") = 0
|
||||
Row("ImporteRetISR") = 0
|
||||
Row("PorcentajeRetIVA") = 0
|
||||
Row("PorcentajeRetISR") = 0
|
||||
Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje")
|
||||
Row("ImporteIEPS") = Math.Round(DrPS("IEPSPorcentaje").ToString.ToDecimal * TotalCalculableImpuestos, 2)
|
||||
Row("IEPS") = Row("ImporteIEPS")
|
||||
Row("Descuento") = Math.Round(Descuento, 2)
|
||||
Row("TipoDescuento") = 0
|
||||
Row("Total") = (Cantidad * PU)
|
||||
Row("TotalImporte") = Math.Round(Cantidad * PU, 2)
|
||||
'Row("AsientoContableVentas") = DrPS("AsientoContableVentas")
|
||||
' Row("IdCtaContVentas") = IdCtaContable
|
||||
' Row("AplicaParaConcepto") = AplicaParaConcepto
|
||||
|
||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||
|
||||
|
||||
Row("EntregaDirecta") = EntregaDirecta
|
||||
'Contratos
|
||||
Row("CveContratoDetalle") = CveContratoDetalle
|
||||
Row("CveVentaDetalle") = CveVentaDetalle
|
||||
Row("CveMovimientoDetallePedido") = CveVentaDetalle
|
||||
Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
|
||||
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
|
||||
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
||||
Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
|
||||
Row("CuentaPredial") = CuentaPredial
|
||||
Row("EsCargo") = EsCargo
|
||||
|
||||
'RECARGAR GV
|
||||
TmpDT.Rows.Add(Row)
|
||||
TmpDT.AcceptChanges()
|
||||
Retorno = True
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
Protected Function CreaDTDetalleRNC() As DataTable
|
||||
Dim TmpDT = New DataTable
|
||||
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
||||
TmpDT.Columns.Add("Consec", GetType(Integer))
|
||||
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Codigo", GetType(String))
|
||||
TmpDT.Columns.Add("CveUM", GetType(Integer))
|
||||
TmpDT.Columns.Add("UM", GetType(String))
|
||||
TmpDT.Columns.Add("SATClaveUM", GetType(String))
|
||||
TmpDT.Columns.Add("CveClasificacion", GetType(Integer))
|
||||
TmpDT.Columns.Add("Clasificacion", GetType(String))
|
||||
TmpDT.Columns.Add("CvePS", GetType(Integer))
|
||||
TmpDT.Columns.Add("PS", GetType(String))
|
||||
TmpDT.Columns.Add("CodigoPS", GetType(String))
|
||||
TmpDT.Columns.Add("SATClaveProdServ", GetType(String))
|
||||
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
|
||||
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
|
||||
TmpDT.Columns.Add("SerieLote", GetType(String))
|
||||
TmpDT.Columns.Add("CuentaPredial", GetType(String))
|
||||
TmpDT.Columns.Add("Obs", GetType(String))
|
||||
TmpDT.Columns.Add("TiempoEntrega", GetType(String))
|
||||
TmpDT.Columns.Add("PU", GetType(Decimal))
|
||||
TmpDT.Columns.Add("IVA", GetType(Decimal))
|
||||
TmpDT.Columns.Add("ImporteIVA", GetType(Decimal))
|
||||
TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
||||
TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal))
|
||||
TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal))
|
||||
TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
|
||||
TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal))
|
||||
TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal))
|
||||
TmpDT.Columns.Add("IEPS", GetType(Decimal))
|
||||
TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Descuento", GetType(Decimal))
|
||||
TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
|
||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||
'Para uso del módulo contable
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
||||
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
||||
TmpDT.Columns.Add("Proyecto", GetType(String))
|
||||
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
TmpDT.Columns.Add("SubProyecto", GetType(String))
|
||||
TmpDT.Columns.Add("CveVentaDetallePadre", GetType(Integer))
|
||||
|
||||
'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto
|
||||
TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer))
|
||||
'Contratos
|
||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
'Remisiones a Facturas
|
||||
TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer))
|
||||
|
||||
'Pedido2 a Facturas
|
||||
TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer))
|
||||
|
||||
TmpDT.Columns.Add("Origen", GetType(Integer))
|
||||
'Ordenes Servicio
|
||||
TmpDT.Columns.Add("CveOS", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveOSDetalle", GetType(Integer))
|
||||
TmpDT.Columns.Add("SeFacturara", GetType(Integer))
|
||||
TmpDT.Columns.Add("Folio", GetType(Integer))
|
||||
TmpDT.Columns.Add("Estatus", GetType(String))
|
||||
'Ordenamiento
|
||||
TmpDT.Columns.Add("Orden", GetType(Integer))
|
||||
TmpDT.Columns.Add("TipoDocto", GetType(String))
|
||||
'OC
|
||||
TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||
|
||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||
TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
|
||||
TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal))
|
||||
TmpDT.Columns.Add("CantidadFacturadaPed2", GetType(Decimal))
|
||||
TmpDT.Columns.Add("CantidadInventario", GetType(Decimal))
|
||||
|
||||
TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String))
|
||||
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
|
||||
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
|
||||
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
||||
|
||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||
|
||||
Return TmpDT
|
||||
End Function
|
||||
Protected Sub CargaDTDetalleRNC()
|
||||
|
||||
For Each Row As GridViewRow In GvM.Rows
|
||||
If Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero()
|
||||
Dim Cantidad As Decimal = Row.DataKey("Cantidad").ToDecimal()
|
||||
Dim PU As Decimal = Row.DataKey("PU").ToDecimal()
|
||||
Dim SubTotal As Decimal = Cantidad * PU
|
||||
|
||||
Dim CveUnidadMedida As Integer = 0
|
||||
Dim CveClasificacion As Integer = 0
|
||||
Dim UnidadMedida As String = ""
|
||||
Dim Clasificacion As String = ""
|
||||
Dim PS As String = ""
|
||||
Dim PorcentajeIVA As Decimal = 0D
|
||||
Dim IVA As Decimal = 0D
|
||||
If CvePS > 0 Then
|
||||
If SubTotal > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
CveUnidadMedida = Dr("CveUnidadMedida").ToString.ToEntero
|
||||
CveClasificacion = Dr("CveClasificacion").ToString.ToEntero
|
||||
PS = Dr("PSCodigo").ToString
|
||||
UnidadMedida = Dr("UnidadMedida").ToString
|
||||
Clasificacion = Dr("Clasificacion").ToString
|
||||
End If
|
||||
PorcentajeIVA = 0.16D
|
||||
IVA = SubTotal * PorcentajeIVA
|
||||
End If
|
||||
End If
|
||||
|
||||
AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "Inv/RecepcionUsados", SubTotal, 0, -1, "",
|
||||
ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim TotalImporte As Decimal = ObjRemisionNC.DtDetalle.SUM("TotalImporte").ToDecimal()
|
||||
Dim ImporteIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteIVA").ToDecimal()
|
||||
Dim ImporteRetIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetIVA").ToDecimal()
|
||||
Dim ImporteRetISR As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetISR").ToDecimal()
|
||||
Dim ImporteIEPS As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteIEPS").ToDecimal()
|
||||
Dim Descuento As Decimal = ObjRemisionNC.DtDetalle.SUM("Descuento").ToDecimal()
|
||||
Dim Amortizacion As Decimal = 0
|
||||
|
||||
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
|
||||
|
||||
'DETALLES
|
||||
ObjRemisionNC.SubTotal = TotalImporte
|
||||
ObjRemisionNC.Descuento = Descuento
|
||||
ObjRemisionNC.Amortizacion = Amortizacion
|
||||
ObjRemisionNC.IVA = ImporteIVA
|
||||
ObjRemisionNC.RetIVA = ImporteRetIVA
|
||||
ObjRemisionNC.RetISR = ImporteRetISR
|
||||
ObjRemisionNC.IEPS = ImporteIEPS
|
||||
ObjRemisionNC.Total = Total
|
||||
ObjRemisionNC.TotalOtrosConceptos = 0
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaTamaños()
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
If objAcum.TamañoGet(-1, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DtTamaños = objAcum.DtResultados.Copy()
|
||||
End If
|
||||
objAcum.Dispose()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
File diff suppressed because one or more lines are too long
119
OC/OC.aspx
119
OC/OC.aspx
@@ -274,6 +274,7 @@
|
||||
<label class="col-md-2">Cancelacion:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtMotivoCancelacion" CssClass="form-control input-sm" runat="server" Enabled="false" Width="365px" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -586,6 +587,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="max-width: 60px;">
|
||||
Cliente:
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="Ddlcliente" OnSelectedIndexChanged="Ddlcliente_SelectedIndexChanged" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" Width="100%" DataTextField="Nombre" DataValueField="CveCliente" runat="server"></asp:DropDownList>
|
||||
@@ -594,6 +596,7 @@
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 75px;">
|
||||
Vendedor:
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div style="width: 90% !important; float: left;">
|
||||
@@ -608,6 +611,7 @@
|
||||
</div>
|
||||
<div runat="server" id="DivLugarEntregaDirecta1" visible="false" class="col-md-2" style="max-width: 120px;">
|
||||
Lugar Entrega:
|
||||
|
||||
</div>
|
||||
<div runat="server" id="DivLugarEntregaDirecta2" visible="false" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlDireccionEnvio" CssClass="select2me" runat="server" Width="300px" Visible="false" DataTextField="DireccionEnvio" DataValueField="CveDireccionEnvio"></asp:DropDownList>
|
||||
@@ -722,6 +726,7 @@
|
||||
<tr>
|
||||
<th scope="col">Cantidad</th>
|
||||
<th scope="col" id="ThComercializadora" runat="server" visible="false">Tipo OC
|
||||
|
||||
<br />
|
||||
|
||||
</th>
|
||||
@@ -810,6 +815,7 @@
|
||||
<asp:HiddenField ID="HdnCveCuentaComprometido" runat="server" ClientIDMode="Static" />
|
||||
<img alt="POA" width="15px" height="15px" src="/Imagenes/Money_add.png" style="cursor: pointer;" onclick="$get('divPOA').style.display='';PosicionaObjeto('HplMaq','divPOA');" />
|
||||
</td>
|
||||
|
||||
<td>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -862,7 +868,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCECant" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantEdit" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.######}")%>' style="width:100%"></asp:Label>
|
||||
<asp:Label ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.######}")%>' Style="width: 100%"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
@@ -1045,6 +1051,50 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpIvas" runat="server" class="text-right" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row" id="RowCotizaciones" runat="server" visible="false">
|
||||
<div class="col-md-12 ">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<%--<i class="fa fa-users font-green"></i>--%>
|
||||
<span class="caption-subject bold uppercase">Cotizaciones Rapidas</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkAddCotEva" CssClass="caption-subject bold" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:LinkButton><br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpBitacoraEva" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBitacoraEva" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado cotizaciones rapidas" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Descripcion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="175px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Archivo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" Text="<i class='fa fa-download' aria-hidden='true'></i>" OnClick="DownloadFile"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div style="display: inline-block;">
|
||||
<table border="0" rules="none" class="TextTab well ">
|
||||
<tr class="text-right">
|
||||
@@ -1122,14 +1172,13 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:HiddenField ID="HdnEditCveActivoFijo" runat="server" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnEditCodigo" runat="server" ClientIDMode="Static" />
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger ControlID="LbAgregar" EventName="Click" />
|
||||
@@ -1151,6 +1200,7 @@
|
||||
|
||||
<asp:HyperLink ID="hplAgregarCotizacion" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-plus'></i> Agregar Cotizacion" Style="cursor: pointer;" ToolTip="Agregar Cotizacion"></asp:HyperLink>
|
||||
|
||||
|
||||
<asp:HyperLink ID="hplEnviarCorreo" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-envelope'></i> Enviar cotización por correo" Style="cursor: pointer;" ToolTip="Enviar cotización por correo"></asp:HyperLink>
|
||||
|
||||
</div>
|
||||
@@ -1424,6 +1474,7 @@
|
||||
<td style="text-align: center;">
|
||||
<asp:Panel runat="server" ID="PnlUsuarioAsignado" Visible="False">
|
||||
Asignar a:
|
||||
|
||||
<asp:DropDownList ID="DdlUsuariosAsignado" CssClass="select2me" Width="200px" DataTextField="Nombre" DataValueField="CveUsuario" runat="server"></asp:DropDownList>
|
||||
</asp:Panel>
|
||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary" Style="margin-top: 5px;" runat="server" Text="Guardar" Width="170px" ValidationGroup="GrpGuardar" />
|
||||
@@ -1462,28 +1513,25 @@
|
||||
|
||||
|
||||
<a name="pie_de_pagina"></a>
|
||||
<div class="row" id="RowBitacora">
|
||||
<div class="row">
|
||||
<div class="col-md-12 ">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<%--<i class="fa fa-users font-green"></i>--%>
|
||||
<span class="caption-subject bold uppercase">Bitácora</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:UpdatePanel ID="UpAccionesBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:LinkButton ID="ImgAddObs" CssClass="caption-subject bold" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:LinkButton><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' >Agendar</i>" Visible="false" Style="cursor: pointer;" ToolTip="Agendar"></asp:HyperLink>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
|
||||
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
@@ -1495,16 +1543,13 @@
|
||||
<asp:BoundField HeaderText="Prioridad" DataField="Prioridad" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Archivo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" CssClass="Texto" OnClick="DownloadFile">
|
||||
<asp:Image ImageUrl="/Imagenes/Abajo.png" ID="ImgArchivo" runat="server" />
|
||||
</asp:LinkButton>
|
||||
<asp:LinkButton ID="LinkArchivo" Visible="false" runat="server" Text="<i class='fa fa-download' aria-hidden='true'></i>" OnClick="DownloadFile"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1538,20 +1583,20 @@
|
||||
|
||||
<div id="ModalBitacora" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<asp:UpdatePanel runat="server" ID="UpTituloBitacora" UpdateMode="Conditional" class="modal-header">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Bitácora</h4>
|
||||
</div>
|
||||
|
||||
<h4 class="modal-title" runat="server" id="HBitacora">Bitácora</h4>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<label>Bitácora/Observaciones</label>
|
||||
<label runat="server" id="LblBitacora">Bitácora/Observaciones</label>
|
||||
<br />
|
||||
<asp:TextBox CssClass="form-control" ID="TxtEventoDescripcion" class="Widthall" runat="server" TextMode="MultiLine" Columns="60" Rows="4"></asp:TextBox>
|
||||
<br />
|
||||
@@ -1562,35 +1607,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<asp:HiddenField runat="server" ID="HdnEsCotizacion" Value="0" />
|
||||
</div>
|
||||
<%-- <table>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100px">Subir Archivo:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Literal ID="LtSubirArchivoInfo" Text="" runat="server" />
|
||||
<asp:HiddenField ID="HdnArchivoEstatus" runat="server" ClientIDMode="Static" Value="" />
|
||||
<asp:TextBox runat="server" ID="TxtArchivo" Width="300px" Visible="false" />
|
||||
<ajax:AsyncFileUpload ID="AFU" runat="server" OnClientUploadComplete="uploadComplete" OnClientUploadError="uploadError" Width="300px" UploaderStyle="Modern" UploadingBackColor="#CCFFFF" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -1654,6 +1672,7 @@
|
||||
<tr class="Titulos">
|
||||
<td style="width: 760px;">Programa Operativo</td>
|
||||
<td style="float: right; padding-right: 3px;">Importe:
|
||||
|
||||
<asp:TextBox ID="TxtImporte" ClientIDMode="Static" runat="server" Width="50px" CssClass="alineanum" Enabled="false"></asp:TextBox>
|
||||
</td>
|
||||
<td style="padding-right: 4px;" valign="top">
|
||||
@@ -1664,15 +1683,19 @@
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr style="height: 30px;">
|
||||
<td style="float: left;">Fuente F:
|
||||
|
||||
<asp:DropDownList ID="CboFuenteFinanciamiento" runat="server" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="100px"></asp:DropDownList>
|
||||
</td>
|
||||
<td style="float: left;">Unidad Admtiva:
|
||||
|
||||
<asp:DropDownList ID="CboUnidadAdministrativa" runat="server" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="100px"></asp:DropDownList>
|
||||
</td>
|
||||
<td style="float: left;">Tipo Gasto:
|
||||
|
||||
<asp:DropDownList ID="CboTipoGasto" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100px"></asp:DropDownList>
|
||||
</td>
|
||||
<td style="float: left;">Clasificador:
|
||||
|
||||
<asp:DropDownList ID="CboClasificacionOG" runat="server" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="100px"></asp:DropDownList>
|
||||
</td>
|
||||
<td style="float: right;">
|
||||
@@ -2357,6 +2380,7 @@
|
||||
<div id="AccionContrato" runat="server">
|
||||
<p>
|
||||
Tipo de Clasificación:
|
||||
|
||||
</p>
|
||||
<asp:RadioButtonList ID="RblOpcionClasificacion" runat="server" CssClass="rbl" RepeatDirection="Vertical" RepeatLayout="Table">
|
||||
<asp:ListItem Text="Compra de Material para Venta" Value="1"></asp:ListItem>
|
||||
@@ -2365,6 +2389,7 @@
|
||||
|
||||
<asp:LinkButton ID="BtnIniciarContrato" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -174,6 +174,14 @@ Partial Class OC
|
||||
ViewState("NumCotizacionesGanadoras") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property NumCotizacionesEvaluar As Integer
|
||||
Get
|
||||
NumCotizacionesEvaluar = IfNull(ViewState("NumCotizacionesEvaluar"), "-1", ViewState("NumCotizacionesEvaluar")).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("NumCotizacionesEvaluar") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ProveedoresCotizacion As ArrayList
|
||||
Get
|
||||
ProveedoresCotizacion = DirectCast(ViewState("ProveedoresCotizacion"), ArrayList)
|
||||
@@ -964,7 +972,7 @@ Partial Class OC
|
||||
DtDetalle.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
DtDetalle.Columns.Add("CantidadNoEditable", GetType(Double))
|
||||
|
||||
DtDetalle.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
||||
'DtDetalle.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
||||
|
||||
' DtDetalle.Columns.Add("ClasificacionOG", GetType(String))
|
||||
|
||||
@@ -1223,9 +1231,11 @@ Partial Class OC
|
||||
|
||||
DdlPrioridad.SelectedValueExist(objOC.Prioridad.ToString)
|
||||
ChkCotizacion.Checked = objOC.RequiereCotizacion
|
||||
|
||||
If ChkCotizacion.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
|
||||
ChkCotizacion.Enabled = False
|
||||
End If
|
||||
|
||||
tabCotizaciones.Enabled = objOC.RequiereCotizacion
|
||||
tabCotizaciones.UpdatePanelID = uppOpciones.ID
|
||||
TxtGuia.Text = objOC.Guia
|
||||
@@ -1576,6 +1586,11 @@ Partial Class OC
|
||||
'CARGA MOVTOS DE ALMACEN
|
||||
InicializaMovtosAlmacen()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And pCveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
|
||||
RowCotizaciones.Visible = True
|
||||
UpIvas.Update()
|
||||
End If
|
||||
|
||||
uppEstatus.Update()
|
||||
End Sub
|
||||
|
||||
@@ -2058,6 +2073,12 @@ Partial Class OC
|
||||
Private Function ValidaGuardar() As Boolean
|
||||
Dim TieneError = False
|
||||
|
||||
'Entrega Directa requiere Cliente y Vendedor
|
||||
If ChkEntregaDirecta.Checked And Ddlcliente.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Al ser una Entrega Directa es necesario seleccionar un cliente, por favor seleccione uno.")
|
||||
Return True
|
||||
End If
|
||||
|
||||
'VALIDA QUE TENGA REGISTROS
|
||||
If Not GvD.Rows.Count > 0 Then
|
||||
Alert(String.Format("La {0} debe de tener registros", TipoLargo), TipoMensaje.MsgAdvertencia)
|
||||
@@ -2196,14 +2217,22 @@ Partial Class OC
|
||||
End If
|
||||
|
||||
'VALIDA QUE TENGA LAS COTIZACIONES QUE DEBEN TENER
|
||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" AndAlso CveConfianzaProveedor > 0 AndAlso (TipoOC.ToUpper = "REQ" And CveEstatusFinalOK = CboE.SelectedValue.ToEntero) Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" AndAlso (TipoOC.ToUpper = "REQ" And CveEstatusFinalOK = CboE.SelectedValue.ToEntero) Then
|
||||
If CveConfianzaProveedor > 0 Then
|
||||
'SUMA EL TOTAL DE COTIZACIONES
|
||||
For Each GvRow As GridViewRow In GvBitacoraEva.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
Me.NumCotizacionesEvaluar += 1
|
||||
End If
|
||||
Next
|
||||
|
||||
If CveConfianzaProveedor = 1 AndAlso Me.NumCotizaciones < 1 Then
|
||||
Alert("Para el proveedor seleccionado es necesario terner al menos 1 cotización.", TipoMensaje.MsgAdvertencia)
|
||||
Me.NumCotizacionesEvaluar += Me.NumCotizaciones
|
||||
|
||||
If CveConfianzaProveedor = 1 AndAlso Me.NumCotizacionesEvaluar < 1 Then
|
||||
Alert("Para el proveedor seleccionado es necesario tener al menos 1 cotización.", TipoMensaje.MsgAdvertencia)
|
||||
TieneError = True
|
||||
ElseIf CveConfianzaProveedor = 2 AndAlso Me.NumCotizaciones < 2 Then
|
||||
Alert("Para el proveedor seleccionado es necesario terner al menos 2 cotizaciones", TipoMensaje.MsgAdvertencia)
|
||||
ElseIf CveConfianzaProveedor = 2 AndAlso Me.NumCotizacionesEvaluar < 2 Then
|
||||
Alert("Para el proveedor seleccionado es necesario tener al menos 2 cotizaciones", TipoMensaje.MsgAdvertencia)
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
@@ -2222,12 +2251,6 @@ Partial Class OC
|
||||
End Function
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
'Entrega Directa requiere Cliente y Vendedor
|
||||
If ChkEntregaDirecta.Checked And Ddlcliente.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Al ser una Entrega Directa es necesario seleccionar un cliente, por favor seleccione uno.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'VALIDACIONES PARA GUARDAR
|
||||
If ValidaGuardar() Then Exit Sub
|
||||
|
||||
@@ -4501,18 +4524,48 @@ Partial Class OC
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvBitacoraEva_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvBitacoraEva.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Archivo").ToString.Trim <> "" AndAlso CveOrdenCompra > 0 Then
|
||||
e.Row.FCLinkButton("LinkArchivo").Visible = True
|
||||
e.Row.FCLinkButton("LinkArchivo").CommandArgument = String.Format("OI\{0}", e.Row.DBCampo("Archivo").ToString)
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LinkArchivo")) 'Registro un evento Postbacktrigger, que recargue toda la pagina para que funcione
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkAddCotEva_Click(sender As Object, e As EventArgs) Handles LnkAddCotEva.Click
|
||||
HdnEsCotizacion.Value = "1"
|
||||
ChkEventoPrioridad.Visible = False
|
||||
HBitacora.InnerText = "Cotización"
|
||||
LblBitacora.InnerText = "Cotización"
|
||||
|
||||
UPAddEventoBitacora.Update()
|
||||
UpTituloBitacora.Update()
|
||||
RegistraScript("$('#ModalBitacora').modal('show');")
|
||||
End Sub
|
||||
Protected Sub ImgAddObs_Click(sender As Object, e As EventArgs) Handles ImgAddObs.Click
|
||||
HdnEsCotizacion.Value = "0"
|
||||
ChkEventoPrioridad.Visible = True
|
||||
HBitacora.InnerText = "Bitácora"
|
||||
LblBitacora.InnerText = "Bitácora/Observaciones"
|
||||
|
||||
UPAddEventoBitacora.Update()
|
||||
UpTituloBitacora.Update()
|
||||
RegistraScript("$('#ModalBitacora').modal('show');")
|
||||
End Sub
|
||||
Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
|
||||
|
||||
If CveOrdenCompra > 0 Then
|
||||
GuardaBitacora()
|
||||
GuardaBitacora(HdnEsCotizacion.Value.ToEntero() > 0)
|
||||
Else
|
||||
AgregaBitacoraTemporal()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " GUARDA DIRECTO "
|
||||
Private Sub GuardaBitacora()
|
||||
Private Sub GuardaBitacora(Optional EsCotizacion As Boolean = False)
|
||||
Dim ObjEventoBitacora As New ClsOIEventos
|
||||
Dim FileExtension As String = ""
|
||||
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
@@ -4523,7 +4576,7 @@ Partial Class OC
|
||||
Next
|
||||
|
||||
Dim descripcion As String = TxtEventoDescripcion.Text.Trim
|
||||
Dim Prioridad As Integer = If(ChkEventoPrioridad.Checked, 3, 1)
|
||||
Dim Prioridad As Integer = If(EsCotizacion, 4, If(ChkEventoPrioridad.Checked, 3, 1))
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra, Prioridad:=Prioridad) Then
|
||||
|
||||
@@ -4535,7 +4588,7 @@ Partial Class OC
|
||||
TxtEventoDescripcion.Text = ""
|
||||
Anexo.Text = "[]"
|
||||
ChkEventoPrioridad.Checked = False
|
||||
Alert("La bitácora/observación se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||
Alert($"La {If(EsCotizacion, "cotización", "bitácora/observación")} se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||
RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal")
|
||||
|
||||
'obtener el Evento de bitacora para enviar el correo
|
||||
@@ -4562,7 +4615,8 @@ Partial Class OC
|
||||
If ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento IN (6,2) AND CvePrioridad=3").Rows.Count > 0 Then
|
||||
DivEventoUrgente.Visible = True
|
||||
End If
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento IN (6,2)")
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento IN (6,2) AND CvePrioridad <> 4")
|
||||
GvBitacoraEva.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CvePrioridad = 4")
|
||||
Else
|
||||
GvEB.DataSource = Nothing
|
||||
End If
|
||||
@@ -4570,7 +4624,9 @@ Partial Class OC
|
||||
ObjEventoBitacora.Dispose()
|
||||
|
||||
GvEB.DataBind()
|
||||
GvBitacoraEva.DataBind()
|
||||
UPEventoBitacora.Update()
|
||||
UpIvas.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -4703,7 +4759,7 @@ Partial Class OC
|
||||
option72.Visible = True
|
||||
DivFolioAdicional.Visible = True
|
||||
generarAnticipo.Visible = True
|
||||
Ddlcliente.DataSource = GlobalDTCliente(CveEmpresaActual).FiltraParametros(" Estatus = 'Activo' ")
|
||||
Ddlcliente.DataSource = GlobalDTCliente(CveEmpresaActual)
|
||||
Ddlcliente.DataBind()
|
||||
Ddlcliente.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(CveEmpresaActual)
|
||||
|
||||
@@ -247,6 +247,24 @@ Partial Class OS_OrdenesServicios
|
||||
ViewState("CveTecnico") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ClienteRFC As String
|
||||
Get
|
||||
Return ViewState("ClienteRFC").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ClienteRFC") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ClienteMail As String
|
||||
Get
|
||||
Return ViewState("ClienteMail").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ClienteMail") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
@@ -313,7 +331,7 @@ Partial Class OS_OrdenesServicios
|
||||
'Carga OS
|
||||
If CveOS > 0 Then
|
||||
|
||||
CargaEstatusOS()
|
||||
'CargaEstatusOS()
|
||||
CargaDatos()
|
||||
'PermisosSegunEstatus()
|
||||
CargaDetalles()
|
||||
@@ -336,11 +354,11 @@ Partial Class OS_OrdenesServicios
|
||||
TxtFechaRecibido.Text = Now.ToString("dd/MM/yyy")
|
||||
ViewState("CveOS") = -1
|
||||
DdlEstatusOS.Enabled = False
|
||||
CargaEstatusOS()
|
||||
End If
|
||||
|
||||
hdnEsThickbox.Value = "S"
|
||||
hdnClientIDLink.Value = "NoDefinido"
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -417,9 +435,13 @@ Partial Class OS_OrdenesServicios
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.SelectedValue = Nothing
|
||||
DdlSubProyecto.DataSource = ObjOS.DtResultados.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
If CveSubProyecto > 0 Then DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||
DdlEstatusOS.DataSource = ObjOS.DtResultados.FiltraParametros(String.Format("CveSubProyecto = {0}", CveSubProyecto), "", {"CveEstatusOrdenServicio", "EstatusOrdenServicio"})
|
||||
End If
|
||||
ObjOS.Dispose()
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlEstatusOS.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaTiposOrden()
|
||||
Dim ObjOS As New ClsOS
|
||||
@@ -430,11 +452,10 @@ Partial Class OS_OrdenesServicios
|
||||
Else
|
||||
DdlTipoOrdenOS.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjOS.Dispose()
|
||||
DdlTipoOrdenOS.DataBind()
|
||||
DdlTipoOrdenOS.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
ObjOS.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjOS As New ClsOS()
|
||||
@@ -708,6 +729,8 @@ Partial Class OS_OrdenesServicios
|
||||
ClienteEstado = ObjCliente.Estado
|
||||
TelefonoCliente = ObjCliente.Telefono
|
||||
TxtSolicito.Text = ObjCliente.Contacto
|
||||
ClienteRFC = ObjCliente.RFC
|
||||
ClienteMail = ObjCliente.Mail
|
||||
|
||||
If ObjCliente.GetSucursales(CveCliente) Then
|
||||
DdlSucursalCliente.DataSource = ObjCliente.DtResultados
|
||||
@@ -975,11 +998,11 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
|
||||
If Not CveOS > 0 Then
|
||||
|
||||
Dim bandera As Integer = DdlEstatusOS.SelectedValue.ToEntero
|
||||
If Not ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyecto.SelectedValue.ToEntero, TxtSolicito.Text, TxtFechaRecibido.Text.ToDateTime, TxtDescripcion.Text, UsuarioActual.CveUsuario, DdlEstatusOS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCotizacion, -1, -1, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
|
||||
Errores = True
|
||||
End If
|
||||
|
||||
CargaCliente(CveCliente)
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
If Not Errores Then
|
||||
Dim Consecutivo As Integer = Row("Consecutivo").ToString.ToEntero
|
||||
@@ -2423,6 +2446,46 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/OrdenServicio.rdlc", lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirAlGenerar()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim report As LocalReport = New LocalReport()
|
||||
|
||||
Dim dt As DataTable = TmpDT
|
||||
Dim DtMateriales As DataTable = TmpDTMaterialesDetalle
|
||||
|
||||
report.ReportPath = String.Format("Empresas/{0}/Formatos/FormatoOS.rdlc", UsuarioActual.CveEmpresa)
|
||||
|
||||
params.Add(New ReportParameter("Cliente", NombreCliente))
|
||||
params.Add(New ReportParameter("Direccion", ClienteDireccion))
|
||||
params.Add(New ReportParameter("NoDeCliente", TxtCodigo.Text))
|
||||
params.Add(New ReportParameter("RFC", ClienteRFC))
|
||||
params.Add(New ReportParameter("Poblacion", ClienteCiudad))
|
||||
params.Add(New ReportParameter("Vendedor", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Contacto", TxtSolicito.Text))
|
||||
params.Add(New ReportParameter("Correo", ClienteMail))
|
||||
params.Add(New ReportParameter("Sucursal", DdlSubProyecto.SelectedItem.Value))
|
||||
params.Add(New ReportParameter("TipoServicio", "Reparación/Diagnostico"))
|
||||
params.Add(New ReportParameter("DiaFecha", Date.Today.Day.ToString))
|
||||
params.Add(New ReportParameter("MesFecha", Date.Today.Month.ToString))
|
||||
params.Add(New ReportParameter("AñoFecha", Date.Today.Year.ToString))
|
||||
params.Add(New ReportParameter("DiaVigencia", Date.Today.Day.ToString))
|
||||
params.Add(New ReportParameter("MesVigencia", Date.Today.Month.ToString))
|
||||
params.Add(New ReportParameter("AñoVigencia", Date.Today.Year.ToString))
|
||||
params.Add(New ReportParameter("Folio", CveFolio.ToString))
|
||||
params.Add(New ReportParameter("CodigoDeServicio", CveOS.ToString))
|
||||
params.Add(New ReportParameter("FallaReportada", TxtDescripcion.Text))
|
||||
params.Add(New ReportParameter("Copia", "Copia: Cliente"))
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = DtMateriales}
|
||||
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = dt}
|
||||
|
||||
lrds.Add(rds)
|
||||
lrds.Add(rds2)
|
||||
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/FormatoOS.rdlc", UsuarioActual.CveEmpresa), lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "S O L I C I T A R M A T E R I A L"
|
||||
|
||||
61
SqlServerTypes/readme.htm
Normal file
61
SqlServerTypes/readme.htm
Normal file
@@ -0,0 +1,61 @@
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Microsoft.SqlServer.Types</title>
|
||||
<style>
|
||||
body {
|
||||
background: #fff;
|
||||
color: #505050;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
#main {
|
||||
background: #efefef;
|
||||
padding: 5px 30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h1>Action required to load native assemblies</h1>
|
||||
<p>
|
||||
To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial140.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr120.dll is also included in case the C++ runtime is not installed.
|
||||
</p>
|
||||
<p>
|
||||
You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture).
|
||||
</p>
|
||||
<h2>ASP.NET Web Sites</h2>
|
||||
<p>
|
||||
For ASP.NET Web Sites, add the following block of code to the code behind file of the Web Form where you have added Report Viewer Control:
|
||||
<pre>
|
||||
Default.aspx.cs:
|
||||
|
||||
public partial class _Default : System.Web.UI.Page
|
||||
{
|
||||
static bool _isSqlTypesLoaded = false;
|
||||
|
||||
public _Default()
|
||||
{
|
||||
if (!_isSqlTypesLoaded)
|
||||
{
|
||||
SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~"));
|
||||
_isSqlTypesLoaded = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</p>
|
||||
<h2>ASP.NET Web Applications</h2>
|
||||
<p>
|
||||
For ASP.NET Web Applications, add the following line of code to the Application_Start method in Global.asax.cs:
|
||||
<pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre>
|
||||
</p>
|
||||
<h2>Desktop Applications</h2>
|
||||
<p>
|
||||
For desktop applications, add the following line of code to run before any spatial operations are performed:
|
||||
<pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -584,11 +584,11 @@
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoCliente.ClientID.ToString()%>">Tipo de Cliente:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivCargoUsado" visible="false">
|
||||
<label>Cargo Usado:</label>
|
||||
<asp:CheckBox ID="ChkCargoUsado" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivBonificacionUsado" visible="false">
|
||||
<label>Bonificación Usado:</label>
|
||||
<asp:CheckBox ID="ChkBonificacionUsado" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" />
|
||||
</div>
|
||||
|
||||
@@ -1650,6 +1650,8 @@ Partial Class Clientes
|
||||
|
||||
DivEsDistribuidor.Visible = True
|
||||
TabUsados.Visible = True
|
||||
DivCargoUsado.Visible = True
|
||||
DivBonificacionUsado.Visible = True
|
||||
CargaUsados()
|
||||
|
||||
End If
|
||||
|
||||
@@ -4641,6 +4641,8 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
ObjCliente.Dispose()
|
||||
|
||||
RecargaGlobalCliente()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -4823,6 +4825,18 @@ Partial Class PV
|
||||
|
||||
ObjPS.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub RecargaGlobalCliente()
|
||||
Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDTCliente)
|
||||
Hilo.Start()
|
||||
End Sub
|
||||
Private Sub GeneraGlobalDTCliente()
|
||||
Dim Objclientes As New ClsClientes
|
||||
If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1, TipoCliente:=-1) Then
|
||||
Application("GlobalDTCliente") = Objclientes.DtResultados
|
||||
End If
|
||||
Objclientes.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "CLASIFICACIONES DETALLES"
|
||||
|
||||
@@ -557,7 +557,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlIEPSPorcentaje" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Enabled="false">
|
||||
<asp:DropDownList ID="DdlIEPSPorcentaje" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Enabled="false" AutoPostBack="true" OnSelectedIndexChanged="DdlIEPSPorcentaje_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="0%" Value="0.00"></asp:ListItem>
|
||||
<asp:ListItem Text="3%" Value="0.03"></asp:ListItem>
|
||||
|
||||
@@ -2597,5 +2597,16 @@ Partial Class ProductosyServicios
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlIEPSPorcentaje_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlIEPSPorcentaje.SelectedIndexChanged
|
||||
Select Case DdlIEPSPorcentaje.SelectedValue
|
||||
Case "0.09"
|
||||
DdlCategoriaToxicidad.SelectedValueExist("001")
|
||||
Case "0.07"
|
||||
DdlCategoriaToxicidad.SelectedValueExist("002")
|
||||
Case "0.06"
|
||||
DdlCategoriaToxicidad.SelectedValueExist("003")
|
||||
Case Else
|
||||
DdlCategoriaToxicidad.SelectedValueExist("000")
|
||||
End Select
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -3434,6 +3434,7 @@
|
||||
<asp:RequiredFieldValidator ID="RFVNCPSAnt" runat="server" InitialValue="-1" ControlToValidate="DdlNCPSAnt" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VGAnticiposClientes"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERFVNCPSAnt" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPSAnt" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivFechaAnticipoCliente" runat="server" visible="false">
|
||||
@@ -5762,6 +5763,10 @@
|
||||
<asp:RequiredFieldValidator ID="RFVNCPS" runat="server" InitialValue="-1" ControlToValidate="DdlNCPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalAplicarNC"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENCPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPS" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblNCSaldoAnticipo" runat="server" Text=""></asp:Label>
|
||||
<asp:CheckBox ID="ChkAplicaNCAnticipo" runat="server" Text="Aplicar a Anticipo" Visible="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col-md-2">
|
||||
|
||||
@@ -3567,6 +3567,12 @@ Partial Class Ventas
|
||||
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
'LkNotaCredito.Visible = True
|
||||
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
'visualizo el saldo de anticipos, para cuando se aplique una Nota de crédito, decida si afecta anticipos o a DSV
|
||||
LblNCSaldoAnticipo.Visible = True
|
||||
ChkAplicaNCAnticipo.Visible = True
|
||||
ChkAplicaNCAnticipo.Checked = True
|
||||
If DbRowVenta("SaldoAnticipo").ToString.ToDouble <= 0 Then ChkAplicaNCAnticipo.Checked = False : ChkAplicaNCAnticipo.Enabled = False
|
||||
LblNCSaldoAnticipo.Text = String.Format("Saldo Anticipo: $ {0}", DbRowVenta("SaldoAnticipo").ToString.ToDouble.FormatoNumero)
|
||||
Case "Dev"
|
||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Devolucion", "Dev"))
|
||||
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
@@ -9978,7 +9984,7 @@ Partial Class Ventas
|
||||
|
||||
'cuando es NC, por amortización de anticipo, no debe de registrar el concepto 11,
|
||||
'pero cuando es NC y se aplicó anticipo, debe de restarle el importe
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") And CveAnticipo > 0 Then
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") And CveAnticipo > 0 AndAlso ChkAplicaNCAnticipo.Checked = True Then
|
||||
ConceptoContableAplicar = 11
|
||||
CveVentaAplicar = CveAnticipo
|
||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
@@ -15840,16 +15846,18 @@ Partial Class Ventas
|
||||
|
||||
'CONVERTIR REMISION - TIPO MONEDA -PESO A DOLARES
|
||||
If DdlMoneda.SelectedValue.ToEntero <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
|
||||
|
||||
Dim Importe As Decimal
|
||||
Dim TCC As Decimal = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, 6)
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * TCC, 6)
|
||||
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
|
||||
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal * TCC, NumeroDecimales)
|
||||
Importe = Row("Total").ToString.ToDecimal - Row("Descuento").ToString.ToDecimal
|
||||
Row("ImporteIEPS") = Math.Round(Importe * Row("PorcentajeIEPS").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteIVA") = Math.Round(Importe * Row("PorcentajeIVA").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(Importe * Row("PorcentajeRetIVA").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("ImporteRetISR") = Math.Round(Importe * Row("PorcentajeRetISR").ToString.ToDecimal, NumeroDecimales)
|
||||
Next
|
||||
|
||||
Dim ImpuestosLocales As Double = 0
|
||||
@@ -16780,7 +16788,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Private Sub GeneraGlobalDTCliente()
|
||||
Dim Objclientes As New ClsClientes
|
||||
If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1) Then
|
||||
If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1,TipoCliente:=-1) Then
|
||||
Application("GlobalDTCliente") = Objclientes.DtResultados
|
||||
End If
|
||||
Objclientes.Dispose()
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net40" />
|
||||
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
||||
<package id="Microsoft.ReportingServices.ReportViewerControl.WebForms" version="150.1358.0" targetFramework="net45" />
|
||||
<package id="Microsoft.ReportViewer.2015.Runtime" version="12.0.2.2402" targetFramework="net4" />
|
||||
<package id="Microsoft.SqlServer.Types" version="14.0.1016.290" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net4" />
|
||||
<package id="Microsoft.Web.Xdt" version="1.0.0" targetFramework="net4" />
|
||||
<package id="NC-OS-SessionStateProvider" version="4.4.0.0" targetFramework="net40" />
|
||||
|
||||
Reference in New Issue
Block a user