meemup-library 1.4.58 → 1.4.60

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.
@@ -566,9 +566,9 @@ export default new class PreviewContentController {
566
566
  if (member.id > initPointOfSaleTeamMember.id) {
567
567
  content += SimplePreviewController.createSubTitle(`Member ID: #${member.id}`);
568
568
  content += SimplePreviewController.createSubTitle(`Member: ${member.firstName} ${member.lastName}`);
569
- content += SimplePreviewController.printSpace(16);
569
+ content += SimplePreviewController.printSpace(8);
570
570
  }
571
- content += SimplePreviewController.createHeader(`${title}: ${MoneyController.format(device.money, setting.currencySymbol)}`, 'left');
571
+ content += SimplePreviewController.createText(`${title}: ${MoneyController.format(device.money, setting.currencySymbol)}`);
572
572
  content += SimplePreviewController.createText(`Reason: ${device.reason}`);
573
573
  // content += SimplePreviewController.printSolidLine();
574
574
  // content += SimplePreviewController.createText(`Reason: ${device.reason}`);
@@ -718,21 +718,26 @@ export default new class PreviewContentController {
718
718
  const sum = MoneyController.sumField(records, 'amount');
719
719
  content += SimplePreviewController.createHeader('Cash drawer report', 'center');
720
720
  content += SimplePreviewController.createText(company, 'center', true);
721
+ content += SimplePreviewController.printSpace(20);
721
722
  content += SimplePreviewController.createTextValueSpaceBetween('Cash drawer:', `#${form.cashDrawerId} - ${device.name}`);
722
- content += SimplePreviewController.createTextValueSpaceBetween('Since:', `#${form.cashDrawerId} - ${device.name}`);
723
- content += SimplePreviewController.createTextValueSpaceBetween('Until:', `#${form.cashDrawerId} - ${device.name}`);
723
+ content += SimplePreviewController.createTextValueSpaceBetween('Since:', form.since);
724
+ content += SimplePreviewController.createTextValueSpaceBetween('Until:', form.until);
724
725
  if (member.id > initPointOfSaleTeamMember.id) {
725
726
  content += SimplePreviewController.createTextValueSpaceBetween('Member ID:', `#${member.id}`);
726
727
  content += SimplePreviewController.createTextValueSpaceBetween('Member:', `${member.firstName} ${member.lastName}`);
727
728
  }
728
729
  content += SimplePreviewController.printSolidLine();
730
+ content += SimplePreviewController.printSpace(8);
729
731
  records.map(record => {
730
732
  //moment(record.dateTime).format(Formats.printedAt)
731
733
  content += SimplePreviewController.createTextValueSpaceBetween(formatDate(record.dateTime), MoneyController.format(record.amount, currency));
732
- content += SimplePreviewController.createText(record.reason);
733
- content += SimplePreviewController.printSolidLine();
734
+ content += SimplePreviewController.createText(record.reason, 'left', false);
735
+ content += SimplePreviewController.printSpace(16);
734
736
  });
735
- content += SimplePreviewController.createTextValueSpaceBetween('Total:', MoneyController.format(sum, currency));
737
+ content += SimplePreviewController.printSolidLine();
738
+ content += SimplePreviewController.printSpace(4);
739
+ content += SimplePreviewController.createTextValueSpaceBetween('Total:', MoneyController.format(sum, currency), 18);
740
+ content += SimplePreviewController.printSpace(20);
736
741
  content += SimplePreviewController.footer();
737
742
  return this.standardHtmlContainer(content);
738
743
  }
@@ -214,7 +214,12 @@ class SimplePreviewController {
214
214
  <tbody>
215
215
  `;
216
216
  detail.products.forEach((row) => {
217
- let productName = (template.showCategoryTitle ? `[${row.categoryTitle}] ` : "") + ((template.showProductKitchenName && row.kitchenReceiptName.trim().length > 0) ? row.kitchenReceiptName : row.productName);
217
+ let cat = "";
218
+ if (!template.showCategoryTitle || !row.categoryTitle || row.categoryTitle.trim().length === 0)
219
+ cat = "";
220
+ else
221
+ cat = `[${row.categoryTitle.trim()}] `;
222
+ let productName = cat + ((template.showProductKitchenName && row.kitchenReceiptName.trim().length > 0) ? row.kitchenReceiptName : row.productName);
218
223
  let amount = template.showPrices ? MoneyController.format(row.totalAmount, detail.company.currencySymbol) : "";
219
224
  content += `<tr style="height: 28px;">
220
225
  <td style="font-size:${template.fontSize}px; min-width:40px; width: 40px; text-align: left;">${row.quantity}X</td>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.4.58",
3
+ "version": "1.4.60",
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.58\" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.4.60\" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"