@hyper.software/common-helpers 1.11.18 → 1.11.20

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.
Files changed (37) hide show
  1. package/lib/services/bookingService/__tests__/bookingInvoiceService.getAdultAndChildrenCount.test.js +2 -2
  2. package/lib/services/bookingService/__tests__/bookingInvoiceService.getAdultAndChildrenCount.test.js.map +1 -1
  3. package/lib/services/bookingService/__tests__/bookingInvoiceService.test.js +1 -37
  4. package/lib/services/bookingService/__tests__/bookingInvoiceService.test.js.map +1 -1
  5. package/lib/services/bookingService/__tests__/bookingService.initialiseProducts.test.js +4 -58
  6. package/lib/services/bookingService/__tests__/bookingService.initialiseProducts.test.js.map +1 -1
  7. package/lib/services/bookingService/__tests__/bookingsService. getSeasonalNights.test.js +1 -1
  8. package/lib/services/bookingService/__tests__/bookingsService. getSeasonalNights.test.js.map +1 -1
  9. package/lib/services/bookingService/__tests__/bookingsService.getAccommodationCost.test.js +36 -36
  10. package/lib/services/bookingService/__tests__/bookingsService.getAccommodationCost.test.js.map +1 -1
  11. package/lib/services/bookingService/__tests__/bookingsService.getBookingServiceQuantity.test.js +1 -1
  12. package/lib/services/bookingService/__tests__/bookingsService.getBookingServiceQuantity.test.js.map +1 -1
  13. package/lib/services/bookingService/__tests__/bookingsService.getChildrenCost.test.js +54 -54
  14. package/lib/services/bookingService/__tests__/bookingsService.getChildrenCost.test.js.map +1 -1
  15. package/lib/services/bookingService/__tests__/bookingsService.getLengthOfStay.test.js +36 -36
  16. package/lib/services/bookingService/__tests__/bookingsService.getLengthOfStay.test.js.map +1 -1
  17. package/lib/services/bookingService/__tests__/bookingsService.getServicesCost.test.js +24 -24
  18. package/lib/services/bookingService/__tests__/bookingsService.getServicesCost.test.js.map +1 -1
  19. package/lib/services/bookingService/__tests__/bookingsService.getTotalCost.test.js +32 -32
  20. package/lib/services/bookingService/__tests__/bookingsService.getTotalCost.test.js.map +1 -1
  21. package/lib/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.js +147 -144
  22. package/lib/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.js.map +1 -1
  23. package/lib/services/bookingService/bookingInvoiceService.js +2 -2
  24. package/lib/services/bookingService/bookingInvoiceService.js.map +1 -1
  25. package/lib/services/bookingService/bookingServicesService.d.ts +2 -2
  26. package/lib/services/bookingService/bookingServicesService.js +11 -9
  27. package/lib/services/bookingService/bookingServicesService.js.map +1 -1
  28. package/lib/services/bookingService/bookingsService.d.ts +2 -2
  29. package/lib/services/bookingService/bookingsService.js +17 -17
  30. package/lib/services/bookingService/bookingsService.js.map +1 -1
  31. package/lib/testingData/bookingData.d.ts +0 -13
  32. package/lib/testingData/bookingData.js +700 -67858
  33. package/lib/testingData/bookingData.js.map +1 -1
  34. package/lib/testingData/roomsData.d.ts +4670 -0
  35. package/lib/testingData/roomsData.js +4746 -0
  36. package/lib/testingData/roomsData.js.map +1 -0
  37. package/package.json +1 -1
@@ -4,33 +4,33 @@ var bookingData_1 = require("../../../testingData/bookingData");
4
4
  var companyData_1 = require("../../../testingData/companyData");
5
5
  var bookingsService_1 = require("../bookingsService");
6
6
  describe('WHEN testing .getServicesCost()', function () {
7
- it('SHOULD compute the correct accommodation cost for case 3 - A 2-day booking with services (that are enabled by default), without OBP and without Length of Stay Discount ', function () {
8
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking3, companyData_1.company);
7
+ it('SHOULD compute the correct services cost for booking1 - A 2-day booking with services (that are enabled by default), without OBP and without Length of Stay Discount ', function () {
8
+ var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking1, companyData_1.company);
9
9
  expect(servicesCost).toBe(65);
10
10
  });
11
- it('SHOULD compute the correct accommodation cost for case 4 - A 2-day booking with services (that are enabled by default), with OBP and without Length of Stay Discount ', function () {
12
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking4, companyData_1.company);
11
+ it('SHOULD compute the correct accommodation cost for booking2 - A 2-day booking with services (that are enabled by default), with OBP and without Length of Stay Discount ', function () {
12
+ var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking2, companyData_1.company);
13
13
  expect(servicesCost).toBe(55);
14
14
  });
15
- it('SHOULD compute the correct accommodation cost for case 6 - A 3-day booking with services (enabled by default), with a reduced price by OBP and by the Length of Stay Discount ', function () {
16
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking6, companyData_1.company);
17
- expect(servicesCost).toBe(40);
18
- });
19
- it('SHOULD compute correct accommodation cost for case 11 - A 3-day booking with services that are enabled by default and are seasonal between 2 seasons Extended stay and breakfast', function () {
20
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking11, companyData_1.company);
21
- expect(servicesCost).toBe(105);
22
- });
23
- it('SHOULD compute correct accommodation cost for case 12 - A 4-day booking with services that are enabled by default and are seasonal between 2 seasons Extended stay', function () {
24
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking12, companyData_1.company);
25
- expect(servicesCost).toBe(320);
26
- });
27
- it('SHOULD compute correct accommodation cost for case 13 - A 4-day booking with services that are enabled by default and are seasonal between 2 seasons Extended stay', function () {
28
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking13, companyData_1.company);
29
- expect(servicesCost).toBe(240);
30
- });
31
- it('SHOUlD compute correct accommodation cost for case 15 - A 2 day booking with 4 rooms services that are enabled by default and counting also the per stay services for each room that has them', function () {
32
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking15, companyData_1.company);
33
- expect(servicesCost).toBe(380);
34
- });
15
+ // it('SHOULD compute the correct accommodation cost for booking6 - A 3-day booking with services (enabled by default), with a reduced price by OBP and by the Length of Stay Discount ', () => {
16
+ // const servicesCost = getServicesCost(booking6, company)
17
+ // expect(servicesCost).toBe(40)
18
+ // })
19
+ // it('SHOULD compute correct accommodation cost for booking11 - A 3-day booking with services that are enabled by default and are seasonal between 2 seasons Extended stay and breakfast', () => {
20
+ // const servicesCost = getServicesCost(booking11, company)
21
+ // expect(servicesCost).toBe(105)
22
+ // })
23
+ // it('SHOULD compute correct accommodation cost for booking12 - A 4-day booking with services that are enabled by default and are seasonal between 2 seasons Extended stay', () => {
24
+ // const servicesCost = getServicesCost(booking12, company)
25
+ // expect(servicesCost).toBe(320)
26
+ // })
27
+ // it('SHOULD compute correct accommodation cost for booking13 - A 4-day booking with services that are enabled by default and are seasonal between 2 seasons Extended stay', () => {
28
+ // const servicesCost = getServicesCost(booking13, company)
29
+ // expect(servicesCost).toBe(240)
30
+ // })
31
+ // it('SHOUlD compute correct accommodation cost for booking15 - A 2 day booking with 4 rooms services that are enabled by default and counting also the per stay services for each room that has them', () => {
32
+ // const servicesCost = getServicesCost(booking15, company)
33
+ // expect(servicesCost).toBe(15)
34
+ // })
35
35
  });
36
36
  //# sourceMappingURL=bookingsService.getServicesCost.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bookingsService.getServicesCost.test.js","sourceRoot":"","sources":["../../../../src/services/bookingService/__tests__/bookingsService.getServicesCost.test.ts"],"names":[],"mappings":";;AAAA,gEAA2H;AAC3H,gEAA0D;AAC1D,sDAAoD;AAEpD,QAAQ,CAAC,iCAAiC,EAAE;IAC1C,EAAE,CAAC,0KAA0K,EAAE;QAC7K,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACvD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,uKAAuK,EAAE;QAC1K,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACvD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,gLAAgL,EAAE;QACnL,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACvD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,kLAAkL,EAAE;QACrL,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,uBAAS,EAAE,qBAAO,CAAC,CAAA;QACxD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oKAAoK,EAAE;QACvK,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,uBAAS,EAAE,qBAAO,CAAC,CAAA;QAExD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oKAAoK,EAAE;QACvK,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,uBAAS,EAAE,qBAAO,CAAC,CAAA;QACxD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,+LAA+L,EAAE;QAClM,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,uBAAS,EAAE,qBAAO,CAAC,CAAA;QACxD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"bookingsService.getServicesCost.test.js","sourceRoot":"","sources":["../../../../src/services/bookingService/__tests__/bookingsService.getServicesCost.test.ts"],"names":[],"mappings":";;AAAA,gEAAqE;AACrE,gEAA0D;AAC1D,sDAAoD;AAEpD,QAAQ,CAAC,iCAAiC,EAAE;IAC1C,EAAE,CAAC,uKAAuK,EAAE;QAC1K,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACvD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,yKAAyK,EAAE;QAC5K,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACvD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,iMAAiM;IACjM,4DAA4D;IAC5D,kCAAkC;IAClC,KAAK;IAEL,mMAAmM;IACnM,6DAA6D;IAC7D,mCAAmC;IACnC,KAAK;IAEL,qLAAqL;IACrL,6DAA6D;IAC7D,mCAAmC;IACnC,KAAK;IAEL,qLAAqL;IACrL,6DAA6D;IAC7D,mCAAmC;IACnC,KAAK;IAEL,gNAAgN;IAChN,6DAA6D;IAC7D,kCAAkC;IAClC,KAAK;AACP,CAAC,CAAC,CAAA"}
@@ -12,37 +12,37 @@ describe('WHEN testing .getTotalCost()', function () {
12
12
  var accommodationCost = (0, bookingsService_1.getTotalCost)(bookingData_1.booking2, companyData_1.company);
13
13
  expect(accommodationCost).toBe(248);
14
14
  });
15
- it('SHOULD compute the correct accommodation cost for case 3 - A 2-day booking with services (that are enabled by default), without OBP and without Length of Stay Discount ', function () {
16
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking3);
17
- expect(accommodationCost).toBe(298);
18
- });
19
- it('SHOULD compute the correct accommodation cost for case 4 - A 2-day booking with services (that are enabled by default), with OBP and without Length of Stay Discount ', function () {
20
- var accommodationCost = (0, bookingsService_1.getTotalCost)(bookingData_1.booking4, companyData_1.company);
21
- expect(accommodationCost).toBe(303);
22
- });
23
- it('SHOULD compute the correct accommodation cost for case 5 - A 3-day booking with a reduced price by OBP and by the Length of Stay Discount', function () {
24
- var accommodationCost = (0, bookingsService_1.getTotalCost)(bookingData_1.booking5, companyData_1.company);
25
- expect(accommodationCost).toBe(329.88599999999997);
26
- });
27
- it('SHOULD compute the correct accommodation cost for case 6 - A 3-day booking with services (enabled by default), with a reduced price by OBP and by the Length of Stay Discount ', function () {
28
- var accommodationCost = (0, bookingsService_1.getTotalCost)(bookingData_1.booking6, companyData_1.company);
29
- expect(accommodationCost).toBe(381.94);
30
- });
31
- it('SHOULD compute the correct accommodation cost for case 7 - A 2-day booking at the normal price without OBP or Length of Stay Discount, with 1 child aged 5 years (0 - 10 range)', function () {
32
- var accommodationCost = (0, bookingsService_1.getTotalCost)(bookingData_1.booking7, companyData_1.company);
33
- expect(accommodationCost).toBe(368);
34
- });
35
- it('SHOULD compute the correct accommodation cost for case 8 - A 2-day booking at the normal price with OBP or Length of Stay Discount, with 4 children of various age ranges ', function () {
36
- var accommodationCost = (0, bookingsService_1.getTotalCost)(bookingData_1.booking8, companyData_1.company);
37
- expect(accommodationCost).toBe(508);
38
- });
39
- it('SHOULD compute the correct accommodation cost for case 9 - A 2-day booking with a reduced price by OBP and without Length of Stay Discount, with 4 children of various age ranges ', function () {
40
- var accommodationCost = (0, bookingsService_1.getTotalCost)(bookingData_1.booking9, companyData_1.company);
41
- expect(accommodationCost).toBe(388.79999999999995);
42
- });
43
- it('SHOULD compute the correct accommodation cost for case 9 - A 3-day booking with normal price by OBP and with Length of Stay Discount, with 4 children of various age ranges', function () {
44
- var accommodationCost = (0, bookingsService_1.getTotalCost)(bookingData_1.booking10, companyData_1.company);
45
- expect(accommodationCost).toBe(681.54);
46
- });
15
+ // it('SHOULD compute the correct accommodation cost for case 3 - A 2-day booking with services (that are enabled by default), without OBP and without Length of Stay Discount ', () => {
16
+ // const accommodationCost = getAccommodationCost(booking3)
17
+ // expect(accommodationCost).toBe(298)
18
+ // })
19
+ // it('SHOULD compute the correct accommodation cost for case 4 - A 2-day booking with services (that are enabled by default), with OBP and without Length of Stay Discount ', () => {
20
+ // const accommodationCost = getTotalCost(booking4, company)
21
+ // expect(accommodationCost).toBe(303)
22
+ // })
23
+ // it('SHOULD compute the correct accommodation cost for case 5 - A 3-day booking with a reduced price by OBP and by the Length of Stay Discount', () => {
24
+ // const accommodationCost = getTotalCost(booking5, company)
25
+ // expect(accommodationCost).toBe(329.88599999999997)
26
+ // })
27
+ // it('SHOULD compute the correct accommodation cost for case 6 - A 3-day booking with services (enabled by default), with a reduced price by OBP and by the Length of Stay Discount ', () => {
28
+ // const accommodationCost = getTotalCost(booking6, company)
29
+ // expect(accommodationCost).toBe(381.94)
30
+ // })
31
+ // it('SHOULD compute the correct accommodation cost for case 7 - A 2-day booking at the normal price without OBP or Length of Stay Discount, with 1 child aged 5 years (0 - 10 range)', () => {
32
+ // const accommodationCost = getTotalCost(booking7, company)
33
+ // expect(accommodationCost).toBe(368)
34
+ // })
35
+ // it('SHOULD compute the correct accommodation cost for case 8 - A 2-day booking at the normal price with OBP or Length of Stay Discount, with 4 children of various age ranges ', () => {
36
+ // const accommodationCost = getTotalCost(booking8, company)
37
+ // expect(accommodationCost).toBe(508)
38
+ // })
39
+ // it('SHOULD compute the correct accommodation cost for case 9 - A 2-day booking with a reduced price by OBP and without Length of Stay Discount, with 4 children of various age ranges ', () => {
40
+ // const accommodationCost = getTotalCost(booking9, company)
41
+ // expect(accommodationCost).toBe(388.79999999999995)
42
+ // })
43
+ // it('SHOULD compute the correct accommodation cost for case 9 - A 3-day booking with normal price by OBP and with Length of Stay Discount, with 4 children of various age ranges', () => {
44
+ // const accommodationCost = getTotalCost(booking10, company)
45
+ // expect(accommodationCost).toBe(681.54)
46
+ // })
47
47
  });
48
48
  //# sourceMappingURL=bookingsService.getTotalCost.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bookingsService.getTotalCost.test.js","sourceRoot":"","sources":["../../../../src/services/bookingService/__tests__/bookingsService.getTotalCost.test.ts"],"names":[],"mappings":";;AAAA,gEAWyC;AACzC,gEAA0D;AAC1D,sDAAuE;AAEvE,QAAQ,CAAC,8BAA8B,EAAE;IACvC,EAAE,CAAC,uIAAuI,EAA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IAAM,iBAAiB,GAAG,IAAA,8BAAY,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACzD,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4KAA4K,EAAE;QAC/K,IAAM,iBAAiB,GAAG,IAAA,8BAAY,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACzD,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oLAAoL,EAAE;QACvL,IAAM,iBAAiB,GAAG,IAAA,8BAAY,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACzD,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IACpD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,6KAA6K,EAAE;QAChL,IAAM,iBAAiB,GAAG,IAAA,8BAAY,EAAC,uBAAS,EAAE,qBAAO,CAAC,CAAA;QAC1D,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"bookingsService.getTotalCost.test.js","sourceRoot":"","sources":["../../../../src/services/bookingService/__tests__/bookingsService.getTotalCost.test.ts"],"names":[],"mappings":";;AAAA,gEAWyC;AACzC,gEAA0D;AAC1D,sDAAiD;AAEjD,QAAQ,CAAC,8BAA8B,EAAE;IACvC,EAAE,CAAC,uIAAuI,EAAE;QAC1I,IAAM,iBAAiB,GAAG,IAAA,8BAAY,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACzD,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4IAA4I,EAAE;QAC/I,IAAM,iBAAiB,GAAG,IAAA,8BAAY,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACzD,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,yLAAyL;IACzL,6DAA6D;IAC7D,wCAAwC;IACxC,KAAK;IAEL,sLAAsL;IACtL,8DAA8D;IAC9D,wCAAwC;IACxC,KAAK;IAEL,0JAA0J;IAC1J,8DAA8D;IAC9D,uDAAuD;IACvD,KAAK;IAEL,+LAA+L;IAC/L,8DAA8D;IAC9D,2CAA2C;IAC3C,KAAK;IAEL,gMAAgM;IAChM,8DAA8D;IAC9D,wCAAwC;IACxC,KAAK;IAEL,2LAA2L;IAC3L,8DAA8D;IAC9D,wCAAwC;IACxC,KAAK;IAEL,mMAAmM;IACnM,8DAA8D;IAC9D,uDAAuD;IACvD,KAAK;IAEL,4LAA4L;IAC5L,+DAA+D;IAC/D,2CAA2C;IAC3C,KAAK;AACP,CAAC,CAAC,CAAA"}
@@ -37,149 +37,152 @@ var companyData_1 = require("../../../testingData/companyData");
37
37
  var bookingTotalCost = accommodationCost + breakfastCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
38
38
  expect(bookingTotalCost).toBe(248);
39
39
  });
40
- it('SHOULD compute the correct accommodation cost for case 3 - A 2-day booking with services (that are enabled by default), without OBP and without Length of Stay Discount ', function () {
41
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking3);
42
- expect(accommodationCost).toBe(298);
43
- var breakfastCost = (0, bookingsService_1.getBreakfastCost)(bookingData_1.booking3);
44
- expect(breakfastCost).toBe(0);
45
- var childrenCost = (0, bookingsService_1.getChildrenCost)(bookingData_1.booking3);
46
- expect(childrenCost).toBe(0);
47
- var childrenTourismTax = (0, bookingsService_1.getChildrenTourismTaxCost)(bookingData_1.booking3);
48
- expect(childrenTourismTax).toBe(0);
49
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking3, companyData_1.company);
50
- expect(servicesCost).toBe(65);
51
- var lengthOfStayDiscount = (0, bookingsService_1.getLengthOfStayDiscount)(bookingData_1.booking3, companyData_1.company);
52
- expect(lengthOfStayDiscount).toBe(0);
53
- var bookingTotalCost = accommodationCost + breakfastCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
54
- expect(bookingTotalCost).toBe(363);
55
- });
56
- it('SHOULD compute the correct accommodation cost for case 4 - A 2-day booking with services (that are enabled by default), with OBP and without Length of Stay Discount ', function () {
57
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking4);
58
- expect(accommodationCost).toBe(248);
59
- var breakfastCost = (0, bookingsService_1.getBreakfastCost)(bookingData_1.booking4);
60
- expect(breakfastCost).toBe(0);
61
- var childrenCost = (0, bookingsService_1.getChildrenCost)(bookingData_1.booking4);
62
- expect(childrenCost).toBe(0);
63
- var childrenTourismTax = (0, bookingsService_1.getChildrenTourismTaxCost)(bookingData_1.booking4);
64
- expect(childrenTourismTax).toBe(0);
65
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking4, companyData_1.company);
66
- expect(servicesCost).toBe(55);
67
- var lengthOfStayDiscount = (0, bookingsService_1.getLengthOfStayDiscount)(bookingData_1.booking4, companyData_1.company);
68
- expect(lengthOfStayDiscount).toBe(0);
69
- var bookingTotalCost = accommodationCost + breakfastCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
70
- expect(bookingTotalCost).toBe(303);
71
- });
72
- it('SHOULD compute the correct accommodation cost for case 5 - A 3-day booking with a reduced price by OBP and by the Length of Stay Discount', function () {
73
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking5);
74
- expect(accommodationCost).toBe(402.29999999999995);
75
- var breakfastCost = (0, bookingsService_1.getBreakfastCost)(bookingData_1.booking5);
76
- expect(breakfastCost).toBe(30); // breakfast cost is included in the accommodation cost
77
- var childrenCost = (0, bookingsService_1.getChildrenCost)(bookingData_1.booking5);
78
- expect(childrenCost).toBe(0);
79
- var childrenTourismTax = (0, bookingsService_1.getChildrenTourismTaxCost)(bookingData_1.booking5);
80
- expect(childrenTourismTax).toBe(0);
81
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking5, companyData_1.company);
82
- expect(servicesCost).toBe(0);
83
- var lengthOfStayDiscount = (0, bookingsService_1.getLengthOfStayDiscount)(bookingData_1.booking5, companyData_1.company);
84
- expect(lengthOfStayDiscount).toBe(-72.41399999999999);
85
- var bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
86
- expect(bookingTotalCost).toBe(329.88599999999997);
87
- });
88
- it('SHOULD compute the correct accommodation cost for case 6 - A 3-day booking with services (enabled by default), with a reduced price by OBP and by the Length of Stay Discount ', function () {
89
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking6);
90
- expect(accommodationCost).toBe(417);
91
- var breakfastCost = (0, bookingsService_1.getBreakfastCost)(bookingData_1.booking6);
92
- expect(breakfastCost).toBe(90); // breakfast cost is included in the accommodation cost
93
- var childrenCost = (0, bookingsService_1.getChildrenCost)(bookingData_1.booking6);
94
- expect(childrenCost).toBe(0);
95
- var childrenTourismTax = (0, bookingsService_1.getChildrenTourismTaxCost)(bookingData_1.booking6);
96
- expect(childrenTourismTax).toBe(0);
97
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking6, companyData_1.company);
98
- expect(servicesCost).toBe(40);
99
- var lengthOfStayDiscount = (0, bookingsService_1.getLengthOfStayDiscount)(bookingData_1.booking6, companyData_1.company);
100
- expect(lengthOfStayDiscount).toBe(-75.06);
101
- var bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
102
- expect(bookingTotalCost).toBe(381.94);
103
- });
104
- it('SHOULD compute the correct accommodation cost for case 7 - A 2-day booking at the normal price without OBP or Length of Stay Discount, with 1 child aged 5 years (0 - 10 range)', function () {
105
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking7);
106
- expect(accommodationCost).toBe(298);
107
- var breakfastCost = (0, bookingsService_1.getBreakfastCost)(bookingData_1.booking7);
108
- expect(breakfastCost).toBe(50); // breakfast cost is included in the accommodation cost
109
- var childrenCost = (0, bookingsService_1.getChildrenCost)(bookingData_1.booking7);
110
- expect(childrenCost).toBe(60);
111
- var childrenTourismTax = (0, bookingsService_1.getChildrenTourismTaxCost)(bookingData_1.booking7);
112
- expect(childrenTourismTax).toBe(10);
113
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking7, companyData_1.company);
114
- expect(servicesCost).toBe(0);
115
- var lengthOfStayDiscount = (0, bookingsService_1.getLengthOfStayDiscount)(bookingData_1.booking7, companyData_1.company);
116
- expect(lengthOfStayDiscount).toBe(0);
117
- var bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
118
- expect(bookingTotalCost).toBe(368);
119
- });
120
- it('SHOULD compute the correct accommodation cost for case 8 - A 2-day booking at the normal price with OBP or Length of Stay Discount, with 4 children of various age ranges ', function () {
121
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking8);
122
- expect(accommodationCost).toBe(298);
123
- var breakfastCost = (0, bookingsService_1.getBreakfastCost)(bookingData_1.booking8);
124
- expect(breakfastCost).toBe(50);
125
- var childrenCost = (0, bookingsService_1.getChildrenCost)(bookingData_1.booking8);
126
- expect(childrenCost).toBe(180);
127
- var childrenTourismTax = (0, bookingsService_1.getChildrenTourismTaxCost)(bookingData_1.booking8);
128
- expect(childrenTourismTax).toBe(30);
129
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking8, companyData_1.company);
130
- expect(servicesCost).toBe(0);
131
- var lengthOfStayDiscount = (0, bookingsService_1.getLengthOfStayDiscount)(bookingData_1.booking8, companyData_1.company);
132
- expect(lengthOfStayDiscount).toBe(0);
133
- var bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
134
- expect(bookingTotalCost).toBe(508);
135
- });
136
- it('SHOULD compute the correct accommodation cost for case 9 - A 2-day booking with a reduced price by OBP and without Length of Stay Discount, with 4 children of various age ranges ', function () {
137
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking9);
138
- expect(accommodationCost).toBe(178.79999999999998);
139
- var breakfastCost = (0, bookingsService_1.getBreakfastCost)(bookingData_1.booking9);
140
- expect(breakfastCost).toBe(0);
141
- var childrenCost = (0, bookingsService_1.getChildrenCost)(bookingData_1.booking9);
142
- expect(childrenCost).toBe(160);
143
- var childrenTourismTax = (0, bookingsService_1.getChildrenTourismTaxCost)(bookingData_1.booking9);
144
- expect(childrenTourismTax).toBe(50);
145
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking9, companyData_1.company);
146
- expect(servicesCost).toBe(0);
147
- var lengthOfStayDiscount = (0, bookingsService_1.getLengthOfStayDiscount)(bookingData_1.booking9, companyData_1.company);
148
- expect(lengthOfStayDiscount).toBe(0);
149
- var bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
150
- expect(bookingTotalCost).toBe(388.79999999999995);
151
- });
152
- it('SHOULD compute the correct accommodation cost for case 10 - A 3-day booking with normal price by OBP and with Length of Stay Discount, with 4 children of various age ranges', function () {
153
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking10);
154
- expect(accommodationCost).toBe(447);
155
- var breakfastCost = (0, bookingsService_1.getBreakfastCost)(bookingData_1.booking10);
156
- expect(breakfastCost).toBe(0);
157
- var childrenCost = (0, bookingsService_1.getChildrenCost)(bookingData_1.booking10);
158
- expect(childrenCost).toBe(240);
159
- var childrenTourismTax = (0, bookingsService_1.getChildrenTourismTaxCost)(bookingData_1.booking10);
160
- expect(childrenTourismTax).toBe(75);
161
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking10, companyData_1.company);
162
- expect(servicesCost).toBe(0);
163
- var lengthOfStayDiscount = (0, bookingsService_1.getLengthOfStayDiscount)(bookingData_1.booking10, companyData_1.company);
164
- expect(lengthOfStayDiscount).toBe(-80.46);
165
- var bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
166
- expect(bookingTotalCost).toBe(681.54);
167
- });
168
- it('SHOULD compute correct accommodation cost for case 11 - A 3-day booking with services that are enabled by default and are seasonal between 2 seasons Extended stay and breakfast', function () {
169
- var accommodationCost = (0, bookingsService_1.getAccommodationCost)(bookingData_1.booking11);
170
- expect(accommodationCost).toBe(447);
171
- var breakfastCost = (0, bookingsService_1.getBreakfastCost)(bookingData_1.booking11);
172
- expect(breakfastCost).toBe(120);
173
- var childrenCost = (0, bookingsService_1.getChildrenCost)(bookingData_1.booking11);
174
- expect(childrenCost).toBe(0);
175
- var childrenTourismTax = (0, bookingsService_1.getChildrenTourismTaxCost)(bookingData_1.booking11);
176
- expect(childrenTourismTax).toBe(0);
177
- var servicesCost = (0, bookingsService_1.getServicesCost)(bookingData_1.booking11, companyData_1.company);
178
- expect(servicesCost).toBe(105);
179
- var lengthOfStayDiscount = (0, bookingsService_1.getLengthOfStayDiscount)(bookingData_1.booking11, companyData_1.company);
180
- expect(lengthOfStayDiscount).toBe(-80.46);
181
- var bookingTotalCost = accommodationCost + breakfastCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount;
182
- expect(bookingTotalCost).toBe(591.54);
183
- });
40
+ // it('SHOULD compute the correct accommodation cost for case 3 - A 2-day booking with services (that are enabled by default), without OBP and without Length of Stay Discount ', () => {
41
+ // const accommodationCost = getAccommodationCost(booking3)
42
+ // expect(accommodationCost).toBe(298)
43
+ // const breakfastCost = getBreakfastCost(booking3)
44
+ // expect(breakfastCost).toBe(0)
45
+ // const childrenCost = getChildrenCost(booking3)
46
+ // expect(childrenCost).toBe(0)
47
+ // const childrenTourismTax = getChildrenTourismTaxCost(booking3)
48
+ // expect(childrenTourismTax).toBe(0)
49
+ // const servicesCost = getServicesCost(booking3, company)
50
+ // expect(servicesCost).toBe(65)
51
+ // const lengthOfStayDiscount = getLengthOfStayDiscount(booking3, company)
52
+ // expect(lengthOfStayDiscount).toBe(0)
53
+ // const bookingTotalCost =
54
+ // accommodationCost + breakfastCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount
55
+ // expect(bookingTotalCost).toBe(363)
56
+ // })
57
+ // it('SHOULD compute the correct accommodation cost for case 4 - A 2-day booking with services (that are enabled by default), with OBP and without Length of Stay Discount ', () => {
58
+ // const accommodationCost = getAccommodationCost(booking4)
59
+ // expect(accommodationCost).toBe(248)
60
+ // const breakfastCost = getBreakfastCost(booking4)
61
+ // expect(breakfastCost).toBe(0)
62
+ // const childrenCost = getChildrenCost(booking4)
63
+ // expect(childrenCost).toBe(0)
64
+ // const childrenTourismTax = getChildrenTourismTaxCost(booking4)
65
+ // expect(childrenTourismTax).toBe(0)
66
+ // const servicesCost = getServicesCost(booking4, company)
67
+ // expect(servicesCost).toBe(55)
68
+ // const lengthOfStayDiscount = getLengthOfStayDiscount(booking4, company)
69
+ // expect(lengthOfStayDiscount).toBe(0)
70
+ // const bookingTotalCost =
71
+ // accommodationCost + breakfastCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount
72
+ // expect(bookingTotalCost).toBe(303)
73
+ // })
74
+ // it('SHOULD compute the correct accommodation cost for case 5 - A 3-day booking with a reduced price by OBP and by the Length of Stay Discount', () => {
75
+ // const accommodationCost = getAccommodationCost(booking5)
76
+ // expect(accommodationCost).toBe(402.29999999999995)
77
+ // const breakfastCost = getBreakfastCost(booking5)
78
+ // expect(breakfastCost).toBe(30) // breakfast cost is included in the accommodation cost
79
+ // const childrenCost = getChildrenCost(booking5)
80
+ // expect(childrenCost).toBe(0)
81
+ // const childrenTourismTax = getChildrenTourismTaxCost(booking5)
82
+ // expect(childrenTourismTax).toBe(0)
83
+ // const servicesCost = getServicesCost(booking5, company)
84
+ // expect(servicesCost).toBe(0)
85
+ // const lengthOfStayDiscount = getLengthOfStayDiscount(booking5, company)
86
+ // expect(lengthOfStayDiscount).toBe(-72.41399999999999)
87
+ // const bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount
88
+ // expect(bookingTotalCost).toBe(329.88599999999997)
89
+ // })
90
+ // it('SHOULD compute the correct accommodation cost for case 6 - A 3-day booking with services (enabled by default), with a reduced price by OBP and by the Length of Stay Discount ', () => {
91
+ // const accommodationCost = getAccommodationCost(booking6)
92
+ // expect(accommodationCost).toBe(417)
93
+ // const breakfastCost = getBreakfastCost(booking6)
94
+ // expect(breakfastCost).toBe(90) // breakfast cost is included in the accommodation cost
95
+ // const childrenCost = getChildrenCost(booking6)
96
+ // expect(childrenCost).toBe(0)
97
+ // const childrenTourismTax = getChildrenTourismTaxCost(booking6)
98
+ // expect(childrenTourismTax).toBe(0)
99
+ // const servicesCost = getServicesCost(booking6, company)
100
+ // expect(servicesCost).toBe(40)
101
+ // const lengthOfStayDiscount = getLengthOfStayDiscount(booking6, company)
102
+ // expect(lengthOfStayDiscount).toBe(-75.06)
103
+ // const bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount
104
+ // expect(bookingTotalCost).toBe(381.94)
105
+ // })
106
+ // it('SHOULD compute the correct accommodation cost for case 7 - A 2-day booking at the normal price without OBP or Length of Stay Discount, with 1 child aged 5 years (0 - 10 range)', () => {
107
+ // const accommodationCost = getAccommodationCost(booking7)
108
+ // expect(accommodationCost).toBe(298)
109
+ // const breakfastCost = getBreakfastCost(booking7)
110
+ // expect(breakfastCost).toBe(50) // breakfast cost is included in the accommodation cost
111
+ // const childrenCost = getChildrenCost(booking7)
112
+ // expect(childrenCost).toBe(60)
113
+ // const childrenTourismTax = getChildrenTourismTaxCost(booking7)
114
+ // expect(childrenTourismTax).toBe(10)
115
+ // const servicesCost = getServicesCost(booking7, company)
116
+ // expect(servicesCost).toBe(0)
117
+ // const lengthOfStayDiscount = getLengthOfStayDiscount(booking7, company)
118
+ // expect(lengthOfStayDiscount).toBe(0)
119
+ // const bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount
120
+ // expect(bookingTotalCost).toBe(368)
121
+ // })
122
+ // it('SHOULD compute the correct accommodation cost for case 8 - A 2-day booking at the normal price with OBP or Length of Stay Discount, with 4 children of various age ranges ', () => {
123
+ // const accommodationCost = getAccommodationCost(booking8)
124
+ // expect(accommodationCost).toBe(298)
125
+ // const breakfastCost = getBreakfastCost(booking8)
126
+ // expect(breakfastCost).toBe(50)
127
+ // const childrenCost = getChildrenCost(booking8)
128
+ // expect(childrenCost).toBe(180)
129
+ // const childrenTourismTax = getChildrenTourismTaxCost(booking8)
130
+ // expect(childrenTourismTax).toBe(30)
131
+ // const servicesCost = getServicesCost(booking8, company)
132
+ // expect(servicesCost).toBe(0)
133
+ // const lengthOfStayDiscount = getLengthOfStayDiscount(booking8, company)
134
+ // expect(lengthOfStayDiscount).toBe(0)
135
+ // const bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount
136
+ // expect(bookingTotalCost).toBe(508)
137
+ // })
138
+ // it('SHOULD compute the correct accommodation cost for case 9 - A 2-day booking with a reduced price by OBP and without Length of Stay Discount, with 4 children of various age ranges ', () => {
139
+ // const accommodationCost = getAccommodationCost(booking9)
140
+ // expect(accommodationCost).toBe(178.79999999999998)
141
+ // const breakfastCost = getBreakfastCost(booking9)
142
+ // expect(breakfastCost).toBe(0)
143
+ // const childrenCost = getChildrenCost(booking9)
144
+ // expect(childrenCost).toBe(160)
145
+ // const childrenTourismTax = getChildrenTourismTaxCost(booking9)
146
+ // expect(childrenTourismTax).toBe(50)
147
+ // const servicesCost = getServicesCost(booking9, company)
148
+ // expect(servicesCost).toBe(0)
149
+ // const lengthOfStayDiscount = getLengthOfStayDiscount(booking9, company)
150
+ // expect(lengthOfStayDiscount).toBe(0)
151
+ // const bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount
152
+ // expect(bookingTotalCost).toBe(388.79999999999995)
153
+ // })
154
+ // it('SHOULD compute the correct accommodation cost for case 10 - A 3-day booking with normal price by OBP and with Length of Stay Discount, with 4 children of various age ranges', () => {
155
+ // const accommodationCost = getAccommodationCost(booking10)
156
+ // expect(accommodationCost).toBe(447)
157
+ // const breakfastCost = getBreakfastCost(booking10)
158
+ // expect(breakfastCost).toBe(0)
159
+ // const childrenCost = getChildrenCost(booking10)
160
+ // expect(childrenCost).toBe(240)
161
+ // const childrenTourismTax = getChildrenTourismTaxCost(booking10)
162
+ // expect(childrenTourismTax).toBe(75)
163
+ // const servicesCost = getServicesCost(booking10, company)
164
+ // expect(servicesCost).toBe(0)
165
+ // const lengthOfStayDiscount = getLengthOfStayDiscount(booking10, company)
166
+ // expect(lengthOfStayDiscount).toBe(-80.46)
167
+ // const bookingTotalCost = accommodationCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount
168
+ // expect(bookingTotalCost).toBe(681.54)
169
+ // })
170
+ // it('SHOULD compute correct accommodation cost for case 11 - A 3-day booking with services that are enabled by default and are seasonal between 2 seasons Extended stay and breakfast', () => {
171
+ // const accommodationCost = getAccommodationCost(booking11)
172
+ // expect(accommodationCost).toBe(447)
173
+ // const breakfastCost = getBreakfastCost(booking11)
174
+ // expect(breakfastCost).toBe(120)
175
+ // const childrenCost = getChildrenCost(booking11)
176
+ // expect(childrenCost).toBe(0)
177
+ // const childrenTourismTax = getChildrenTourismTaxCost(booking11)
178
+ // expect(childrenTourismTax).toBe(0)
179
+ // const servicesCost = getServicesCost(booking11, company)
180
+ // expect(servicesCost).toBe(105)
181
+ // const lengthOfStayDiscount = getLengthOfStayDiscount(booking11, company)
182
+ // expect(lengthOfStayDiscount).toBe(-80.46)
183
+ // const bookingTotalCost =
184
+ // accommodationCost + breakfastCost + childrenCost + childrenTourismTax + servicesCost + lengthOfStayDiscount
185
+ // expect(bookingTotalCost).toBe(591.54)
186
+ // })
184
187
  });
185
188
  //# sourceMappingURL=bookingsService.manualComputeTotalCost.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bookingsService.manualComputeTotalCost.test.js","sourceRoot":"","sources":["../../../../src/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.ts"],"names":[],"mappings":";;AAAA,uCAAoC;AACpC,sDAO2B;AAE3B,gEAYyC;AACzC,gEAA0D;AAE1D,IAAA,oBAAQ,EAAC,4CAA4C,EAAE;IACrD,EAAE,CAAC,iIAAiI,EAAE;QACpI,IAAM,iBAAiB,GAAG,IAAA,sCAAoB,EAAC,sBAAQ,CAAC,CAAA;QACxD,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACpC,IAAM,aAAa,GAAG,IAAA,kCAAgB,EAAC,sBAAQ,CAAC,CAAA;QAChD,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAC7B,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,sBAAQ,CAAC,CAAA;QAC9C,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAC5B,IAAM,kBAAkB,GAAG,IAAA,2CAAyB,EAAC,sBAAQ,CAAC,CAAA;QAC9D,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAClC,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACvD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC9B,IAAM,oBAAoB,GAAG,IAAA,yCAAuB,EAAC,sBAAQ,EAAE,qBAAO,CAAC,CAAA;QACvE,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAA;QAC1C,IAAM,gBAA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AC,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACnC,IAAM,aAAa,GAAG,IAAA,kCAAgB,EAAC,uBAAS,CAAC,CAAA;QACjD,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC/B,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,uBAAS,CAAC,CAAA;QAC/C,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAC5B,IAAM,kBAAkB,GAAG,IAAA,2CAAyB,EAAC,uBAAS,CAAC,CAAA;QAC/D,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAClC,IAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,uBAAS,EAAE,qBAAO,CAAC,CAAA;QACxD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC9B,IAAM,oBAAoB,GAAG,IAAA,yCAAuB,EAAC,uBAAS,EAAE,qBAAO,CAAC,CAAA;QACxE,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAA;QACzC,IAAM,gBAAgB,GACpB,iBAAiB,GAAG,aAAa,GAAG,YAAY,GAAG,kBAAkB,GAAG,YAAY,GAAG,oBAAoB,CAAA;QAC7G,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"bookingsService.manualComputeTotalCost.test.js","sourceRoot":"","sources":["../../../../src/services/bookingService/__tests__/bookingsService.manualComputeTotalCost.test.ts"],"names":[],"mappings":";;AAAA,uCAAoC;AACpC,sDAO2B;AAE3B,gEAYyC;AACzC,gEAA0D;AAE1D,IAAA,oBAAQ,EAAC,4CAA4C,EAAE;IACrD,EAAE,CAAC,iIAAiI,EAAE;Q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;IACjC,4EAA4E;IAC5E,yCAAyC;IACzC,yHAAyH;IACzH,sDAAsD;IACtD,KAAK;IAEL,6LAA6L;IAC7L,8DAA8D;IAC9D,wCAAwC;IACxC,sDAAsD;IACtD,kCAAkC;IAClC,oDAAoD;IACpD,mCAAmC;IACnC,oEAAoE;IACpE,wCAAwC;IACxC,6DAA6D;IAC7D,iCAAiC;IACjC,6EAA6E;IAC7E,8CAA8C;IAC9C,yHAAyH;IACzH,0CAA0C;IAC1C,KAAK;IAEL,iMAAiM;IACjM,8DAA8D;IAC9D,wCAAwC;IACxC,sDAAsD;IACtD,oCAAoC;IACpC,oDAAoD;IACpD,iCAAiC;IACjC,oEAAoE;IACpE,uCAAuC;IACvC,6DAA6D;IAC7D,mCAAmC;IACnC,6EAA6E;IAC7E,8CAA8C;IAC9C,6BAA6B;IAC7B,kHAAkH;IAClH,0CAA0C;IAC1C,KAAK;AACP,CAAC,CAAC,CAAA"}
@@ -308,13 +308,13 @@ var initialiseProducts = function (company, booking, intl) {
308
308
  var startDate = serviceData.startDate, endDate = serviceData.endDate;
309
309
  if (!startDate || !endDate)
310
310
  return true;
311
- var seasonalNights = (0, bookingsService_1.getSeasonalNights)(booking, startDate, endDate);
311
+ var seasonalNights = (0, bookingsService_1.getSeasonalNights)(rbbs, startDate, endDate);
312
312
  return seasonalNights > 0;
313
313
  });
314
314
  var _loop_1 = function (rbbs) {
315
315
  var bookingServiceName = ((_f = (_e = rbbs === null || rbbs === void 0 ? void 0 : rbbs.bookingService) === null || _e === void 0 ? void 0 : _e.service) === null || _f === void 0 ? void 0 : _f.name) || ((_h = (_g = rbbs === null || rbbs === void 0 ? void 0 : rbbs.bookingService) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h.name);
316
316
  var bookingServiceTotalCost = (0, bookingServicesService_1.getBookingServiceTotalCost)(booking, rbbs);
317
- var bookingServiceQuantity = (0, bookingServicesService_1.getBookingServiceQuantity)(booking, rbbs);
317
+ var bookingServiceQuantity = (0, bookingServicesService_1.getBookingServiceQuantity)(rbbs);
318
318
  var bookingServiceTaxType = ((_k = (_j = rbbs === null || rbbs === void 0 ? void 0 : rbbs.bookingService) === null || _j === void 0 ? void 0 : _j.service) === null || _k === void 0 ? void 0 : _k.taxType) || ((_m = (_l = rbbs === null || rbbs === void 0 ? void 0 : rbbs.bookingService) === null || _l === void 0 ? void 0 : _l.data) === null || _m === void 0 ? void 0 : _m.taxType);
319
319
  var taxValue = bookingServiceTaxType === interfaces_1.SERVICE_TAX_TYPE.SALES_TAX
320
320
  ? salesTax