Skip to content

Commit fcc1817

Browse files
jiloysssjiloysss
jiloysss
authored and
jiloysss
committed
Fix: None
Refactor: None Feat: Categories in shift report if hasTailPos equals true
1 parent bd2afd4 commit fcc1817

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

src/container/PaymentContainer/index.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,10 @@ export default class PaymentContainer extends React.Component {
358358
TinyPOS.bufferedText(
359359
`${
360360
this.props.printerStore.companySettings.length > 0
361-
? this.props.printerStore.companySettings[0].name ? this.props.printerStore.companySettings[0].name.toString() :
362-
"Bai Web and Mobile Lab": "Bai Web and Mobile Lab"
361+
? this.props.printerStore.companySettings[0].name
362+
? this.props.printerStore.companySettings[0].name.toString()
363+
: "Bai Web and Mobile Lab"
364+
: "Bai Web and Mobile Lab"
363365
}`,
364366
{ align: "center", size: "doubleheight" },
365367
true,
@@ -441,24 +443,25 @@ export default class PaymentContainer extends React.Component {
441443
),
442444
),
443445
);
444-
writePromises.push(
445-
BluetoothSerial.write(
446-
TinyPOS.bufferedText(
447-
"Mode of payment: " + this.props.stateStore.payment_state[0].selected,
448-
{ align: "left", size: "normal" },
449-
true,
450-
),
451-
),
452-
);
453-
writePromises.push(
454-
BluetoothSerial.write(
455-
TinyPOS.bufferedText(
456-
"================================",
457-
{ size: "normal" },
458-
true,
459-
),
460-
),
461-
);
446+
writePromises.push(
447+
BluetoothSerial.write(
448+
TinyPOS.bufferedText(
449+
"Mode of payment: " +
450+
this.props.stateStore.payment_state[0].selected,
451+
{ align: "left", size: "normal" },
452+
true,
453+
),
454+
),
455+
);
456+
writePromises.push(
457+
BluetoothSerial.write(
458+
TinyPOS.bufferedText(
459+
"================================",
460+
{ size: "normal" },
461+
true,
462+
),
463+
),
464+
);
462465
writePromises.push(
463466
BluetoothSerial.write(
464467
TinyPOS.bufferedText(

src/container/SalesContainer/index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,12 @@ export default class SalesContainer extends React.Component {
110110
const { setReceiptLine } = this.props.receiptStore;
111111
const { defaultReceipt } = this.props.receiptStore;
112112
const { isStackItem } = this.props.stateStore;
113-
let line = ""
114-
if(item.category !== "No Category") {
115-
const categoryObj = this.props.categoryStore.find(item.category);
116-
line = createReceiptLine(item, categoryObj._55.name);
113+
let line = "";
114+
if (item.category !== "No Category") {
115+
const categoryObj = this.props.categoryStore.find(item.category);
116+
line = createReceiptLine(item, categoryObj._55.name);
117117
} else {
118-
line = createReceiptLine(item, item.category);
119-
118+
line = createReceiptLine(item, item.category);
120119
}
121120
setReceiptLine(line);
122121

src/store/StateStore/StateStore.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ const StateStore = types
5252

5353
// Default Customer
5454
useDefaultCustomer: types.optional(types.boolean, false),
55-
5655
})
5756
.views(self => ({
5857
get queueOrigin() {

0 commit comments

Comments
 (0)