This commit is contained in:
2019-10-22 11:17:52 -07:00
19 changed files with 2754 additions and 2533 deletions

View File

@@ -246,6 +246,15 @@
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<div id="DivOtrosIngresosEgresos" runat="server" visible="false" class="row">
<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>
</div>
</div>
<br />
<asp:Panel ID="PnlRecibidoPor" runat="server" Visible="false">
<asp:UpdatePanel ID="UpRecibidoPor" class="row" style="padding: 0px; min-height: 22px; margin-top: 3px;" runat="server" UpdateMode="Conditional">

Binary file not shown.

View File

@@ -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

View File

@@ -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,40 +2960,64 @@ 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)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
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))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
If ObjOS.GetOrdenesServiciosDetalle(CveOS) Then
TmpDTOS = ObjOS.DtResultados
End If
If ObjOS.GetDetalleMateriales(-1, CveOS) Then
TmpDTMaterialesOS = ObjOS.DtResultados
End If
Dim lrds As New List(Of ReportDataSource)
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}
lrds.Add(rds)
lrds.Add(rds2)
ObjOS.Dispose()
ImprimirPDF("Empresas/Grales/Formatos/OrdenServicio.rdlc", lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
Else
params.Add(New ReportParameter("LogoPath", ""))
Dim lrds As New List(Of ReportDataSource)
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}
lrds.Add(rds)
lrds.Add(rds2)
ObjOS.Dispose()
ImprimirPDF(String.Format("Empresas/{0}/Formatos/OrdenServicio.rdlc", UsuarioActual.CveEmpresa), lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
End If
If ObjOS.GetOrdenesServiciosDetalle(CveOS) Then
TmpDTOS = ObjOS.DtResultados
End If
If ObjOS.GetDetalleMateriales(-1, CveOS) Then
TmpDTMaterialesOS = ObjOS.DtResultados
End If
Dim lrds As New List(Of ReportDataSource)
Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}
lrds.Add(rds)
lrds.Add(rds2)
ImprimirPDF("Empresas/Grales/Formatos/OrdenServicio.rdlc", lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
ObjOS.Dispose()
End Sub
Private Sub CreaDT()
TmpDTOS = New DataTable

View File

@@ -143,7 +143,7 @@ Partial Class Compras_RepNotasCredito
TCCompra = gr.DataKey("TipoCambio").ToDecimal
CveMoneda = gr.DataKey("CveMoneda").ToEntero
CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 2, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 103, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveMoneda > 1 Then
IdCtaContable = gr.DataKey("IdCtaContExtranjera").ToEntero

View File

@@ -212,8 +212,14 @@ Partial Class ContabilidadC_RegPrePoliza
End If
Exit Sub
Else
CreaDT()
BtnEliminar.Visible = False
If UsuarioActual.Empresa.UsaAC Then
ChkAutoConta.Checked = True
End If
End If
@@ -889,7 +895,7 @@ Partial Class ContabilidadC_RegPrePoliza
Next
'El movimiento 2 es el de Pago
If ChkAutoConta.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If ChkAutoConta.Checked AndAlso MsgError = "" Or UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
If idCuentaContabilizacion > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then

View File

@@ -167,6 +167,7 @@
<ajax:TabPanel ID="TA" runat="server" HeaderText="IVA Acreditable">
<ContentTemplate>
<h4><b>IVA Acreditable</b></h4>
<asp:Label ID="LblMsgAcreditable" runat="server" Text="" ForeColor="Red"></asp:Label>
<asp:GridView ID="GvA" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVAAcreditable_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />

View File

@@ -62,6 +62,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{
if (TipoCambio == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
LblMsgAcreditable.Text = ""; // lbl de mensajes de negativos
ClsContabilidad ObjCont = new ClsContabilidad();
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
@@ -83,10 +84,18 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{
GvA.DataSource = ObjCont.DtResultados;
DtIVAAcreditable = ObjCont.DtResultados;
if (DtIVAAcreditable.FiltraParametros("IVA < 0 OR IEPS < 0 ").Rows.Count > 0)
{
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
}
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
GvIVA2.DataSource = ObjCont.DtResultados;
}
}
ObjCont.Dispose();
GvT.DataBind();

View File

@@ -876,6 +876,17 @@ Partial Class Inventarios_EntradasSalidas
TxtObservaciones.Enabled = True
End If
Dim ObjContabilidad As New ClsContabilidad
If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
If dr IsNot Nothing Then
If dr("IdPoliza").ToString.ToEntero > 0 Then
BtnEliminar.Visible = False
End If
End If
End If
ObjContabilidad.Dispose()
'SI TIENE PREPOLIZA NO SE DEBE PODER EDITAR
If Mov.TienePrePoliza > 0 Then
'[IPP] Se invalida por necesidad de JAM de modificar fechas para cuadrar con CIFRA - 19Abril2018
@@ -1513,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
@@ -1527,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

View File

@@ -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
View 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>

View File

@@ -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>

View File

@@ -1650,6 +1650,8 @@ Partial Class Clientes
DivEsDistribuidor.Visible = True
TabUsados.Visible = True
DivCargoUsado.Visible = True
DivBonificacionUsado.Visible = True
CargaUsados()
End If

View File

@@ -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>

View File

@@ -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

View File

@@ -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">
@@ -5929,7 +5934,7 @@
</div>
<div class="modal-footer">
<button id="CancelarAplicarNC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
<asp:Button Text="AplicarNC" ID="BtnAplicarNC" OnClick="BtnAplicarNC_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalAplicarNC" runat="server" />
<asp:Button Text="Aplicar NC" ID="BtnAplicarNC" OnClick="BtnAplicarNC_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalAplicarNC" runat="server" />
</div>
</div>
</ContentTemplate>

View File

@@ -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"))))
@@ -6859,6 +6865,10 @@ Partial Class Ventas
If CveVenta > 0 Then MensajeAlert = New StringBuilder
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
If Opcion = "Cot" And UsuarioActual.CveEmpresa = 141 Then
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
End If
If ArchivoCotizacion.Exists Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
Else
@@ -9974,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
@@ -15836,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

View File

@@ -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" />