PartnerDetailsInvoices.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template lang="pug">
  2. .customer-form-item
  3. label(v-for="(invoice, index) in partnerInvoices" :key="invoice")
  4. span.form-label Factura
  5. label.form-label-number {{ invoice.number }}
  6. .table-header
  7. table
  8. tbody
  9. tr
  10. td Vencimiento
  11. td Total
  12. td Saldo
  13. .table-body
  14. table
  15. tbody
  16. tr(v-for="moveline in partnerMoveLine[index]" :key="moveline")
  17. td {{ formatDate(moveline.date_maturity) }}
  18. td {{ formatNumber(moveline.debit) }}
  19. td {{ formatNumber(moveline.amount_residual) }}
  20. </template>
  21. <script>
  22. import { mapGetters, mapActions } from 'vuex'
  23. export default {
  24. computed: mapGetters([
  25. 'hasSelectedPartner',
  26. 'selectedPartner',
  27. 'partnerInvoices',
  28. 'partnerMoveLine'
  29. ]),
  30. methods:{
  31. formatNumber(valor){
  32. return accounting.format(valor, 0,'.', ',')
  33. },
  34. formatDate(Fecha){
  35. return moment(Fecha).format('DD-MM-YYYY');
  36. },
  37. verifyDate(){
  38. return ".tr-Expired"
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="sass">
  44. .customer-form-item
  45. .form-label
  46. width: 65px
  47. height: 35px
  48. font-size: 14px
  49. font-weight: bold
  50. .form-label-number
  51. margin: 0px 0px 5px 9px
  52. font-size: 14px
  53. color: #0288d1
  54. .table-header
  55. table
  56. width: 308px
  57. height: 30px
  58. margin: 0px
  59. font-size: 10pt
  60. font-weight: bold
  61. tbody
  62. tr
  63. line-height: 30px
  64. border-top: 1px solid #d3d3d3
  65. border-bottom: 1px solid #d3d3d3
  66. td
  67. &:nth-child(1)
  68. width: 110px
  69. text-align: left
  70. &:nth-child(2)
  71. width: 100px
  72. text-align: center
  73. &:nth-child(3)
  74. width: 100px
  75. text-align: center
  76. .table-body
  77. width: 310px
  78. table
  79. width: 100%
  80. margin: 6px 0px
  81. font-size: 12px
  82. color: #727575
  83. tbody
  84. tr
  85. td
  86. &:nth-child(1)
  87. width: 110px
  88. text-align: left
  89. &:nth-child(2)
  90. width: 100px
  91. text-align: right
  92. &:nth-child(3)
  93. width: 100px
  94. text-align: right
  95. .tr-unexpired
  96. color: #727575
  97. .tr-Expired
  98. color: red
  99. </style>