Skip to content

Commit

Permalink
feat(stock): implement stock management modules
Browse files Browse the repository at this point in the history

* Stock database design implementation

* Server side api

* database updates and fixing

* stock api : create new stock

* implements stock movement API

* Implementing GET methods for stock API

* move functions into core.js

* Stock lots registry

* Fix mergin conflicts

* Fix mergin differences

* Search in stock lots registry

* e2e tests for stock lots registry

* Stock Movements Implementations

* Stock Movements Implementations

* Search and Reports in Movements

* Stock Inventories implementation

* Stock inventory status

* stock movement e2e test and fixing

* Fix e2e test according dates updated

* stock exit management

* exit movement

* Handle depot selections

* Movement to patient

* Patient distribution with proof

* Enhancement of stock exit to patient receipt

* Stock Exit to depot

* Stock exit to service and to loss management

* stock entry from purchase

* Date picker component

* Stock entry from purchase with document

* Fix stock entry receipt for purchase

* Stock entry implementations

* Fix and enhancement of stock entry

* remove purchase from inventory node

* Adding grouping in stock registry

* Fix and enhancements

* Add integration of stocks

* Add integration receipt

* Fix mergin conflicts error

* Disable donation until implementation

* stock adjustment receipt

* Starting today filter in movement

* fix and enhancement

* Fix and enhancements

* fix stock registries tests

* test for exit

* e2e test for stock exit

* Fix and enhancements

* E2E tests for stock entry by purchase and integration

* Fix e2e tests and enhancements

* Fix and enhancements according the review

* Fix and enhancement for 2nd review

* Fix and enhancements

* Daily record and tests enhancement
  • Loading branch information
mbayopanda authored and jniles committed Apr 6, 2017
1 parent 8866491 commit 1c5364b
Show file tree
Hide file tree
Showing 150 changed files with 9,206 additions and 221 deletions.
6 changes: 6 additions & 0 deletions client/src/css/structure.css
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,12 @@ growl-notification.fading.ng-leave.ng-leave-active {
margin-left: 18px;
}

.text-ellipsis {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

.text-clear {
font-weight : normal !important;
}
Expand Down
9 changes: 9 additions & 0 deletions client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"SUBMIT":"Submit",
"SUBMIT_CHANGES":"Submit Changes",
"SUBMIT_CREDIT_NOTE":"Submit Credit Note",
"SUSPEND":"Suspend",
"THIS_WEEK":"This Week",
"THIS_MONTH":"This Month",
"THIS_YEAR":"This Year",
Expand Down Expand Up @@ -100,6 +101,8 @@
"MANY_TRYS":"Many tries",
"NOT_CONFIGURED":"The accounts for this currency have not been configured yet.",
"NOTE":"Note",
"NO_SOURCE":"No source defined",
"NO_DESTINATION":"No destination defined",
"NO_FILTERS_APPLIED":"No filters applied",
"NO_INVOICES_SELECTED":"No invoices selected",
"NO_RECIPIENT":"An invoice must have a recipient before assigning items.",
Expand Down Expand Up @@ -142,6 +145,9 @@
"ASSET":"Asset",
"AUTHOR":"Author",
"AUXILIARY":"Auxiliary",
"AVG_CONSUMPTION":"Average Consumption",
"AVG_MONTHLY_CONSUMPTION":"Monthly Average Consumption",
"MONTHLY_CONSUMPTION":"Monthly Consumption",
"BALANCE":"Balance",
"BALANCE_SECTION":"Balance Sheet Section",
"BANK":"Bank",
Expand Down Expand Up @@ -198,6 +204,7 @@
"DETAIL_PREVIOUS":"Previous Year Details",
"DETAILS":"Details",
"DEBTOR_CREDITOR":"Debtor/Creditor",
"DELAY":"Delay",
"DISTRIBUTABLE":"Distributable",
"DISABLED":"Disabled",
"DIAGNOSIS":"Diagnosis",
Expand Down Expand Up @@ -233,6 +240,7 @@
"GAIN_ACCOUNT":"Gain on Exchange Rate Account",
"GENDER":"Sex",
"GENERAL_LEDGER":"General Ledger",
"GLOBAL_QUANTITY":"Global Quantity",
"GRADE":"Grade",
"GROUP":"Group",
"GROUPS_DEBTOR_TITLE":"Debtor Group",
Expand Down Expand Up @@ -315,6 +323,7 @@
"POST_OFFICE_BOX":"Post Office Box",
"POSTING_JOURNAL":"Posting Journal",
"PO_BOX":"PO Box",
"PURCHASE_INTERVAL":"Purchase Interval",
"QUANTITY":"Quantity",
"PREFIX":"Prefix",
"PREVIOUS_DATE":"Previous Date",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/en/purchases.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"CONFIRMED_DESC":"The purchase order has been confirmed by the supplier that it can be delivered",
"WAITING_CONFIRMATION":"Waiting confirmation",
"WAITING_CONFIRMATION_DESC":"The supplier doesn't confirm that the purchase order can be delivered",
"PARTIALLY_RECEIVED":"Partially Received",
"RECEIVED":"Received in Stock",
"RECEIVED_DESC":"The purchase order has been completed and products are in the stock",
"NOT_RECEIVED":"Not Received",
Expand Down
102 changes: 102 additions & 0 deletions client/src/i18n/en/stock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"STOCK" : {
"ALERT" : "Alert",
"ADJUSTMENT" : "Adjustment",
"ADJUSTMENT_TYPE" : "Adjustment Type",
"AMOUNT" : "Montant",
"APPROVISIONING" : "Quantity to order",
"CACHED_DATA" : "Data saved",
"CODE" : "Code",
"COST" : "Cost",
"DECREASE" : "Decrease",
"DECREASE_HELP" : "Adjustment of stock by decreasing the quantity of lots of products in stock",
"DEPOT" : "Depot",
"DEPOT_RESPONSIBLE" : "Depot Manager",
"DETAILS" : "Details",
"DOCUMENT" : "Document",
"DONATION" : "Donation",
"ENTRY" : "Stock Entry",
"ENTRY_DATE" : "Entry Date",
"ENTRY_DOCUMENT" : "Entry Document",
"ENTRY_PURCHASE" : "Purchase",
"ENTRY_INTEGRATION" : "Integration",
"EXPIRATION_DATE" : "Expiration Date",
"EXPIRATION" : "Expiration",
"EXPIRATION_RISK" : "Expiration Risk",
"EXIT" : "Stock Exit",
"EXIT_DEPOT" : "Exit to a depot",
"EXIT_PATIENT" : "Exit to a patient",
"EXIT_SERVICE" : "Exit to a service",
"EXIT_LOSS" : "Loss",
"FILE" : "Stock File",
"FLUX" : "Reason",
"FROM" : "From",
"GROUPING" : "Grouping",
"INCREASE" : "Increase",
"INCREASE_HELP" : "Adjustment of stock by increasing the quantity of lots of products in stock",
"INVENTORY" : "Inventory",
"INPUT" : "Input",
"INTEGRATION" : "Integration",
"IO" : "In/Out",
"ITEMS" : "Items",
"LEGEND" : "Legend",
"LOSS" : "Stock Loss",
"LOT" : "Lot",
"LOTS" : "Lots",
"MAXIMUM" : "Maximum Stock",
"MINIMUM" : "Minimum Stock",
"MONTH" : "Stock Months",
"MONTHLY_CONSUM" : "Month Consumptions",
"MOTIF" : "Motif",
"MOVEMENTS" : "Movements",
"NO_ORDER" : "No Orders",
"OUTPUT" : "Output",
"ORDERS" : "Orders",
"ORIGIN" : "Origin",
"ORIGINS" : "Lots Origins",
"ORIGIN_DOCUMENT" : "Origin Document",
"PURCHASE_ORDER" : "Purchase Order",
"QUANTITY" : "Quantity",
"RECEIPT" : {
"ADJUSTMENT" : "Adjustment",
"ENTRY_DEPOT" : "Stock Entry",
"ENTRY_PURCHASE" : "Stock Entry - Purchase",
"ENTRY_INTEGRATION" : "Stock Entry - Integration",
"EXIT_PATIENT" : "Stock Exit - Patient",
"EXIT_DEPOT" : "Stock Exit - Depot",
"EXIT_SERVICE" : "Stock Exit - Service",
"EXIT_LOSS" : "Stock Exit - Loss"
},
"RECEIVER" : "Recepteur",
"RESPONSIBLE" : "Stock Manager",
"SEARCH" : "Search",
"SECURITY" : "Security Stock",
"STATUS" : {
"IN_STOCK" : "In Stock",
"LABEL" : "Etat",
"MAXIMUM" : "Maximum Stock Reached",
"MINIMUM" : "Minimum Stock Reached",
"OVER_MAX" : "Over Maximum",
"SECURITY" : "Security Stock Reached",
"SOLD_OUT" : "Sold Out"
},
"SUCCESS" : "Successfully created a movement",
"TO" : "Destination",
"UNIT_COST" : "Unit cost"
},
"STOCK_FLUX" : {
"FROM_PURCHASE" : "From Purchase Order",
"FROM_OTHER_DEPOT" : "From Depot",
"FROM_ADJUSTMENT" : "Adjustment (Positive)",
"FROM_PATIENT" : "From Patient",
"FROM_SERVICE" : "From Service",
"FROM_DONATION" : "From Donation",
"FROM_INTEGRATION" : "From Integration",
"FROM_LOSS" : "From Loss",
"TO_OTHER_DEPOT" : "To Depot",
"TO_PATIENT" : "To Patient",
"TO_SERVICE" : "To Service",
"TO_LOSS" : "To Loss",
"TO_ADJUSTMENT" : "Adjustment (Negative)"
}
}
3 changes: 3 additions & 0 deletions client/src/i18n/en/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"AGE":"Age",
"AMOUNT":"Amount",
"ASSET":"Asset",
"AVAILABLE": "Available",
"BALANCE":"Balance",
"BALANCE_SECTION":"Balance Sheet Section",
"BEFORE":"Before",
Expand Down Expand Up @@ -42,6 +43,7 @@
"ERROR_TYPE":"Error Type",
"ENTERPRISE_ID":"ID Enterprise",
"EXCHANGE_RATE":"Exchange Rate",
"EXPIRATION_DATE":"Expiration Date",
"FILTERING":{"LABEL":"Filter"},
"FIRST_NAME":"First Name",
"FUNCTION":"Function",
Expand All @@ -66,6 +68,7 @@
"LISTS":"Registered price list",
"LOADING":"Fetching data from the server.",
"LOCKED":"Locked",
"LOT":"Lot",
"PAYMENT_INVOICE":"payment made against this invoice",
"NAME":"Name",
"NATURE":"Nature",
Expand Down
5 changes: 4 additions & 1 deletion client/src/i18n/en/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@
"SECTION_RESULTAT":"Result Section",
"SERVICE":"Services",
"SIMPLE_VOUCHER":"Simple Voucher",
"STOCK":"Stock",
"STOCK": "Stock",
"STOCK_INVENTORY":"Stock Inventory",
"STOCK_LOTS":"Stock Lots",
"STOCK_MOVEMENTS":"Stock Movements",
"SUBSIDY":"Subsidy Management",
"TRANSACTION_TYPE":"Transaction Types",
"USERS":"Users",
Expand Down
9 changes: 9 additions & 0 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"SUBMIT":"Soumettre",
"SUBMIT_CREDIT_NOTE":"Soumettre la note de crédit",
"SUBMIT_CHANGES":"Soumettre des changements",
"SUSPEND":"Suspendre",
"THIS_MONTH":"Ce mois",
"THIS_WEEK":"Cette semaine",
"THIS_YEAR":"Cette année",
Expand Down Expand Up @@ -100,6 +101,8 @@
"MANY_TRYS":"Plusieurs tentatives",
"NOT_CONFIGURED":"Les comptes ne sont pas configuree.",
"NOTE":"Note",
"NO_SOURCE":"Aucune source definie",
"NO_DESTINATION":"Aucune destination definie",
"NO_FILTERS_APPLIED":"Aucun filtrage des données",
"NO_INVOICES_SELECTED":"Aucune facture sélectionnée",
"NO_RECIPIENT":"Une facture doit appartenir à une personne avant d'assigner les éléments.",
Expand Down Expand Up @@ -142,6 +145,9 @@
"ASSET":"Actif",
"AUTHOR":"Auteur",
"AUXILIARY":"Auxilliaire",
"AVG_CONSUMPTION":"Consommation Moyenne",
"AVG_MONTHLY_CONSUMPTION":"Consommation Mensuelle Moyenne",
"MONTHLY_CONSUMPTION":"Consommation Mensuelle",
"BALANCE":"Balance",
"BALANCE_SECTION":"Section du Bilan",
"BANK":"Banque",
Expand Down Expand Up @@ -198,6 +204,7 @@
"DEFAULT_QUANTITY":"Quantité par Défaut",
"DETAIL_PREVIOUS":"Detailler Année Précédente",
"DESIGNATION":"Désignation",
"DELAY":"Delai de livraison",
"DISTRIBUTABLE":"Distribuable",
"DISABLED":"Désactivée",
"DIAGNOSIS":"Diagnostic",
Expand Down Expand Up @@ -233,6 +240,7 @@
"GAIN_ACCOUNT":"Compte excedant",
"GENDER":"Sexe",
"GENERAL_LEDGER":"Grand Livre",
"GLOBAL_QUANTITY":"Quantité globale",
"GRADE":"Grade",
"GROUP":"Groupe",
"GROUPS_DEBTOR_TITLE":"Groupe débiteur",
Expand Down Expand Up @@ -327,6 +335,7 @@
"PROFIT_CENTER":"Centre de profit",
"PROJECT":"Projet",
"PROVINCE":"Province",
"PURCHASE_INTERVAL":"Intervalle de commande",
"QUANTITY":"Quantité",
"RECIPIENT":"Facture de ",
"REFERENCE":"Référence",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/purchases.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"CONFIRMED_DESC":"La commande a été confirmée par le fournisseur qu'elle pourra être livrée",
"WAITING_CONFIRMATION":"En Attente de confirmation",
"WAITING_CONFIRMATION_DESC":"Le fournisseur n'a pas encore confirmé qu'il saura fournir la commande",
"PARTIALLY_RECEIVED":"Reçu partiellement",
"RECEIVED":"Reçu en Stock",
"RECEIVED_DESC":"La commande a été reçu et se trouve dans le stock",
"NOT_RECEIVED":"Non Reçu",
Expand Down
102 changes: 102 additions & 0 deletions client/src/i18n/fr/stock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"STOCK" : {
"ALERT" : "Alert",
"ADJUSTMENT" : "Ajustement",
"ADJUSTMENT_TYPE" : "Type d'Ajustement",
"AMOUNT" : "Montant",
"APPROVISIONING" : "Quantité à commander",
"CACHED_DATA" : "Donnees mises en cache",
"CODE" : "Code",
"COST" : "Cout",
"DECREASE" : "Diminution",
"DECREASE_HELP" : "Ajustement de stock en reduisant la quantité des lots des produits en stock",
"DEPOT" : "Depot",
"DEPOT_RESPONSIBLE" : "Gestionnaire du depot",
"DETAILS" : "Details",
"DOCUMENT" : "Document",
"DONATION" : "Donation",
"ENTRY" : "Entrée de stock",
"ENTRY_DATE" : "Date d'entrée",
"ENTRY_DOCUMENT" : "Document d'entrée",
"ENTRY_PURCHASE" : "Achat",
"ENTRY_INTEGRATION" : "Integration",
"EXPIRATION_DATE" : "Date d'expiration",
"EXPIRATION_RISK" : "Risque à Perimer",
"EXPIRATION" : "Expiration",
"EXIT" : "Sortie de stock",
"EXIT_DEPOT" : "Transfert vers un depot",
"EXIT_PATIENT" : "Distribution vers un patient",
"EXIT_SERVICE" : "Distribution vers un service",
"EXIT_LOSS" : "Perte",
"FILE" : "Fiche de stock",
"FLUX" : "Raison",
"FROM" : "Provenance",
"GROUPING" : "Groupage",
"INCREASE" : "Augmentation",
"INCREASE_HELP" : "Ajustement de stock en augmentant la quantité des lots des produits en stock",
"INVENTORY" : "Inventaire",
"IO" : "Entrée/Sortie",
"INPUT" : "Entrée",
"INTEGRATION" : "Integration",
"ITEMS" : "Items",
"LEGEND" : "Legende",
"LOSS" : "Perte de stock",
"LOT" : "Lot",
"LOTS" : "Lots",
"MAXIMUM" : "Stock maximum",
"MINIMUM" : "Stock minimum",
"MONTH" : "Mois de stock",
"MONTHLY_CONSUM" : "Consommation Mensuelle",
"MOTIF" : "Motif",
"MOVEMENTS" : "Mouvements",
"NO_ORDER" : "Pas de commandes",
"OUTPUT" : "Sortie",
"ORDERS" : "Commandes",
"ORIGIN" : "Origin",
"ORIGINS" : "Origines des lots",
"ORIGIN_DOCUMENT" : "Document de l'origine",
"PURCHASE_ORDER" : "Commande d'Achat",
"QUANTITY" : "Quantité",
"RECEIPT" : {
"ADJUSTMENT" : "Ajustement",
"ENTRY_DEPOT" : "Entrée de Stock",
"ENTRY_PURCHASE" : "Entree de Stock - Achat",
"ENTRY_INTEGRATION" : "Entree de Stock - Integration",
"EXIT_PATIENT" : "Sortie de Stock - Patient",
"EXIT_DEPOT" : "Sortie de Stock - Depot",
"EXIT_SERVICE" : "Sortie de Stock - Service",
"EXIT_LOSS" : "Sortie de Stock - Perte"
},
"RECEIVER" : "Recepteur",
"RESPONSIBLE" : "Gestionnaire du stock",
"SEARCH" : "Chercher",
"SECURITY" : "Stock de securité",
"STATUS" : {
"IN_STOCK" : "Disponible",
"LABEL" : "Etat",
"MAXIMUM" : "Stock Max Atteint",
"MINIMUM" : "Stock Min Atteint",
"OVER_MAX" : "Stock Max Depassé",
"SECURITY" : "Stock de Securité Atteint",
"SOLD_OUT" : "Rupture de stock"
},
"SUCCESS" : "Mouvement realisé avec success",
"TO" : "Destination",
"UNIT_COST" : "Cout unitaire"
},
"STOCK_FLUX" : {
"FROM_PURCHASE" : "Commande d'achat",
"FROM_OTHER_DEPOT" : "En provenance d'un depot",
"FROM_ADJUSTMENT" : "Ajustement (Positif)",
"FROM_PATIENT" : "En provenance d'un patient",
"FROM_SERVICE" : "En provenance d'un service",
"FROM_DONATION" : "En provenance d'une donation",
"FROM_INTEGRATION" : "En provenance d'une integration",
"FROM_LOSS" : "En provenance d'une perte",
"TO_OTHER_DEPOT" : "Vers un depot",
"TO_PATIENT" : "Vers un patient",
"TO_SERVICE" : "Vers un service",
"TO_LOSS" : "Vers une perte",
"TO_ADJUSTMENT" : "Ajustement (Negatif)"
}
}
3 changes: 3 additions & 0 deletions client/src/i18n/fr/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"ACTION":"Action",
"AFTER":"Apres",
"AGE":"Age",
"AVAILABLE": "Disponible",
"BALANCE":"Balance",
"AMOUNT":"Montant",
"ASSET":"Actif",
Expand Down Expand Up @@ -42,6 +43,7 @@
"ENTERPRISE_ID":"ID enterprise",
"ERROR_TYPE":"Type d'erreur",
"EXCHANGE_RATE":"Taux de change",
"EXPIRATION_DATE":"Date d'expiration",
"FILTERING":{"LABEL":"Filtre"},
"FIRST_NAME":"Prenom",
"FUNCTION":"Fonction",
Expand All @@ -66,6 +68,7 @@
"LISTS":"Liste des prix enregistrés",
"LOADING":"Récupération des données à partir du serveur.",
"LOCKED":"Bloquée",
"LOT":"Lot",
"PAYMENT_INVOICE":"paiement pour cette facture",
"NAME":"Nom",
"NATURE":"Nature",
Expand Down
Loading

0 comments on commit 1c5364b

Please sign in to comment.