Skip to content

Commit

Permalink
Fix: None
Browse files Browse the repository at this point in the history
Refactor: None
Feat: Categories in shift report if hasTailPos equals true
  • Loading branch information
jiloysss authored and jiloysss committed Sep 13, 2019
1 parent bd2afd4 commit fcc1817
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
43 changes: 23 additions & 20 deletions src/container/PaymentContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,10 @@ export default class PaymentContainer extends React.Component {
TinyPOS.bufferedText(
`${
this.props.printerStore.companySettings.length > 0
? this.props.printerStore.companySettings[0].name ? this.props.printerStore.companySettings[0].name.toString() :
"Bai Web and Mobile Lab": "Bai Web and Mobile Lab"
? this.props.printerStore.companySettings[0].name
? this.props.printerStore.companySettings[0].name.toString()
: "Bai Web and Mobile Lab"
: "Bai Web and Mobile Lab"
}`,
{ align: "center", size: "doubleheight" },
true,
Expand Down Expand Up @@ -441,24 +443,25 @@ export default class PaymentContainer extends React.Component {
),
),
);
writePromises.push(
BluetoothSerial.write(
TinyPOS.bufferedText(
"Mode of payment: " + this.props.stateStore.payment_state[0].selected,
{ align: "left", size: "normal" },
true,
),
),
);
writePromises.push(
BluetoothSerial.write(
TinyPOS.bufferedText(
"================================",
{ size: "normal" },
true,
),
),
);
writePromises.push(
BluetoothSerial.write(
TinyPOS.bufferedText(
"Mode of payment: " +
this.props.stateStore.payment_state[0].selected,
{ align: "left", size: "normal" },
true,
),
),
);
writePromises.push(
BluetoothSerial.write(
TinyPOS.bufferedText(
"================================",
{ size: "normal" },
true,
),
),
);
writePromises.push(
BluetoothSerial.write(
TinyPOS.bufferedText(
Expand Down
11 changes: 5 additions & 6 deletions src/container/SalesContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,12 @@ export default class SalesContainer extends React.Component {
const { setReceiptLine } = this.props.receiptStore;
const { defaultReceipt } = this.props.receiptStore;
const { isStackItem } = this.props.stateStore;
let line = ""
if(item.category !== "No Category") {
const categoryObj = this.props.categoryStore.find(item.category);
line = createReceiptLine(item, categoryObj._55.name);
let line = "";
if (item.category !== "No Category") {
const categoryObj = this.props.categoryStore.find(item.category);
line = createReceiptLine(item, categoryObj._55.name);
} else {
line = createReceiptLine(item, item.category);

line = createReceiptLine(item, item.category);
}
setReceiptLine(line);

Expand Down
1 change: 0 additions & 1 deletion src/store/StateStore/StateStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const StateStore = types

// Default Customer
useDefaultCustomer: types.optional(types.boolean, false),

})
.views(self => ({
get queueOrigin() {
Expand Down

0 comments on commit fcc1817

Please sign in to comment.