Parcourir la source

[ADD] Selección de Facturas , Selección de cuotas,

adrielso il y a 7 ans
Parent
commit
b267c44137

+ 12 - 6
src/Payments.vue

@@ -1,12 +1,13 @@
 <template lang="pug">
 	.payments
-		form-wizard(title="" subtitle="" finishButtonText="Finalizar" color="#8c9bad" backButtonText="Volver" nextButtonText="Continuar" transition="fade" @on-complete="completePayment()" @on-change="(prev, next) => removeLineAll(prev > next && prev >= 2)")
+		//- form-wizard(title="" subtitle="" finishButtonText="Finalizar" color="#8c9bad" backButtonText="Volver" nextButtonText="Continuar" transition="fade" @on-complete="completePayment()" @on-change="(prev, next) => removeLineAll(prev > next && prev >= 2)")
+		form-wizard(title="" subtitle="" finishButtonText="Finalizar" color="#8c9bad" backButtonText="Volver" nextButtonText="Continuar" transition="fade" @on-complete="completePayment()")
 			tab-content(title="Quien es el cliente?")
-				partner-step
+				Customers
 			tab-content(title="Cual es la factura?")
-				//- invoice-step
+				invoices
 			tab-content(title="Que cuota es?")
-				//- move-step
+				move-line
 			tab-content(title="Como quieres pagar?" )
 				//- method-payment-step
 </template>
@@ -18,14 +19,19 @@
 	import {FormWizard, TabContent } from 'vue-form-wizard'
 	import 'vue-form-wizard/dist/vue-form-wizard.min.css'
 
-	import PartnerStep from '@@/steps/PartnerStep'
+	import Customers from '@@/steps/Partner'
+	import Invoices from '@@/steps/Invoices'
+	import MoveLine from '@@/steps/MoveLine'
 
 	export default {
 		components: {
 			TabContent,
 			FormWizard,
-			PartnerStep,
+			Customers,
+			Invoices,
+			MoveLine
 		},
+
 		methods: mapActions([
 			'initPayments'
 			// 'notify',

+ 1 - 1
src/components/common/Card.vue

@@ -30,7 +30,7 @@
             onClick() {
                 this.$emit('onClick')
             }
-        } 
+        }
     }
 </script>
 

+ 112 - 0
src/components/invoices/InvoiceCard.vue

@@ -0,0 +1,112 @@
+<template lang="pug">
+    .invoice-card(@click='onClick' :class="{ 'selected-invoice': isSelected }")
+        h2.invoice-date {{ dateInvoice }}
+        h2.invoice-title {{ number }}
+        .invoice-amount
+            .invoice-total
+                h2.amount-label Total
+                h2.invoice-total-value {{ amountTotal }}
+            .invoice-total
+                h2.amount-label  Saldo
+                h2.invoice-saldo-value {{ residual }}
+</template>
+
+<script>
+    export default {
+        props: {
+            number: {
+                type: String,
+                default: ''
+            },
+            dateInvoice: {
+                type: String,
+                default: ''
+            },
+            amountTotal: {
+                type: Number,
+                default: 0
+            },
+            residual: {
+                type: Number,
+                default: 0
+            },
+            isSelected: {
+                type: Boolean,
+                default: true
+            }
+        },
+        methods: {
+            onClick() {
+                this.$emit('onClick')
+            }
+        }
+    }
+</script>
+
+<style lang="sass">
+    @import '../../assets/variables'
+    .invoice-card
+        width: 250px
+        height: 125px
+        margin: 5px
+        border: 1px solid #d3d3d3
+        display: inline-block
+        position: relative
+        &.selected-invoice
+            transition-duration: 300ms
+            border-bottom: 3px solid $app-main-color
+        &:hover
+            cursor: pointer
+        .invoice-title
+            width: 100%
+            height: 30px
+            font-size: 12pt
+            text-align: center
+            margin-top: 25px
+            position: absolute
+            top: 0
+        .invoice-date
+            width: 100%
+            height: 30px
+            font-size: 9pt
+            text-align: right
+            padding-right: 10px
+            margin-top: 5px
+            position: absolute
+            top: 0
+        .invoice-amount
+            width: 100%
+            height: 70px
+            padding-top: 5px
+            margin: 0px
+            position: absolute
+            bottom: 0px
+            .invoice-total
+                width: calc(100% - 10px)
+                height: 30px
+                border-bottom: 1px solid $app-main-color
+                margin-left: 5px
+                margin-right: 5px
+                .amount-label
+                    width: 75px
+                    height: 30px
+                    float: left
+                    text-align: right
+                    font-size: 10pt
+                    font-weight: bold
+                    margin: 0px
+                    padding: 10px
+                    color: #ccc
+                .invoice-total-value, .invoice-saldo-value
+                    width: calc(100% - 75px)
+                    float: right
+                    text-align: right
+                    font-size: 10pt
+                    font-weight: bold
+                    margin: 0px
+                    padding: 10px
+                .invoice-total-value
+                    bottom: 23px
+                .invoice-saldo-value
+                    bottom: 0
+</style>

+ 46 - 0
src/components/invoices/InvoicesGrid.vue

@@ -0,0 +1,46 @@
+<template lang="pug">
+    .card-grid-wrapper
+        card-grid
+            card(v-for='item in items' :key='item.id' :dateInvoice ='item.dateInvoice' :number='item.number' :amountTotal='item.amountTotal' :residual='item.residual' :isSelected='item.id === selectedId' @onClick='onClickCard(item)')
+</template>
+
+<script>
+
+    import card from '@@/invoices/InvoiceCard'
+
+    export default {
+        props: {
+            items: {
+                type: Array,
+                default: []
+            },
+        },
+        components: {
+            card
+        },
+        methods: {
+            getDescription(item) {
+                return (!!this.description && item[this.description]) || ''
+            },
+            onClickCard(item) {
+                this.selectedId = item.id
+                this.$emit('onSelect', item)
+            }
+        },
+        data() {
+            return {
+                selectedId: -1
+            }
+        }
+    }
+</script>
+
+<style lang="sass">
+    .card-grid-wrapper
+        width: 100%
+        height: calc(100% - 100px)
+        margin-top: 15px
+        overflow-y: auto
+        .card-grid
+            width: 100%
+</style>

+ 98 - 0
src/components/moveLine/MoveLineCard.vue

@@ -0,0 +1,98 @@
+<template lang="pug">
+    .card-move-line(@click='onClick' :class="{ 'selected-move': isSelected }")
+        h2.move-date Vencimiento {{ dateMaturity }}
+        .move-amount
+            .move-total
+                h2.move-amount-label Total
+                h2.move-total-value {{ debit }}
+            .move-total
+                h2.move-amount-label  Saldo
+                h2.move-saldo-value {{ amountResidual }}
+</template>
+
+<script>
+    export default {
+        props: {
+            dateMaturity: {
+                type: String,
+                default: ''
+            },
+            debit: {
+                type: Number,
+                default: 0
+            },
+            amountResidual: {
+                type: Number,
+                default: 0
+            },
+            isSelected: {
+                type: Boolean,
+                default: true
+            }
+        },
+        methods: {
+            onClick() {
+                this.$emit('onClick')
+            }
+        }
+    }
+</script>
+
+<style lang="sass">
+    @import '../../assets/variables'
+    .card-move-line
+        width: 245px
+        height: 125px
+        margin: 5px
+        border: 1px solid #d3d3d3
+        display: inline-block
+        position: relative
+        &.selected-move
+            transition-duration: 300ms
+            border-bottom: 3px solid $app-main-color
+        &:hover
+            cursor: pointer
+        .move-date
+            width: 100%
+            height: 30px
+            font-size: 12pt
+            text-align: center
+            margin-top: 25px
+            position: absolute
+            top: 0
+        .move-amount
+            width: 100%
+            height: 70px
+            padding-top: 5px
+            margin: 0px
+            position: absolute
+            bottom: 0px
+            .move-total
+                width: calc(100% - 10px)
+                height: 30px
+                border-bottom: 1px solid $app-main-color
+                margin-left: 5px
+                margin-right: 5px
+                .move-amount-label
+                    width: 75px
+                    height: 30px
+                    float: left
+                    // text-align: right
+                    font-size: 10pt
+                    font-weight: bold
+                    margin: 0px
+                    padding: 10px
+                    color: #ccc
+                .move-total-value, .move-saldo-value
+                    width: calc(100% - 75px)
+                    float: right
+                    text-align: right
+                    font-size: 10pt
+                    font-weight: bold
+                    margin: 0px
+                    padding: 10px
+                .move-total-value
+                    bottom: 23px
+                .move-saldo-value
+                    bottom: 0
+</style>

+ 47 - 0
src/components/moveLine/MovesGrid.vue

@@ -0,0 +1,47 @@
+<template lang="pug">
+    .card-grid-wrapper-move
+        .card-grid-move
+            card(v-for='item in items' :key='item.id' :amountResidual='item.amountResidual' :dateMaturity='item.dateMaturity' :debit='item.debit' :isSelected='item.id === selectedId' @onClick='onClickCard(item)')
+</template>
+
+<script>
+
+    import card from '@@/moveLine/MoveLineCard'
+
+    export default {
+        props: {
+            items: {
+                type: Array,
+                default: []
+            },
+        },
+        components: {
+            card
+        },
+        methods: {
+            // getDescription(item) {
+            //     return (!!this.description && item[this.description]) || ''
+            // },
+            onClickCard(item) {
+                this.selectedId = item.id
+                this.$emit('onSelect', item)
+            }
+        },
+        data() {
+            return {
+                selectedId: -1
+            }
+        }
+    }
+</script>
+
+<style lang="sass">
+    .card-grid-wrapper-move
+        width: calc(100% - 300px)
+        height: calc(100% - 100px)
+        margin-top: 15px
+        overflow-y: auto
+        display: inline-block
+        .card-grid-move
+            width: 100%
+</style>

+ 52 - 0
src/components/moveLine/SelectedMovesGrid.vue

@@ -0,0 +1,52 @@
+<template lang="pug">
+    .move-Lines-wrapper
+        .move-line-card
+            h3 Aquí va las cuota seleccionadas
+        //- card-grid
+            card(v-for='item in items' :key='item.id' :dateInvoice ='item.dateInvoice' :number='item.number' :amountTotal='item.amountTotal' :residual='item.residual' :isSelected='item.id === selectedId' @onClick='onClickCard(item)')
+</template>
+
+<script>
+
+    // import card from '@@/invoices/InvoiceCard'
+
+    export default {
+        props: {
+            items: {
+                type: Array,
+                default: []
+            },
+        },
+        // components: {
+            // card
+        // },
+        // methods: {
+            // getDescription(item) {
+            //     return (!!this.description && item[this.description]) || ''
+            // },
+            // onClickCard(item) {
+            //     this.selectedId = item.id
+            //     this.$emit('onSelect', item)
+            // }
+        // },
+        // data() {
+        //     return {
+        //         selectedId: -1
+        //     }
+        // }
+    }
+</script>
+
+<style lang="sass">
+    .move-Lines-wrapper
+        width: 300px
+        height: calc(100% - 100px)
+        margin-top: 15px
+        overflow-y: auto
+        vertical-align: top
+        display: inline-block
+        border-left: 1px solid #e3e3e3
+        padding-left: 10px
+        .move-line-Card
+            width: 100%
+</style>

+ 0 - 27
src/components/steps/InvoiceStep.vue

@@ -1,27 +0,0 @@
-<template lang="pug">
-    .payments-step
-        .invoice-step
-            //- invoice-searcher
-            //- invoice-grid
-</template>
-
-<script>
-    // import InvoiceSearcher from '@/components/invoice/InvoiceSearcher'
-    // import InvoiceGrid from '@/components/invoice/InvoiceGrid'
-
-    export default {
-        components: {
-            // InvoiceSearcher,
-            // InvoiceGrid
-        }
-    }
-</script>
-
-<style lang="sass">
-    .invoice-step
-        width: 100%
-        height: 100%
-        padding-right: 5px
-        display: inline-block
-
-</style>

+ 36 - 0
src/components/steps/Invoices.vue

@@ -0,0 +1,36 @@
+<template lang="pug">
+    .payments-step
+        .invoice-step
+            searcher(:items='invoices' :keys="['number']")
+            grid(:items='invoices' @onSelect='selectInvoice')
+</template>
+
+<script>
+    import { mapGetters, mapActions } from 'vuex'
+    import { Searcher } from '@@/common'
+    import { SELECT_INVOICE } from '@/constants/actionTypes'
+
+    import Grid from '@@/invoices/InvoicesGrid'
+
+    export default {
+        components: {
+            Searcher,
+            Grid
+        },
+        computed: mapGetters([
+            'invoices'
+        ]),
+        methods: mapActions([
+            SELECT_INVOICE
+        ]),
+    }
+</script>
+
+<style lang="sass">
+    .invoice-step
+        width: 100%
+        height: 100%
+        padding-right: 5px
+        display: inline-block
+
+</style>

+ 33 - 0
src/components/steps/MoveLine.vue

@@ -0,0 +1,33 @@
+<template lang="pug">
+    .payments-step
+        .move-step
+            grid(:items='moves' @onSelect='selectMove')
+            select-moves
+</template>
+<script>
+    import Grid from '@@/moveLine/MovesGrid'
+    import SelectMoves from '@@/moveLine/SelectedMovesGrid'
+
+    import {mapGetters, mapActions } from 'vuex'
+    import { SELECT_MOVE } from '@/constants/actionTypes'
+
+    export default {
+        components: {
+            Grid,
+            SelectMoves
+        },
+        computed: mapGetters([
+            'moves'
+        ]),
+        methods: mapActions([
+            SELECT_MOVE
+        ])
+    }
+</script>
+<style lang="sass">
+    .move-step
+        width: 100%
+        height: 100%
+        padding-right: 5px
+
+</style>

+ 0 - 22
src/components/steps/MoveStep.vue

@@ -1,22 +0,0 @@
-<template lang="pug">
-    .payments-step
-        .move-step
-            //- move-Container
-            //- move-lines-container
-</template>
-
-<script>
-
-    // import MoveContainer from '@/components/move/MoveContainer/MoveContainer'
-    // import MoveLinesContainer from '@/components/move/MoveLinesContainer/MoveLinesContainer'
-
-    export default {
-        components: {
-            // MoveContainer,
-            // MoveLinesContainer
-        },
-    }
-</script>
-
-<style lang="sass">
-</style>

+ 0 - 0
src/components/steps/PartnerStep.vue → src/components/steps/Partner.vue


+ 12 - 4
src/constants/actionTypes.js

@@ -16,6 +16,12 @@ const INIT_PAYMENTS_COMPANY = 'initPaymentsCompany'
  */
 const INIT_PAYMENTS_CUSTOMERS = 'initPaymentsCustomers'
 const SELECT_PAYMENTS_CUSTOMER = 'selectPaymentsCustomer'
+/* invoice */
+const SELECT_CUSTOMER_INVOICES = 'selectCustomerInvoices'
+const SELECT_INVOICE = 'selectInvoice'
+/* Move Line */
+const SELECT_MOVE_INVOICE = 'selectMoveInvoice'
+const SELECT_MOVE = 'selectMove'
 /**
  * [JOURNALS]
  */
@@ -27,10 +33,12 @@ const INIT_PAYMENTS_CURRENCIES = 'initPaymentsCurrencies'
 
 
 export {
-    PAYMENTS_NOTIFY, INIT_PAYMENTS,EXPLODE_DATA,//initial
-    INIT_PAYMENTS_DATE,//date
-    INIT_PAYMENTS_USER, INIT_PAYMENTS_COMPANY,//user
-    INIT_PAYMENTS_CUSTOMERS, SELECT_PAYMENTS_CUSTOMER, //Customer
+    PAYMENTS_NOTIFY, INIT_PAYMENTS,EXPLODE_DATA, //initial
+    INIT_PAYMENTS_DATE, //date
+    INIT_PAYMENTS_USER, INIT_PAYMENTS_COMPANY, //user
+    INIT_PAYMENTS_CUSTOMERS, SELECT_PAYMENTS_CUSTOMER, //customer
+    SELECT_CUSTOMER_INVOICES, SELECT_INVOICE, //Customer -invoice
+    SELECT_MOVE_INVOICE, SELECT_MOVE, //Customer -Move
     INIT_PAYMENTS_JOURNALS, //Journal
     INIT_PAYMENTS_CURRENCIES //currency
 }

+ 11 - 1
src/constants/mutationTypes.js

@@ -19,6 +19,14 @@ const SET_SELECTED_CURRENCY_COMPANY = 'setSelectedCurrencyCompany'
 const SET_CUSTOMERS = 'setCustomers'
 const SET_LOADING_CUSTOMERS = 'setLoadingCustomers'
 const SET_SELECTED_CUSTOMER = 'setSelectCustomer'
+/*invoices*/
+const SET_INVOICES = 'setInvoices'
+const SET_SELECTED_INVOICE = 'setSelectedInvoice'
+const SET_SELECTED_CURRENCY_INVOICE = 'setSelectedCurrencyInvoice'
+/* Moves Lines */
+const SET_MOVES = 'setMoves'
+const SET_SELECTED_MOVE_LINE = 'setSelectedMoveLine'
+const SET_SELECTED_MOVE_PAYMENTS = 'setSelectedMovePayments'
 /**
  * [JOURNALS]
  * @type {String}
@@ -34,8 +42,10 @@ const SET_LOADING_CURRENCIES = 'setLoadingCurrencies'
 
 export {
     SET_DATE, SET_LOADING_DATE, //Date
-    SET_USER, SET_LOADING_USER, SET_SELECTED_COMPANY, SET_SELECTED_CURRENCY_COMPANY,//User
+    SET_USER, SET_LOADING_USER, SET_SELECTED_COMPANY, SET_SELECTED_CURRENCY_COMPANY, //User
     SET_CUSTOMERS, SET_LOADING_CUSTOMERS, SET_SELECTED_CUSTOMER, //customer
+    SET_INVOICES, SET_SELECTED_INVOICE, SET_SELECTED_CURRENCY_INVOICE, //customer - invoice
+    SET_MOVES, SET_SELECTED_MOVE_LINE, SET_SELECTED_MOVE_PAYMENTS, //customer -Move
     SET_JOURNALS, SET_LOADING_JOURNALS, //Journal
     SET_CURRENCIES, SET_LOADING_CURRENCIES //Currency
 }

+ 11 - 2
src/store/index.js

@@ -2,13 +2,20 @@ import Vue from 'vue'
 import Vuex from 'vuex'
 
 import actions from '@/store/actions'
-
+/* date*/
 import date from '@/store/modules/date'
+/* user - company*/
 import user from '@/store/modules/user'
+import company  from '@/store/modules/company'
+/*Customre - invoices moveLine */
 import customers from '@/store/modules/customers'
+import invoices from '@/store/modules/invoices'
+import moveLines from '@/store/modules/moveLines'
+/* jounarl*/
 import journals from '@/store/modules/journals'
+/* currency */
 import currency  from '@/store/modules/currency'
-import company  from '@/store/modules/company'
+
 
 Vue.use(Vuex)
 
@@ -19,6 +26,8 @@ const store = new Vuex.Store({
         user,
         company,
         customers,
+        invoices,
+        moveLines
         // journals,
         // currency
     },

+ 3 - 2
src/store/modules/customers.js

@@ -1,4 +1,4 @@
-import { INIT_PAYMENTS_CUSTOMERS, SELECT_PAYMENTS_CUSTOMER } from '@/constants/actionTypes'
+import { INIT_PAYMENTS_CUSTOMERS, SELECT_PAYMENTS_CUSTOMER, SELECT_CUSTOMER_INVOICES } from '@/constants/actionTypes'
 import { SET_CUSTOMERS, SET_LOADING_CUSTOMERS, SET_SELECTED_CUSTOMER } from '@/constants/mutationTypes'
 
 const initialState = {
@@ -80,8 +80,9 @@ const actions = {
      * @param {*} param0
      * @param {*} payload
      */
-    [SELECT_PAYMENTS_CUSTOMER] ({ commit }, payload ) {
+    [SELECT_PAYMENTS_CUSTOMER] ({ commit, dispatch }, payload ) {
         commit(SET_SELECTED_CUSTOMER, payload)
+        dispatch(SELECT_CUSTOMER_INVOICES, payload.invoices)
     }
 }
 

+ 99 - 0
src/store/modules/invoices.js

@@ -0,0 +1,99 @@
+import { SELECT_CUSTOMER_INVOICES, SELECT_INVOICE, SELECT_MOVE_INVOICE } from '@/constants/actionTypes'
+import { SET_INVOICES, SET_SELECTED_INVOICE, SET_SELECTED_CURRENCY_INVOICE } from '@/constants/mutationTypes'
+
+const initialState = {
+    invoices: null,
+    currencyInvoice: null,
+    selectedInvoice : null
+}
+
+const state = {
+    invoices: initialState.invoices,
+    currencyInvoice: initialState.currencyInvoice,
+    selectedInvoice: initialState.selectedInvoice
+}
+
+const getters = {
+    /**
+     * [invoices description]
+     * @param  {[type]} state [description]
+     * @return {[type]}       [description]
+     */
+    invoices(state) {
+        return state.invoices
+    },
+    /**
+     * [currencyInvoice description]
+     * @param  {[type]} state [description]
+     * @return {[type]}       [description]
+     */
+    currencyInvoice(state) {
+        return state.currencyInvoice
+    },
+    /**
+     * [selectedInvoice description]
+     * @param  {[type]} state [description]
+     * @return {[type]}       [description]
+     */
+    selectedInvoice(state) {
+        return state.selectedInvoice
+    }
+}
+
+const mutations = {
+    /**
+     * [invoices description]
+     * @type {[type]}
+     * @param  {[type]} state [description]
+     * @param  {[type]} payload [description]
+     */
+    [SET_INVOICES] (state, payload) {
+        state.invoices = payload
+    },
+    /**
+     * [selectedInvoice description]
+     * @type {[type]}
+     * @param  {[type]} state [description]
+     * @param  {[type]} payload [description]
+     */
+    [SET_SELECTED_INVOICE] (state, payload) {
+        state.selectedInvoice = payload
+    },
+    /**
+     * [currencyInvoice description]
+     * @type {[type]}
+     * @param  {[type]} state [description]
+     * @param  {[type]} payload [description]
+     */
+    [SET_SELECTED_CURRENCY_INVOICE] (state, payload) {
+        state.currencyInvoice = payload
+    }
+}
+
+const actions = {
+    /**
+     * [Selecciona las factura del cliente seleccionado]
+     * @param {*} param0
+     * @param {*} payload
+     */
+    [SELECT_CUSTOMER_INVOICES] ({ commit }, payload) {
+        commit(SET_INVOICES, payload)
+    },
+    /**
+     * [Seleccionar una factura]
+     * @param {*} param0
+     * @param {*} payload
+     */
+    [SELECT_INVOICE] ({ commit, dispatch }, payload) {
+        commit(SET_SELECTED_INVOICE, payload)
+        commit(SET_SELECTED_CURRENCY_INVOICE, payload.currency)
+        dispatch(SELECT_MOVE_INVOICE, payload.moveLines)
+    }
+}
+
+export default {
+    state,
+    getters,
+    mutations,
+    actions
+}

+ 98 - 0
src/store/modules/moveLines.js

@@ -0,0 +1,98 @@
+import { SELECT_MOVE_INVOICE, SELECT_MOVE } from '@/constants/actionTypes'
+import { SET_MOVES, SET_SELECTED_MOVE_LINE, SET_SELECTED_MOVE_PAYMENTS } from '@/constants/mutationTypes'
+
+const initialState = {
+    moves : null,
+    selectedMoveLine: null,
+    movesPayments: []
+}
+
+const state = {
+    moves: initialState.moves,
+    selectedMoveLine: initialState.selectedMoveLine,
+    movesPayments: initialState.movesPayments
+}
+
+const getters = {
+    /**
+     * [moves description]
+     * @param  {[type]} state [description]
+     * @return {[type]}       [description]
+     */
+    moves(state) {
+        return state.moves
+    },
+    /**
+     * [selectedMoveLine description]
+     * @param  {[type]} state [description]
+     * @return {[type]}       [description]
+     */
+    selectedMoveLine(state){
+        return state.selectedMoveLine
+    },
+    /**
+     * [movesPayments description]
+     * @param  {[type]} state [description]
+     * @return {[type]}       [description]
+     */
+    movesPayments(state) {
+        return state.movesPayments
+    }
+}
+
+const mutations = {
+    /**
+     * [moves description]
+     * @type {[type]}
+     * @param  {[type]} state [description]
+     * @param  {[type]} payload [description]
+     */
+    [SET_MOVES] (state, payload) {
+        state.moves =  payload
+    },
+    /**
+     * [selectedMoveLine description]
+     * @type {[type]}
+     * @param  {[type]} state [description]
+     * @param  {[type]} payload [description]
+     */
+    [SET_SELECTED_MOVE_LINE] (state, payload) {
+        state.selectedMoveLine = payload
+    },
+    /**
+     * [movesPayments description]
+     * @type {[type]}
+     * @param  {[type]} state [description]
+     * @param  {[type]} payload [description]
+     */
+    [SET_SELECTED_MOVE_PAYMENTS] (state, payload) {
+        state.movesPayments = [payload, ...state.movesPayments]
+    }
+}
+
+const actions = {
+    /**
+     * [SELECT_MOVE_INVOICE]
+     * @param {*} param0
+     * @param {*} payload
+     */
+    [SELECT_MOVE_INVOICE] ({ commit }, payload) {
+        commit(SET_MOVES, payload)
+    },
+    /**
+     * [SELECT_MOVE]
+     * @param {*} param0
+     * @param {*} payload
+     */
+    [SELECT_MOVE] ({ commit }, payload) {
+        commit(SET_SELECTED_MOVE_PAYMENTS, payload)
+        commit(SET_SELECTED_MOVE_LINE, payload)
+    }
+}
+
+export default {
+    state,
+    getters,
+    mutations,
+    actions
+}