Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bailabs/tailpos
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/store/PosStore/ReceiptStore.js
#	src/stories/components/SearchableDropdownComponent.js
  • Loading branch information
jiloysss committed May 8, 2019
1 parent e73782c commit bd5df71
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/container/SettingsContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ export default class SettingsContainer extends React.Component {
};

onCompanySave = () => {
this.props.receiptStore.defaultReceipt.changeTaxes(this.props.stateStore.settings_state[0].tax);
this.props.receiptStore.defaultReceipt.changeTaxes(
this.props.stateStore.settings_state[0].tax,
);
if (this.props.printerStore.companySettings.length > 0) {
let company = this.props.printerStore.findCompany(
this.props.printerStore.companySettings[0]._id,
Expand Down
7 changes: 3 additions & 4 deletions src/store/PosStore/ReceiptStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,9 @@ export const Receipt = types
changeTaxesAmount(taxAmount) {
self.taxesAmount = taxAmount;
},
changeTaxes(taxAmount) {
self.taxesValue = taxAmount ? taxAmount : "0";

},
changeTaxes(taxAmount) {
self.taxesValue = taxAmount ? taxAmount : "0";
},
changeStatusCommission(name) {
for (let i = 0; i < self.lines.length; i += 1) {
let objectReceipt = JSON.parse(self.lines[i].commission_details);
Expand Down
7 changes: 6 additions & 1 deletion src/stories/components/TotalLineComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ const TotalLineComponent = props => (
</Text>
</View>
<View style={styles.viewInner}>
<Text style={styles.text}>Tax {parseFloat(props.receipt.taxesValue) > 0 ? "(" + props.receipt.taxesValue.toString() + "%)" : ""}</Text>
<Text style={styles.text}>
Tax{" "}
{parseFloat(props.receipt.taxesValue) > 0
? "(" + props.receipt.taxesValue.toString() + "%)"
: ""}
</Text>
<Text>
{new MoneyCurrency(props.currency ? props.currency : "PHP").moneyFormat(
formatNumber(props.taxesValue),
Expand Down
1 change: 0 additions & 1 deletion src/stories/screens/SalesReceipt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class SalesReceipt extends React.Component {
/>

<TotalLineComponent

currency={currency}
receipt={receipt ? receipt : ""}
subtotal={receipt ? receipt.subtotal.toFixed(2) : "0.00"}
Expand Down

0 comments on commit bd5df71

Please sign in to comment.