--Addenda en ventas, guardar, lectura y escritura en xml
This commit is contained in:
@@ -454,7 +454,8 @@ Public Class ClsVentas
|
|||||||
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
|
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
|
||||||
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
|
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
|
||||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False,
|
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False,
|
||||||
Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional EsFacturaGlobal As Boolean = False, Optional CveSATPeriodicidad As Integer = -1, Optional CveSATMes As Integer = -1, Optional SATAnio As Integer = -1, Optional CveMotivoDevolucion As Integer = -1) As Boolean
|
Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional EsFacturaGlobal As Boolean = False, Optional CveSATPeriodicidad As Integer = -1, Optional CveSATMes As Integer = -1, Optional SATAnio As Integer = -1, Optional CveMotivoDevolucion As Integer = -1,
|
||||||
|
Optional Addenda As String = "") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_VentasAdd")
|
DataAdapter("PA_VentasAdd")
|
||||||
@@ -569,6 +570,7 @@ Public Class ClsVentas
|
|||||||
.Add("@SATAnio", SqlDbType.Int).Value = SATAnio
|
.Add("@SATAnio", SqlDbType.Int).Value = SATAnio
|
||||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||||
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
|
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
|
||||||
|
.Add("@Addenda", SqlDbType.VarChar).Value = Addenda
|
||||||
End With
|
End With
|
||||||
'SqlTypes.SqlDateTime.Null
|
'SqlTypes.SqlDateTime.Null
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ Imports System.Data
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
|
Imports System.Xml.Serialization
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
@@ -401,6 +402,25 @@ Namespace Modelos
|
|||||||
Public Property TipoFolio As String
|
Public Property TipoFolio As String
|
||||||
|
|
||||||
Public Property Valido As Boolean
|
Public Property Valido As Boolean
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
<Serializable(), System.Xml.Serialization.XmlRoot("REM")>
|
||||||
|
Public Class M_REM
|
||||||
|
<System.Xml.Serialization.XmlElement("NOS")>
|
||||||
|
Public Property NOS As String
|
||||||
|
<System.Xml.Serialization.XmlElement("OR")>
|
||||||
|
Public Property _OR As String
|
||||||
|
<System.Xml.Serialization.XmlElement("CLUES")>
|
||||||
|
Public Property CLUES As String
|
||||||
|
<System.Xml.Serialization.XmlElement("CONTRATO")>
|
||||||
|
Public Property CONTRATO As String
|
||||||
|
<System.Xml.Serialization.XmlElement("FEEX")>
|
||||||
|
Public Property FEEX As String
|
||||||
|
<System.Xml.Serialization.XmlElement("FEEN")>
|
||||||
|
Public Property FEEN As String
|
||||||
|
<System.Xml.Serialization.XmlElement("FERE")>
|
||||||
|
Public Property FERE As String
|
||||||
End Class
|
End Class
|
||||||
Public Enum TipoMensajeRespuesta
|
Public Enum TipoMensajeRespuesta
|
||||||
TextoLimpio = 0
|
TextoLimpio = 0
|
||||||
@@ -8037,6 +8057,7 @@ Namespace Modelos
|
|||||||
Public Property CveMotivoCancelacion As Integer = -1
|
Public Property CveMotivoCancelacion As Integer = -1
|
||||||
Public Property MotivoCancelacion As String = ""
|
Public Property MotivoCancelacion As String = ""
|
||||||
Public Property TipoContable As Integer = -1
|
Public Property TipoContable As Integer = -1
|
||||||
|
Public Property Addenda As String = ""
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -2237,6 +2237,13 @@ Public Class Timbrado
|
|||||||
GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB)
|
GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Si tiene una addenda personalizada, agregarla al xml
|
||||||
|
If Not String.IsNullOrEmpty(Ventas.Addenda) Then
|
||||||
|
Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML)
|
||||||
|
GeneraAddenda(RutaCadena, Ventas.Addenda)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
'----------------------
|
'----------------------
|
||||||
@@ -3013,6 +3020,12 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Si tiene una addenda personalizada, agregarla al xml
|
||||||
|
If Not String.IsNullOrEmpty(Ventas.Addenda) Then
|
||||||
|
Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML)
|
||||||
|
GeneraAddenda(RutaCadena, Ventas.Addenda)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
@@ -3288,6 +3301,12 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Si tiene una addenda personalizada, agregarla al xml
|
||||||
|
If Not String.IsNullOrEmpty(Ventas.Addenda) Then
|
||||||
|
Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML)
|
||||||
|
GeneraAddenda(RutaCadena, Ventas.Addenda)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
@@ -3502,7 +3521,7 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
|||||||
End Using
|
End Using
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GeneraAddendaFord(Archivo As String, pFolio As String, LstFordASN As ListBox, FordGSDBM As String)
|
Private Sub GeneraAddenda(Archivo As String, Addenda As String)
|
||||||
Dim cfdi As String = ""
|
Dim cfdi As String = ""
|
||||||
Dim SB As New StringBuilder
|
Dim SB As New StringBuilder
|
||||||
Try
|
Try
|
||||||
@@ -3513,28 +3532,13 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
|||||||
End Using
|
End Using
|
||||||
Catch e As Exception
|
Catch e As Exception
|
||||||
Alert("The file could not be read:", TipoMensaje.MsgError)
|
Alert("The file could not be read:", TipoMensaje.MsgError)
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
cfdi = cfdi.Replace("</cfdi:Comprobante>", "")
|
cfdi = cfdi.Replace("</cfdi:Comprobante>", "")
|
||||||
|
|
||||||
SB.Append(cfdi)
|
SB.Append(cfdi)
|
||||||
|
SB.AppendFormat("{0}", Addenda)
|
||||||
SB.Append("<cfdi:Addenda><fomadd:addenda xmlns:fomadd="" http://www.ford.com.mx/cfdi/addenda"" xsi:schemaLocation=""http://www.ford.com.mx/cfdi/addenda http://www.ford.com.mx/cfdi/addenda/cfdiAddendaFord_1_0.xsd"">")
|
SB.Append("</cfdi:Comprobante>")
|
||||||
SB.AppendFormat("<fomadd:FOMASN version="" 1.0""><fomadd:GSDB>{0}</fomadd:GSDB>", FordGSDBM.Trim.ToUpper)
|
|
||||||
|
|
||||||
If pFolio <> "" Then SB.AppendFormat("<fomadd:ASN>{0}</fomadd:ASN>", pFolio)
|
|
||||||
'If TxtFordASN2.Text.Trim <> "" Then SB.AppendFormat("<fomadd:ASN>{0}</fomadd:ASN>", TxtFordASN2.Text.Trim)
|
|
||||||
|
|
||||||
For Each li As ListItem In LstFordASN.Items
|
|
||||||
|
|
||||||
SB.AppendFormat("<fomadd:ASN>{0}</fomadd:ASN>", li.Text)
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
SB.Append("</fomadd:FOMASN></fomadd:addenda></cfdi:Addenda></cfdi:Comprobante>")
|
|
||||||
|
|
||||||
|
|
||||||
Using outfile As New StreamWriter(Archivo)
|
Using outfile As New StreamWriter(Archivo)
|
||||||
outfile.Write(SB.ToString())
|
outfile.Write(SB.ToString())
|
||||||
|
|||||||
@@ -935,8 +935,8 @@
|
|||||||
<asp:ImageButton ID="ImgGuardaEstatus" runat="server" ClientIDMode="Static" ImageUrl="/Imagenes/accept.png" Style="display: none;" />--%>
|
<asp:ImageButton ID="ImgGuardaEstatus" runat="server" ClientIDMode="Static" ImageUrl="/Imagenes/accept.png" Style="display: none;" />--%>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left" id="TrMotivoCancelacion" visible="false" runat="server" >
|
<tr align="left" id="TrMotivoCancelacion" visible="false" runat="server">
|
||||||
<td style="vertical-align:top"><b>Mot. Canc.:</b> </td>
|
<td style="vertical-align: top"><b>Mot. Canc.:</b> </td>
|
||||||
<td>
|
<td>
|
||||||
<asp:Label ID="LblMotivoCancelacion" runat="server"></asp:Label>
|
<asp:Label ID="LblMotivoCancelacion" runat="server"></asp:Label>
|
||||||
|
|
||||||
@@ -2807,7 +2807,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet light xspadding bordered whitoutcol">
|
<div class="portlet light xspadding bordered whitoutcol">
|
||||||
@@ -3069,7 +3069,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-4">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet light xspadding bordered whitoutcol">
|
<div class="portlet light xspadding bordered whitoutcol">
|
||||||
@@ -3270,6 +3270,119 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="portlet light xspadding bordered whitoutcol">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">IMSS Bienestar</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="display: none;">
|
||||||
|
<div class="form-body">
|
||||||
|
<table border="0">
|
||||||
|
|
||||||
|
<tr align="left">
|
||||||
|
<td>Número de orden de suministro: </td>
|
||||||
|
<td>
|
||||||
|
<div class="form-group form-md-line-input" style="width: 90%">
|
||||||
|
<asp:TextBox ID="TxtNOS" CssClass="form-control input-sm" runat="server"></asp:TextBox><label></label><i></i>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr align="left">
|
||||||
|
<td>Orden de remisión: </td>
|
||||||
|
<td>
|
||||||
|
<div class="form-group form-md-line-input" style="width: 90%">
|
||||||
|
<asp:TextBox ID="TxtOR" CssClass="form-control input-sm" runat="server"></asp:TextBox><label></label><i></i>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr align="left">
|
||||||
|
<td>CLUES: </td>
|
||||||
|
<td>
|
||||||
|
<div class="form-group form-md-line-input" style="width: 90%">
|
||||||
|
<asp:TextBox ID="TxtCLUES" CssClass="form-control input-sm" runat="server"></asp:TextBox><label></label><i></i>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr align="left">
|
||||||
|
<td>Contrato: </td>
|
||||||
|
<td>
|
||||||
|
<div class="form-group form-md-line-input" style="width: 90%">
|
||||||
|
<asp:TextBox ID="TxtContrato" CssClass="form-control input-sm" runat="server"></asp:TextBox><label></label><i></i>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr align="left">
|
||||||
|
<td>Fecha de expedición: </td>
|
||||||
|
<td>
|
||||||
|
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||||
|
<asp:TextBox ID="TxtFEEX" CssClass="form-control" runat="server" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:HyperLink ID="ImgTxtFEEX" class="btn default" runat="server"><i class="fa fa-calendar"></i></asp:HyperLink>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="MEETxtFEEX" runat="server" TargetControlID="TxtFEEX" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender ID="CEETxtFEEX" runat="server" TargetControlID="TxtFEEX" PopupButtonID="ImgTxtFEEX" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:CompareValidator ID="CVTxtFEEX" runat="server" ControlToValidate="TxtFEEX" Display="None" ErrorMessage="El campo <b>''Fecha de expedición''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETxtFEEX" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFEEX" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr align="left">
|
||||||
|
<td>Fecha de recepción: </td>
|
||||||
|
<td>
|
||||||
|
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||||
|
<asp:TextBox ID="TxtFERE" CssClass="form-control" runat="server" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:HyperLink ID="ImgTxtFERE" class="btn default" runat="server"><i class="fa fa-calendar"></i></asp:HyperLink>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="METxtFERE" runat="server" TargetControlID="TxtFERE" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender ID="CETxtFERE" runat="server" TargetControlID="TxtFERE" PopupButtonID="ImgTxtFERE" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:CompareValidator ID="CVTxtFERE" runat="server" ControlToValidate="TxtFERE" Display="None" ErrorMessage="El campo <b>''Fecha de recepción''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETxtFERE" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFERE" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr align="left">
|
||||||
|
<td>Fecha de recepción: </td>
|
||||||
|
<td>
|
||||||
|
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||||
|
<asp:TextBox ID="TxtFEEN" CssClass="form-control" runat="server" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:HyperLink ID="ImgTxtFEEN" class="btn default" runat="server"><i class="fa fa-calendar"></i></asp:HyperLink>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="METxtFEEN" runat="server" TargetControlID="TxtFEEN" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender ID="CETxtFEEN" runat="server" TargetControlID="TxtFEEN" PopupButtonID="ImgTxtFEEN" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:CompareValidator ID="CVTxtFEEN" runat="server" ControlToValidate="TxtFEEN" Display="None" ErrorMessage="El campo <b>''Fecha de entrega''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETxtFEEN" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFEEN" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -9082,24 +9195,23 @@
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
function impresionBase64(pdfBase64) {
|
function impresionBase64(pdfBase64) {
|
||||||
printJS({printable:pdfBase64, type:'pdf', showModal:true, base64: true});
|
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
function abrirDdlPS(){
|
function abrirDdlPS() {
|
||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
$('#C_Tab_TabGenerales_DdlPS > select').select2('open').next().find(':input.select2-search__field').focus();
|
$('#C_Tab_TabGenerales_DdlPS > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function pageLoad()
|
function pageLoad() {
|
||||||
{
|
|
||||||
//ABRIR EL DROPDOWN DE PS DESPUES DE ASIGNAR CANTIDAD
|
//ABRIR EL DROPDOWN DE PS DESPUES DE ASIGNAR CANTIDAD
|
||||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(109) %>' == '1') {
|
if ('<%= UsuarioActual.Empresa.Funcionalidad(109) %>' == '1') {
|
||||||
$('#TxtCantidad').on('keydown', function (e) {
|
$('#TxtCantidad').on('keydown', function (e) {
|
||||||
if (e.which == 13 || e.which == 9 ) {
|
if (e.which == 13 || e.which == 9) {
|
||||||
let valorNumericoCantidad = parseFloat($('#TxtCantidad').val());
|
let valorNumericoCantidad = parseFloat($('#TxtCantidad').val());
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if(valorNumericoCantidad > 0){
|
if (valorNumericoCantidad > 0) {
|
||||||
$('#C_Tab_TabGenerales_DdlPS > select').select2('open').next().find(':input.select2-search__field').focus();
|
$('#C_Tab_TabGenerales_DdlPS > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9108,10 +9220,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#TxtPrecio').on('keydown', function (e) {
|
$('#TxtPrecio').on('keydown', function (e) {
|
||||||
if (e.which == 13 || e.which == 9 ) {
|
if (e.which == 13 || e.which == 9) {
|
||||||
let valorNumericoPrecio = parseFloat($('#TxtCantidad').val());
|
let valorNumericoPrecio = parseFloat($('#TxtCantidad').val());
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if(valorNumericoPrecio > 0){
|
if (valorNumericoPrecio > 0) {
|
||||||
$('#LbAgregar').focus();
|
$('#LbAgregar').focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9128,8 +9240,7 @@
|
|||||||
var totalPago = ToDouble($get("TxtImporteEfectivo").value);
|
var totalPago = ToDouble($get("TxtImporteEfectivo").value);
|
||||||
if (totalPago > 0) {
|
if (totalPago > 0) {
|
||||||
args.IsValid = (ToDouble(args.Value) > 0);
|
args.IsValid = (ToDouble(args.Value) > 0);
|
||||||
}else
|
} else {
|
||||||
{
|
|
||||||
args.IsValid = true;
|
args.IsValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9139,8 +9250,7 @@
|
|||||||
var totalPago = ToDouble($get("TxtImporteCredito").value);
|
var totalPago = ToDouble($get("TxtImporteCredito").value);
|
||||||
if (totalPago > 0) {
|
if (totalPago > 0) {
|
||||||
args.IsValid = (ToDouble(args.Value) > 0);
|
args.IsValid = (ToDouble(args.Value) > 0);
|
||||||
}else
|
} else {
|
||||||
{
|
|
||||||
args.IsValid = true;
|
args.IsValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9150,8 +9260,7 @@
|
|||||||
var totalPago = ToDouble($get("TxtImporteDebito").value);
|
var totalPago = ToDouble($get("TxtImporteDebito").value);
|
||||||
if (totalPago > 0) {
|
if (totalPago > 0) {
|
||||||
args.IsValid = (ToDouble(args.Value) > 0);
|
args.IsValid = (ToDouble(args.Value) > 0);
|
||||||
}else
|
} else {
|
||||||
{
|
|
||||||
args.IsValid = true;
|
args.IsValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9161,8 +9270,7 @@
|
|||||||
var totalPago = ToDouble($get("TxtImporteCheque").value);
|
var totalPago = ToDouble($get("TxtImporteCheque").value);
|
||||||
if (totalPago > 0) {
|
if (totalPago > 0) {
|
||||||
args.IsValid = (ToDouble(args.Value) > 0);
|
args.IsValid = (ToDouble(args.Value) > 0);
|
||||||
}else
|
} else {
|
||||||
{
|
|
||||||
args.IsValid = true;
|
args.IsValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9172,17 +9280,16 @@
|
|||||||
var totalPago = ToDouble($get("TxtImporteTransferencia").value);
|
var totalPago = ToDouble($get("TxtImporteTransferencia").value);
|
||||||
if (totalPago > 0) {
|
if (totalPago > 0) {
|
||||||
args.IsValid = (ToDouble(args.Value) > 0);
|
args.IsValid = (ToDouble(args.Value) > 0);
|
||||||
}else
|
} else {
|
||||||
{
|
|
||||||
args.IsValid = true;
|
args.IsValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//FUNCIONES PARA COMERCIO EXTERIOR
|
//FUNCIONES PARA COMERCIO EXTERIOR
|
||||||
function CalculaPU_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
|
function CalculaPU_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
|
||||||
if(ToDouble(TxtCantidad.value) > 0){
|
if (ToDouble(TxtCantidad.value) > 0) {
|
||||||
TxtValorUnitario.value = ((ToDouble(TotalUSD) / ToDouble(TxtCantidad.value)).toFixed(6)).toString();
|
TxtValorUnitario.value = ((ToDouble(TotalUSD) / ToDouble(TxtCantidad.value)).toFixed(6)).toString();
|
||||||
}else{
|
} else {
|
||||||
TxtValorUnitario.value = "0";
|
TxtValorUnitario.value = "0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9190,7 +9297,7 @@
|
|||||||
function CalculaCantidad_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
|
function CalculaCantidad_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
|
||||||
if (ToDouble(TxtValorUnitario.value) > 0) {
|
if (ToDouble(TxtValorUnitario.value) > 0) {
|
||||||
TxtCantidad.value = ((ToDouble(TotalUSD) / ToDouble(TxtValorUnitario.value)).toFixed(6)).toString();
|
TxtCantidad.value = ((ToDouble(TotalUSD) / ToDouble(TxtValorUnitario.value)).toFixed(6)).toString();
|
||||||
}else{
|
} else {
|
||||||
TxtCantidad.value = "0";
|
TxtCantidad.value = "0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9325,15 +9432,15 @@
|
|||||||
const cantidadSugerida = (Importe / pu);
|
const cantidadSugerida = (Importe / pu);
|
||||||
if (cantidadSugerida > CantidadPendiente) {
|
if (cantidadSugerida > CantidadPendiente) {
|
||||||
TxtCantidad.value = CantidadPendiente.toString();
|
TxtCantidad.value = CantidadPendiente.toString();
|
||||||
}else {
|
} else {
|
||||||
TxtCantidad.value = cantidadSugerida.toString();
|
TxtCantidad.value = cantidadSugerida.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
TxtCantidad.value = "0";
|
TxtCantidad.value = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
TxtCantidad.value = "0";
|
TxtCantidad.value = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9392,15 +9499,15 @@
|
|||||||
const cantidadSugerida = (Importe / pu);
|
const cantidadSugerida = (Importe / pu);
|
||||||
if (cantidadSugerida > CantidadPendiente) {
|
if (cantidadSugerida > CantidadPendiente) {
|
||||||
TxtCantidad.value = CantidadPendiente.toString();
|
TxtCantidad.value = CantidadPendiente.toString();
|
||||||
}else {
|
} else {
|
||||||
TxtCantidad.value = cantidadSugerida.toString();
|
TxtCantidad.value = cantidadSugerida.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
TxtCantidad.value = "0";
|
TxtCantidad.value = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
TxtCantidad.value = "0";
|
TxtCantidad.value = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9459,15 +9566,15 @@
|
|||||||
const cantidadSugerida = (Importe / pu);
|
const cantidadSugerida = (Importe / pu);
|
||||||
if (cantidadSugerida > CantidadPendiente) {
|
if (cantidadSugerida > CantidadPendiente) {
|
||||||
TxtCantidad.value = CantidadPendiente.toString();
|
TxtCantidad.value = CantidadPendiente.toString();
|
||||||
}else {
|
} else {
|
||||||
TxtCantidad.value = cantidadSugerida.toString();
|
TxtCantidad.value = cantidadSugerida.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
TxtCantidad.value = "0";
|
TxtCantidad.value = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
TxtCantidad.value = "0";
|
TxtCantidad.value = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9767,7 +9874,7 @@
|
|||||||
if (Importe > ImporteRestante) {
|
if (Importe > ImporteRestante) {
|
||||||
TxtImporte.value = FormatoNumero(ImporteRestante, 2);
|
TxtImporte.value = FormatoNumero(ImporteRestante, 2);
|
||||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + ToDouble(TxtImporte.value), 2);
|
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + ToDouble(TxtImporte.value), 2);
|
||||||
}else {
|
} else {
|
||||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
||||||
TxtImporte.value = FormatoNumero(Importe, 2);
|
TxtImporte.value = FormatoNumero(Importe, 2);
|
||||||
}
|
}
|
||||||
@@ -9776,7 +9883,7 @@
|
|||||||
Chk.checked = false;
|
Chk.checked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) + ImporteSinPorcentaje, 2);
|
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) + ImporteSinPorcentaje, 2);
|
||||||
TxtImporte.value = FormatoNumero(Importe, 2);
|
TxtImporte.value = FormatoNumero(Importe, 2);
|
||||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
||||||
@@ -9788,7 +9895,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
CompararNC();
|
CompararNC();
|
||||||
}else {
|
} else {
|
||||||
if (Chk.checked) {
|
if (Chk.checked) {
|
||||||
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) + ImporteSinPorcentaje, 2);
|
TxtTotalGv.value = FormatoNumero(ToDouble(TxtTotalGv.value) + ImporteSinPorcentaje, 2);
|
||||||
TxtImporte.value = FormatoNumero(Importe, 2);
|
TxtImporte.value = FormatoNumero(Importe, 2);
|
||||||
@@ -10159,7 +10266,7 @@
|
|||||||
|
|
||||||
function CalculaDescPS() {
|
function CalculaDescPS() {
|
||||||
console.log("evento descuento");
|
console.log("evento descuento");
|
||||||
let ivaPor = parseFloat($get("HdnIVADescPS").value) ;
|
let ivaPor = parseFloat($get("HdnIVADescPS").value);
|
||||||
|
|
||||||
if ($get("TxtPorPS").value != "") {
|
if ($get("TxtPorPS").value != "") {
|
||||||
let PorcentajeDescuento = parseFloat($get("TxtPorPS").value);
|
let PorcentajeDescuento = parseFloat($get("TxtPorPS").value);
|
||||||
@@ -10182,7 +10289,7 @@
|
|||||||
|
|
||||||
$get("LblIVADescPS").innerText = formato_numero(((subTotal - descuento) * ivaPor), 2, '.', ',');
|
$get("LblIVADescPS").innerText = formato_numero(((subTotal - descuento) * ivaPor), 2, '.', ',');
|
||||||
|
|
||||||
let importeIVA =parseFloat($get("LblIVADescPS").innerText.replace(",", "").replace(",", ""));
|
let importeIVA = parseFloat($get("LblIVADescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
|
|
||||||
let Total = (subTotal - descuento) + importeIVA;
|
let Total = (subTotal - descuento) + importeIVA;
|
||||||
|
|
||||||
@@ -10198,10 +10305,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function LimpiarTotalDescPS(ivaPor){
|
function LimpiarTotalDescPS(ivaPor) {
|
||||||
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
$get("LblIVADescPS").innerText = formato_numero((subTotal * ivaPor), 2, '.', ',');
|
$get("LblIVADescPS").innerText = formato_numero((subTotal * ivaPor), 2, '.', ',');
|
||||||
let importeIVA =parseFloat($get("LblIVADescPS").innerText.replace(",", "").replace(",", ""));
|
let importeIVA = parseFloat($get("LblIVADescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
let Total = (subTotal) + importeIVA;
|
let Total = (subTotal) + importeIVA;
|
||||||
|
|
||||||
$get("LblTotalFinalDescPS").innerText = formato_numero(Total, 2, '.', ',');
|
$get("LblTotalFinalDescPS").innerText = formato_numero(Total, 2, '.', ',');
|
||||||
@@ -10210,7 +10317,7 @@
|
|||||||
$get("HdnDescPS").innerText = "0.00";
|
$get("HdnDescPS").innerText = "0.00";
|
||||||
}
|
}
|
||||||
|
|
||||||
function recalcularUtilidad(descuento){
|
function recalcularUtilidad(descuento) {
|
||||||
let totalCompra = parseFloat($get("HdnTotalCompra").value);
|
let totalCompra = parseFloat($get("HdnTotalCompra").value);
|
||||||
if (totalCompra > 0) {
|
if (totalCompra > 0) {
|
||||||
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
||||||
@@ -10314,7 +10421,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$get("TxtImporteContado").value = FormatoNumero(total - totalRNC - totalAmortizado - totalProntoPago,2);
|
$get("TxtImporteContado").value = FormatoNumero(total - totalRNC - totalAmortizado - totalProntoPago, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************************************************************************************************************************************************
|
// ****************************************************************************************************************************************************************************
|
||||||
@@ -10372,11 +10479,11 @@
|
|||||||
$('body').on('click', '.ChkAllClickAF input', function () { $(".ChkAllEvtAF input").not(this).prop('checked', $('.ChkAllClickAF input').is(':checked')); });
|
$('body').on('click', '.ChkAllClickAF input', function () { $(".ChkAllEvtAF input").not(this).prop('checked', $('.ChkAllClickAF input').is(':checked')); });
|
||||||
$('body').on('click', '.ChkAllClickPS input', function () { $(".ChkAllEvtPS input").not(this).prop('checked', $('.ChkAllClickPS input').is(':checked')); });
|
$('body').on('click', '.ChkAllClickPS input', function () { $(".ChkAllEvtPS input").not(this).prop('checked', $('.ChkAllClickPS input').is(':checked')); });
|
||||||
|
|
||||||
if(HdnCargarInventario.value == 'True'){
|
if (HdnCargarInventario.value == 'True') {
|
||||||
$("#TabAlmacen_tab .ajax__tab_inner").click(function () {
|
$("#TabAlmacen_tab .ajax__tab_inner").click(function () {
|
||||||
CargaMovimientosInventario();
|
CargaMovimientosInventario();
|
||||||
});
|
});
|
||||||
}else {
|
} else {
|
||||||
$("#TabAlmacen_tab .ajax__tab_inner").unbind();
|
$("#TabAlmacen_tab .ajax__tab_inner").unbind();
|
||||||
}
|
}
|
||||||
if (HdnCargarInventario.value == 'True') {
|
if (HdnCargarInventario.value == 'True') {
|
||||||
@@ -10555,7 +10662,7 @@
|
|||||||
function FnSuma() {
|
function FnSuma() {
|
||||||
debugger;
|
debugger;
|
||||||
$get('TxtSubTotal2').value = FormatoNumero(ToDouble($get('TxtSubTotal').value) - ToDouble($get('LblDescuentos').innerHTML) - ToDouble($get('LblAmortizacion').innerHTML), 2);
|
$get('TxtSubTotal2').value = FormatoNumero(ToDouble($get('TxtSubTotal').value) - ToDouble($get('LblDescuentos').innerHTML) - ToDouble($get('LblAmortizacion').innerHTML), 2);
|
||||||
var totalVenta = ToDouble($get('TxtSubTotal2').value) + ToDouble($get('TxtIVA').value) + ToDouble($get('TxtIEPS') ? ToDouble($get('TxtIEPS').value) : 0) - ToDouble($get('TxtRetIVA') ? $get('TxtRetIVA').value : 0) - ToDouble($get('TxtRetISR') ? $get('TxtRetISR').value:0);
|
var totalVenta = ToDouble($get('TxtSubTotal2').value) + ToDouble($get('TxtIVA').value) + ToDouble($get('TxtIEPS') ? ToDouble($get('TxtIEPS').value) : 0) - ToDouble($get('TxtRetIVA') ? $get('TxtRetIVA').value : 0) - ToDouble($get('TxtRetISR') ? $get('TxtRetISR').value : 0);
|
||||||
|
|
||||||
$("#<%=GvImpuestosLocales2.ClientID%> input[type='text']").each(function () {
|
$("#<%=GvImpuestosLocales2.ClientID%> input[type='text']").each(function () {
|
||||||
|
|
||||||
@@ -10600,9 +10707,9 @@
|
|||||||
// $get('HdnVentaSaldo').value = SaldoCompra;
|
// $get('HdnVentaSaldo').value = SaldoCompra;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if(AmorContrato > 0){
|
if (AmorContrato > 0) {
|
||||||
txt.value = AmorContrato.toFixed(2);
|
txt.value = AmorContrato.toFixed(2);
|
||||||
}else{
|
} else {
|
||||||
txt.value = importe.toFixed(2);
|
txt.value = importe.toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10966,7 +11073,7 @@
|
|||||||
function CalculaPorcentajeNC() {
|
function CalculaPorcentajeNC() {
|
||||||
var ImporteReferencia = (($('#C_DdlNCNivelImporte').val() == "1") ? ToDouble($get('TxtTotal').value) : ToDouble($get('TxtSubTotal').value));
|
var ImporteReferencia = (($('#C_DdlNCNivelImporte').val() == "1") ? ToDouble($get('TxtTotal').value) : ToDouble($get('TxtSubTotal').value));
|
||||||
//var ImporteReferencia = ToDouble($get('TxtTotal').value);
|
//var ImporteReferencia = ToDouble($get('TxtTotal').value);
|
||||||
$get('TxtNCPorcentaje').value = (ToDouble($get('TxtNCImporte').value * 100.00) / ImporteReferencia).toFixed(4) ;
|
$get('TxtNCPorcentaje').value = (ToDouble($get('TxtNCImporte').value * 100.00) / ImporteReferencia).toFixed(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CambioTipoMoneda(chk, saldo, txt, tipocambio, CveMoneda) {
|
function CambioTipoMoneda(chk, saldo, txt, tipocambio, CveMoneda) {
|
||||||
|
|||||||
@@ -6255,6 +6255,38 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim Addenda = DbRowVenta("Addenda").ToString()
|
||||||
|
If Not String.IsNullOrEmpty(Addenda) Then
|
||||||
|
Try
|
||||||
|
Dim ObjAddenda As New Modelos.M_REM
|
||||||
|
|
||||||
|
Addenda = Addenda.Replace("<cfdi:Addenda>", "")
|
||||||
|
Addenda = Addenda.Replace("</cfdi:Addenda>", "")
|
||||||
|
|
||||||
|
Dim strAddenda As New StringBuilder()
|
||||||
|
strAddenda.Append("<?xml version=""1.0""?>")
|
||||||
|
strAddenda.Append(Addenda)
|
||||||
|
|
||||||
|
Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(ObjAddenda.GetType())
|
||||||
|
Dim string_reader As TextReader = New System.IO.StringReader(strAddenda.ToString())
|
||||||
|
|
||||||
|
ObjAddenda = DirectCast(serializer.Deserialize(string_reader), Modelos.M_REM)
|
||||||
|
|
||||||
|
If ObjAddenda IsNot Nothing Then
|
||||||
|
TxtNOS.Text = ObjAddenda.NOS
|
||||||
|
TxtOR.Text = ObjAddenda._OR
|
||||||
|
TxtCLUES.Text = ObjAddenda.CLUES
|
||||||
|
TxtContrato.Text = ObjAddenda.CONTRATO
|
||||||
|
TxtFEEX.Text = ObjAddenda.FEEX
|
||||||
|
TxtFERE.Text = ObjAddenda.FERE
|
||||||
|
TxtFEEN.Text = ObjAddenda.FEEN
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al cargar los datos de la addenda", ex)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
End If
|
End If
|
||||||
@@ -13624,6 +13656,48 @@ Partial Class Ventas
|
|||||||
}
|
}
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(TxtNOS.Text.Trim()) Then
|
||||||
|
Dim Obj_REM As New Modelos.M_REM
|
||||||
|
Obj_REM.NOS = TxtNOS.Text
|
||||||
|
Obj_REM._OR = TxtOR.Text
|
||||||
|
Obj_REM.CLUES = TxtCLUES.Text
|
||||||
|
Obj_REM.CONTRATO = TxtContrato.Text
|
||||||
|
Obj_REM.FEEX = TxtFEEX.Text
|
||||||
|
Obj_REM.FEEN = TxtFEEN.Text
|
||||||
|
Obj_REM.FERE = TxtFERE.Text
|
||||||
|
|
||||||
|
Dim xmlRem As String = ""
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(Obj_REM.GetType)
|
||||||
|
Dim string_writer As New System.IO.StringWriter
|
||||||
|
serializer.Serialize(string_writer, Obj_REM)
|
||||||
|
|
||||||
|
xmlRem = string_writer.ToString()
|
||||||
|
|
||||||
|
'QUITAR NAMESPACES Y ETIQUETAS NO NECESARIAS
|
||||||
|
If xmlRem <> "" Then
|
||||||
|
xmlRem = xmlRem.Replace("<?xml version=""1.0"" encoding=""utf-16""?>", "")
|
||||||
|
xmlRem = xmlRem.Replace("xmlns:xsd=""http://www.w3.org/2001/XMLSchema""", "")
|
||||||
|
xmlRem = xmlRem.Replace("xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""", "")
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
xmlRem = ""
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(xmlRem) Then
|
||||||
|
Dim SB As New StringBuilder
|
||||||
|
SB.Append("<cfdi:Addenda>")
|
||||||
|
SB.AppendFormat("{0}", xmlRem)
|
||||||
|
SB.Append("</cfdi:Addenda>")
|
||||||
|
|
||||||
|
Obj.Addenda = SB.ToString()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return Timbre
|
Return Timbre
|
||||||
@@ -14163,7 +14237,7 @@ Partial Class Ventas
|
|||||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
||||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
||||||
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir,
|
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir,
|
||||||
Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text, CveMotivoDevolucion:=CveMotivoDevolucion) Then
|
Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text, CveMotivoDevolucion:=CveMotivoDevolucion, Addenda:=factura.Addenda) Then
|
||||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Else
|
Else
|
||||||
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
||||||
@@ -39177,6 +39251,5 @@ Partial Class Ventas
|
|||||||
' End Sub
|
' End Sub
|
||||||
'End Class
|
'End Class
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user