Se le agregan columnas al reporte de Amazon Operaciones pagadas

AmazonRelease1.1
unknown 2 years ago
parent 3ad6abda5c
commit fb1a79ae3f
  1. 2
      .env.development
  2. 2
      .env.production
  3. 2
      .env.qa
  4. 8
      package.json
  5. 25
      src/Components/Clientes/Amazon/DTO/DTO2096RptPayedOperations.ts
  6. 87
      src/Components/Clientes/Amazon/Reportes/Payed/RptAmazonPayedOperations.tsx
  7. 17
      src/Components/Clientes/Amazon/Reportes/Traffic/Pending/RtpAmazonPendingTraficInvoice.tsx
  8. 5
      src/Components/Clientes/Amazon/Services/Amazon.Services.ts
  9. 11
      src/Constants/TargetURL.ts
  10. 60
      src/css/development-home.css
  11. 2
      src/css/home.css
  12. 60
      src/css/production-home.css
  13. 60
      src/css/qa-home.css
  14. BIN
      src/images/QA.png
  15. 6
      src/index.tsx
  16. 13
      yarn.lock

@ -0,0 +1,2 @@
REACT_APP_ENVIRONMENT=development
REACT_APP_API=https://localhost:5001/api

@ -0,0 +1,2 @@
REACT_APP_ENVIRONMENT=production
REACT_APP_API=https://www.gemcousa.mx/GEMCOBackend/api

@ -0,0 +1,2 @@
REACT_APP_ENVIRONMENT=qa
REACT_APP_API=https://www.gemcousa.solutions/GEMCOBackend/api

@ -21,6 +21,7 @@
"bootstrap": "^5.1.3",
"btoa": "^1.2.1",
"custom-item-select": "^1.2.3",
"env-cmd": "^10.1.0",
"file-saver": "^2.0.5",
"formik": "^2.2.9",
"jwt-decode": "^3.1.2",
@ -59,8 +60,11 @@
"yup": "^0.32.11"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"start-dev": "env-cmd -f .env.development react-scripts start",
"start-qa": "env-cmd -f .env.qa react-scripts start",
"start-prod": "env-cmd -f .env.production react-scripts start",
"build-qa": "env-cmd -f .env.qa react-scripts build",
"build-prod": "env-cmd -f .env.production react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},

@ -0,0 +1,25 @@
export default interface DTO2096RptPayedOperations {
id: number
referencia: string
commercialInvoiceDate: string
invoiceNumber: string
name: string
trailerNumber: string
trailerId: string
porOfLoading: string
portOfEntry: string
paymentsTerms: string
incoterms: string
hawb: string
totalInvoiceQuantityUnitOfMeasure: string
totalInvoiceQuantity: number
totalInvoiceWeightUnitOfMeasure: string
totalInvoiceWeight: string
totalInvoiceValueChargeOrAllowance: string
totalInvoiceValueCurrencyISOCode: string
totalInvoiceValueMonetaryAmount: string,
fPago: string,
patente: string,
aduana: string,
pedimento: string
}

@ -27,6 +27,7 @@ import { BsChevronDown, BsChevronRight, BsFilePdfFill } from 'react-icons/bs'
import { FaAmazon } from 'react-icons/fa'
import loadingImg from '../../../../../images/ajaxloader.gif'
import { MFileManager } from '../../../../Utils/MFileManager/MFileManager'
import DTO2096RptPayedOperations from '../../DTO/DTO2096RptPayedOperations'
export interface IRptAmazonPayedOpereationsProps {}
@ -39,6 +40,9 @@ export default function RptAmazonPayedOpereations(
)
const [header, setHeader] = useState('')
const [Referencia, setReferencia] = useState('')
const [Inicio, setInicio] = useState(currentDate())
const [Fin, setFin] = useState(currentDate())
const [Data, setData] = useState<DTO2096RptPayedOperations[]>([])
const [show, setShowMsg] = useState(false)
const [ShowModal, setShowModal] = useState(false)
const [WaitingDialog, setWaitingDialog] = useState(false)
@ -50,11 +54,21 @@ export default function RptAmazonPayedOpereations(
const [Invoices, setInvoices] = useState<number[]>([])
const msgColor = 'primary'
function currentDate(): string {
var today = new Date()
var dd = String(today.getDate()).padStart(2, '0')
var mm = String(today.getMonth() + 1).padStart(2, '0') //January is 0!
var yyyy = today.getFullYear()
return yyyy + '-' + mm + '-' + dd
}
const loadReport = () => {
DSAmazon.AmazonPayedOperationsGET()
DSAmazon.AmazonPayedOperationsGET(Inicio, Fin)
.then((response) => {
dispatch(initializeInvoice([]))
dispatch(populateInvoices(response.data))
console.log(response.data)
setData(response.data)
/* dispatch(initializeInvoice([]))
dispatch(populateInvoices(response.data)) */
})
.catch((e: Error) => {
alert('Ocurrio un error' + e.message.toString())
@ -129,7 +143,6 @@ export default function RptAmazonPayedOpereations(
}
const downloadNoPartes = (id: number, Factura: string) => {
// setWaitingDialog(true)
DSAmazon.NoPartesAmazon2SIRGET(id)
.then((response: any) => {
if (response.status === 200) {
@ -170,8 +183,35 @@ export default function RptAmazonPayedOpereations(
Operaciones Pagadas
</Card.Title>
</Col>
<Col xs={6}></Col>
<Col></Col>
<Col style={{textAlign:'right'}}>Desde</Col>
<Col xs={1}>
<Form.Control
defaultValue={Inicio}
type="date"
name="Inicio"
placeholder="Inicio"
title="Inicio"
alt="Inicio"
data-date-format="YYYY-mm-dd"
onChange={(e) => setInicio(e.target.value)}
size="sm"
/>
</Col>
<Col style={{textAlign:'right'}}>Hasta</Col>
<Col xs={1}>
<Form.Control
defaultValue={Fin}
type="date"
name="Fin"
placeholder="Fin"
title="Fin"
alt="Fin"
onChange={(e) => setFin(e.target.value)}
size="sm"
/>
</Col>
<Col style={{textAlign:'right'}} onClick={()=>{loadReport()}}><Button variant="primary">Buscar</Button></Col>
</Row>
</Card.Body>
</Card>
@ -200,21 +240,20 @@ export default function RptAmazonPayedOpereations(
<th>Tot Charge or allowance</th>
<th>Tot currency ISO code</th>
<th>Tot Monetary amount</th>
<th>Total de partidas</th>
<th>Fecha pago</th>
<th>Patente</th>
<th>Aduana</th>
<th>Pedimento</th>
</tr>
</thead>
<tbody>
{mInvoices
? mInvoices.map((MasterData) => {
{Data
? Data.map((MasterData) => {
return (
<>
<tr
style={{ cursor: 'pointer', height: '25px' }}
className={
MasterData.max === true
? 'masterSelected'
: 'normalSelected'
}
className={'normalSelected'}
>
<td
style={{
@ -364,17 +403,17 @@ export default function RptAmazonPayedOpereations(
<td style={{ textAlign: 'center' }}>
{MasterData.totalInvoiceValueMonetaryAmount}
</td>
<td
style={{
fontWeight: 'bold',
textAlign: 'center'
}}
>
{mInvoices
.filter((value) => value.id === MasterData.id)
.map((row) => {
return row.detail.length
})}
<td style={{ textAlign: 'center' }}>
{MasterData.fPago.substring(0,10)}
</td>
<td style={{ textAlign: 'center', width:'100px' }}>
{MasterData.patente}
</td>
<td style={{ textAlign: 'center', width:'60px' }}>
{MasterData.aduana}
</td>
<td style={{ textAlign: 'center', width:'100px' }}>
{MasterData.pedimento}
</td>
</tr>
</>

@ -90,6 +90,13 @@ export default function RptAmazonPendingTraficInvoice(
})
}
function getReceiver(Cadena: string, char1: string[1], char2: string[1]) {
return Cadena.slice(
Cadena.indexOf(char1) + 1,
Cadena.lastIndexOf(char2),
);
}
return (
<div>
<Card>
@ -123,7 +130,7 @@ export default function RptAmazonPendingTraficInvoice(
<th style={{ width: '50px' }}></th>
<th style={{ width: '80px' }}>Commercial Invoice Date</th>
<th style={{ width: '150px' }}>Invoice Number</th>
<th style={{ width: '50px' }}>Name</th>
<th style={{ width: '50px' }}>Receiver</th>
<th style={{ width: '100px' }}>Incoterms</th>
<th>Qty Unit of measure</th>
<th>Tot Qty</th>
@ -195,8 +202,12 @@ export default function RptAmazonPendingTraficInvoice(
<td style={{ width: '150px' }}>
{MasterData.invoiceNumber}
</td>
<td style={{ width: '50px', textAlign: 'center' }}>
{MasterData.name}
<td style={{ width: '100px', textAlign: 'center', fontWeight: 'bold', fontSize: '13px' }}>
{mInvoices
.filter((value) => value.id === MasterData.id)
.map((row) => {
return getReceiver(row.detail[0].amazonShipmentReferenceId,'_','_')
})}
</td>
<td style={{ width: '100px', textAlign: 'center' }}>
{MasterData.incoterms}

@ -16,6 +16,7 @@ import DTO2096NoParte from '../DTO/DTO2096NoParte'
import I2096NoParteLog from '../Interfaces/I2096NoParteLog'
import DTO2096TraficoFieldsUpdate from '../DTO/DTO2096TraficoFieldsUpdate'
import DTO2096RELParteFactura from '../DTO/DTO2096RELParteFactura'
import DTO2096RptPayedOperations from '../DTO/DTO2096RptPayedOperations'
class AmazonDataService {
AmazonPendingClasificationInvoiceGET() {
@ -67,8 +68,8 @@ class AmazonDataService {
}
AmazonPayedOperationsGET() {
return http.get<I2096Headers[]>(`/AmazonInvoice/AmazonPayedOperationsGET`)
AmazonPayedOperationsGET(Inicio: string, Fin: string) {
return http.get<DTO2096RptPayedOperations[]>(`/AmazonInvoice/AmazonPayedOperationsGET?Inicio=${Inicio}&Fin=${Fin}`)
}
RELParteFacturasGET(id: number) {

@ -1,10 +1,11 @@
export class TargetURL {
get() {
return !process.env.NODE_ENV || process.env.NODE_ENV === 'development'
? //'https://gemcousa.solutions/GEMCOBackend/api'
/* return !process.env.NODE_ENV || process.env.NODE_ENV === 'development'
? 'https://gemcousa.solutions/GEMCOBackend/api'
'https://localhost:5001/api'
: //: "http://reportes.gemcousa.com:5000/api";
// 'https://www.gemcousa.mx/GEMCOBackend/api'
'https://gemcousa.solutions/GEMCOBackend/api'
: "http://reportes.gemcousa.com:5000/api";
'https://www.gemcousa.mx/GEMCOBackend/api'
'https://gemcousa.solutions/GEMCOBackend/api' */
return process.env.REACT_APP_API
}
}

@ -0,0 +1,60 @@
/*** FONDO PARA SITIO WEB ***/
body {
background-image: linear-gradient(to right, #F7FFF1, #EFFFE2, #EFFFE2, white, white, white, #EFFFE2, #EFFFE2, #F7FFF1);
}
/*** COLOR DE TEXTO PARA ETIQUETAS EN FORMS, ENCABEZADOS DE FORMS Y BOTON DE ACCORDIONS ***/
#login-box h3, .navbar-nav a.dropdown-item:hover, .form-group .label, .form-group label {
color: #0a58ca !important;
}
/*** DISEÑO PARA FORM DEL LOGIN ***/
#login-box {
margin: 0 auto;
border-radius: 15px !important;
border: none;
}
/*** ACOMODO SUPERIOR PARA LOS DIV.CONTAINER'S EN SITIO WEB ***/
div.App > div.container {
margin-top: 30px !important;
}
/*** ESTILOS PARA LA BARRA DEL MENU ***/
.custom-theme {
background-image: linear-gradient(to bottom, #4a9d06,#5cb90f,#7fda35) !important;
color: white;
}
.navbar-brand, .navbar-nav .dropdown-toggle.nav-link, .navbar-collapse .btn-outline-success, #basic-navbar-nav a.nav-link, .navbar-toggler-icon {
color: white;
}
/* .dropdown-toggle2 {
color: black !important;
background-color: #c8ced3 !important;
} */
#secondlevel {
color: black !important;
padding: 0.25rem 1rem;
/* background-color: #c8ced3 !important; */
}
/* #secondlevel a:link { color: #000000 !important; }
#secondlevel a:visited { color: #000000 !important; }
#secondlevel a:hover { color: #000000 !important; }
#secondlevel a:active { color: #000000 !important; } */
/*** ESTILO DE LETRA PARA ELEMENTOS DE ACCORDION ***/
.accordion-button.collapsed {
background-image: linear-gradient(to bottom, #c7c7c7, #c7c7c7, #e9e9e9, #f3f3f3) !important;
}
.accordion-button:not(.collapsed) {
background-image: linear-gradient(to bottom, #8fcafd, #bedaff, #e5eefb);
font-size: 13pt;
}
@media all and (min-width: 480px) {
#login-box {
border: 3px outset #ddd !important;
}
}

@ -1,6 +1,6 @@
/*** FONDO PARA SITIO WEB ***/
body {
background-image: linear-gradient(to right, rgb(215,215,215), rgb(245,245,245), rgb(245,245,245), white, white, white, rgb(245,245,245), rgb(245,245,245), rgb(215,215,215)) !important;
background-image: linear-gradient(to right, rgb(215,215,215), rgb(245,245,245), rgb(245,245,245), white, white, white, rgb(245,245,245), rgb(245,245,245), rgb(215,215,215));
}
/*** COLOR DE TEXTO PARA ETIQUETAS EN FORMS, ENCABEZADOS DE FORMS Y BOTON DE ACCORDIONS ***/

@ -0,0 +1,60 @@
/*** FONDO PARA SITIO WEB ***/
body {
background-image: linear-gradient(to right, rgb(215,215,215), rgb(245,245,245), rgb(245,245,245), white, white, white, rgb(245,245,245), rgb(245,245,245), rgb(215,215,215));
}
/*** COLOR DE TEXTO PARA ETIQUETAS EN FORMS, ENCABEZADOS DE FORMS Y BOTON DE ACCORDIONS ***/
#login-box h3, .navbar-nav a.dropdown-item:hover, .form-group .label, .form-group label {
color: #0a58ca !important;
}
/*** DISEÑO PARA FORM DEL LOGIN ***/
#login-box {
margin: 0 auto;
border-radius: 15px !important;
border: none;
}
/*** ACOMODO SUPERIOR PARA LOS DIV.CONTAINER'S EN SITIO WEB ***/
div.App > div.container {
margin-top: 30px !important;
}
/*** ESTILOS PARA LA BARRA DEL MENU ***/
.custom-theme {
background-image: linear-gradient(to bottom, rgb(0, 75, 187),rgb(0, 113, 219),rgb(64, 150, 248)) !important;
color: white;
}
.navbar-brand, .navbar-nav .dropdown-toggle.nav-link, .navbar-collapse .btn-outline-success, #basic-navbar-nav a.nav-link, .navbar-toggler-icon {
color: white;
}
/* .dropdown-toggle2 {
color: black !important;
background-color: #c8ced3 !important;
} */
#secondlevel {
color: black !important;
padding: 0.25rem 1rem;
/* background-color: #c8ced3 !important; */
}
/* #secondlevel a:link { color: #000000 !important; }
#secondlevel a:visited { color: #000000 !important; }
#secondlevel a:hover { color: #000000 !important; }
#secondlevel a:active { color: #000000 !important; } */
/*** ESTILO DE LETRA PARA ELEMENTOS DE ACCORDION ***/
.accordion-button.collapsed {
background-image: linear-gradient(to bottom, #c7c7c7, #c7c7c7, #e9e9e9, #f3f3f3) !important;
}
.accordion-button:not(.collapsed) {
background-image: linear-gradient(to bottom, #8fcafd, #bedaff, #e5eefb);
font-size: 13pt;
}
@media all and (min-width: 480px) {
#login-box {
border: 3px outset #ddd !important;
}
}

@ -0,0 +1,60 @@
/*** FONDO PARA SITIO WEB ***/
body {
background-image: url("../images/QA.png"), linear-gradient(to right, #FFFEE2, #FFFED5, #FFFED5, white, white, white, #FFFED5, #FFFED5, #FFFEE2);
}
/*** COLOR DE TEXTO PARA ETIQUETAS EN FORMS, ENCABEZADOS DE FORMS Y BOTON DE ACCORDIONS ***/
#login-box h3, .navbar-nav a.dropdown-item:hover, .form-group .label, .form-group label {
color: #0a58ca !important;
}
/*** DISEÑO PARA FORM DEL LOGIN ***/
#login-box {
margin: 0 auto;
border-radius: 15px !important;
border: none;
}
/*** ACOMODO SUPERIOR PARA LOS DIV.CONTAINER'S EN SITIO WEB ***/
div.App > div.container {
margin-top: 30px !important;
}
/*** ESTILOS PARA LA BARRA DEL MENU ***/
.custom-theme {
background-image: linear-gradient(to bottom, #da6907,#cf7d34,#f0a35f) !important;
color: white;
}
.navbar-brand, .navbar-nav .dropdown-toggle.nav-link, .navbar-collapse .btn-outline-success, #basic-navbar-nav a.nav-link, .navbar-toggler-icon {
color: white;
}
/* .dropdown-toggle2 {
color: black !important;
background-color: #c8ced3 !important;
} */
#secondlevel {
color: black !important;
padding: 0.25rem 1rem;
/* background-color: #c8ced3 !important; */
}
/* #secondlevel a:link { color: #000000 !important; }
#secondlevel a:visited { color: #000000 !important; }
#secondlevel a:hover { color: #000000 !important; }
#secondlevel a:active { color: #000000 !important; } */
/*** ESTILO DE LETRA PARA ELEMENTOS DE ACCORDION ***/
.accordion-button.collapsed {
background-image: linear-gradient(to bottom, #c7c7c7, #c7c7c7, #e9e9e9, #f3f3f3) !important;
}
.accordion-button:not(.collapsed) {
background-image: linear-gradient(to bottom, #8fcafd, #bedaff, #e5eefb);
font-size: 13pt;
}
@media all and (min-width: 480px) {
#login-box {
border: 3px outset #ddd !important;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@ -1,6 +1,7 @@
import React from 'react'
import React, { useEffect } from 'react'
import ReactDOM from 'react-dom'
import './css/home.css'
/* import './css/home.css' */
/* require (`./css/${process.env.REACT_APP_ENVIRONMENT}-home.css`) */
import 'bootstrap/dist/css/bootstrap.min.css'
import App from './App'
import reportWebVitals from './reportWebVitals'
@ -49,6 +50,7 @@ import RptOperaciones from './Components/Reportes/RptOperaciones'
import RptRelacionMission from './Components/GEMCO/Facturacion/Anexo/RptRelacionMission'
import RptRelacionAlen from './Components/GEMCO/Facturacion/Anexo/RptRelacionAlen'
import RptCasaCuervoCOVEs from './Components/Clientes/CasaCuervo/Reportes/RptCasaCuervoCOVEs'
require (`./css/${process.env.REACT_APP_ENVIRONMENT}-home.css`)
function PageNotFound() {
return (

@ -4176,6 +4176,11 @@ commander@^2.20.0:
resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
commander@^4.0.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
commander@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae"
@ -5066,6 +5071,14 @@ entities@^2.0.0:
resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz"
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==
env-cmd@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/env-cmd/-/env-cmd-10.1.0.tgz#c7f5d3b550c9519f137fdac4dd8fb6866a8c8c4b"
integrity sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA==
dependencies:
commander "^4.0.0"
cross-spawn "^7.0.0"
error-ex@^1.3.1:
version "1.3.2"
resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz"

Loading…
Cancel
Save