Skip to content

Commit

Permalink
Merge #1905
Browse files Browse the repository at this point in the history
1905: Refactor Stock distribution r=jniles

This PR refactor the stock distribution page and closes #1854

Most of the work is about addressing points listed in #1854 and some refactor in order to reduce the code.
A new component ```bhStockEntryExitType``` has been introduced to remove repeated code found in ```exit.html``` and ```entry.html``` for selecting the type of entry or exit.

The main change is about stock distribution from depot to an other depot (Stock transfer)
Now the stock transfer is a set of two processes which are a stock exit to depot and a stock entry from depot. Both of them are independent in other to avoid mistakes and guaranty the data integrity.
Each time the stock in the depot will match the stock in the system.
  • Loading branch information
bors[bot] committed Aug 17, 2017
2 parents 360b68a + fb2ec1f commit e8ed369
Show file tree
Hide file tree
Showing 51 changed files with 1,040 additions and 664 deletions.
23 changes: 15 additions & 8 deletions client/src/i18n/en/depot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{"DEPOT":{"ADD_DEPOT":"Add a Depot",
"ALL_DEPOTS":"All Depots",
"DEPOTS_LIST":"Depots list",
"DESCRIPTION":"This module allows you to List, Create, Edit and Delete a Depot",
"EDIT_DEPOT":"Edit the information in a Depot",
"MAIN":{"TITLE":"Depot Management"},
"NO_DEPOT":"No Depot",
"TITLE":"Depot Management"}}
{
"DEPOT": {
"ADD_DEPOT": "Add a Depot",
"ALL_DEPOTS": "All Depots",
"DEPOTS_LIST": "Depots list",
"DESCRIPTION": "This module allows you to List, Create, Edit and Delete a Depot",
"EDIT_DEPOT": "Edit the information in a Depot",
"ENTITY" : "Depot",
"MAIN": {
"TITLE": "Depot Management"
},
"NO_DEPOT": "No Depot",
"TITLE": "Depot Management"
}
}
2 changes: 2 additions & 0 deletions client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,14 @@
"DATE_FROM": "Start",
"DATE_REGISTRATION": "Registration Date",
"DATE_TO": "End",
"DAYS" : "Days",
"DEACTIVATE": "Deactivate",
"DEBIT": "Debit",
"DEBTOR_GROUP": "Debtor Group",
"DEBTOR_GROUP_FORM": "Form debtor group record",
"DEFINE_UNTIL_DATE": "Define a limit date",
"DEFAULT_QUANTITY": "Default Quantity",
"DEPOT": "Depot",
"DESCRIPTION": "Description",
"DESIGNATION": "Designation",
"DETAIL_PREVIOUS": "Previous Year Details",
Expand Down
47 changes: 26 additions & 21 deletions client/src/i18n/en/inventory.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{"INVENTORY":{"ADD_GROUP":"Add Inventory Group",
"ADD_METADATA":"Add Inventory Item",
"ADD_TYPE":"Add Inventory Type",
"ADD_UNIT":"Add Inventory unit form",
"CONFIGURATION":"Configurations",
"CONTAINS":"Contains",
"CREATE_ANOTHER":"Create another inventory item",
"EDIT_GROUP":"Edit inventory group",
"EDIT_METADATA":"Edit inventory",
"EDIT_TYPE":"Edit inventory type",
"EDIT_UNIT":"Edit inventory unit form",
"ELEMENT":"Element",
"PRICE_LIST_REPORT":"Inventory Prices Report",
"PRICES":"Inventory Prices",
"LIST":"Inventory Data List",
"LIST_METADATA":"Inventory",
"LIST_GROUP":"Inventory Groups",
"LIST_TYPE":"Inventory Types",
"LIST_UNIT":"Inventory Unit form",
"DEFAULT_QUANTITY_DEFINITION":"The default quantity allows you to customize the default quantity invoiced for. The invoicing module can change this quantity at invoice time.",
"REGISTRY": "Inventories Registry"}}
{
"INVENTORY": {
"ADD_GROUP": "Add Inventory Group",
"ADD_METADATA": "Add Inventory Item",
"ADD_TYPE": "Add Inventory Type",
"ADD_UNIT": "Add Inventory unit form",
"CODE" : "Iventory Code",
"CONFIGURATION": "Configurations",
"CONTAINS": "Contains",
"CREATE_ANOTHER": "Create another inventory item",
"EDIT_GROUP": "Edit inventory group",
"EDIT_METADATA": "Edit inventory",
"EDIT_TYPE": "Edit inventory type",
"EDIT_UNIT": "Edit inventory unit form",
"ELEMENT": "Element",
"PRICE_LIST_REPORT": "Inventory Prices Report",
"PRICES": "Inventory Prices",
"LIST": "Inventory Data List",
"LIST_METADATA": "Inventory",
"LIST_GROUP": "Inventory Groups",
"LIST_TYPE": "Inventory Types",
"LIST_UNIT": "Inventory Unit form",
"DEFAULT_QUANTITY_DEFINITION": "The default quantity allows you to customize the default quantity invoiced for. The invoicing module can change this quantity at invoice time.",
"REGISTRY": "Inventories Registry"
}
}
15 changes: 10 additions & 5 deletions client/src/i18n/en/patient_reg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{"PATIENT_REG":{"PAGE_TITLE":"Patient Registration",
"PATIENT_DETAILS":"Patient Details",
"SUCCESS":"Patient Registered Successfully",
"CARD":"Patient Card",
"IDENTITY":"Patient Identity"}}
{
"PATIENT_REG": {
"ENTITY" : "Patient",
"PAGE_TITLE": "Patient Registration",
"PATIENT_DETAILS": "Patient Details",
"SUCCESS": "Patient Registered Successfully",
"CARD": "Patient Card",
"IDENTITY": "Patient Identity"
}
}
19 changes: 12 additions & 7 deletions client/src/i18n/en/service.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{"SERVICE":{"ADDING_SERVICE":"Adding service",
"ADD_SERVICE":"Add service",
"ALL_SERVICES":"All services",
"DESCRIPTION":"This module allows to create, list, edit, delete and view the cost and product service",
"EDITING_SERVICE":"Editing service",
"OVERVIEWING_SERVICE":"Overviewing Service",
"TITLE":"Service Management"}}
{
"SERVICE": {
"ADDING_SERVICE": "Adding service",
"ADD_SERVICE": "Add service",
"ALL_SERVICES": "All services",
"DESCRIPTION": "This module allows to create, list, edit, delete and view the cost and product service",
"EDITING_SERVICE": "Editing service",
"ENTITY" : "Service",
"OVERVIEWING_SERVICE": "Overviewing Service",
"TITLE": "Service Management"
}
}
7 changes: 7 additions & 0 deletions client/src/i18n/en/stock.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"AMOUNT" : "Montant",
"APPROVISIONING" : "Quantity to order",
"CACHED_DATA" : "Data saved",
"CHOOSE_AGAIN" : "(Click On This Box to Choose Again)",
"CODE" : "Code",
"COST" : "Cost",
"DECREASE" : "Decrease",
Expand Down Expand Up @@ -56,6 +57,10 @@
"ORIGIN" : "Origin",
"ORIGINS" : "Lots Origins",
"ORIGIN_DOCUMENT" : "Origin Document",
"PATIENT_DISTRIBUTION" : "Patient Distribution",
"SERVICE_DISTRIBUTION" : "Service Distribution",
"DEPOT_DISTRIBUTION" : "Depot Distribution",
"LOSS_DISTRIBUTION" : "Stock Loss",
"PURCHASE_ORDER" : "Purchase Order",
"QUANTITY" : "Quantity",
"RECEIPT" : {
Expand All @@ -69,6 +74,7 @@
"EXIT_LOSS" : "Stock Exit - Loss"
},
"RECEIVER" : "Recepteur",
"RECEPTION_TRANSFER" : "Transfer",
"RESPONSIBLE" : "Stock Manager",
"SEARCH" : "Search",
"SECURITY" : "Security Stock",
Expand All @@ -94,6 +100,7 @@
"FROM_DONATION" : "From Donation",
"FROM_INTEGRATION" : "From Integration",
"FROM_LOSS" : "From Loss",
"FROM_TRANSFER" : "From Transfer",
"TO_OTHER_DEPOT" : "To Depot",
"TO_PATIENT" : "To Patient",
"TO_SERVICE" : "To Service",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/en/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"ENTERPRISE_ID": "ID Enterprise",
"EXCHANGE_RATE": "Exchange Rate",
"EXPIRATION_DATE": "Expiration Date",
"EXPIRE_IN":"Expire In",
"NUM_PIECE": "Num Doc",
"ENTRY": "Entry",
"EXIT": "Exit",
Expand Down
23 changes: 15 additions & 8 deletions client/src/i18n/fr/depot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{"DEPOT":{"ADD_DEPOT":"Ajouter un dépôt",
"ALL_DEPOTS":"Tous les dépôts",
"DEPOTS_LIST":"Liste des dépôts",
"DESCRIPTION":"Ce module vous permet de Lister, Creer, Modifier et Supprimer un dépôt",
"EDIT_DEPOT":"Editer les informations d'un dépôt",
"MAIN":{"TITLE":"Gestion des dépôts"},
"NO_DEPOT":"Aucun dépôt",
"TITLE":"Gestion des dépôts"}}
{
"DEPOT": {
"ADD_DEPOT": "Ajouter un dépôt",
"ALL_DEPOTS": "Tous les dépôts",
"DEPOTS_LIST": "Liste des dépôts",
"DESCRIPTION": "Ce module vous permet de Lister, Creer, Modifier et Supprimer un dépôt",
"EDIT_DEPOT": "Editer les informations d'un dépôt",
"ENTITY" : "Depot",
"MAIN": {
"TITLE": "Gestion des dépôts"
},
"NO_DEPOT": "Aucun dépôt",
"TITLE": "Gestion des dépôts"
}
}
2 changes: 2 additions & 0 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,14 @@
"DATE_FROM": "Debut",
"DATE_REGISTRATION": "Date d'enregistrement",
"DATE_TO": "Fin",
"DAYS": "Jours",
"DEACTIVATE": "Désactiver",
"DEBIT": "Débit",
"DEBTOR_GROUP": "Groupe Débiteur",
"DEBTOR_GROUP_FORM": "Formulaire d'enregistrement de groupe débiteur",
"DEBTOR_CREDITOR": "Débiteur/Créditeur",
"DEFINE_UNTIL_DATE": "Définir une date limite",
"DEPOT": "Depot",
"DESCRIPTION": "Description",
"DETAILS": "Details",
"DEFAULTS": "Filtres par défaut",
Expand Down
47 changes: 26 additions & 21 deletions client/src/i18n/fr/inventory.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{"INVENTORY":{"ADD_GROUP":"Ajouter Groupe d'Inventaires",
"ADD_METADATA":"Ajouter Inventaire",
"ADD_TYPE":"Ajouter Types d'Inventaires",
"ADD_UNIT":"Ajouter Forme d'Inventaires",
"CONFIGURATION":"Configurations",
"CONTAINS":"Contient",
"CREATE_ANOTHER":"Ajouter une Autre Inventaires",
"DEFAULT_QUANTITY_DEFINITION":"Ce champ suggérera le quantité par défaut dans le facture.",
"EDIT_GROUP":"Modifier Groupe d'inventaires",
"EDIT_METADATA":"Modifier Inventaire",
"EDIT_TYPE":"Modifier Types d'inventaires",
"EDIT_UNIT":"Modifier Forme d'inventaires",
"ELEMENT":"Élément",
"PRICE_LIST_REPORT":"Rapport des prix des articles et services",
"PRICES":"Tarification",
"LIST":"Liste des données d'inventaire",
"LIST_METADATA":"Inventaires",
"LIST_GROUP":"Groupes d'inventaires",
"LIST_TYPE":"Types d'inventaires",
"LIST_UNIT":"Formes d'inventaires",
"REGISTRY": "Registre des inventaires"}}
{
"INVENTORY": {
"ADD_GROUP": "Ajouter Groupe d'Inventaires",
"ADD_METADATA": "Ajouter Inventaire",
"ADD_TYPE": "Ajouter Types d'Inventaires",
"ADD_UNIT": "Ajouter Forme d'Inventaires",
"CODE" : "Code Item",
"CONFIGURATION": "Configurations",
"CONTAINS": "Contient",
"CREATE_ANOTHER": "Ajouter une Autre Inventaires",
"DEFAULT_QUANTITY_DEFINITION": "Ce champ suggérera le quantité par défaut dans le facture.",
"EDIT_GROUP": "Modifier Groupe d'inventaires",
"EDIT_METADATA": "Modifier Inventaire",
"EDIT_TYPE": "Modifier Types d'inventaires",
"EDIT_UNIT": "Modifier Forme d'inventaires",
"ELEMENT": "Élément",
"PRICE_LIST_REPORT": "Rapport des prix des articles et services",
"PRICES": "Tarification",
"LIST": "Liste des données d'inventaire",
"LIST_METADATA": "Inventaires",
"LIST_GROUP": "Groupes d'inventaires",
"LIST_TYPE": "Types d'inventaires",
"LIST_UNIT": "Formes d'inventaires",
"REGISTRY": "Registre des inventaires"
}
}
15 changes: 10 additions & 5 deletions client/src/i18n/fr/patient_reg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{"PATIENT_REG":{"CARD":"Fiche du patient",
"PAGE_TITLE":"Enregistrement des Patients",
"PATIENT_DETAILS":"Détails Patient",
"SUCCESS":"Patient enregistré avec succès",
"IDENTITY":"Identité du patient"}}
{
"PATIENT_REG": {
"ENTITY" : "Patient",
"CARD": "Fiche du patient",
"PAGE_TITLE": "Enregistrement des Patients",
"PATIENT_DETAILS": "Détails Patient",
"SUCCESS": "Patient enregistré avec succès",
"IDENTITY": "Identité du patient"
}
}
19 changes: 12 additions & 7 deletions client/src/i18n/fr/service.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{"SERVICE":{"ADDING_SERVICE":"Ajout service",
"ADD_SERVICE":"Ajouter service",
"ALL_SERVICES":"Tous les services",
"DESCRIPTION":"Ce module permet de creer, lister, modifier, supprimer et voir le cout et produit du service",
"EDITING_SERVICE":"Modification service",
"OVERVIEWING_SERVICE":"Visualisation sommaire du service",
"TITLE":"Gestion des services"}}
{
"SERVICE": {
"ADDING_SERVICE": "Ajout service",
"ADD_SERVICE": "Ajouter service",
"ALL_SERVICES": "Tous les services",
"DESCRIPTION": "Ce module permet de creer, lister, modifier, supprimer et voir le cout et produit du service",
"EDITING_SERVICE": "Modification service",
"ENTITY" : "Service",
"OVERVIEWING_SERVICE": "Visualisation sommaire du service",
"TITLE": "Gestion des services"
}
}
7 changes: 7 additions & 0 deletions client/src/i18n/fr/stock.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"AMOUNT" : "Montant",
"APPROVISIONING" : "Quantité à commander",
"CACHED_DATA" : "Donnees mises en cache",
"CHOOSE_AGAIN" : "(Cliquer Sur Cette Boite Pour Choisir Encore)",
"CODE" : "Code",
"COST" : "Cout",
"DECREASE" : "Diminution",
Expand Down Expand Up @@ -56,6 +57,10 @@
"ORIGIN" : "Origin",
"ORIGINS" : "Origines des lots",
"ORIGIN_DOCUMENT" : "Document de l'origine",
"PATIENT_DISTRIBUTION" : "Distribution au Patient",
"SERVICE_DISTRIBUTION" : "Distribution au Service",
"DEPOT_DISTRIBUTION" : "Distribution au depot",
"LOSS_DISTRIBUTION" : "Perte de Stock",
"PURCHASE_ORDER" : "Commande d'Achat",
"QUANTITY" : "Quantité",
"RECEIPT" : {
Expand All @@ -69,6 +74,7 @@
"EXIT_LOSS" : "Sortie de Stock - Perte"
},
"RECEIVER" : "Recepteur",
"RECEPTION_TRANSFER" : "Transfert",
"RESPONSIBLE" : "Gestionnaire du stock",
"SEARCH" : "Chercher",
"SECURITY" : "Stock de securité",
Expand All @@ -94,6 +100,7 @@
"FROM_DONATION" : "En provenance d'une donation",
"FROM_INTEGRATION" : "En provenance d'une integration",
"FROM_LOSS" : "En provenance d'une perte",
"FROM_TRANSFER" : "En provenance d'un transfert",
"TO_OTHER_DEPOT" : "Vers un depot",
"TO_PATIENT" : "Vers un patient",
"TO_SERVICE" : "Vers un service",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"ERROR_TYPE": "Type d'erreur",
"EXCHANGE_RATE": "Taux de change",
"EXPIRATION_DATE": "Date d'expiration",
"EXPIRE_IN" : "Expire Dans",
"NUM_PIECE": "N° Piece",
"ENTRY": "Entrée",
"EXIT": "Sortie",
Expand Down
Loading

0 comments on commit e8ed369

Please sign in to comment.