se agregaron 2 campos en el DTO2096RptFacturasPagadas y en RptAmazonFacturasPagadas se agregaron esos campos en la tablay los iconos de buscar y exel.

RptConsolidadosSinPagar
Luis Rendon 8 months ago
parent 195449562c
commit 693fcb91af
  1. 4
      src/Components/Clientes/Amazon/DTO/DTO2096RptFacturasPagadas.ts
  2. 97
      src/Components/Clientes/Amazon/Reportes/FacturasPagadas/RptAmazonFacturasPagadas.tsx
  3. 5
      src/Components/Reportes/RptContsFacturasFraccion.tsx

@ -1,4 +1,5 @@
export default interface DTO2096RptFacturasPagadas {
numeroFactura: string,
factura: string,
pedimento: string,
fechaPago: string,
@ -7,5 +8,6 @@ export default interface DTO2096RptFacturasPagadas {
valorDolares: string,
valorAduana: string,
razonSocial: string,
aduana: string
aduana: string,
piezas: string
}

@ -23,6 +23,7 @@ import {
import { MsgInformativo } from '../../../../Utils/Toast/msgInformativo'
import { AiFillFileExcel } from 'react-icons/ai'
import { IconContext } from 'react-icons'
import { BsSearch, BsFileEarmarkExcel } from 'react-icons/bs'
import { BsChevronDown, BsChevronRight, BsFilePdfFill } from 'react-icons/bs'
import { FaAmazon } from 'react-icons/fa'
import loadingImg from '../../../../../images/ajaxloader.gif'
@ -60,58 +61,82 @@ export default function RptAmazonFacturasPagadas(
const msgColor = 'primary'
const columnsConcepts = [
{
name: 'Factura',
width: '350px',
// name: <div style={{ textAlign: 'center' }}>Numero Factura</div>,
name: 'Numero Factura',
with: '10px',
selector: (row: DTO2096RptFacturasPagadas) => row.numeroFactura,
sortable: true
},
{
name: <div style={{ textAlign: 'center' }}>Factura</div>,
width: '300px',
selector: (row: DTO2096RptFacturasPagadas) => row.factura,
sortable: true
},
{
name: 'Pedimento',
name: <div style={{ textAlign: 'center' }}>Pedimento</div>,
width: '120px',
selector: (row: DTO2096RptFacturasPagadas) => row.pedimento,
sortable: true
},
{
name: 'Fecha pago',
name: <div style={{ textAlign: 'center' }}>Fecha Pago</div>,
width: '120px',
selector: (row: DTO2096RptFacturasPagadas) => row.fechaPago.substring(0,10),
selector: (row: DTO2096RptFacturasPagadas) =>
row.fechaPago.substring(0, 10),
sortable: true
},
{
name: 'Clave',
name: <div style={{ textAlign: 'center' }}>Clave</div>,
width: '80px',
selector: (row: DTO2096RptFacturasPagadas) => row.clave,
sortable: true
},
{
name: 'Tipo Op',
name: <div style={{ textAlign: 'center' }}>Tipo Operacion</div>,
width: '120px',
selector: (row: DTO2096RptFacturasPagadas) => row.tipoOp,
sortable: true
},
{
name: 'Valor Dolares',
name: <div style={{ textAlign: 'center' }}>Valor Dolares</div>,
width: '130px',
selector: (row: DTO2096RptFacturasPagadas) => row.valorDolares,
sortable: true
},
{
name: 'Valor Aduana',
name: <div style={{ textAlign: 'center' }}>Valor Aduana </div>,
width: '130px',
selector: (row: DTO2096RptFacturasPagadas) => row.valorAduana,
sortable: true
},
{
name: 'Razon Social',
name: <div style={{ textAlign: 'center' }}>Razon Social</div>,
width: '350px',
selector: (row: DTO2096RptFacturasPagadas) => row.razonSocial,
sortable: true
},
{
name: 'Aduana',
width: '550px',
name: <div style={{ textAlign: 'center' }}>Aduana</div>,
width: '100px',
selector: (row: DTO2096RptFacturasPagadas) => row.aduana,
sortable: false
},
{
name: <div style={{ textAlign: 'center' }}>Piezas</div>,
width: '100px',
selector: (row: DTO2096RptFacturasPagadas) => row.piezas,
sortable: false
}
]
@ -137,9 +162,13 @@ export default function RptAmazonFacturasPagadas(
exportExcel(Data, 'Reporte de facturas pagadas de Amazon')
}
function exportExcel(jsonData: DTO2096RptFacturasPagadas[], fileName: string): void {
function exportExcel(
jsonData: DTO2096RptFacturasPagadas[],
fileName: string
): void {
let Heading = [
[
'Numero Factura',
'Factura',
'Pedimento',
'Fecha Pago',
@ -148,11 +177,13 @@ export default function RptAmazonFacturasPagadas(
'Valor Dolares',
'Valor Aduana',
'Razon Social',
'Aduana'
'Aduana',
'Piezas'
]
]
const dataOnly = jsonData.map(
({
numeroFactura,
factura,
pedimento,
fechaPago,
@ -161,9 +192,11 @@ export default function RptAmazonFacturasPagadas(
valorDolares,
valorAduana,
razonSocial,
aduana
aduana,
piezas
}) => {
return {
numeroFactura,
factura,
pedimento,
fechaPago,
@ -172,12 +205,14 @@ export default function RptAmazonFacturasPagadas(
valorDolares,
valorAduana,
razonSocial,
aduana
aduana,
piezas
}
}
)
const Report = dataOnly.map(
({
numeroFactura,
factura,
pedimento,
fechaPago,
@ -186,9 +221,11 @@ export default function RptAmazonFacturasPagadas(
valorDolares,
valorAduana,
razonSocial,
aduana
aduana,
piezas
}) => {
return {
numeroFactura,
factura,
pedimento,
fechaPago,
@ -197,7 +234,8 @@ export default function RptAmazonFacturasPagadas(
valorDolares,
valorAduana,
razonSocial,
aduana
aduana,
piezas
}
}
)
@ -215,7 +253,6 @@ export default function RptAmazonFacturasPagadas(
}
}
useEffect(() => {
loadReport()
}, [])
@ -233,7 +270,20 @@ export default function RptAmazonFacturasPagadas(
Facturas Pagadas
</Card.Title>
</Col>
<Col><Button variant="success" onClick={()=>{downloadExcel()}}>Excel</Button></Col>
<Col>
<Col style={{ textAlign: 'center' }}>
<Button
variant="success"
onClick={() => {
downloadExcel()
}}
>
<BsFileEarmarkExcel />
Excel
</Button>
</Col>
</Col>
<Col style={{ textAlign: 'right' }}>Desde</Col>
<Col xs={1}>
<Form.Control
@ -267,7 +317,12 @@ export default function RptAmazonFacturasPagadas(
loadReport()
}}
>
<Button variant="primary">Buscar</Button>
{/* <div className="col-md-3 d-flex aling-items-center"> */}
<Button variant="primary">
Buscar <BsSearch />
</Button>
{/* </div> */}
</Col>
</Row>
</Card.Body>

@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react'
//boostrap componentes
import { Button, Card, Form } from 'react-bootstrap'
import { BsSearch, BsFileEarmarkExcel } from 'react-icons/bs'
//interfaces
@ -238,7 +239,7 @@ export default function RptPFacturasFraccion() {
generaReporte()
}}
>
Buscar
Buscar <BsSearch />
</Button>
</div>
@ -263,7 +264,7 @@ export default function RptPFacturasFraccion() {
downloadExcel()
}}
>
Excel
Excel <BsFileEarmarkExcel />
</Button>
</div>
</div>

Loading…
Cancel
Save