@esolve/ng-esolve-connect 0.78.0 → 0.79.0

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,4 @@
1
+ export declare class EsolveCartTaxBreakdown {
2
+ goods: number;
3
+ discount: number;
4
+ }
@@ -1,4 +1,6 @@
1
+ import { EsolveCartTotalsRecord } from '../interfaces';
1
2
  import { EsolveDeliveryCategoryTotalsMap, EsolveDeliveryCategoryTotalsMapRecord } from '../types';
3
+ import { EsolveCartTaxBreakdown } from './esolve-cart-tax-breakdown.model';
2
4
  /**
3
5
  * Totals in cart
4
6
  */
@@ -16,9 +18,13 @@ export declare class EsolveCartTotals {
16
18
  */
17
19
  sub_total: number;
18
20
  /**
19
- * Total VAT of all the items in the cart
21
+ * Total VAT of all the items in the cart including the discount
20
22
  */
21
23
  vat_total: number;
24
+ /**
25
+ * Breakdown of the tax in the cart
26
+ */
27
+ tax: EsolveCartTaxBreakdown;
22
28
  /**
23
29
  * Total discount of all the item in the cart
24
30
  */
@@ -40,33 +46,8 @@ export declare class EsolveCartTotals {
40
46
  * (NOTE: shipping and insurance is not included)
41
47
  */
42
48
  get total(): number;
43
- constructor(
44
- /**
45
- * Number of unique records in cart
46
- */
47
- records?: number,
48
- /**
49
- * Total quantity of all items in a cart
50
- */
51
- items?: number,
52
- /**
53
- * Total in cart before discount and VAT is added
54
- */
55
- sub_total?: number,
56
- /**
57
- * Total VAT of all the items in the cart
58
- */
59
- vat_total?: number,
60
- /**
61
- * Total discount of all the item in the cart
62
- */
63
- discount_total?: number,
64
- /**
65
- * Total of all vouchers used
66
- */
67
- voucher_total?: number,
68
- /**
69
- * Total of allowance
70
- */
71
- allowance?: number, delivery_category_totals?: EsolveDeliveryCategoryTotalsMapRecord);
49
+ get discount_total_incl(): number;
50
+ get sub_total_incl(): number;
51
+ constructor(record?: EsolveCartTotalsRecord);
52
+ populateDeliveryCategoryTotals(delivery_category_totals?: EsolveDeliveryCategoryTotalsMapRecord): void;
72
53
  }
@@ -4,9 +4,10 @@ export interface EsolveCartTotalsRecord {
4
4
  items: string;
5
5
  total: string;
6
6
  vat: string;
7
+ vat_on_goods?: string;
8
+ vat_on_discount?: string;
7
9
  discount: string;
8
10
  vouchers: string;
9
- wallet: string;
10
11
  allowance: string;
11
12
  delivery_category_totals?: EsolveDeliveryCategoryTotalsMapRecord;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esolve/ng-esolve-connect",
3
- "version": "0.78.0",
3
+ "version": "0.79.0",
4
4
  "homepage": "https://www.esolve.co.za/",
5
5
  "description": "An Angular library that speaks to an eSolve instance's API",
6
6
  "peerDependencies": {