From 5e9b3df4794319ae8f080c539034cd1211a041b3 Mon Sep 17 00:00:00 2001 From: mbayopanda Date: Tue, 11 Oct 2022 06:37:46 +0100 Subject: [PATCH] purchase order additional details --- .../purchases/create/createUpdate.html | 377 +++++++++--------- server/controllers/finance/purchases.js | 4 +- .../reports/purchases.receipt.handlebars | 33 +- 3 files changed, 209 insertions(+), 205 deletions(-) diff --git a/client/src/modules/purchases/create/createUpdate.html b/client/src/modules/purchases/create/createUpdate.html index fd56a5e98b..bfb51ca4da 100644 --- a/client/src/modules/purchases/create/createUpdate.html +++ b/client/src/modules/purchases/create/createUpdate.html @@ -18,212 +18,209 @@ ng-submit="PurchaseCtrl.submit(PurchaseOrderForm)" novalidate> -
-
-
-
-
- - - - - - -
- - - - - {{ PurchaseCtrl.format($select.selected.id) }} - - - - - - -
-
-
+
+
+
+
+ + + + + + +
+ + +
+
- -
- EXCHANGE.CURRENT_RATE: - {{ PurchaseCtrl.currentExchangeRate | currency:PurchaseCtrl.rate.currency.id }} - FORM.INFO.PER {{PurchaseCtrl.enterprise.currencySymbol}} +
+
+
+
+ + + + + {{ PurchaseCtrl.format($select.selected.id) }} + + + + + + +
+
-
- - -
-
-
+
+ +
+ EXCHANGE.CURRENT_RATE: + {{ PurchaseCtrl.currentExchangeRate | currency:PurchaseCtrl.rate.currency.id }} + FORM.INFO.PER {{PurchaseCtrl.enterprise.currencySymbol}} +
+
+ + +
+
- -
- +
-
- -
-
- -
-
- -
+
+ -
-
-
+
+
- - -
- - -
-
-
+
+ +
+
+ +
+ +
+
-
-
- -
- - +
+
- - +
+ +
+ + + + +
+ +
+ + - - + + -
+ + +
+ +
+ + - - - - -
+ + +
+ +
-
- - - - - - -
- - -
- -
- - -
+
+ + +
-
- - -
+
+ +
diff --git a/server/controllers/finance/purchases.js b/server/controllers/finance/purchases.js index 2cb3712ee7..d0b592ffd0 100644 --- a/server/controllers/finance/purchases.js +++ b/server/controllers/finance/purchases.js @@ -130,7 +130,8 @@ function lookupPurchaseOrder(uid) { p.info_delivery_condition, p.info_special_instruction, p.info_payment_condition, - s.address_1, s.email, s.phone + s.address_1, s.email, s.phone, + curr.format_key, curr.symbol FROM purchase AS p JOIN document_map dm ON p.uuid = dm.uuid JOIN project ON p.project_id = project.id @@ -138,6 +139,7 @@ function lookupPurchaseOrder(uid) { JOIN project AS pr ON p.project_id = pr.id JOIN user AS u ON u.id = p.user_id JOIN purchase_status AS ps ON ps.id = p.status_id + JOIN currency curr ON curr.id = p.currency_id WHERE p.uuid = ?; `; diff --git a/server/controllers/inventory/reports/purchases.receipt.handlebars b/server/controllers/inventory/reports/purchases.receipt.handlebars index 3c4abde683..8018bad993 100644 --- a/server/controllers/inventory/reports/purchases.receipt.handlebars +++ b/server/controllers/inventory/reports/purchases.receipt.handlebars @@ -8,11 +8,11 @@ white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; - font-size: 0.7em; + font-size: 0.5em; } -
+
{{#> header}}

{{purchase.reference}}

{{#if metadata.enterprise.settings.enable_barcodes}} @@ -34,7 +34,7 @@
- {{#if metadata.enterprise.settings.purchase_general_condition}} + {{#if metadata.enterprise.settings.enable_prf_details}}
{{translate 'PURCHASES.INFO.PURCHASE_NUMBER'}}
@@ -81,20 +81,25 @@ - - - - - - + + + + + + + + + + + {{#each purchase.items}} - - - + + + @@ -187,8 +192,8 @@
- {{#if metadata.enterprise.settings.purchase_general_condition}} -
+ {{#if metadata.enterprise.settings.enable_prf_details}} +
{{ metadata.enterprise.settings.purchase_general_condition }}
{{/if}}
{{translate "FORM.LABELS.CODE" }}{{translate "FORM.LABELS.INVENTORY_ITEM" }}{{translate "FORM.LABELS.TYPE" }}{{translate "FORM.LABELS.QUANTITY" }}{{translate "FORM.LABELS.UNIT_PRICE" }}{{translate "FORM.LABELS.TOTAL" }}{{translate "FORM.LABELS.CURRENCY" }}{{ purchase.format_key }}{{ purchase.format_key }}
{{translate "FORM.LABELS.NR" }}{{translate "FORM.LABELS.QUANTITY" }}{{translate "FORM.LABELS.UNITS" }}{{translate "FORM.LABELS.DESCRIPTION" }}{{translate "FORM.LABELS.UNIT_PRICE" }}{{translate "FORM.LABELS.TOTAL" }}
{{this.code}}{{this.text}}{{this.unit}}{{add @index 1}} {{this.quantity}}{{translate this.unit_type}}{{this.text}} {{currency this.unit_price ../purchase.currency_id}} {{currency this.total ../purchase.currency_id}}