@provis/provis-common-be-module 1.7.6 → 1.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ declare const quotation: {
2
+ TYPE_QUOTATION_ATTACHMENT_DOC_OTHER: {
3
+ code: string;
4
+ desc: {
5
+ en: string;
6
+ id: string;
7
+ };
8
+ };
9
+ TYPE_QUOTATION_ATTACHMENT_PREMIUM_NOTE: {
10
+ code: string;
11
+ desc: {
12
+ en: string;
13
+ id: string;
14
+ };
15
+ };
16
+ TYPE_QUOTATION_ATTACHMENT_COMMISSION_NOTE: {
17
+ code: string;
18
+ desc: {
19
+ en: string;
20
+ id: string;
21
+ };
22
+ };
23
+ LIST: any[];
24
+ };
25
+ export default quotation;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const quotation = {
4
+ TYPE_QUOTATION_ATTACHMENT_DOC_OTHER: {
5
+ code: 'OTHER',
6
+ desc: {
7
+ en: "Other Document",
8
+ id: "Dokumen Lainnya"
9
+ },
10
+ },
11
+ TYPE_QUOTATION_ATTACHMENT_PREMIUM_NOTE: {
12
+ code: 'PREMIUM_NOTE',
13
+ desc: {
14
+ en: "Premium Note",
15
+ id: "Catatan Premi"
16
+ },
17
+ },
18
+ TYPE_QUOTATION_ATTACHMENT_COMMISSION_NOTE: {
19
+ code: 'COMMISSION_NOTE',
20
+ desc: {
21
+ en: "Commission Note",
22
+ id: "Catatan Komisi"
23
+ },
24
+ },
25
+ LIST: [],
26
+ };
27
+ quotation.LIST.push(quotation.TYPE_QUOTATION_ATTACHMENT_PREMIUM_NOTE);
28
+ quotation.LIST.push(quotation.TYPE_QUOTATION_ATTACHMENT_COMMISSION_NOTE);
29
+ quotation.LIST.push(quotation.TYPE_QUOTATION_ATTACHMENT_DOC_OTHER);
30
+ exports.default = quotation;
@@ -3,11 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
4
  const brokerage_1 = require("../constants/brokerage");
5
5
  function default_1(request) {
6
+ if (!request.type) {
7
+ return null;
8
+ }
6
9
  switch (request.type.toLowerCase()) {
7
10
  case brokerage_1.default.TYPE_BROKERAGE_FIX_AMOUNT.code:
8
11
  return request.rate;
9
12
  case brokerage_1.default.TYPE_BROKERAGE_PERCENTAGE.code:
10
13
  return request.rate * request.amount / 100;
11
- default: null;
14
+ default:
15
+ return null;
12
16
  }
13
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provis/provis-common-be-module",
3
- "version": "1.7.6",
3
+ "version": "1.7.8",
4
4
  "description": "This common module for Provis internal backend use lib",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {