This commit is contained in:
rakcsle
2022-02-22 17:50:00 -07:00
11 changed files with 110 additions and 93 deletions

1
.gitignore vendored
View File

@@ -279,3 +279,4 @@ __pycache__/
vwd.webinfo
/Bin.rar
/Ashx/sigfox.ashx
/BinOLD

View File

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

View File

@@ -96,6 +96,8 @@
<asp:ListItem Text="ACUM. DIST. CONT." Value="2"></asp:ListItem>
<asp:ListItem Text="ACUM. DIST. CRED." Value="3"></asp:ListItem>
<asp:ListItem Text="DEV. DE ACUM." Value="4"></asp:ListItem>
<asp:ListItem Text="TOTAL ACUM." Value="5"></asp:ListItem>
<asp:ListItem Text="GARANTIAS." Value="6"></asp:ListItem>
<asp:ListItem Text="FILTROS." Value="7"></asp:ListItem>
<asp:ListItem Text="FILTROS CRED" Value="8"></asp:ListItem>
<asp:ListItem Text="DEV. DE FILTROS" Value="9"></asp:ListItem>
@@ -104,6 +106,8 @@
<asp:ListItem Text="ACEITES CRED." Value="12"></asp:ListItem>
<asp:ListItem Text="DEV ACEITES" Value="13"></asp:ListItem>
<asp:ListItem Text="TOTAL ACEITES" Value="14"></asp:ListItem>
<asp:ListItem Text="TOTAL VARIOS" Value="15"></asp:ListItem>
<asp:ListItem Text="TOTAL" Value="16"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate">

View File

@@ -21,7 +21,6 @@ Partial Class Acumuladores_RepIndicadorDiarioDetalle
#Region " CARGA DATOS INICIALES "
Private Sub CargaParametrosDetalle()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)

View File

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

Binary file not shown.

View File

@@ -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;
//}
}

View File

@@ -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 = "<i class='fa fa-arrow-left' > Recibir</i>"
e.Row.FCLinkButton("BtnSurtir").Text = "<i class='fa fa-arrow-left'></i> Recibir"
Else
e.Row.FCLinkButton("BtnSurtir").CssClass = "btn yellow-gold input-sm"
e.Row.FCLinkButton("BtnSurtir").Text = " Devolver <i class='fa fa-arrow-right' ></i>"
e.Row.FCLinkButton("BtnSurtir").Text = " Devolver <i class='fa fa-arrow-right'></i>"
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: <b>{Serie}</b>. <br/>")
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: <b>{Serie}</b>. <br/>")
Continue For
End If
If TipoMovimiento = 2 Then
If DtExistencias.SUM("Existencia", $"Serie = '{Serie}'") = 0 Then
MensajeSinExistencias.Append($"Serie: <b>{Serie}</b>. <br/>")
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

View File

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

View File

@@ -619,7 +619,7 @@
<tr align="left" runat="server" id="trNCFactura" visible="false">
<td><b>Factura:</b></td>
<td>
<asp:DropDownList ID="DdlNCFactura" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Factura" DataValueField="CveVenta" Width="100%">
<asp:DropDownList ID="DdlNCFactura" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Factura" DataValueField="CveVenta" Width="200px">
</asp:DropDownList>
<asp:Label ID="LblSerieFolioPadre" runat="server" Visible="false"></asp:Label>
<asp:HiddenField ID="HdnFolioFiscalNC" runat="server" />
@@ -679,7 +679,7 @@
<td>
<asp:UpdatePanel ID="UPPVentas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="200px">
<asp:ListItem Selected="true" Text="Sin asignar" Value="0"></asp:ListItem>
</asp:DropDownList>
</ContentTemplate>

View File

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