From 931541354a0be9da00b5a5948362269e87527abb Mon Sep 17 00:00:00 2001 From: mbayopanda Date: Thu, 29 Sep 2022 17:22:18 +0100 Subject: [PATCH] Add info to purchase order --- client/src/i18n/en/entity.json | 1 + client/src/i18n/fr/entity.json | 1 + client/src/i18n/fr/purchases.json | 19 ++ client/src/js/components/bhInputText.js | 1 + client/src/modules/entities/entities.js | 5 + .../src/modules/entities/entities.service.js | 2 +- .../modules/entities/modals/entity.modal.html | 6 + .../purchases/create/PurchaseOrderForm.js | 15 +- .../purchases/create/createUpdate.html | 202 ++++++++++++------ .../modules/suppliers/modal/createUpdate.html | 61 +++--- .../modules/suppliers/modal/createUpdate.js | 16 +- .../modules/templates/bhInputText.tmpl.html | 1 + server/controllers/admin/entities/index.js | 4 +- server/controllers/admin/suppliers.js | 30 ++- server/controllers/finance/purchases.js | 13 +- .../reports/purchases.receipt.handlebars | 132 +++++++++++- .../partials/enterpriseDetails.handlebars | 3 +- server/models/migrations/next/migrate.sql | 16 +- server/models/schema.sql | 16 +- 19 files changed, 429 insertions(+), 115 deletions(-) diff --git a/client/src/i18n/en/entity.json b/client/src/i18n/en/entity.json index ab13d777dd..f34158e81f 100644 --- a/client/src/i18n/en/entity.json +++ b/client/src/i18n/en/entity.json @@ -5,6 +5,7 @@ "ASSIGNED_TO": "Assigned to", "EDIT_ENTITY":"Edit Contact", "NAME":"Name", + "TITLE":"Title", "SEX":"Sex", "PHONE":"Phone", "EMAIL":"Email", diff --git a/client/src/i18n/fr/entity.json b/client/src/i18n/fr/entity.json index e132f397db..63901e169d 100644 --- a/client/src/i18n/fr/entity.json +++ b/client/src/i18n/fr/entity.json @@ -5,6 +5,7 @@ "ASSIGNED_TO": "Attribué à", "EDIT_ENTITY":"Modifier le contact", "NAME":"Nom", + "TITLE":"Titre", "SEX":"Sex", "PHONE":"Téléphone", "EMAIL":"Email", diff --git a/client/src/i18n/fr/purchases.json b/client/src/i18n/fr/purchases.json index af693da888..9e64caf4cc 100644 --- a/client/src/i18n/fr/purchases.json +++ b/client/src/i18n/fr/purchases.json @@ -25,6 +25,25 @@ "RECEIVED_DESC" : "La commande a été reçu et se trouve dans le stock", "WAITING_CONFIRMATION" : "En Attente de confirmation", "WAITING_CONFIRMATION_DESC" : "Le fournisseur n'a pas encore confirmé qu'il saura fournir la commande" + }, + "INFO" : { + "PURCHASE_NUMBER" : "Numero commande", + "PRF_NUMBER" : "Numero PRF", + "CONTACT_NAME" : "Personne de contact", + "CONTACT_PHONE" : "Téléphone du contact", + "CONTACT_TITLE" : "Titre du contact", + "DELIVERY_LOCATION" : "Lieu de livraison", + "DELIVERY_DATE" : "Date de livraison", + "DELIVERY_CONDITION" : "Condition de livraison", + "PAYMENT_CONDITION" : "Condition de paiement", + "SPECIAL_INSTRUCTION" : "Instruction speciale", + "REQUESTED_BY": "Demandé par (nom en caractères d'imprimerie)", + "APPROVED_BY": "Approuvé par (nom en caractères d'imprimerie)", + "APPROVED_TWO_BY": "Deuxième approbation (nom en caractères d'imprimerie)", + "SIGNATURE": "Signature", + "DATE": "Date", + "TITLE": "Titre", + "SUPPLIER_OBLIGATION": "Le fournisseur est tenu de signer et de renvoyer une copie de ce bon de commande :" } } } diff --git a/client/src/js/components/bhInputText.js b/client/src/js/components/bhInputText.js index 82878e1b4a..233e82dd8d 100644 --- a/client/src/js/components/bhInputText.js +++ b/client/src/js/components/bhInputText.js @@ -15,6 +15,7 @@ angular.module('bhima.components') key : '@?', description : '@?', isCurrency : ' util.maskObjectFromKeys(entity, entityKeys); return service; diff --git a/client/src/modules/entities/modals/entity.modal.html b/client/src/modules/entities/modals/entity.modal.html index f223f75c9d..f97088e81e 100644 --- a/client/src/modules/entities/modals/entity.modal.html +++ b/client/src/modules/entities/modals/entity.modal.html @@ -23,6 +23,12 @@ + +
+ + +
+
    -
  1. TREE.INVENTORY
  2. -
  3. PURCHASES.PAGE_TITLE
  4. +
  5. PURCHASES.PAGE_TITLE
  6. +
  7. TREE.PURCHASE
@@ -22,59 +22,52 @@
-
+
- - + + -
- + + -
- -
-
- -
-
- -
+ + -
-
-
-
+
+ + + + +
+
+ + -
@@ -107,24 +100,6 @@ {{ PurchaseCtrl.currentExchangeRate | currency:PurchaseCtrl.rate.currency.id }} FORM.INFO.PER {{PurchaseCtrl.enterprise.currencySymbol}}
- -
- - -
-
-
-
-
@@ -142,12 +117,119 @@
+
+ + +
+ +
+
+ +
+
+ +
+ +
+
+
+
+ +
+ + +
+
+
+ + + + + + + +
+ + +
+
+
+
+ + +
+
+
+
+
+
+
+ + +
+
+
+
diff --git a/client/src/modules/suppliers/modal/createUpdate.html b/client/src/modules/suppliers/modal/createUpdate.html index 284f3e9347..40776deead 100644 --- a/client/src/modules/suppliers/modal/createUpdate.html +++ b/client/src/modules/suppliers/modal/createUpdate.html @@ -13,9 +13,8 @@