|
|
@ -47,11 +47,11 @@ export const ProveedorFactura: FC<IProps> = (props) => { |
|
|
|
const MsgTime = 2000; |
|
|
|
const MsgTime = 2000; |
|
|
|
const msgColor = 'primary'; |
|
|
|
const msgColor = 'primary'; |
|
|
|
const ClasificacionProveedor = 2; |
|
|
|
const ClasificacionProveedor = 2; |
|
|
|
const [Uuid, setUuid] = useState<string | undefined>(); |
|
|
|
const [Uuid, setUuid] = useState<string>(''); |
|
|
|
const [FechaFactura, setFechaFactura] = useState<string | undefined>(); |
|
|
|
const [FechaFactura, setFechaFactura] = useState<string>(''); |
|
|
|
const [Cove, setCove] = useState<string | undefined>(); |
|
|
|
const [Cove, setCove] = useState<string>(''); |
|
|
|
const [Entrega, setEntrega] = useState<string | undefined>(); |
|
|
|
const [Entrega, setEntrega] = useState<string>(''); |
|
|
|
const [Transporte, setTransporte] = useState<string | undefined>(); |
|
|
|
const [Transporte, setTransporte] = useState<string>(''); |
|
|
|
const TblHeader: React.FC = () => ( |
|
|
|
const TblHeader: React.FC = () => ( |
|
|
|
<table> |
|
|
|
<table> |
|
|
|
<tr |
|
|
|
<tr |
|
|
@ -73,26 +73,98 @@ export const ProveedorFactura: FC<IProps> = (props) => { |
|
|
|
<td width='560px' style={{ textAlign: 'center' }}> |
|
|
|
<td width='560px' style={{ textAlign: 'center' }}> |
|
|
|
Proveedor |
|
|
|
Proveedor |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
|
|
|
|
<td width='120px' style={{ textAlign: 'center' }}> |
|
|
|
|
|
|
|
UUID |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td width='120px' style={{ textAlign: 'center' }}> |
|
|
|
|
|
|
|
Fecha Factura |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td width='120px' style={{ textAlign: 'center' }}> |
|
|
|
|
|
|
|
COVE |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td width='120px' style={{ textAlign: 'center' }}> |
|
|
|
|
|
|
|
Entrega |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td width='120px' style={{ textAlign: 'center' }}> |
|
|
|
|
|
|
|
Transporte |
|
|
|
|
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const columnsFacturas = [ |
|
|
|
const columnsFacturas = [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: 'id', |
|
|
|
name: 'Id', |
|
|
|
width: '10%', |
|
|
|
width: '65px', |
|
|
|
selector: (row: ICorresponsalFacturas) => row.id, |
|
|
|
selector: (row: ICorresponsalFacturas) => row.id, |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
name: 'Factura', |
|
|
|
|
|
|
|
width:'150px', |
|
|
|
|
|
|
|
selector: (row: ICorresponsalFacturas) => row.factura, |
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: 'Valor Dls', |
|
|
|
|
|
|
|
width:'100px', |
|
|
|
|
|
|
|
selector: (row: ICorresponsalFacturas) => '$ ' + row.valorFacturaDls, |
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: 'Pedido', |
|
|
|
|
|
|
|
width:'130px', |
|
|
|
|
|
|
|
selector: (row: ICorresponsalFacturas) => row.pedido, |
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: 'Proveedor', |
|
|
|
|
|
|
|
width:'150px', |
|
|
|
|
|
|
|
selector: (row: ICorresponsalFacturas) => mProveedores.filter(x => x.id === row.proveedor)[0].nombre, |
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
|
|
|
center:true, |
|
|
|
|
|
|
|
wrap: true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: 'UUID', |
|
|
|
|
|
|
|
width:'160px', |
|
|
|
|
|
|
|
selector: (row: ICorresponsalFacturas) => row.uuid ? row.uuid : '', |
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
|
|
|
center:true, |
|
|
|
|
|
|
|
wrap: true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: 'Fecha Factura', |
|
|
|
|
|
|
|
width: '125px', |
|
|
|
|
|
|
|
selector: (row: ICorresponsalFacturas) => row.fechaFactura? row.fechaFactura!.substring(0,11) : '', |
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: 'COVE', |
|
|
|
|
|
|
|
selector: (row: ICorresponsalFacturas) => row.cove ? row.cove : '', |
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
|
|
|
allowOverflow: true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: 'Entrega', |
|
|
|
|
|
|
|
selector: (row: ICorresponsalFacturas) => row.entrega ? row.entrega : '', |
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: 'Transporte', |
|
|
|
|
|
|
|
selector: (row: ICorresponsalFacturas) => row.transporte ? row.transporte : '', |
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/* { |
|
|
|
name: <TblHeader />, |
|
|
|
name: <TblHeader />, |
|
|
|
width: '75%', |
|
|
|
width: '75%', |
|
|
|
cell: (row: ICorresponsalFacturas) => { |
|
|
|
cell: (row: ICorresponsalFacturas) => { |
|
|
|
return <ControlledInput record={row} disabled={false} mode={2} />; |
|
|
|
return <ControlledInput record={row} disabled={false} mode={2} />; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, */ |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: 'Elimina', |
|
|
|
name: 'Elimina', |
|
|
|
|
|
|
|
width: '80px', |
|
|
|
cell: (row: ICorresponsalFacturas) => ( |
|
|
|
cell: (row: ICorresponsalFacturas) => ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
@ -117,6 +189,7 @@ export const ProveedorFactura: FC<IProps> = (props) => { |
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
FacDataService.getAll(props.IDTrafico) |
|
|
|
FacDataService.getAll(props.IDTrafico) |
|
|
|
.then((response) => { |
|
|
|
.then((response) => { |
|
|
|
|
|
|
|
console.log(response.data); |
|
|
|
dispatch(populateCorresponsalesFacturas(response.data)); |
|
|
|
dispatch(populateCorresponsalesFacturas(response.data)); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch((e: Error) => { |
|
|
|
.catch((e: Error) => { |
|
|
|