Skip to content

About

This project allows you to query products by scanning their barcode through a REST API. By entering the barcode, the system automatically retrieves product data such as name, brand, quantity, and image URL, making inventory management and control easier.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

122 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 An inventory and sales management system developed in Java using Java Swing for the graphical user interface.

Database Diagram

image

Database Script

Create database tiendita;
Use tiendita;

create table usuario (
idUsuario integer primary key not null auto_increment,
nombre varchar(40) not null,
apellido varchar(40)  not null,
nombreUsuario varchar(20) not null,
contrasenia blob,
rol varchar(20) not null
);

create table categoria(
idCategoria integer primary key not null auto_increment,
nombreCategoria varchar(40) not null
);

create table producto (
idProducto integer primary key not null auto_increment,
idCategoria integer not null, foreign key(idCategoria) REFERENCES categoria(idCategoria) ON DELETE CASCADE ON UPDATE CASCADE,
codigoBarra varchar(20) not null unique,
nombre varchar(60)  null,
precio decimal(8,2)  null default 0,
marca varchar(50) null,
contenido varchar(20) null,
igvAplicable tinyint(1) not null default 0,
imagenUrl varchar(200) null
);

create table venta(
idVenta integer primary key not null auto_increment,
idUsuario integer not null, foreign key(idUsuario) REFERENCES usuario(idUsuario) ON DELETE CASCADE ON UPDATE CASCADE,
fechaVenta timestamp default current_timestamp,
impTotSnIgvOExo decimal(8,2) not null default 0,
igvTotal decimal(6,2) not null default 0,
impTotMasIgv decimal(8,2) not null default 0,
descTot decimal(6,2) not null default 0,
total decimal(8,2) not null default 0,
tipoVenta enum('Boleta', 'Factura') default 'Boleta',
metPago enum('Efectivo', 'Tarjeta', 'Yape', 'Plin', 'Transacción', 'Fiado') not null default 'Efectivo',
observacion varchar(250) null
);

create table detalleVenta(
idDetalle integer primary key not null auto_increment,
idVenta integer not null, foreign key(idVenta) REFERENCES venta(idVenta) ON DELETE CASCADE ON UPDATE CASCADE,
idProducto integer not null, foreign key(idProducto) REFERENCES producto(idProducto) ON DELETE CASCADE ON UPDATE CASCADE, 
cant decimal(6,2) not null default 0,
impSnIgvOExo decimal(8,2) not null default 0,
igv decimal(6,2) not null default 0,
impMasIgv decimal(8,2) not null default 0,
descProdu decimal(6,2) not null default 0,
subtotCnDesc decimal(8,2) not null default 0
);

create table inventario(
idInventario integer primary key not null auto_increment,
idProducto integer not null, foreign key (idProducto) references producto(idProducto) ON DELETE CASCADE ON UPDATE CASCADE,
ubicacion varchar(80) not null, 
stockProducto integer not null default 0,
stockMinimo integer null default 0
);

References

Project Data

image
This project uses data from Open Food Facts, an open database of food products.
The data is available under the Open Database License (ODbL).

Icons

Escáner de código de barras 2 Filled icono de Icons8
X icono de Icons8
Menos icono de Icons8
Full Screen icono de Icons8
PDF icono de Icons8
MS Excel icono de Icons8
Comprobado icono de Icons8
X icono de Icons8

🤝 Contributions

Contributions are welcome! If you want to improve this project:

  1. Fork the repository.
  2. Create a new branch.
    git checkout -b feature-nueva
  3. Make your changes and push them:
    git commit -m "Agrega nueva funcionalidad"
  4. Submit a pull request.

License

This project is licensed unde the MTA License
📌 If you liked this project, give it a ⭐ on GitHub! 😃🔥

About

This project allows you to query products by scanning their barcode through a REST API. By entering the barcode, the system automatically retrieves product data such as name, brand, quantity, and image URL, making inventory management and control easier.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages