Skip to content

Commit

Permalink
shipment database structure
Browse files Browse the repository at this point in the history
shipment in transit

update shipment status

shipment entry and status handling

fix duplication of lot's line in the entry receipt

fix ordering in the receipt

starting shipment registry

Handling search modal

Handle save grid state

Export to pdf, csv and excel the shipments report

Create and update shipment packing list

fix client routing 403 error

Handle status updates

Handle shipment overview

Enhance shipment overview and removing current_depot references

Shipment barcode

Fix unit and ui

Do not allow affected assets

do not restrict to only asset but reduce quantity of affected lot

Add link to reference

fix quantity reduction on edit shipment

remove not necessary shipment routes

Shipment exit from stock exit module

shipment database structure

shipment in transit

update shipment status

shipment entry and status handling

Handling search modal

Export to pdf, csv and excel the shipments report

fix client routing 403 error

Handle status updates

Handle shipment overview

Enhance shipment overview and removing current_depot references

Shipment barcode

fix quantity reduction on edit shipment

remove not necessary shipment routes

fix entry shipment reference and apply exit refactoring

force block on shipment data not loaded correctly

fix server side queries and schema

allow deletion of ready shipment

Wait for async process finished

Add integration test

Forbid expired lot

Fixes according reviews

Add shipment information in the stock entry modal for transfer

Use of created_at date
  • Loading branch information
mbayopanda committed Mar 24, 2022
1 parent d171c5a commit e9bcb65
Show file tree
Hide file tree
Showing 68 changed files with 4,347 additions and 14 deletions.
87 changes: 87 additions & 0 deletions client/src/css/structure.css
Original file line number Diff line number Diff line change
Expand Up @@ -1209,3 +1209,90 @@ table.lot-schedule .right {
form.NoSubmitButton div.modal-footer button.btn-primary {
display: none;
}

/* --------------------------------------------------------
stepper
--------------------------------------------------------- */
.stepper-wrapper {
margin-top: auto;
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}

.stepper-item {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
}

@media (max-width: 768px) {
.stepper-item {
font-size: 12px;
}
}

.stepper-item::before {
position: absolute;
content: "";
border-bottom: 5px solid #ccc;
width: 100%;
top: 20px;
left: -50%;
z-index: 2;
}

.stepper-item::after {
position: absolute;
content: "";
border-bottom: 5px solid #ccc;
width: 100%;
top: 20px;
left: 50%;
z-index: 2;
}

.stepper-item .step-counter {
position: relative;
z-index: 5;
display: flex;
justify-content: center;
align-items: center;
width: 40px;
height: 40px;
border-radius: 50%;
background: #ccc;
margin-bottom: 6px;
}

.stepper-item.active {
font-weight: bold;
}

.stepper-item.completed .step-counter {
background-color: var(--ima-blue);
color: white;
}

.stepper-item.completed::after {
position: absolute;
content: "";
border-bottom: 5px solid var(--ima-blue);
width: 100%;
top: 20px;
left: 50%;
z-index: 3;
}

.stepper-item.completed.active::after {
border-bottom: 5px solid #ccc;
}

.stepper-item:first-child::before {
content: none;
}
.stepper-item:last-child::after {
content: none;
}
20 changes: 20 additions & 0 deletions client/src/i18n/en/asset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"ASSET" : {
"TITLE" : "Asset",
"STATUS" : {
"EMPTY" : "Empty",
"PARTIAL" : "Partial",
"COMPLETE" : "Complete",
"IN_TRANSIT" : "In Transit",
"DELIVERED" : "Delivered",
"AT_DEPOT" : "At Depot",
"READY_FOR_SHIPMENT" : "Ready for shipment",
"LOST" : "LOST"
},
"CONDITION" : {
"NEW" : "New",
"GOOD" : "Good",
"BROKEN" : "Broken"
}
}
}
3 changes: 3 additions & 0 deletions client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@
"REFERENCE_NUMBER": "Reference number",
"REFERENCE_PATIENT": "Patient Reference",
"REFERENCE_VOUCHER" : "Voucher Reference",
"REFERENCE_SHIPMENT" : "Shipment Reference",
"REFERENCE": "Reference",
"REFERENCE_STOCK_MOVEMENT" : "Stock Movement Reference",
"REFERENCES": "References",
Expand Down Expand Up @@ -977,6 +978,7 @@
"BED":"Select a Bed",
"CASHBOX": "Select a cashbox",
"CASHBOX_OPTIONAL": "Select a cashbox (optional)",
"CONDITION": "Select a condition",
"COST_CENTER": "Select a Cost Center",
"COUNTRY": "Select Country",
"CREDITOR_GROUP": "Select a Creditor Group",
Expand Down Expand Up @@ -1016,6 +1018,7 @@
"PROVINCE": "Select a Province",
"REFERENCE_GROUP": "Select a Reference Group",
"REFERENCE_REQUISITION": "Select the reference of the requisition",
"REFERENCE_SHIPMENT": "Select the shipment reference",
"REFERENCE": "Select a Reference",
"RENDERER" : "Select a Renderer",
"REPORT_TYPE": "Select a Report Type",
Expand Down
60 changes: 60 additions & 0 deletions client/src/i18n/en/shipment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"SHIPMENT" : {
"TITLE" : "Shipment",
"SHIPMENTS": "Shipments",
"SHIPMENT_REFERENCE": "Shipment Reference",
"SHIPMENT_DATE": "Expedition",
"SHIPPER": "Shipper",
"REQUISITION": "Requisition",
"ORIGIN_DEPOT": "Origin depot",
"CURRENT_DEPOT": "Current depot",
"CURRENT_LOCATION": "Current location",
"DESTINATION_DEPOT": "Destination depot",
"DATE_PACKED": "Date packed",
"DATE_SENT": "Date sent",
"DATE_DELIVERED": "Date delivered",
"ANTICIPATED_DELIVERY_DATE": "Anticipated delivery date",
"RECEIVER": "Receiver",
"CREATED_BY": "Created by",
"CREATE": "Create",
"EDIT": "Edit",
"DELETE": "Delete",
"REFERENCE": "Reference",
"STOCK_REFERENCE": "Stock Reference",
"PACKING": "Packing",
"PACKING_LIST": "Packing List",
"NEW_SHIPMENT": "New Shipment",
"SHIPMENT_REGISTRY": "Shipment Registry",
"UPDATE_LOCATION": "Update Location",
"UPDATE_LOCATION_MESSAGE": "You are about to change the location of this shipment, this information will be saved in the history of this shipment",
"UPDATE_LOCATION_WARNING": "You cannot change the location because only shipments with an IN-TRANSIT status can allow the change of location",
"UPDATE_STATUS": "Update Status",
"UPDATE_PACKING_LIST": "Update Packing List",
"READY_TO_SHIP": "Ready to ship",
"READY_TO_SHIP_MESSAGE":"By validating, you confirm that this shipment is ready to leave the warehouse; You will no longer be able to make changes to it.",
"OVERVIEW": "Shipment Overview",
"CONDITION": "Condition",
"CREATED": "Shipment successfully created",
"UPDATED": "Shipment successfully updated",
"DELETED": "Shipment successfully deleted",
"NOT_DEFINED": "Not Defined",
"NEW_LOCATION": "New Location",
"SHIPMENT_STATUS": "Shipment Status",
"SHIPMENT_LOCATION_TRACKING": "Locations Tracking",
"LOCATION": "Location",
"TRACKING_LOG": "Tracking Log",
"UPDATE_TRACKING_LOG_WARNING": "You cannot update the tracking log, as only shipments with IN-TRANSIT status can be updated",
"UPDATE_TRACKING_LOG_MESSAGE": "Please provide current shipping location and other important new information",
"CURRENT_STATUS": "Current status",
"BARCODE": "Shipment Barcode",
"ENTER_SHIPMENT_PROGRESS": "Please enter the shipment progress status",
"ENTER_SHIPMENT_PROGRESS_HELP_TEXT": "Ex. RECEPTION - IMA GOMA WAREHOUSE, GOMA",
"DELIVERY_EXPECTED_ON": "Delivery expected on",
"EXISTING_SHIPMENT_AT_DEPOT": "Current shipment in the depot ({{number}})",
"PLEASE_SHIP_EXISTING_SHIPMENT": "Please ship or cancel these existing shipments",
"EXISTING_ASSETS_IN_OTHER_SHIPMENT": "You have the following assets in ongoing shipments. Please send or cancel these shipments so that you can reassign those assets",
"DOES_SHIPMENT_EXIST": "Do you have a ready shipment?",
"DOES_SHIPMENT_EXIST_HELP": "Please provide the reference of a ready shipment",
"IS_IN_TRANSIT_TOOLTIP": "This inventory is in transit to the depot ({{depot}})"
}
}
1 change: 1 addition & 0 deletions client/src/i18n/en/stock.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
"QUANTITY_RECEIVED" : "Quantity Received",
"QUANTITY_REMAINING" : "Quantity Remaining",
"QUANTITY_SENT" : "Quantity Sent",
"TOTAL_QUANTITY_RECEIVED" : "Total Received",
"SERVICE_DISTRIBUTION" : "Service Distribution",
"TRANSFER_AVAILABLE" : "Available",
"TRANSFER_COMPLETED" : "Transfer was already completed!",
Expand Down
3 changes: 2 additions & 1 deletion client/src/i18n/en/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"AGGREGATED_STOCK_CONSUMPTION" : "Compute Aggregate Stock Consumption",
"ALLOCATION_AUX_FEES_CENTERS" : "Allocation of Auxiliary Cost Centers",
"ASSET_MANAGEMENT" : {
"TITLE" : "Asset Management"
"TITLE" : "Asset Management",
"SHIPMENTS" : "Shipments"
},
"ASSETS" : "Assets",
"ASSETS_REGISTRY" : "Assets Registry",
Expand Down
20 changes: 20 additions & 0 deletions client/src/i18n/fr/asset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"ASSET" : {
"TITLE" : "Actif",
"STATUS" : {
"EMPTY" : "Vide",
"PARTIAL" : "En partie",
"COMPLETE" : "Complète",
"IN_TRANSIT" : "En transit",
"DELIVERED" : "Livré",
"AT_DEPOT" : "Au dépôt",
"READY_FOR_SHIPMENT" : "Prêt pour l'expédition",
"LOST" : "Perdu"
},
"CONDITION" : {
"NEW" : "Neuf",
"GOOD" : "Bon",
"BROKEN" : "Abimé"
}
}
}
3 changes: 3 additions & 0 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@
"REFERENCE_NUMBER": "Numéro de référence",
"REFERENCE_PATIENT": "Référence Patient",
"REFERENCE_VOUCHER": "Référence Bordereau",
"REFERENCE_SHIPMENT" : "Référence Expédition",
"REFERENCE": "Référence",
"REFERENCE_STOCK_MOVEMENT" : "Référence de mouvement stock",
"REFERENCES": "Références",
Expand Down Expand Up @@ -977,6 +978,7 @@
"BED":"Sélectionner un lit",
"CASHBOX": "Sélectionner une caisse",
"CASHBOX_OPTIONAL": "Sélectionner une caisse (optionnel)",
"CONDITION": "Sélectionner une condition",
"COST_CENTER": "Sélectionnez un centre de coûts",
"COUNTRY": "Sélectionner le pays",
"CREDITOR_GROUP": "Sélectionner un Groupe Créditeur",
Expand Down Expand Up @@ -1016,6 +1018,7 @@
"PROVINCE": "Sélectionner une province",
"REFERENCE_GROUP": "Sélectionner un groupe de référence",
"REFERENCE_REQUISITION": "Sélectionner la référence de la requisition",
"REFERENCE_SHIPMENT": "Sélectionner la référence de l'expédition",
"REFERENCE": "Sélectionner la Référence",
"RENDERER" : "Sélectionner un rendu",
"REPORT_TYPE": "Sélectionner le type de rapport",
Expand Down
60 changes: 60 additions & 0 deletions client/src/i18n/fr/shipment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"SHIPMENT" : {
"TITLE" : "Expedition",
"SHIPMENTS": "Expéditions",
"SHIPMENT_REFERENCE": "Référence Expédition",
"SHIPMENT_DATE": "Date de l'expédition",
"SHIPPER": "Transporteur",
"REQUISITION": "Requisition",
"ORIGIN_DEPOT": "Dépôt d'origine",
"CURRENT_DEPOT": "Dépôt en cours",
"CURRENT_LOCATION": "Localisation en cours",
"DESTINATION_DEPOT": "Dépôt de destination",
"DATE_PACKED": "Date colisage",
"DATE_SENT": "Date d'envoi",
"DATE_DELIVERED": "Date de livraison",
"ANTICIPATED_DELIVERY_DATE": "Date de livraison previsionnelle",
"RECEIVER": "Recepteur",
"CREATED_BY": "Crée par",
"CREATE": "Créer",
"EDIT": "Editer",
"DELETE": "Supprimer",
"REFERENCE": "Reférence",
"STOCK_REFERENCE": "Stock Reférence",
"PACKING": "Colisage",
"PACKING_LIST": "Liste de colisage",
"NEW_SHIPMENT": "Nouvelle expédition",
"SHIPMENT_REGISTRY": "Registre des expéditions",
"UPDATE_LOCATION": "Mise à jour localisation",
"UPDATE_LOCATION_MESSAGE": "Vous êtes sur le point de changer la localisation de cette expédition, cette information sera enregistrée dans l'historique de cette expédition",
"UPDATE_LOCATION_WARNING": "Vous ne pouvez pas changer la localisation car seul les expéditions ayant un statut EN-TRANSIT peuvent bénéficier du changement de localisation",
"UPDATE_STATUS": "Mise à jour statut",
"UPDATE_PACKING_LIST": "Mise à jour colisage",
"READY_TO_SHIP": "Prêt pour l'expédition",
"READY_TO_SHIP_MESSAGE": "En validant, vous confirmez que cette expédition est prête pour la sortie du dépôt; Vous ne pourrez plus y effectuer des changements",
"OVERVIEW": "Aperçu de l'expédition",
"CONDITION": "Condition",
"CREATED": "Expédition créee avec succès",
"UPDATED": "Expédition mis à jour avec succès",
"DELETED": "Expédition supprimée avec succès",
"NOT_DEFINED": "Non-défini",
"NEW_LOCATION": "Nouvelle localisation",
"SHIPMENT_STATUS": "Etat de l'expédition",
"SHIPMENT_LOCATION_TRACKING": "Suivi des emplacements",
"LOCATION": "Localisation",
"TRACKING_LOG": "Journal de suivi",
"UPDATE_TRACKING_LOG_WARNING": "Vous ne pouvez pas mettre à jour le journal de suivi, car seule les expéditions ayant un statut EN-TRANSIT peuvent être mise à jour",
"UPDATE_TRACKING_LOG_MESSAGE": "Veuillez préciser la localisation actuelle de l'expédition et d'autres nouvelles informations importantes",
"CURRENT_STATUS": "Etat actuel",
"BARCODE": "Code-barre de l'expédition",
"ENTER_SHIPMENT_PROGRESS": "Veuillez entrer l'etat de progression de l'expédition",
"ENTER_SHIPMENT_PROGRESS_HELP_TEXT": "Ex. RECEPTION - IMA GOMA WAREHOUSE, GOMA",
"DELIVERY_EXPECTED_ON": "Livraison attendue le",
"EXISTING_SHIPMENT_AT_DEPOT": "Les expéditions en cours dans le dépôt ({{number}})",
"PLEASE_SHIP_EXISTING_SHIPMENT": "Veuillez envoyer ou annuler les expéditions existantes encore dans le dépôt",
"EXISTING_ASSETS_IN_OTHER_SHIPMENT": "Vous avez les actifs suivants dans des expéditions en cours. Veuillez envoyer ou annuler ces expéditions afin de pouvoir re-affecter ces actifs",
"DOES_SHIPMENT_EXIST": "Avez-vous une expédition prête ?",
"DOES_SHIPMENT_EXIST_HELP": "Veuillez renseigner la référence de l'expédition prête",
"IS_IN_TRANSIT_TOOLTIP": "Cet inventaire est en transit vers le depot ({{depot}})"
}
}
9 changes: 8 additions & 1 deletion client/src/i18n/fr/stock.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@
"QUANTITY_CONSUMED_OVER_GLOBAL" : "La quantité totale consommé dépasse la quantity globale consommée",
"QUANTITY_LOST_LOWER" : "La quantité totale perdue est inférieure à la quantity globale perdue",
"QUANTITY_LOST_OVER_GLOBAL" : "La quantité totale perdue dépasse la quantity globale perdue",
"UNITIALISED" : "Cette ligne de grille est vide et non initialisée. Veuillez le supprimer pour le soumettre."
"UNITIALISED" : "Cette ligne de grille est vide et non initialisée. Veuillez le supprimer pour le soumettre.",
"LOT_EXPIRED" : "Lot {{ label }} est expiré. Sa date d'expiration ({{expiration_date | date }}) précède la date selectionnée.",
"LOT_MISSING_INVENTORY_INFO" : "Lot {{ label }} manque les informations d'inventaire. Veuillez selectionner l'inventaire pour continuer.",
"LOT_MISSING_LOT_INFO" : "Lot {{ uuid }} manque les informations de lot. Veuillez selectionner le libellé du lot pour continuer.",
"LOT_NEGATIVE_QUANTITY" : "Lot {{ label }} a une quantité négative.",
"LOT_OVERCONSUMPTION" : "Lot {{ label }} est sur-utilisé. Attendu {{quantity}} {{unit}} doit être moins que {{_quantity_available}} {{ unit }}.",
"LOT_UNUSED" : "Lot {{ label }} n'est pas utilisé (0 {{ unit }} séléctionné). Veuillez spécifier une quantité pour continuer."
},
"ENTRY_ADJUSTMENT" : "Ajustement positif de {{numArticles}} articles de dans {{depot}} par {{user}}.",
"EXIT" : "Sortie de stock",
Expand Down Expand Up @@ -223,6 +229,7 @@
"QUANTITY_RECEIVED" : "Quantité reçue",
"QUANTITY_REMAINING" : "Quantité restante",
"QUANTITY_SENT" : "Quantité envoyée",
"TOTAL_QUANTITY_RECEIVED" : "Total reçue",
"SERVICE_DISTRIBUTION" : "Distribution au Service",
"TRANSFER_AVAILABLE" : "Disponible",
"TRANSFER_COMPLETED" : "Le transfert était déjà terminé !",
Expand Down
3 changes: 2 additions & 1 deletion client/src/i18n/fr/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"AGGREGATED_STOCK_CONSUMPTION" : "Consommation de stock agrégée",
"ALLOCATION_AUX_FEES_CENTERS" : "Allocation des centres de cout auxiliaires",
"ASSET_MANAGEMENT" : {
"TITLE" : "Gestion des actifs"
"TITLE" : "Gestion des actifs",
"SHIPMENTS" : "Expéditions"
},
"ASSETS" : "Actifs",
"ASSETS_REGISTRY" : "Registre des actifs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<ng-form name="HasShipmentForm">
<bh-yes-no-radios
label="SHIPMENT.DOES_SHIPMENT_EXIST"
value="$ctrl.shipmentVoucherExist"
name="shipmentVoucherExist"
id="shipmentVoucherExist"
help-text="SHIPMENT.DOES_SHIPMENT_EXIST_HELP"
on-change-callback="$ctrl.onChangeVoucherExist(value)">
</bh-yes-no-radios>

<!-- reference -->
<div class="form-group" ng-if="$ctrl.shipmentVoucherExist">
<!-- Shipment -->
<bh-shipment-select
shipment-uuid="$ctrl.shipmentReference"
depot-uuid="$ctrl.depotUuid"
required="true"
ready="true"
disabled="$ctrl.shipmentDisabled"
on-select-callback="$ctrl.onSelectShipment(shipment)">
</bh-shipment-select>

<div class="help-block" ng-show="$ctrl.message">
<p ng-class="$ctrl.classeLabel" translate>{{ $ctrl.message }}</p>
</div>
</div>
</ng-form>
Loading

0 comments on commit e9bcb65

Please sign in to comment.