Skip to content

Commit eb38e43

Browse files
committed
database and models implementations
* geany setup for project * 4 spaces always for ident * models for products/items * fix README * workbench model and sql files for DB * data notes documentation
1 parent 222c0f2 commit eb38e43

23 files changed

+1696
-105
lines changed

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
end_of_line = lf
12+
max_line_length = off
13+
14+
[*.md]
15+
indent_size = false
16+
17+
[*.ini]
18+
indent_size = 4
19+
20+
[*.sql]
21+
indent_size = 4

README.md

+36-71
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,58 @@
1-
# Erp Recibosapi
1+
# Erp articuloapi
22

3+
Software de repositorio de datos de items/productos y base de datos de imágenes!
34

5+
## Contenido
46

5-
## Getting started
7+
* [Introduccion](#introduccion)
8+
* [Como usar este proyecto](#como-usar-este-proyecto)
9+
* [Despliegue y desarrollo](#despliegue-y-desarrollo)
10+
* [Infraestructura del proyecto](#infraestructura-del-proyecto)
611

7-
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
12+
## Introduccion
813

9-
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
14+
Sistema php basado en guachi/banshee tipo repositorio para almacenaje de documentos
15+
escaneados ( [articulo](docs/README-artifacts.md#artefactos) ).
1016

11-
## Add your files
17+
Este sistema es parte de otros sistemas mas grandes, y punto de
18+
partida para el sistema de gastos y retenciones.
1219

13-
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14-
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
20+
## Como usar este proyecto
1521

16-
```
17-
cd existing_repo
18-
git remote add origin https://gitlab.com/codeigniterpower/erp-recibosapi.git
19-
git branch -M main
20-
git push -uf origin main
21-
```
22+
Este repositorio concentra y sincroniza empleando **git-modules**,
23+
y utilia el flujo de trabajo de ramas simplificado **GitFlow simplified**
2224

23-
## Integrate with your tools
25+
Para clonarlo y trabajar en el, **DEBE leer [docs/README.md](docs/README.md)**
2426

25-
- [ ] [Set up project integrations](https://gitlab.com/codeigniterpower/erp-recibosapi/-/settings/integrations)
27+
#### Despliegue y desarrollo
2628

27-
## Collaborate with your team
29+
Los detalles para despliegue estan en [docs/README-produccion.md](docs/README-produccion.md),
30+
y para instalacion y desarrollo local el documento [docs/README.md](docs/README.md)
2831

29-
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30-
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31-
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32-
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33-
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
32+
#### Infraestructura del proyecto
3433

35-
## Test and Deploy
34+
El proyecto esta basado en una plantilla de api, con todo ya listo,
35+
y no debe salirse de lo que ya esta estructurado, puesto solo
36+
es subir archivos y ver archivos, puros get y post y una autenticacion delegada.
3637

37-
Use the built-in continuous integration in GitLab.
38+
Para mas detalles leer [docs/README.md](docs/README.md)
3839

39-
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40-
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41-
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42-
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43-
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
40+
## LICENSE
4441

45-
***
42+
The Guachi Framework is open-source software under the MIT License, this downstream part is a reduced version for!
43+
Este minicore conteine partes del framework Banshee bajo la misma licencia.
4644

47-
# Editing this README
45+
* (c) 2023 Dias Victor @diazvictor
4846

49-
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
47+
El proyecto articuloapi es open source y free software bajo la licencia GPLv3 por lo que cualquier modificacion debe ser compartida.
5048

51-
## Suggestions for a good README
49+
* (c) 2023 PICCORO Lenz MCKAY @mckaygerhard
50+
* (c) 2023 Dias Victor @diazvictor
5251

53-
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
52+
Las adiciones y la funcionalidad estan licenciadas tambien **CC-BY-SA-NC** Compartir igual sin derecho comercial a menos que se pida permiso esten de acuerdo ambas partes, y con atribuciones de credito.
5453

55-
## Name
56-
Choose a self-explaining name for your project.
54+
* (c) 2023 PICCORO Lenz McKAY <mckaygerhard>
55+
* (c) 2023 Dias Victor @diazvictor
56+
* (c) 2023 Tyron Lucero
5757

58-
## Description
59-
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60-
61-
## Badges
62-
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63-
64-
## Visuals
65-
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66-
67-
## Installation
68-
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69-
70-
## Usage
71-
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72-
73-
## Support
74-
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75-
76-
## Roadmap
77-
If you have ideas for releases in the future, it is a good idea to list them in the README.
78-
79-
## Contributing
80-
State if you are open to contributions and what your requirements are for accepting them.
81-
82-
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83-
84-
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85-
86-
## Authors and acknowledgment
87-
Show your appreciation to those who have contributed to the project.
88-
89-
## License
90-
For open source projects, say how it is licensed.
91-
92-
## Project status
93-
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
58+
El proyecto se ha mudado al por fin madurar https://codeberg.org/codeigniter/erp-articuloapi

controllers/api/v1/lists.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**!
3+
* @package ReceiptAPI
4+
* @filename lists.php
5+
* @version 1.0
6+
* @autor Díaz Urbaneja Víctor Eduardo Diex <[email protected]>
7+
* @date 22.11.2023 02:33:35 -04
8+
*/
9+
10+
class api_v1_lists_controller extends controller {
11+
12+
public function execute() {
13+
/*esta variable recoje los parametros de la url,
14+
*es un array y el indice 0 indica el primer parametro*/
15+
$parameters = ($this->router->parameters) ? $this->router->parameters : false;
16+
17+
if (
18+
$parameters[0] and $parameters[0] == 'page' and
19+
valid_input($parameters[1], VALIDATE_NUMBERS, VALIDATE_NONEMPTY)
20+
) {
21+
$this->model->get($parameters[1]);
22+
return;
23+
}
24+
25+
$this->model->get();
26+
}
27+
28+
}

controllers/api/v1/search.php

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**!
3+
* @package ReceiptAPI
4+
* @filename search.php
5+
* @version 1.0
6+
* @autor Díaz Urbaneja Víctor Eduardo Diex <[email protected]>
7+
* @date 23.11.2023 21:14:35 -04
8+
*/
9+
10+
class api_v1_search_controller extends controller {
11+
12+
public function execute() {
13+
/*esta variable recoje los parametros de la url,
14+
*es un array y el indice 0 indica el primer parametro*/
15+
$parameters = ($this->router->parameters) ? $this->router->parameters : false;
16+
17+
if ($parameters and $parameters[0]) {
18+
if (isset($parameters[1]) and $parameters[1] == 'page' and
19+
valid_input($parameters[2], VALIDATE_NUMBERS, VALIDATE_NONEMPTY)
20+
) {
21+
$this->model->get($parameters[0], $parameters[2]);
22+
return;
23+
}
24+
25+
$this->model->get($parameters[0]);
26+
return;
27+
}
28+
$this->model->notFound();
29+
}
30+
31+
}

controllers/api/v1/upload.php

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/**!
3+
* @package ReceiptAPI
4+
* @filename upload.php
5+
* @version 1.0
6+
* @autor Díaz Urbaneja Víctor Eduardo Diex <[email protected]>
7+
* @date 22.11.2023 01:03:17 -04
8+
*/
9+
10+
class api_v1_upload_controller extends controller {
11+
12+
public function execute() {
13+
/*esta variable recoje los parametros de la url,
14+
*es un array y el indice 0 indica el primer parametro*/
15+
$parameters = ($this->router->parameters) ? $this->router->parameters : false;
16+
17+
if ($_SERVER["REQUEST_METHOD"] == "POST") {
18+
$this->model->save($_POST);
19+
return;
20+
}
21+
22+
$this->model->notFound();
23+
}
24+
25+
}

docs/DATA-notes.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
This file is used only for some data notes, please read [DEVELOPMENT.md](DEVELOPMENT.md)
3+
4+
## Adjuntos
5+
6+
Pictures, archives etc are saves using base64 strings, as most generic way,
7+
due this: https://www.sqlite.org/datatype3.html#date_and_time_datatype the
8+
data types will be TEXT for.
9+
10+
## Items
11+
12+
El sistema es solo una especie de **repositorio de la parte inmutable de una
13+
empresa, sus activos que son los productos y el capital de bienes**, los servicios
14+
cuando son productos se representan como items tambien.
15+
16+
## Descripciones e idiomas
17+
18+
Para el soporte multi idiomas se emplea https://en.wikipedia.org/wiki/ISO_639-3#Usage
19+
20+
No se guardan caracteristicas que cambian sino las inmutables ejemplo, guarda
21+
el idioma español pero no el pais donde se habla o al que pertenece.
22+
23+
## Caracteristicas
24+
25+
Los productos pueden cambiar de categoria pero no de caracteristicas, este
26+
sistema no guarda sino las caracteristicas inmutables, como el tipo de material
27+
en que esta fabricado o el dia de la primera aquisicion del mismo.
28+
29+
## Diccionario de datos
30+
31+
El diseño para el diccionario de datos esta en [erp-articulosapidb.mwb](erp-articulosapidb.mwb)
32+
y se puede usar el script [erp-articulosapidb.sql](erp-articulosapidb.sql) para
33+
usar la base de datos. Los comentarios describen en minimo la logica de la
34+
funcionalidad de los mismos.
35+
36+
**WARNING** : sqlite must use https://qgqlochekone.blogspot.com/2017/03/mysql-to-sqlite-comments-error-near.html
37+
38+
![erp-articulosapidb.png](erp-articulosapidb.png)

docs/erp-articuloapidb.mwb

216 KB
Binary file not shown.

docs/erp-articuloapidb.png

92.9 KB
Loading

0 commit comments

Comments
 (0)