@social-mail/social-mail-web-server 1.8.329 → 1.8.331

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.8.329",
3
+ "version": "1.8.331",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,7 +17,7 @@ export default async function seedUI(config: DBConfig) {
17
17
  await config.saveVersion(UIPackageConfig, {
18
18
  package: "@social-mail/social-mail-client",
19
19
  view: "dist/web/AppIndex",
20
- version: "1.9.28"
20
+ version: "1.9.29"
21
21
  });
22
22
 
23
23
  await config.saveVersion(WebComponentsPackageConfig, {
@@ -106,9 +106,9 @@ export default class SalesInvoiceService implements Disposable, ICacheContainer<
106
106
 
107
107
  const itemTotal = Decimal(lineItem.priceAfterDiscount).sub(Decimal(lineItem.couponDiscount));
108
108
  const totalAmount = itemTotal.dividedBy(taxDiscount.add(1));
109
- lineItem.amount = totalAmount.mul(lineItem.quantity).toFixed(2) as any;
109
+ lineItem.amount = totalAmount.toFixed(2) as any;
110
110
  } else {
111
- lineItem.amount = Decimal(lineItem.priceAfterDiscount).sub(Decimal(lineItem.couponDiscount)).mul(lineItem.quantity).toFixed(2) as any;
111
+ lineItem.amount = Decimal(lineItem.priceAfterDiscount).sub(Decimal(lineItem.couponDiscount)).toFixed(2) as any;
112
112
  }
113
113
 
114
114
  for(const taxPrice of taxPrices) {
@@ -136,7 +136,7 @@ export default class SalesInvoiceService implements Disposable, ICacheContainer<
136
136
  lineItem.taxes = taxes.toFixed(2) as any;
137
137
  // for inclusive tax, we need to fix the rounding off
138
138
  if (itemPrice.taxIncluded) {
139
- const lineTotal = Decimal(lineItem.priceAfterDiscount).mul(Decimal(lineItem.quantity));
139
+ const lineTotal = Decimal(lineItem.priceAfterDiscount);
140
140
  lineItem.total = lineTotal.toFixed(2) as any;
141
141
  lineItem.amount = lineTotal.minus(taxes).toFixed(2) as any;
142
142
  } else {