You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
3.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="total-info tw-p-5 tw-mb-[20px] tw-bg-white tw-rounded-xl">
  3. <div class="element tw-flex tw-justify-between tw-items-center tw-flex-nowrap tw-mb-[12px]">
  4. <!-- <div class="label tw-body-4 tw-text-black tw-font-bold">
  5. {{ $t("Subtotal") }}
  6. </div> -->
  7. <!-- <div class="content tw-body-4 tw-text-black tw-font-bold">
  8. ${{ subTotal.toLocaleString() + currency }}
  9. </div> -->
  10. <div class="label tw-body-4 tw-text-black tw-font-bold">
  11. {{ $t("Subtotal")}}
  12. <!-- <span class="tw-text-neutrals-400 tw-font-medium tw-ml-[4px]">{{
  13. $t("(Tax included)")
  14. }}</span> -->
  15. </div>
  16. <div class="content tw-body-4 tw-font-bold">
  17. ${{ subTotal.toLocaleString() + currency}}
  18. </div>
  19. </div>
  20. <div class="element tw-flex tw-justify-between tw-items-center tw-flex-nowrap tw-mb-[12px]">
  21. <!-- <div class="label tw-body-4 tw-text-black tw-font-bold">
  22. {{ $t("Subtotal") }}
  23. </div> -->
  24. <!-- <div class="content tw-body-4 tw-text-black tw-font-bold">
  25. ${{ subTotal.toLocaleString() + currency }}
  26. </div> -->
  27. <div class="label tw-body-4 tw-text-black tw-font-bold">
  28. {{ $t("Discount")}}
  29. <!-- <span class="tw-text-neutrals-400 tw-font-medium tw-ml-[4px]">{{
  30. $t("(Tax included)")
  31. }}</span> -->
  32. </div>
  33. <div class="content tw-body-4 tw-font-bold">
  34. ${{ 0 + currency}}
  35. </div>
  36. </div>
  37. <div class="element tw-flex tw-justify-between tw-items-center tw-flex-nowrap tw-mb-[12px]">
  38. <!-- <div class="label tw-body-4 tw-text-black tw-font-bold">
  39. {{ $t("Subtotal") }}
  40. </div> -->
  41. <!-- <div class="content tw-body-4 tw-text-black tw-font-bold">
  42. ${{ subTotal.toLocaleString() + currency }}
  43. </div> -->
  44. <div class="label tw-body-4 tw-text-black tw-font-bold">
  45. {{ $t("Taxes")}}
  46. <!-- <span class="tw-text-neutrals-400 tw-font-medium tw-ml-[4px]">{{
  47. $t("(Tax included)")
  48. }}</span> -->
  49. </div>
  50. <div class="content tw-body-4 tw-font-bold">
  51. ${{ taxes + currency}}
  52. </div>
  53. </div>
  54. <div
  55. class="element total tw-flex tw-justify-between tw-items-center tw-flex-nowrap tw-pt-[12px] tw-border-0 tw-border-t tw-border-solid tw-border-neutrals-200">
  56. <div class="label tw-body-2 tw-text-black tw-font-bold">
  57. {{ $t("Total Amount") }}
  58. </div>
  59. <div class="content tw-body-2 tw-text-primary-1 tw-font-bold">
  60. ${{ total.toLocaleString() + currency }}
  61. </div>
  62. </div>
  63. <div class="element tw-flex tw-justify-center tw-items-center tw-mt-[30px] xl:tw-hidden xl:tw-mt-0">
  64. <button
  65. class="btnPay tw-transition tw-btn-md tw-bg-primary-1 tw-px-[30px] tw-py-[9.5px] tw-rounded-2xl hover:tw-bg-primary-2"
  66. @click="payNow">
  67. {{ $t("Pay now") }}
  68. </button>
  69. </div>
  70. </div>
  71. </template>
  72. <script>
  73. export default {
  74. name: "TotalPrice",
  75. props: {
  76. subTotal: {
  77. type: Number,
  78. },
  79. total:{
  80. type: Number,
  81. },
  82. currency: {
  83. type: String,
  84. }
  85. },
  86. data() {
  87. return {};
  88. },
  89. computed: {
  90. taxes() {
  91. return (Math.round(this.subTotal*0.05)).toLocaleString();
  92. },
  93. },
  94. methods: {
  95. payNow() {
  96. this.$emit('payNowClick');
  97. },
  98. },
  99. };
  100. </script>
  101. <style lang="scss" scoped>
  102. </style>