meemup-library 1.4.30 → 1.4.32

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.
@@ -1,4 +1,5 @@
1
1
  import { initCustomerFacingDisplayPacket } from "../interfaces/cfds/ICustomerFacingDisplayPacket";
2
+ import MoneyController from "./MoneyController";
2
3
  export default new class CustomerFacingDisplayPacketController {
3
4
  code(order, udpClientName, currencySymbol, taxTitle) {
4
5
  let packet = Object.assign(Object.assign({}, initCustomerFacingDisplayPacket), { r: udpClientName, c: currencySymbol, d: [] });
@@ -9,30 +10,30 @@ export default new class CustomerFacingDisplayPacketController {
9
10
  q: ext.quantity,
10
11
  s: ext.pizzaSide,
11
12
  t: ext.text,
12
- p: ext.totalAmount
13
+ p: MoneyController.round(ext.totalAmount)
13
14
  });
14
15
  });
15
16
  let pro = {
16
17
  q: product.quantity,
17
18
  t: product.title,
18
- p: product.totalAmount,
19
+ p: MoneyController.round(product.totalAmount),
19
20
  e: extPro
20
21
  };
21
22
  packet.d.push(pro);
22
23
  });
23
- packet.dd = order.displayDiscount;
24
+ packet.dd = MoneyController.round(order.displayDiscount);
24
25
  packet.re = order.remark;
25
26
  packet.ot = order.orderType;
26
- packet.dc = order.deliveryCost;
27
+ packet.dc = MoneyController.round(order.deliveryCost);
27
28
  packet.ds = order.displaySubTotal;
28
29
  packet.tt = taxTitle;
29
30
  packet.dt = order.displayTax;
30
31
  packet.pt = order.paymentType;
31
32
  packet.ps = order.paymentState;
32
33
  packet.rcp = order.roundCashPayments;
33
- packet.rca = order.displayRoundCashAmount;
34
+ packet.rca = MoneyController.round(order.displayRoundCashAmount);
34
35
  packet.fees = order.displayFees;
35
- packet.ta = order.displayTotalAmount;
36
+ packet.ta = MoneyController.round(order.displayTotalAmount);
36
37
  return packet;
37
38
  }
38
39
  decode(data) {
@@ -1,6 +1,5 @@
1
- export default interface IPointOfSaleEditCashDrawer {
1
+ import IPointOfSaleAddCashDrawer from "./IPointOfSaleAddCashDrawer";
2
+ export default interface IPointOfSaleEditCashDrawer extends IPointOfSaleAddCashDrawer {
2
3
  id: number;
3
- name: string;
4
- printerId: number;
5
4
  }
6
5
  export declare const initPointOfSaleEditCashDrawer: IPointOfSaleEditCashDrawer;
@@ -1,5 +1,6 @@
1
1
  export const initPointOfSaleEditCashDrawer = {
2
2
  id: -1,
3
3
  name: "",
4
- printerId: -1
4
+ printerId: -1,
5
+ printPlanId: ""
5
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.4.30",
3
+ "version": "1.4.32",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "remove:one": "rimraf dist",
12
12
  "remove:two": "rimraf ./src/dist",
13
13
  "test": "echo \"Error: no test specified\" && exit 1",
14
- "commit": "git add . && git commit -m \"version.1.4.30 \" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.4.32 \" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"