Este aplicativo totalmente gratuito é um Sistema Gerador de Notas Fiscais em Python, sua implementação é bastante simples e prática, podendo ser utilizado para implementá-lo em um sistema mais complexo, com Django.
Este software desenvolvido em Python inclui uma base de dados em SQLITE3, de onde são fornecidos os dados dos produtos e os dados de quem efetua a venda.
Neste software você faz a escolha do produto, o sistema te leva para um formulário simples onde você insere as informações do cliente e o valor com o qual vai efetuar o pagamento. Após isso você dá send e aparece uma tabela com as informações da fatura.
Na seção de fatura há um botão que diz gerar PDF, desta forma a fatura é impressa. Este software é fácil de parametrizar a partir do SQLITE3, segue a estrutura do banco de dados:
CREATE TABLE IF NOT EXISTS "django_migrations" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "app" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "applied" datetime NOT NULL); CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE IF NOT EXISTS "auth_group_permissions" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "group_id" integer NOT NULL REFERENCES "auth_group" ("id") DEFERRABLE INITIALLY DEFERRED, "permission_id" integer NOT NULL REFERENCES "auth_permission" ("id") DEFERRABLE INITIALLY DEFERRED); CREATE TABLE IF NOT EXISTS "auth_user_groups" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED, "group_id" integer NOT NULL REFERENCES "auth_group" ("id") DEFERRABLE INITIALLY DEFERRED); CREATE TABLE IF NOT EXISTS "auth_user_user_permissions" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED, "permission_id" integer NOT NULL REFERENCES "auth_permission" ("id") DEFERRABLE INITIALLY DEFERRED); CREATE UNIQUE INDEX "auth_group_permissions_group_id_permission_id_0cd325b0_uniq" ON "auth_group_permissions" ("group_id", "permission_id"); CREATE INDEX "auth_group_permissions_group_id_b120cbf9" ON "auth_group_permissions" ("group_id"); CREATE INDEX "auth_group_permissions_permission_id_84c5c92e" ON "auth_group_permissions" ("permission_id"); CREATE UNIQUE INDEX "auth_user_groups_user_id_group_id_94350c0c_uniq" ON "auth_user_groups" ("user_id", "group_id"); CREATE INDEX "auth_user_groups_user_id_6a12ed8b" ON "auth_user_groups" ("user_id"); CREATE INDEX "auth_user_groups_group_id_97559544" ON "auth_user_groups" ("group_id"); CREATE UNIQUE INDEX "auth_user_user_permissions_user_id_permission_id_14a6b632_uniq" ON "auth_user_user_permissions" ("user_id", "permission_id"); CREATE INDEX "auth_user_user_permissions_user_id_a95ead1b" ON "auth_user_user_permissions" ("user_id"); CREATE INDEX "auth_user_user_permissions_permission_id_1fbb5f2c" ON "auth_user_user_permissions" ("permission_id"); CREATE TABLE IF NOT EXISTS "django_admin_log" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "action_time" datetime NOT NULL, "object_id" text NULL, "object_repr" varchar(200) NOT NULL, "change_message" text NOT NULL, "content_type_id" integer NULL REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED, "user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED, "action_flag" smallint unsigned NOT NULL CHECK ("action_flag" >= 0)); CREATE INDEX "django_admin_log_content_type_id_c4bce8eb" ON "django_admin_log" ("content_type_id"); CREATE INDEX "django_admin_log_user_id_c564eba6" ON "django_admin_log" ("user_id"); CREATE TABLE IF NOT EXISTS "django_content_type" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "app_label" varchar(100) NOT NULL, "model" varchar(100) NOT NULL); CREATE UNIQUE INDEX "django_content_type_app_label_model_76bd3d3b_uniq" ON "django_content_type" ("app_label", "model"); CREATE TABLE IF NOT EXISTS "auth_permission" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "content_type_id" integer NOT NULL REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED, "codename" varchar(100) NOT NULL, "name" varchar(255) NOT NULL); CREATE UNIQUE INDEX "auth_permission_content_type_id_codename_01ab375a_uniq" ON "auth_permission" ("content_type_id", "codename"); CREATE INDEX "auth_permission_content_type_id_2f476e4b" ON "auth_permission" ("content_type_id"); CREATE TABLE IF NOT EXISTS "auth_group" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(150) NOT NULL UNIQUE); CREATE TABLE IF NOT EXISTS "django_session" ("session_key" varchar(40) NOT NULL PRIMARY KEY, "session_data" text NOT NULL, "expire_date" datetime NOT NULL); CREATE INDEX "django_session_expire_date_a5c62663" ON "django_session" ("expire_date"); CREATE TABLE IF NOT EXISTS "app_producat" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(100) NOT NULL, "dis" text NOT NULL, "price" varchar(100) NOT NULL, "img" varchar(100) NOT NULL); CREATE TABLE IF NOT EXISTS "auth_user" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "password" varchar(128) NOT NULL, "last_login" datetime NULL, "is_superuser" bool NOT NULL, "username" varchar(150) NOT NULL UNIQUE, "last_name" varchar(150) NOT NULL, "email" varchar(254) NOT NULL, "is_staff" bool NOT NULL, "is_active" bool NOT NULL, "date_joined" datetime NOT NULL, "first_name" varchar(150) NOT NULL); CREATE TABLE IF NOT EXISTS "app_buyer" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(50) NOT NULL, "address" varchar(150) NOT NULL, "phone" integer NOT NULL, "purchase_date" date NOT NULL); CREATE TABLE IF NOT EXISTS "app_seller" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(50) NOT NULL, "address" varchar(150) NOT NULL, "phone" integer NOT NULL, "date" date NOT NULL);
Vídeo explicativo (em espanhol)
Comissionamento do Sistema Gerador de Faturas em Python em um Servidor Local
É muito importante instalar Python em seu computador, é recomendável que o Python seja incluído no PATH do Windows, para que possa ser executado em qualquer local.
O vídeo a seguir explica o processo, se você tiver alguma dúvida, você pode se apoiar no vídeo a seguir:
O Visual Studio Code pode ser baixado no seguinte link:
https://code.visualstudio.com/
Instalação do Git
Git é um gerenciador de repositório com o qual podemos trabalhar de forma avançada com nosso processo de desenvolvimento, por isso recomendamos instalar o Git para avançar no processo de configuração da aplicação em um servidor local.
Baixe o sistema gerador de fatura Python do GitHub
O aplicativo é distribuído gratuitamente e você pode baixá-lo no seguinte link:
Com a instalação dos aplicativos listados acima, Python, VS Code e Git, você deve primeiro abrir o VS Code e navegar até onde deseja baixar o projeto. Mais tarde no Visual Studio Code, você pressiona, View e depois Terminal, confirma que o console que abre é o de Git Bash la nativa de Git, te debe aparecer letras en color.
Após clicar em View and Terminal, copie e cole o seguinte código para poder baixar o projeto:
git clone https://github.com/configuroweb/factura-python.git
Uma nova pasta será criada no local que você escolheu com o nome factura-python e dentro desta pasta já estará o projeto.
Executando o aplicativo em seu servidor local
Após o download do projeto, você não precisará mais do Git Bash, altere o console para Command Prompt e a partir daí execute o seguinte comando:
pip install -r requirements.txt
Com este script todas as aplicações requeridas pelo Sistema Gerador de Faturas em Python com Django serão instaladas para funcionar corretamente e são as seguintes:
appdirs==1.4.4 arabic-reshaper==2.1.3 asgiref==3.5.2 astroid==2.4.1 autopep8==1.5.7 colorama==0.4.3 distlib==0.3.2 Django==4.1.2 django-crispy-forms==1.13.0 django-easy-pdf==0.1.1 filelock==3.0.12 future==0.18.2 html5lib==1.1 Pillow==9.2.0 pycodestyle==2.7.0 pylint==2.5.2 pytz==2020.4 reportlab==3.6.1 six==1.16.0 sqlparse==0.4.1 toml==0.10.1 virtualenv==20.4.7 virtualenvwrapper-win==1.2.6 wrapt==1.12.1 xhtml2pdf==0.2.5
Se esse processo falhar, se ele gerar um erro pode ser por causa das versões, o que você deve fazer é instalar aplicativo por aplicativo com pip install e o nome, por exemplo, Django, o comando seria o seguinte:
pip install Django
O sistema instalará a versão mais recente do Django no projeto, provavelmente sem problemas de compatibilidade.
Depois de ter feito esse processo com sucesso, você precisa executar o arquivo manage.py e executar a opção runserver, o comando é o seguinte:
python manage.py runserver
Neste ponto, o aplicativo estará funcionando sem problemas no seguinte endereço da web:
http://127.0.0.1:8000/
Se você precisar fazer alguma alteração neste aplicativo, enviá-lo para um host ou precisar de um aplicativo personalizado, entre em contato comigo no seguinte link do Whatsapp:
https://configuroweb.com/WhatsappMessenger
Quedo al pendiente de cualquier novedad !!