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.

94 lines
2.9 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
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("Discount")}}
  23. </div>
  24. <div class="content tw-body-4 tw-font-bold">
  25. ${{ 0 + currency}}
  26. </div>
  27. </div> -->
  28. <div class="element tw-flex tw-justify-between tw-items-center tw-flex-nowrap tw-mb-[12px]">
  29. <!-- <div class="label tw-body-4 tw-text-black tw-font-bold">
  30. {{ $t("Subtotal") }}
  31. </div> -->
  32. <!-- <div class="content tw-body-4 tw-text-black tw-font-bold">
  33. ${{ subTotal.toLocaleString() + currency }}
  34. </div> -->
  35. <div class="label tw-body-4 tw-text-black tw-font-bold">
  36. {{ $t("Taxes")}}
  37. <!-- <span class="tw-text-neutrals-400 tw-font-medium tw-ml-[4px]">{{
  38. $t("(Tax included)")
  39. }}</span> -->
  40. </div>
  41. <div class="content tw-body-4 tw-font-bold">
  42. ${{ taxes + currency}}
  43. </div>
  44. </div>
  45. <div
  46. 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">
  47. <div class="label tw-body-2 tw-text-black tw-font-bold">
  48. {{ $t("Total Amount") }}
  49. </div>
  50. <div class="content tw-body-2 tw-text-primary-1 tw-font-bold">
  51. ${{ total.toLocaleString() + currency }}
  52. </div>
  53. </div>
  54. <div class="element tw-flex tw-justify-center tw-items-center tw-mt-[30px] xl:tw-hidden xl:tw-mt-0">
  55. <button
  56. 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"
  57. @click="payNow">
  58. {{ $t("Pay now") }}
  59. </button>
  60. </div>
  61. </div>
  62. </template>
  63. <script>
  64. export default {
  65. name: "TotalPrice",
  66. props: {
  67. subTotal: {
  68. type: Number,
  69. },
  70. total:{
  71. type: Number,
  72. },
  73. currency: {
  74. type: String,
  75. }
  76. },
  77. data() {
  78. return {};
  79. },
  80. computed: {
  81. taxes() {
  82. return (Math.ceil(this.subTotal*0.05)).toLocaleString();
  83. },
  84. },
  85. methods: {
  86. payNow() {
  87. this.$emit('payNowClick');
  88. },
  89. },
  90. };
  91. </script>
  92. <style lang="scss" scoped>
  93. </style>