diff --git a/.gitignore b/.gitignore
index 52ab644c4..99d0efd82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -279,3 +279,4 @@ __pycache__/
vwd.webinfo
/Bin.rar
/Ashx/sigfox.ashx
+/BinOLD
diff --git a/Acumuladores/RepIndicadorDiario.aspx.vb b/Acumuladores/RepIndicadorDiario.aspx.vb
index ca676daf2..f306da8d0 100644
--- a/Acumuladores/RepIndicadorDiario.aspx.vb
+++ b/Acumuladores/RepIndicadorDiario.aspx.vb
@@ -153,8 +153,8 @@ Partial Class ACumuladores_RepIndicadorDiario
If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.DBCampo("Partida").Contiene("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14") Then
- e.Row.FCHyperLink("HplImporteAldia").NavigateUrl = String.Format("RepIndicadorDiarioDetalle.aspx?Partida={0}&FI={1}&FF={2}&CveSubProyecto={3}", e.Row.DBCampo("Partida"), txtFechaI.Text, txtFechaF.Text, DdlSubProyecto.SelectedValue)
+ If e.Row.DBCampo("Partida").Contiene("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16") Then
+ e.Row.FCHyperLink("HplImporteAldia").NavigateUrl = String.Format("RepIndicadorDiarioDetalle.aspx?Partida={0}&FI={1}&FF={2}&CveSubProyecto={3}", e.Row.DBCampo("Partida"), txtFechaF.Text, txtFechaF.Text, DdlSubProyecto.SelectedValue)
End If
If e.Row.DataKey("Ordernador2").ToEntero = 100 Or e.Row.DataKey("Seccion").ToEntero = 3 And (e.Row.DataKey("TipoCategoria").ToEntero = 6 Or e.Row.DataKey("TipoCategoria").ToEntero = 7) Then
diff --git a/Acumuladores/RepIndicadorDiarioDetalle.aspx b/Acumuladores/RepIndicadorDiarioDetalle.aspx
index 5a5a8955c..b60f975f7 100644
--- a/Acumuladores/RepIndicadorDiarioDetalle.aspx
+++ b/Acumuladores/RepIndicadorDiarioDetalle.aspx
@@ -96,6 +96,8 @@
+
+
@@ -104,6 +106,8 @@
+
+
diff --git a/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb b/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb
index f06c03605..eb807a2e5 100644
--- a/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb
+++ b/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb
@@ -21,7 +21,6 @@ Partial Class Acumuladores_RepIndicadorDiarioDetalle
#Region " CARGA DATOS INICIALES "
-
Private Sub CargaParametrosDetalle()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb
index 5db431cb1..cdad985da 100644
--- a/App_Code/ClsCRM.vb
+++ b/App_Code/ClsCRM.vb
@@ -447,11 +447,11 @@ Public Class ClsCRM
.Add("@Correo", SqlDbType.VarChar).Value = Correo
.Add("@CveGiroClasificacion", SqlDbType.Int).Value = CveGiroClasificacion
- .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
+ .Add("@CveEmpresaCRM", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With
Try
SqlAdapter.Fill(Data)
- CveEmpresaCRM = SqlAdapter.SelectCommand.Parameters("@RETURN_VALUE").Value.ToString().ToEntero()
+ CveEmpresaCRM = SqlAdapter.SelectCommand.Parameters("@CveEmpresaCRM").Value.ToString().ToEntero()
Catch ex As Exception
OnError("Ocurrió un error al agregar la Empresa CRM.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
diff --git a/Bin/roslyn/csc.exe b/Bin/roslyn/csc.exe
index 7077f16a0..44c3c41df 100644
Binary files a/Bin/roslyn/csc.exe and b/Bin/roslyn/csc.exe differ
diff --git a/CRM/CatEmpresasCRM.aspx.cs b/CRM/CatEmpresasCRM.aspx.cs
index d7b7b4a1f..9001fb0c6 100644
--- a/CRM/CatEmpresasCRM.aspx.cs
+++ b/CRM/CatEmpresasCRM.aspx.cs
@@ -185,7 +185,7 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas
Archivo file = TxtExcel.getfiles().Archivos[0];
string Directorio = Server.MapPath("~") + file.path;
- DataTable dt = ReadExcelFile(Directorio + file.filename, true);
+ DataTable dt = ModExtensiones.ReadExcelFile(Directorio + file.filename, true);
DataRowCollection Rows = dt.Rows;
ICRMService cRMService = new CRMService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString);
RequestMedioCaptacion RequestMedioCaptacion = new RequestMedioCaptacion(UsuarioActual.CveEmpresa);
@@ -291,51 +291,51 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas
}
- private DataTable ReadExcelFile(string flatFilePath, bool firstRowHasHeaders)
- {
- SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet());
- ExcelFile excelFile = ExcelFile.Load(flatFilePath);
+ //private DataTable ReadExcelFile(string flatFilePath, bool firstRowHasHeaders)
+ //{
+ // SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet());
+ // ExcelFile excelFile = ExcelFile.Load(flatFilePath);
- int unnamed = 0;
- int cols;
- string[] columns;
- int curRow = 0;
- int curCol = 0;
- DataTable dataTable = new DataTable();
- ExcelWorksheet worksheet = excelFile.Worksheets[0];
+ // int unnamed = 0;
+ // int cols;
+ // string[] columns;
+ // int curRow = 0;
+ // int curCol = 0;
+ // DataTable dataTable = new DataTable();
+ // ExcelWorksheet worksheet = excelFile.Worksheets[0];
- for (cols = 0; cols <= worksheet.Rows[0].AllocatedCells.Count - 1; cols++)
- {
- if (firstRowHasHeaders)
- {
- if (worksheet.Rows[0].Cells[cols].Value != null)
- dataTable.Columns.Add(worksheet.Rows[0].Cells[cols].Value.ToString().Trim());
- else
- dataTable.Columns.Add("Unnamed Column " + (System.Threading.Interlocked.Increment(ref unnamed)));
+ // for (cols = 0; cols <= worksheet.Rows[0].AllocatedCells.Count - 1; cols++)
+ // {
+ // if (firstRowHasHeaders)
+ // {
+ // if (worksheet.Rows[0].Cells[cols].Value != null)
+ // dataTable.Columns.Add(worksheet.Rows[0].Cells[cols].Value.ToString().Trim());
+ // else
+ // dataTable.Columns.Add("Unnamed Column " + (System.Threading.Interlocked.Increment(ref unnamed)));
- curRow = 1;
- }
- else
- dataTable.Columns.Add("Column " + (cols + 1));
- }
+ // curRow = 1;
+ // }
+ // else
+ // dataTable.Columns.Add("Column " + (cols + 1));
+ // }
- while (curRow < worksheet.Rows.Count)
- {
- columns = new string[cols - 1 + 1];
+ // while (curRow < worksheet.Rows.Count)
+ // {
+ // columns = new string[cols - 1 + 1];
- for (curCol = 0; curCol <= cols - 1; curCol++)
- {
- if (worksheet.Rows[curRow].Cells[curCol].Value == null)
- columns[curCol] = "";
- else
- columns[curCol] = worksheet.Rows[curRow].Cells[curCol].Value.ToString();
- }
+ // for (curCol = 0; curCol <= cols - 1; curCol++)
+ // {
+ // if (worksheet.Rows[curRow].Cells[curCol].Value == null)
+ // columns[curCol] = "";
+ // else
+ // columns[curCol] = worksheet.Rows[curRow].Cells[curCol].Value.ToString();
+ // }
- dataTable.Rows.Add(columns);
- curRow += 1;
- }
+ // dataTable.Rows.Add(columns);
+ // curRow += 1;
+ // }
- return dataTable;
- }
+ // return dataTable;
+ //}
}
\ No newline at end of file
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb
index 5719ca0ec..fbdf9185a 100644
--- a/Inventarios/RecepcionAlmacen.aspx.vb
+++ b/Inventarios/RecepcionAlmacen.aspx.vb
@@ -841,10 +841,10 @@ Partial Class Inventarios_RecepcionAlmacen
If e.Row.DBCampo("TipoDocto").ToString.Contiene({"Fac"}) And e.Row.DBCampo("EstatusAlmacen").ToString.ToEntero = 0 Then
e.Row.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary input-sm"
- e.Row.FCLinkButton("BtnSurtir").Text = "
Recibir"
+ e.Row.FCLinkButton("BtnSurtir").Text = "
Recibir"
Else
e.Row.FCLinkButton("BtnSurtir").CssClass = "btn yellow-gold input-sm"
- e.Row.FCLinkButton("BtnSurtir").Text = " Devolver
"
+ e.Row.FCLinkButton("BtnSurtir").Text = " Devolver
"
End If
If UsuarioActual.TienePermisoProceso(201) Then
@@ -1773,6 +1773,8 @@ Partial Class Inventarios_RecepcionAlmacen
Dim DtSeriesNuevas As New DataTable
DtSeriesNuevas.Columns.Add("Serie", GetType(String))
+ 'If CvePSS > 0 And CvePSSerie = 0 Then CvePSSerie = CvePSS
+
'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimero("", "PS")
@@ -1812,48 +1814,52 @@ Partial Class Inventarios_RecepcionAlmacen
Dim Index = 0
For Each Serie In SeriesArreglo
- Dim Row = DtDatosDetalle.NewRow
+ If Serie <> "" Then
- Index = Index + 1
- If Index > LbCantidad.Text.ToEntero Then
- Exit For
- End If
- 'VALIDA QUE SIGA AGREGANDO
- If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
- Exit For
- End If
+ Dim Row = DtDatosDetalle.NewRow
- 'VERIFICA EXISTENCIAS
- If TipoMovimiento > 1 Then
- Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
- If Existencia < 1 Then
- MensajeSinExistencias.Append($"Serie:
{Serie}.
")
- Continue For
+ Index = Index + 1
+ If Index > LbCantidad.Text.ToEntero Then
+ Exit For
End If
- If TipoMovimiento = 2 Then
- If DtExistencias.SUM("Existencia", $"Serie = '{Serie}'") = 0 Then
+ 'VALIDA QUE SIGA AGREGANDO
+ If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
+ Exit For
+ End If
+
+ 'VERIFICA EXISTENCIAS
+ If TipoMovimiento > 1 Then
+ Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
+ If Existencia < 1 Then
MensajeSinExistencias.Append($"Serie:
{Serie}.
")
Continue For
End If
+
+ If TipoMovimiento = 2 Then
+ If DtExistencias.SUM("Existencia", $"Serie = '{Serie}'") = 0 Then
+ MensajeSinExistencias.Append($"Serie:
{Serie}.
")
+ Continue For
+ End If
+ End If
End If
+
+ 'Dim AplicaCaducidad = False
+ 'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
+ ' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
+ 'End If
+
+ Row("ConsecId") = CveConsecSerie
+ Row("Consec") = DtDatosDetalle.Rows.Count + 1
+ Row("CvePS") = CvePSSerie
+ Row("CveUM") = CveUMSerie
+ Row("PU") = PUSerie
+ Row("Serie") = Serie
+ Row("FechaCaducidad") = MinFecha.ToShortDateString
+
+ DtDatosDetalle.Rows.Add(Row)
End If
-
- 'Dim AplicaCaducidad = False
- 'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
- ' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
- 'End If
-
- Row("ConsecId") = CveConsecSerie
- Row("Consec") = DtDatosDetalle.Rows.Count + 1
- Row("CvePS") = CvePSSerie
- Row("CveUM") = CveUMSerie
- Row("PU") = PUSerie
- Row("Serie") = Serie
- Row("FechaCaducidad") = MinFecha.ToShortDateString
-
- DtDatosDetalle.Rows.Add(Row)
Next
ObjInventarios.Dispose()
@@ -4841,14 +4847,6 @@ Partial Class Inventarios_RecepcionAlmacen
Alert("El nombre de la cuarta columna debe ser 'Serie'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
- 'If Not dt.Columns(4).ColumnName = "Lote" Then
- ' Alert("El nombre de la cuarta columna debe ser 'Lote'. Favor de corregirlo", TipoMensaje.MsgError)
- ' Exit Sub
- 'End If
- 'If Not dt.Columns(5).ColumnName = "FechaCaducidad" Then
- ' Alert("El nombre de la cuarta columna debe ser 'Fecha Caducidad'. Favor de corregirlo", TipoMensaje.MsgError)
- ' Exit Sub
- 'End If
dt.TableName = "Datos"
@@ -4871,12 +4869,15 @@ Partial Class Inventarios_RecepcionAlmacen
Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
Dim CveUnidadMedida As Integer = RowPS("CveUM").ToString().ToEntero()
+ CvePSSerie = CveProducto
+ CveConsecSerie = DtInv.FiltroPrimeroValor("Consec", "CvePS=" & CvePSSerie).ToEntero
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
Dim Serie As String = RowExcel("Serie").ToString()
Dim Lote As String = "" '= RowExcel("Lote").ToString()
Dim FechaCaducidad As Date = MinFecha '= If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
Dim Observaciones As String = "" '= If(dt.Columns.Contains("Observaciones"), RowExcel("Observaciones").ToString, "").ToString
+ LbCantidad.Text = Cantidad.ToString
Dim Valido As Boolean = True
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index 93b8d5dc5..b79f29538 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -855,6 +855,16 @@ Partial Class Inventarios_TraspasoAlmacen
If ChkTransitorio.Checked Then DivResponsable.Visible = True : DivTransitorio2.Visible = True
Exit Sub
End If
+
+ ''validaciones de carta porte en productos
+ If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
+ ' Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
+ 'If Not ValidaPSSAT(DrPS) Then
+ ' Exit Sub
+ 'End If
+ End If
+
+
End If
Dim DrAlmO, DrAlmD As DataRow
@@ -1729,6 +1739,7 @@ Partial Class Inventarios_TraspasoAlmacen
DivTransitorio2.Visible = True
If UsuarioActual.CveEmpresa.Contiene(119, 140) Then
ChkEmitirTimbrado.Checked = True
+ ChkEmitirCartaPorte.Checked = True
End If
Else
RegistraScript(" $('#DivGastoIndirecto').hide(500);")
@@ -1736,6 +1747,7 @@ Partial Class Inventarios_TraspasoAlmacen
DivTransitorio2.Visible = True
DivEmitirTransitorio.Visible = False
ChkEmitirTimbrado.Checked = False
+ ChkEmitirCartaPorte.Checked = True
End If
UpEmitirTransitorio.Update()
CargaAlmacenDestino()
@@ -3145,7 +3157,7 @@ Partial Class Inventarios_TraspasoAlmacen
Protected Sub ChkEmitirTimbrado_CheckedChanged(sender As Object, e As EventArgs)
If ChkEmitirTimbrado.Checked Then
- ChkEmitirCartaPorte.Checked = False
+ ChkEmitirCartaPorte.Checked = True
ChkEmitirCartaPorte.Visible = True
Else
ChkEmitirCartaPorte.Visible = False
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index d5e3c7e8b..3db0a9422 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -619,7 +619,7 @@
| Factura: |
-
+
@@ -679,7 +679,7 @@
|
-
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 368aaca72..768786cfd 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -5537,7 +5537,7 @@ Partial Class Ventas
dr("CvePS").ToString().ToEntero(), dr("PS").ToString(), dr("Obs").ToString(), dr("PU").ToString().ToDecimal, dr("Descuento").ToString().ToDecimal,
dr("CveProyecto").ToString().ToEntero(), dr("Proyecto").ToString(), dr("CveSubProyecto").ToString().ToEntero(), dr("SubProyecto").ToString(),
CveContratoDetalle:=dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=dr("CveVentaDetalleCotizacion").ToString().ToEntero(),
- CveVentaDetalle:=dr("CveVentaDetalle").ToString().ToEntero(), RegeneraIEPS:=False, SeActualiza:=True)
+ CveVentaDetalle:=dr("CveVentaDetalle").ToString().ToEntero(), RegeneraIEPS:=True, SeActualiza:=True)
Next
@@ -7187,7 +7187,7 @@ Partial Class Ventas
If ObjClientes.GetVenta(pCveVenta, UsuarioActual.CveEmpresa) AndAlso ObjClientes.DtResultados.Rows.Count > 0 Then
DTFacNC = ObjClientes.DtResultados
Dim drvv As DataRow = DTFacNC.FiltroPrimero("")
- DTFacNC.Columns.Add("Factura", GetType(String), " Folio + ' - ' + Fecha + ' $' + Total")
+ DTFacNC.Columns.Add("Factura", GetType(String), " Folio + ' - ' +' $' + Total + ' - ' + Fecha ")
HdnFolioFiscalNC.Value = drvv("FolioFiscal").ToString()
If DTFacNC IsNot Nothing AndAlso DTFacNC.Rows.Count > 0 Then
@@ -17872,7 +17872,7 @@ Partial Class Ventas
Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Not Me.ObjFacturaNC.VentaDesglosaIEPS))
If Not ClienteDesglosaIEPS Then
- If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
+ If RegeneraIEPS AndAlso FacturaDesglosoIEPS Then
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
VentaDesglosaIEPS = True
End If
| |