{"version":3,"sources":["webpack:///./src/modules/facturae/domain/Product.ts","webpack:///./src/components/InvoiceLinesEditor.vue?fdd3","webpack:///./src/components/InvoiceTotalsViewer.vue?42be","webpack:///src/components/InvoiceTotalsViewer.vue","webpack:///./src/components/InvoiceTotalsViewer.vue?7e4d","webpack:///./src/components/InvoiceTotalsViewer.vue?bc9b","webpack:///./src/components/InvoiceLinesEditor.vue?1463","webpack:///src/components/InvoiceLinesEditor.vue","webpack:///./src/components/InvoiceLinesEditor.vue?0401","webpack:///./src/components/InvoiceLinesEditor.vue?af03","webpack:///./src/components/InvoiceTotalsViewer.vue?e735","webpack:///./src/modules/facturae/infra/ApiProductRepository.ts"],"names":["Product","id","code","description","price","company_id","taxes","deleted","taxes_withheld","special_taxable_event","selected_retention","selected_tax","selected_tax_event","this","kind","map","tax","render","_vm","_h","$createElement","_c","_self","staticClass","invoice","general_discounts","length","total_lines_discounts","attrs","_v","_s","total_gross_amount","toFixed","_e","reason","amount","total_gross_amount_before_tax","_l","item","key","rate","toString","tax_type_to_show","base","name","total_amount","retention_concept","Number","retention_amount","reimbursable_amounts","total_to_pay","staticRenderFns","props","type","Invoiceable","computed","tax_type","methods","component","VCol","VRow","allow_import","loading","on","$event","ImportLinesFromExcel","is_mobile","openDialogAdditionalInfo","readonly","openDialogDeleteAllLines","showErrors","areInvoiceLinesValid","isRecurringContract","invoiceable_type","staticStyle","some_0_tax","computed_tax_type","toUpperCase","invoice_line","index","deleteInvoiceLine","class","rest_products","filterProducts","product","product_changed","scopedSlots","_u","fn","data","change","model","value","callback","$$v","$set","expression","showLineDiscount","discounts","_n","computed_tax_items","newRate","tax_change","type_0_options","newTaxEvent","tax_event_change","line_retentions","retention_change","get_total_amount","openDialogOtherInformation","openDialogEditLine","showAdditionalInfoDilog","additionalInfoActiveTab","tab","_g","click","ret_amount","ret_concept","reimbursable_expense","checkedGlobalDiscount","proxy","checkedLineDiscount","discount_amount","discount_reason","cancelChange","changeAdditionaInfo","showEditLineDialog","num_line","ref","_b","tryDelete","line","cancelEditLineChange","changeInvoiceLine","delete_pop_up","addInvoiceLine","_m","keyDialog","otherInformationDialog","activeTab","directives","rawName","delivery_note_number","delivery_note_date","sender_info","receiver_info","additional_line_information","chnageOtherInformation","components","AppRow","AppCol","TableCustomTextField","AppDateField","invoice_lines","Array","required","Boolean","default","Object","products","String","undefined","additionalInfoTabs","actualOtherInformationLine","got_feature","tax_items","includes","push","some","i","console","log","iamvalid","$emit","allow","gross","gross_amount","tax_amount","recargo","recargo_amount","withheld_amount","unit_price_without_tax","quantity","parseFloat","tax_values","selected_product","p","find","additional_information","indexOf","queryText","toLowerCase","VAutocomplete","VBtn","VCard","VCardActions","VCardText","VCardTitle","VCheckbox","VCombobox","VDialog","VDivider","VIcon","VProgressCircular","VSpacer","VTab","VTabItem","VTabs","VTabsItems","VTextField","VTextarea","VTooltip","objectToDict","obj","dict","prototype","hasOwnProperty","call","isArray","ApiProductRepository","command_dispatcher","async_command_dispatcher","query_dispatcher","recargo_rate","JSON","parse","stringify","filters","args","entries","forEach","productData","dispatch","productList","inv","api_to_domain","product_data","domain_to_api","res","parseInt","file_path","filename","og_file_name","job_id"],"mappings":"kHAEA,kCAAO,MAAMA,EAeX,YACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEAC,KAAKZ,GAAKA,EACVY,KAAKC,KAAO,SACZD,KAAKX,KAAOA,EACZW,KAAKV,YAAcA,EACnBU,KAAKT,MAAQA,EACbS,KAAKR,WAAaA,EAClBQ,KAAKP,MAAQA,EACbO,KAAKN,QAAUA,EAEbM,KAAKH,mBADJA,GAIyB,KAG1BG,KAAKF,aADJA,GAImB,IAGpBE,KAAKL,eADHA,GAIoB,GAGtBK,KAAKD,mBADHA,GAIwB,MAE5BC,KAAKJ,sBAAwBA,EAE/B,QACE,OAAO,IAAIT,EACTa,KAAKZ,GACLY,KAAKX,KACLW,KAAKV,YACLU,KAAKT,MACLS,KAAKR,WACLQ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J,EAAe/N,KAAKgO,cAAczJ,GAClC0J,QAAYjO,KAAK+M,mBAAmBY,SAAS,eAAgB,CAAEpJ,QAASwJ,IAC5E,OAAOE,EAAI,aAGf,qBAAqBzO,GACjB,OAAO,IAAI,OAAQ,iBAAU,GAAI,GAAI,EAAK0O,SAAS1O,EAAWoC,YAAa,CAAC,IAAI,OAAI,IAAM,EAAG,KAAK,GAGhG,OAAOsH,G,yCACT,IAAIqE,EAAO,CACPrE,SAAUA,EAAShJ,IAAIqE,GAAWvE,KAAKgO,cAAczJ,KAErD0J,QAAYjO,KAAK+M,mBAAmBY,SAAS,kBAAmBJ,GACpE,OAAOU,EAAI,aAGT,qBAAqBzO,EAAY2O,EAAWC,G,yCAC9C,IAAIb,EAAO,CACP/N,WAAYA,EACZ2O,UAAWA,EACXE,aAAcD,GAEZH,QAAYjO,KAAKgN,yBAAyBW,SAAS,6BAA8BJ,GACrF,OAAOU,EAAIK,a","file":"js/chunk-bf195254.fec8e538.js","sourcesContent":["import { Tax } from \"./Invoiceable\";\n\nexport class Product {\n  id: string;\n  kind: string;\n  code: string;\n  description: string;\n  price: number;\n  company_id: number;\n  taxes: Tax[];\n  deleted: boolean;\n  taxes_withheld : Tax[];\n  special_taxable_event?: Object;\n  selected_retention?:any;\n  selected_tax?:any;  \n  selected_tax_event?: string\n\n  constructor(\n    id: string,\n    code: string,\n    description: string,\n    price: number,\n    company_id: number,\n    taxes: Tax[],\n    deleted: boolean,\n    taxes_withheld? : Tax[],\n    special_taxable_event?: Object,\n    selected_retention?:any,\n    selected_tax?:any,    \n    selected_tax_event?: string\n  ) {\n    this.id = id;\n    this.kind = 'simple'\n    this.code = code;\n    this.description = description;\n    this.price = price;\n    this.company_id = company_id;\n    this.taxes = taxes;\n    this.deleted = deleted;\n    if(selected_retention){\n      this.selected_retention = selected_retention;\n    }\n    else{\n      this.selected_retention = 'na';\n    }\n    if(selected_tax){\n      this.selected_tax = selected_tax;\n    }\n    else{\n      this.selected_tax = 0.21;\n    }\n    if (taxes_withheld){\n      this.taxes_withheld = taxes_withheld;\n    }\n    else{\n      this.taxes_withheld = [];\n    }\n    if (selected_tax_event){\n      this.selected_tax_event = selected_tax_event;\n    }\n    else{\n      this.selected_tax_event = 'N/A';\n    }\n    this.special_taxable_event = special_taxable_event;\n  }\n  clone(): Product {\n    return new Product(\n      this.id,\n      this.code,\n      this.description,\n      this.price,\n      this.company_id,\n      this.taxes.map(tax => tax),\n      this.deleted,\n      this.taxes_withheld.map(tax => tax),\n      this.special_taxable_event,\n      this.selected_retention,\n      this.selected_tax\n    );\n  }\n}","export * from \"-!../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InvoiceLinesEditor.vue?vue&type=style&index=0&id=21535cc8&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.invoice)?_c('div',{staticClass:\"mt-6 w-100\"},[((_vm.invoice.general_discounts && _vm.invoice.general_discounts.length > 0) || _vm.invoice.total_lines_discounts>0)?_c('v-row',{staticClass:\"custom-row\"},[_c('v-col',{staticClass:\"text-right py-0\",attrs:{\"cols\":\"8\",\"md\":\"6\"}},[_c('span',[_vm._v(\"Total sin descuentos\")])]),_c('v-col',{staticClass:\"text-right custom-total\",attrs:{\"cols\":\"4\",\"md\":\"2\",\"lg\":\"1\"}},[_c('span',[_vm._v(_vm._s(_vm.invoice.total_gross_amount.toFixed(2) + ' €'))])])],1):_vm._e(),(_vm.invoice.total_lines_discounts > 0)?_c('v-row',{staticClass:\"custom-row\"},[_c('v-col',{staticClass:\"text-right py-0\",attrs:{\"cols\":\"8\",\"md\":\"6\"}},[_c('span',[_vm._v(\"Descuento por línea\")])]),_c('v-col',{staticClass:\"text-right custom-total\",attrs:{\"cols\":\"4\",\"md\":\"2\",\"lg\":\"1\"}},[_c('span',[_vm._v(_vm._s((-_vm.invoice.total_lines_discounts).toFixed(2) + ' €'))])])],1):_vm._e(),(_vm.invoice.general_discounts && _vm.invoice.general_discounts.length > 0)?_c('v-row',{staticClass:\"custom-row\"},[_c('v-col',{staticClass:\"text-right py-0\",attrs:{\"cols\":\"8\",\"md\":\"6\"}},[_c('span',[_vm._v(\"Descuento global\")]),_c('small',{staticClass:\"description\"},[_vm._v(\"\\n                \"+_vm._s('(' + _vm.invoice.general_discounts[0].reason + ')')+\"\\n            \")])]),_c('v-col',{staticClass:\"text-right custom-total\",attrs:{\"cols\":\"4\",\"md\":\"2\",\"lg\":\"1\"}},[_c('span',[_vm._v(_vm._s((-_vm.invoice.general_discounts[0].amount).toFixed(2) + ' €'))])])],1):_vm._e(),_c('v-row',{staticClass:\"custom-row\"},[_c('v-col',{staticClass:\"text-right py-0\",attrs:{\"cols\":\"8\",\"md\":\"6\"}},[_c('span',[_vm._v(\"Total sin impuestos\")])]),_c('v-col',{staticClass:\"text-right custom-total\",attrs:{\"cols\":\"4\",\"md\":\"2\",\"lg\":\"1\"}},[_c('span',[_vm._v(_vm._s(_vm.invoice.total_gross_amount_before_tax.toFixed(2) + ' €'))])])],1),_vm._l((_vm.invoice.total_taxes),function(item){return _c('v-row',{key:item.rate.toString() +'_t',staticClass:\"custom-row\"},[_c('v-col',{staticClass:\"text-right py-0\",attrs:{\"cols\":\"8\",\"md\":\"6\"}},[(_vm.is_mobile)?_c('span',[_vm._v(\"\\n                Total \"+_vm._s(_vm.tax_type_to_show)+\" \"+_vm._s((item.rate * 100).toFixed(2))+\"%  \"),_c('br'),_vm._v(\" \"+_vm._s('(Base: ' + item.base.toFixed(2) + ' €)')+\"\\n            \")]):_c('span',[_vm._v(\"\\n                Total \"+_vm._s(_vm.tax_type_to_show)+\" \"+_vm._s((item.rate * 100).toFixed(2))+\"% \"+_vm._s('(Base: ' + item.base.toFixed(2) + ' €)')+\"\\n            \")])]),_c('v-col',{staticClass:\"text-right custom-total\",attrs:{\"cols\":\"4\",\"md\":\"2\",\"lg\":\"1\"}},[_c('span',[_vm._v(_vm._s(item.amount.toFixed(2) + ' €'))])])],1)}),_vm._l((_vm.invoice.total_taxes_withheld),function(item){return _c('v-row',{key:item.rate.toString() +'_wt',staticClass:\"custom-row\"},[_c('v-col',{staticClass:\"text-right py-0\",attrs:{\"cols\":\"8\",\"md\":\"6\"}},[(_vm.is_mobile)?_c('span',[_vm._v(\"\\n                Total Retención \"+_vm._s((item.rate * 100).toFixed(0))+\"% \"),_c('br'),_vm._v(\" \"+_vm._s('(Base: ' + item.base.toFixed(2) + ' €)')+\"\\n            \")]):_c('span',[_vm._v(\"\\n                Total Retención \"+_vm._s((item.rate * 100).toFixed(0))+\"% \"+_vm._s('(Base: ' + item.base.toFixed(2) + ' €)')+\"\\n            \")])]),_c('v-col',{staticClass:\"text-right custom-total\",attrs:{\"cols\":\"4\",\"md\":\"2\",\"lg\":\"1\"}},[_c('span',[_vm._v(_vm._s((-item.amount).toFixed(2) + ' €'))])])],1)}),_c('v-row',{staticClass:\"custom-row\"},[_c('v-col',{staticClass:\"text-right py-0\",attrs:{\"cols\":\"8\",\"md\":\"6\"}},[_c('span',[_vm._v(\"Total \"+_vm._s(_vm.invoice.name))])]),_c('v-col',{staticClass:\"text-right custom-total\",attrs:{\"cols\":\"4\",\"md\":\"2\",\"lg\":\"1\"}},[_c('span',[_vm._v(_vm._s(_vm.invoice.total_amount.toFixed(2) + ' €'))])])],1),(_vm.invoice.retention_amount)?[_c('v-row',{staticClass:\"custom-row\"},[_c('v-col',{staticClass:\"text-right py-0\",attrs:{\"cols\":\"8\",\"md\":\"6\"}},[_c('span',[_vm._v(\"Retención:   \"),_c('b',[_vm._v(_vm._s(_vm.invoice.retention_concept))])])]),_c('v-col',{staticClass:\"text-right custom-total\",attrs:{\"cols\":\"4\",\"md\":\"2\",\"lg\":\"1\"}},[_c('span',[_vm._v(_vm._s(-Number(_vm.invoice.retention_amount).toFixed(2) + ' €'))])])],1)]:_vm._e(),(_vm.invoice.reimbursable_amounts && _vm.invoice.reimbursable_amounts.length > 0)?[_c('v-row',{staticClass:\"custom-row\"},[_c('v-col',{staticClass:\"text-right py-0\"},[_c('span',[_vm._v(\"Suplido:  \")])]),_c('v-col',{staticClass:\"text-right custom-total\"},[_c('span',[_vm._v(_vm._s(_vm.invoice.reimbursable_amounts[0].toFixed(2) + ' €'))])])],1)]:_vm._e(),_c('v-row',{staticClass:\"custom-row pb-6\"},[_c('v-col',{staticClass:\"text-right py-0\",attrs:{\"cols\":\"8\",\"md\":\"6\"}},[_c('span',{staticClass:\"title-color\"},[_vm._v(\"Total a pagar\")])]),_c('v-col',{staticClass:\"text-right custom-total-last\",attrs:{\"cols\":\"4\",\"md\":\"2\",\"lg\":\"1\"}},[_c('span',[_vm._v(_vm._s(_vm.invoice.total_to_pay.toFixed(2) + ' €'))])])],1)],2):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n    <div v-if=\"invoice\" class=\"mt-6 w-100\">\n        <!-- Total sin impuestos ni descuentos -->\n        <v-row class=\"custom-row\" v-if=\"(invoice.general_discounts && invoice.general_discounts.length > 0) || invoice.total_lines_discounts>0\">\n            <v-col class=\"text-right py-0\" cols=\"8\" md=\"6\">\n                <span>Total sin descuentos</span>\n            </v-col>\n            <v-col class=\"text-right custom-total\" cols=\"4\" md=\"2\" lg=\"1\">\n                <span>{{ invoice.total_gross_amount.toFixed(2) + ' €' }}</span>\n            </v-col>\n        </v-row>\n\n        <!-- Descuento por linea -->\n        <v-row class=\"custom-row\" v-if=\"invoice.total_lines_discounts > 0\">\n            <v-col class=\"text-right py-0\" cols=\"8\" md=\"6\">\n                <span>Descuento por línea</span>\n            </v-col>\n            <v-col class=\"text-right custom-total\" cols=\"4\" md=\"2\" lg=\"1\">\n                <span>{{ (-invoice.total_lines_discounts).toFixed(2) + ' €' }}</span>\n            </v-col>\n        </v-row>\n\n        <!-- Descuento global -->\n        <v-row class=\"custom-row\" v-if=\"invoice.general_discounts && invoice.general_discounts.length > 0\">\n            <v-col class=\"text-right py-0\" cols=\"8\" md=\"6\">\n                <span>Descuento global</span>\n                <small class=\"description\">\n                    {{ '(' + invoice.general_discounts[0].reason + ')' }}\n                </small>\n            </v-col>\n            <v-col class=\"text-right custom-total\" cols=\"4\" md=\"2\" lg=\"1\">\n                <span>{{ (-invoice.general_discounts[0].amount).toFixed(2) + ' €' }}</span>\n            </v-col>\n        </v-row>\n\n        <!-- Total sin impuestos -->\n        <v-row class=\"custom-row\">\n            <v-col class=\"text-right py-0\" cols=\"8\" md=\"6\">\n                <span>Total sin impuestos</span>\n            </v-col>\n            <v-col class=\"text-right custom-total\" cols=\"4\" md=\"2\" lg=\"1\">\n                <span>{{ invoice.total_gross_amount_before_tax.toFixed(2) + ' €' }}</span>\n                <!-- <template v-if=\"invoice.general_discounts && invoice.general_discounts.length > 0\">\n                    <small class=\"description\">\n                        {{ (-invoice.general_discounts[0].amount).toFixed(2) + ' € de Descuento' }}\n                    </small>\n                </template> -->\n            </v-col>\n        </v-row>\n        \n        <!-- Total IVA por tasa -->\n        <v-row v-for=\"item in invoice.total_taxes\" :key=\"item.rate.toString() +'_t'\" class=\"custom-row\">\n            <v-col class=\"text-right py-0\" cols=\"8\" md=\"6\">\n                <span v-if=\"is_mobile\">\n                    Total {{ tax_type_to_show }} {{ (item.rate * 100).toFixed(2) }}%  <br/> {{ '(Base: ' + item.base.toFixed(2) + ' €)' }}\n                </span>\n                <span v-else>\n                    Total {{ tax_type_to_show }} {{ (item.rate * 100).toFixed(2) }}% {{ '(Base: ' + item.base.toFixed(2) + ' €)' }}\n                </span>\n            </v-col>\n            <v-col class=\"text-right custom-total\" cols=\"4\" md=\"2\" lg=\"1\">\n                <span>{{ item.amount.toFixed(2) + ' €' }}</span>\n            </v-col>\n        </v-row>\n    \n        <!-- Total Retención por tasa -->\n        <v-row v-for=\"item in invoice.total_taxes_withheld\" :key=\"item.rate.toString() +'_wt'\" class=\"custom-row\">\n            <v-col class=\"text-right py-0\" cols=\"8\" md=\"6\">\n                <span v-if=\"is_mobile\">\n                    Total Retención {{ (item.rate * 100).toFixed(0) }}% <br/> {{ '(Base: ' + item.base.toFixed(2) + ' €)' }}\n                </span>\n                <span v-else>\n                    Total Retención {{ (item.rate * 100).toFixed(0) }}% {{ '(Base: ' + item.base.toFixed(2) + ' €)' }}\n                </span>\n            </v-col>\n            <v-col class=\"text-right custom-total\" cols=\"4\" md=\"2\" lg=\"1\">\n                <span>{{ (-item.amount).toFixed(2) + ' €' }}</span>\n            </v-col>\n        </v-row>\n    \n        <!-- Total factura -->\n        <v-row class=\"custom-row\">\n            <v-col class=\"text-right py-0\" cols=\"8\" md=\"6\">\n                <span>Total {{invoice.name}}</span>\n            </v-col>\n            <v-col class=\"text-right custom-total\" cols=\"4\" md=\"2\" lg=\"1\">\n                <span>{{ invoice.total_amount.toFixed(2) + ' €' }}</span>\n            </v-col>\n        </v-row>\n    \n        <!-- Retención -->\n        <template v-if=\"invoice.retention_amount\">\n            <v-row class=\"custom-row\">\n                <v-col class=\"text-right py-0\" cols=\"8\" md=\"6\">\n                    <span>Retención: &nbsp; <b>{{ invoice.retention_concept }}</b></span>\n                </v-col>\n                <v-col class=\"text-right custom-total\" cols=\"4\" md=\"2\" lg=\"1\">\n                    <span>{{ -Number(invoice.retention_amount).toFixed(2) + ' €' }}</span>\n                </v-col>\n            </v-row>\n        </template>\n    \n        <!-- Suplido -->\n        <template v-if=\"invoice.reimbursable_amounts && invoice.reimbursable_amounts.length > 0\">\n            <v-row class=\"custom-row\">\n                <v-col class=\"text-right py-0\">\n                    <span>Suplido: &nbsp;</span>\n                </v-col>\n                <v-col class=\"text-right custom-total\">\n                    <span>{{ invoice.reimbursable_amounts[0].toFixed(2) + ' €' }}</span>\n                </v-col>\n            </v-row>\n        </template>\n    \n        <!-- Total a pagar -->\n        <v-row class=\"custom-row pb-6\">\n            <v-col class=\"text-right py-0\" cols=\"8\" md=\"6\"> \n                <span class=\"title-color\">Total a pagar</span>\n            </v-col>\n            <v-col class=\"text-right custom-total-last\" cols=\"4\" md=\"2\" lg=\"1\">\n                <span>{{ invoice.total_to_pay.toFixed(2) + ' €' }}</span>\n            </v-col>\n        </v-row>\n    </div>\n</template>\n\n\n<script>\n\nimport {Invoiceable} from '../modules/facturae/domain/Invoiceable'\nimport { mapGetters } from \"vuex\";\n\nexport default {\n\n    props: {\n        invoice: {\n            type: Invoiceable,\n        },\n    },\n    data() {\n        return {\n        }\n    },\n\n\n    computed: {\n        \n        // totalGrossAmountBeforeTaxes(){\n        //     let total = 0\n        //     for(let i in this.invoice.lines){\n        //         let line = this.invoice.lines[i]\n        //         total += line.gross_amount\n        //     }\n        //     if (total){\n        //         return Math.trunc(total*100)/100\n        //     }\n        //     else{\n        //         return 0\n        //     }\n        // },\n        tax_type_to_show(){\n            if (this.invoice.tax_type == 'igic'){\n                return 'IGIC'\n            }\n            else{\n                return 'IVA'\n            }\n        },\n        ...mapGetters(['is_mobile']),\n    },\n    methods: {\n        \n        // getTaxes(){\n        //     let taxes_comput = {}\n        //     for(let i in this.invoice.lines){\n        //         let line = this.invoice.lines[i]\n        //         let tax = line.taxes[0]\n        //         let recargo = line.taxes[0].recargo_amount? line.taxes[0].recargo_amount : 0\n        //         if (taxes_comput.hasOwnProperty(tax.rate)){\n        //             taxes_comput[tax.rate].TaxableBase += tax.base\n        //             taxes_comput[tax.rate].TaxAmount += tax.amount + recargo\n        //         }\n        //         else{\n        //             taxes_comput[tax.rate] = {\n        //                 TaxRate: tax.rate*100,\n        //                 TaxableBase: tax.base,\n        //                 TaxAmount: tax.amount + recargo\n        //             }\n        //         }\n        //     }\n        //     let items = []\n        //     console.log(taxes_comput)\n        //     for (let key in taxes_comput){\n        //         items.push(taxes_comput[key])\n        //     }\n        //     return items\n            \n\n        // },\n        // getWithheldTaxes(){\n        //     let taxes_comput = {}\n        //     for(let i in this.invoice.lines){\n        //         let line = this.invoice.lines[i]\n        //         if (line.taxes_withheld.length){\n        //             let tax = line.taxes_withheld[0]\n        //             if (taxes_comput.hasOwnProperty(tax.rate)){\n        //                 taxes_comput[tax.rate].TaxableBase += tax.base\n        //                 taxes_comput[tax.rate].TaxAmount += tax.amount\n        //             }\n        //             else{\n        //                 taxes_comput[tax.rate] = {\n        //                     TaxRate: (tax.rate*100).toFixed(2),\n        //                     TaxableBase: tax.base,\n        //                     TaxAmount: tax.amount\n        //                 }\n        //             }\n        //         }\n        //     }\n        //     let items = []\n        //     for (let key in taxes_comput){\n        //         items.push(taxes_comput[key])\n        //     }\n        //     return items\n            \n\n        // },\n    },\n    \n\n}\n</script>\n\n\n<style scoped>\n.custom-row {\n    display: flex;\n    justify-content: flex-end;\n    align-items: center;\n    margin-right: 20px;\n    margin-bottom: 5px;\n}\n.custom-total {\n    border-radius: 2px;\n    border: 1px solid  #56565680;\n    padding: 4px;\n    width: 150px;\n    text-align: right;\n    display: flex;\n    flex-direction: column;\n}\n\n.custom-total-last {\n    border-radius: 2px;\n    color:#663399; \n    border: 1px solid #663399; \n    padding: 4px;\n    width: 150px;\n    text-align: right;\n}\n\n.description {\n    font-size: 0.8em; /* Adjust the size as needed */\n    color: gray; /* Adjust the color as needed */\n}\n</style>","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InvoiceTotalsViewer.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InvoiceTotalsViewer.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./InvoiceTotalsViewer.vue?vue&type=template&id=70e1d2a5&scoped=true&\"\nimport script from \"./InvoiceTotalsViewer.vue?vue&type=script&lang=js&\"\nexport * from \"./InvoiceTotalsViewer.vue?vue&type=script&lang=js&\"\nimport style0 from \"./InvoiceTotalsViewer.vue?vue&type=style&index=0&id=70e1d2a5&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"70e1d2a5\",\n  null\n  \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VCol,VRow})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-row',{staticClass:\"sector-head\"},[_c('v-col',{staticClass:\"primary_blue--text subtitle-1 flex-sm-nowrap font-weight-bold\",attrs:{\"cols\":\"5\",\"md\":\"6\"}},[_c('p',{staticClass:\"mb-0\"},[_vm._v(\"Líneas de \"+_vm._s(_vm.invoice.name))])]),_c('v-col',{staticClass:\"d-flex justify-end align-center flex-sm-nowrap\",attrs:{\"cols\":\"7\",\"md\":\"6\"}},[(_vm.loading)?_c('v-progress-circular',{staticClass:\"mr-2\",attrs:{\"indeterminate\":\"\",\"color\":\"primary\"}}):_vm._e(),_c('v-btn',{staticClass:\"mr-2\",attrs:{\"outlined\":\"\",\"small\":\"\",\"color\":\"primary\",\"disabled\":!_vm.allow_import || _vm.loading},on:{\"click\":function($event){return _vm.ImportLinesFromExcel()}}},[_c('img',{attrs:{\"src\":require(\"../assets/upload_excel.svg\")}}),(!_vm.is_mobile)?_c('span',[_vm._v(\" Subir Excel \")]):_vm._e()]),_c('v-btn',{staticClass:\"mr-2\",attrs:{\"color\":\"primary\",\"outlined\":\"\",\"small\":\"\",\"disabled\":_vm.loading},on:{\"click\":function($event){return _vm.openDialogAdditionalInfo()}}},[_c('img',{attrs:{\"src\":require(\"../assets/add_info.svg\")}}),(!_vm.is_mobile)?_c('span',[_vm._v(\" Información adicional \")]):_vm._e()]),_c('v-btn',{staticClass:\"mr-2\",attrs:{\"color\":\"primary\",\"outlined\":\"\",\"small\":\"\",\"disabled\":_vm.readonly || _vm.loading},on:{\"click\":function($event){return _vm.openDialogDeleteAllLines()}}},[_c('v-icon',[_vm._v(\"mdi-delete\")]),(!_vm.is_mobile)?_c('span',[_vm._v(\" Borrar todas las líneas \")]):_vm._e()],1)],1)],1),(_vm.showErrors && !_vm.areInvoiceLinesValid)?_c('v-row',{staticClass:\"error__msg\"},[_c('v-col',{attrs:{\"cols\":\"12\"}},[(!_vm.isRecurringContract)?_c('span',[_vm._v(\"\\n                Para poder \\n                \"),(_vm.invoiceable_type == 'invoice')?_c('span',[_vm._v(\"\\n                    firmar y emitir la factura\\n                \")]):_c('span',[_vm._v(\"\\n                    emitir el \"+_vm._s(_vm.invoice.name)+\"\\n                \")]),_vm._v(\"\\n                , es necesario rellenar el campo \\\"Descripción\\\" en las líneas de \"+_vm._s(_vm.invoice.name)+\".\\n            \")]):_c('span',[_vm._v(\"\\n                Para poder empezar el contrato, es necesario rellenar el campo \\\"Descripción\\\" en las líneas de \"+_vm._s(_vm.invoice.name)+\".\\n            \")])])],1):_vm._e(),_c('v-card',{staticClass:\"text-center lines__table\",staticStyle:{\"overflow-y\":\"scroll\"},attrs:{\"flat\":\"\",\"width\":\"100%\"}},[(!_vm.is_mobile)?_c('v-row',{staticClass:\"table-head-row flex-sm-nowrap d-flex align-center justify-center\",attrs:{\"no-gutters\":\"\"}},[_c('v-col',{attrs:{\"cols\":_vm.invoiceable_type == 'invoice' ? (_vm.some_0_tax ? 5 : 6) : (_vm.some_0_tax ? 6 : 7)}},[_vm._v(\"Descripción\")]),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('div',{staticClass:\"col\",attrs:{\"cols\":\"1\"}},[_vm._v(\"Precio Unitario\")]),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('div',{staticClass:\"col\",attrs:{\"cols\":\"1\"}},[_vm._v(\"Cantidad\")]),_c('v-divider',{attrs:{\"vertical\":\"\"}}),(_vm.showLineDiscount)?[_c('div',{staticClass:\"col\",attrs:{\"cols\":\"1\"}},[_vm._v(\"Descuento %\")]),_c('v-divider',{attrs:{\"vertical\":\"\"}})]:_vm._e(),_c('div',{staticClass:\"col\",attrs:{\"cols\":\"1\"}},[_vm._v(_vm._s(_vm.computed_tax_type.toUpperCase()))]),_c('v-divider',{attrs:{\"vertical\":\"\"}}),(_vm.some_0_tax)?_c('div',{staticClass:\"col\",attrs:{\"cols\":\"1\"}},[_vm._v(\"Tipo\")]):_vm._e(),(_vm.some_0_tax)?_c('v-divider',{attrs:{\"vertical\":\"\"}}):_vm._e(),_c('div',{staticClass:\"col\",attrs:{\"cols\":\"1\"}},[_vm._v(\"Retención\")]),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('div',{staticClass:\"col\",attrs:{\"cols\":\"1\"}},[_vm._v(\"Importe total\")]),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('div',{staticClass:\"col small_col\"},[_vm._v(\"Más datos\")])],2):_vm._e(),_vm._l((_vm.invoice_lines),function(invoice_line,index){return (!_vm.is_mobile)?_c('div',{key:index,attrs:{\"no-gutters\":\"\"}},[_c('div',{staticClass:\"d-flex flex-sm-nowrap table-row\"},[[_c('v-col',{staticClass:\" pa-0 ma-0 d-flex flex-sm-nowrap \",attrs:{\"cols\":_vm.invoiceable_type == 'invoice' ? (_vm.some_0_tax ? 5 : 6) : (_vm.some_0_tax ? 6 : 7)}},[_c('div',{staticClass:\"d-flex align-center justify-center\"},[_c('v-btn',{attrs:{\"icon\":\"\",\"color\":\"#4c4c4c\",\"disabled\":_vm.readonly},on:{\"click\":function($event){return _vm.deleteInvoiceLine(index)}}},[_c('v-icon',[_vm._v(\"mdi-delete\")])],1)],1),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('div',{staticClass:\"d-flex align-center justify-center px-2\",class:index % 2 == 0 ? 'bg__gray__2' : 'bg__gray'},[_vm._v(\"\\n                            \"+_vm._s((index + 1))+\"\\n                        \")]),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('v-combobox',{attrs:{\"filled\":\"\",\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"white\",\"value\":invoice_line.description,\"items\":_vm.rest_products,\"item-text\":\"description\",\"hide-details\":\"\",\"return-object\":\"\",\"readonly\":_vm.readonly,\"filter\":_vm.filterProducts},on:{\"change\":function (product) { return _vm.product_changed(product, index); }},scopedSlots:_vm._u([{key:\"item\",fn:function(data){return [_vm._v(\"\\n                                \"+_vm._s((\"(\" + (data.item.code) + \") - \" + (data.item.description)))+\"\\n                            \")]}}],null,true)})],1)],_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('div',{staticClass:\"col\"},[_c('TableCustomTextField',{attrs:{\"required\":true,\"readonly\":_vm.readonly,\"reverse\":true,\"type\":'number'},on:{\"input\":function($event){return _vm.change(index)}},model:{value:(invoice_line.unit_price_without_tax),callback:function ($$v) {_vm.$set(invoice_line, \"unit_price_without_tax\", $$v)},expression:\"invoice_line.unit_price_without_tax\"}})],1),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('div',{staticClass:\"col\"},[_c('TableCustomTextField',{attrs:{\"required\":true,\"readonly\":_vm.readonly,\"reverse\":true,\"type\":'number'},on:{\"input\":function($event){return _vm.change(index)}},model:{value:(invoice_line.quantity),callback:function ($$v) {_vm.$set(invoice_line, \"quantity\", $$v)},expression:\"invoice_line.quantity\"}})],1),_c('v-divider',{attrs:{\"vertical\":\"\"}}),(_vm.showLineDiscount && invoice_line.discounts.length>0)?[_c('div',{staticClass:\"col\"},[_c('TableCustomTextField',{attrs:{\"readonly\":_vm.readonly,\"reverse\":true,\"type\":'number'},on:{\"input\":function($event){return _vm.change(index)}},model:{value:(invoice_line.discounts[0].rate),callback:function ($$v) {_vm.$set(invoice_line.discounts[0], \"rate\", _vm._n($$v))},expression:\"invoice_line.discounts[0].rate\"}})],1),_c('v-divider',{attrs:{\"vertical\":\"\"}})]:_vm._e(),_c('div',{staticClass:\"col\"},[_c('v-autocomplete',{staticStyle:{\"width\":\"100%\"},attrs:{\"autocomplete\":\"off\",\"filled\":\"\",\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"white\",\"value\":invoice_line.selected_tax,\"items\":_vm.computed_tax_items,\"item-text\":\"name\",\"item-value\":\"value\",\"return-object\":false,\"hide-details\":\"\",\"readonly\":_vm.readonly},on:{\"change\":function (newRate) { return _vm.tax_change(newRate, index); }}})],1),_c('v-divider',{attrs:{\"vertical\":\"\"}}),(_vm.some_0_tax)?_c('div',{staticClass:\"col\"},[(invoice_line.selected_tax==0.0)?_c('v-autocomplete',{attrs:{\"autocomplete\":\"off\",\"filled\":\"\",\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"white\",\"value\":invoice_line.selected_tax_event,\"items\":_vm.type_0_options,\"hide-details\":\"\",\"readonly\":_vm.readonly},on:{\"change\":function (newTaxEvent) { return _vm.tax_event_change(newTaxEvent, index); }}}):_vm._e()],1):_vm._e(),(_vm.some_0_tax)?_c('v-divider',{attrs:{\"vertical\":\"\"}}):_vm._e(),_c('div',{staticClass:\"col\"},[_c('v-autocomplete',{attrs:{\"autocomplete\":\"off\",\"filled\":\"\",\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"white\",\"value\":invoice_line.selected_retention,\"items\":_vm.line_retentions,\"item-text\":\"name\",\"item-value\":\"value\",\"return-object\":false,\"hide-details\":\"\",\"readonly\":_vm.readonly},on:{\"change\":function (newRate) { return _vm.retention_change(newRate, index); }}})],1),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('div',{staticClass:\"col\"},[_c('TableCustomTextField',{attrs:{\"value\":_vm.get_total_amount(invoice_line),\"readonly\":\"\",\"reverse\":true}})],1),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('div',{staticClass:\"col small_col\"},[_c('v-btn',{attrs:{\"icon\":\"\"},on:{\"click\":function($event){return _vm.openDialogOtherInformation(invoice_line)}}},[_c('img',{attrs:{\"src\":require(\"../assets/folder_info.svg\")}})])],1)],2),_c('v-divider')],1):_vm._e()}),(_vm.is_mobile)?_c('v-row',{staticClass:\"pa-3\"},[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-card',{attrs:{\"outlined\":\"\"}},[_c('v-card-text',[_c('v-row',{staticClass:\"table-head-row flex-nowrap\",attrs:{\"no-gutters\":\"\"}},[_c('v-col',{staticClass:\"table-head\",attrs:{\"cols\":\"5\"}},[_vm._v(\"Descripción\")]),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('v-col',{staticClass:\"table-head\",attrs:{\"cols\":\"3\"}},[_vm._v(\"Cantidad\")]),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('v-col',{staticClass:\" table-head \",attrs:{\"cols\":\"4\"}},[_vm._v(\"Importe total\")])],1),_vm._l((_vm.invoice_lines),function(invoice_line,index){return _c('v-row',{key:index,attrs:{\"no-gutters\":\"\"},on:{\"click\":function($event){return _vm.openDialogEditLine(invoice_line, index)}}},[_c('v-col',{staticClass:\"pa-0 d-flex align-center justify-center\",class:index % 2 == 0 ? 'bg__gray__2' : 'bg__gray',attrs:{\"cols\":\"1\"}},[_vm._v(\"\\n                                \"+_vm._s((index + 1))+\"\\n                            \")]),_c('v-col',{staticClass:\" pa-0 ma-0 d-flex flex-sm-nowrap\",attrs:{\"cols\":\"4\"}},[_c('TableCustomTextField',{attrs:{\"required\":true,\"kind\":'invoice_line_kind',\"readonly\":\"\"},model:{value:(invoice_line.description),callback:function ($$v) {_vm.$set(invoice_line, \"description\", $$v)},expression:\"invoice_line.description\"}})],1),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('v-col',{attrs:{\"cols\":\"3\"}},[_c('TableCustomTextField',{attrs:{\"required\":true,\"readonly\":\"\",\"reverse\":true,\"type\":'number'},on:{\"change\":function($event){return _vm.change(index)}},model:{value:(invoice_line.quantity),callback:function ($$v) {_vm.$set(invoice_line, \"quantity\", $$v)},expression:\"invoice_line.quantity\"}})],1),_c('v-divider',{attrs:{\"vertical\":\"\"}}),_c('v-col',{staticClass:\"pa-0\"},[_c('TableCustomTextField',{attrs:{\"value\":_vm.get_total_amount(invoice_line),\"readonly\":\"\",\"reverse\":true}})],1)],1)}),_c('v-divider')],2)],1)],1)],1):_vm._e(),_c('v-dialog',{attrs:{\"max-width\":\"880\"},model:{value:(_vm.showAdditionalInfoDilog),callback:function ($$v) {_vm.showAdditionalInfoDilog=$$v},expression:\"showAdditionalInfoDilog\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"headline\"},[_c('span',{staticClass:\"text-h5 primary__blue py-1 ml-2\",attrs:{\"color\":\"\"}},[_vm._v(\"Información adicional\")])]),_c('v-divider'),_c('v-card-text',{staticClass:\"pt-5 pb-5\"},[_c('v-tabs',{staticClass:\"card__tabs px-5\",attrs:{\"background-color\":\"transparent\",\"color\":\"primary\"},model:{value:(_vm.additionalInfoActiveTab),callback:function ($$v) {_vm.additionalInfoActiveTab=$$v},expression:\"additionalInfoActiveTab\"}},[_vm._l((_vm.additionalInfoTabs),function(tab){return [_c('v-tab',_vm._g({key:tab.code,staticClass:\"text-capitalize\"},{ click: function () { return _vm.additionalInfoActiveTab = tab.code; } }),[_vm._v(\"\\n                                \"+_vm._s(tab.name)+\"\\n                            \")])]})],2),_c('v-divider'),_c('v-tabs-items',{model:{value:(_vm.additionalInfoActiveTab),callback:function ($$v) {_vm.additionalInfoActiveTab=$$v},expression:\"additionalInfoActiveTab\"}},_vm._l((_vm.additionalInfoTabs),function(tab){return _c('v-tab-item',{key:tab.code},[(tab.code == 'retention')?[_c('app-row',{staticClass:\"mt-5\",attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Importe de retención\")]),_c('v-text-field',{attrs:{\"type\":\"number\",\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"readonly\":_vm.readonly},model:{value:(_vm.ret_amount),callback:function ($$v) {_vm.ret_amount=$$v},expression:\"ret_amount\"}})],1),_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Concepto de retención\")]),_c('v-text-field',{attrs:{\"type\":\"text\",\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"readonly\":_vm.readonly},model:{value:(_vm.ret_concept),callback:function ($$v) {_vm.ret_concept=$$v},expression:\"ret_concept\"}})],1)],1),_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Suplido\")]),_c('v-text-field',{attrs:{\"type\":\"number\",\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"readonly\":_vm.readonly},model:{value:(_vm.reimbursable_expense),callback:function ($$v) {_vm.reimbursable_expense=$$v},expression:\"reimbursable_expense\"}})],1)],1)]:_vm._e(),(tab.code == 'discounts')?[_c('app-row',{staticClass:\"mt-5\",attrs:{\"contains-input-fields\":\"\"}},[_c('v-checkbox',{staticClass:\"ma-0 pl-2\",attrs:{\"disabled\":_vm.readonly || _vm.checkedGlobalDiscount},scopedSlots:_vm._u([{key:\"label\",fn:function(){return [_c('span',{staticClass:\"text-field-size\"},[_vm._v(\"Descuento por línea\")])]},proxy:true}],null,true),model:{value:(_vm.checkedLineDiscount),callback:function ($$v) {_vm.checkedLineDiscount=$$v},expression:\"checkedLineDiscount\"}})],1),_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('v-checkbox',{staticClass:\"ma-0 pl-2\",attrs:{\"disabled\":_vm.readonly || _vm.checkedLineDiscount},scopedSlots:_vm._u([{key:\"label\",fn:function(){return [_c('span',{staticClass:\"text-field-size\"},[_vm._v(\"Descuento global\")])]},proxy:true}],null,true),model:{value:(_vm.checkedGlobalDiscount),callback:function ($$v) {_vm.checkedGlobalDiscount=$$v},expression:\"checkedGlobalDiscount\"}})],1),(_vm.checkedGlobalDiscount)?_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Cantidad descuento\")]),_c('v-text-field',{attrs:{\"type\":\"number\",\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"readonly\":_vm.readonly},model:{value:(_vm.discount_amount),callback:function ($$v) {_vm.discount_amount=$$v},expression:\"discount_amount\"}})],1),_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Concepto de descuento\")]),_c('v-text-field',{attrs:{\"type\":\"text\",\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"readonly\":_vm.readonly},model:{value:(_vm.discount_reason),callback:function ($$v) {_vm.discount_reason=$$v},expression:\"discount_reason\"}})],1)],1):_vm._e()]:_vm._e()],2)}),1)],1),_c('v-card-actions',{staticClass:\"pr-8 pb-5\"},[_c('v-spacer'),_c('v-btn',{staticClass:\"action__btn\",attrs:{\"outlined\":\"\"},on:{\"click\":function($event){return _vm.cancelChange()}}},[_vm._v(\"Cancelar\")]),_c('v-btn',{staticClass:\"white--text action__btn\",attrs:{\"color\":\"#060647\",\"disabled\":_vm.readonly},on:{\"click\":function($event){return _vm.changeAdditionaInfo()}}},[_vm._v(\"\\n                        Guardar\\n                    \")])],1)],1)],1),_c('v-dialog',{attrs:{\"max-width\":\"880\"},model:{value:(_vm.showEditLineDialog),callback:function ($$v) {_vm.showEditLineDialog=$$v},expression:\"showEditLineDialog\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"headline\"},[_c('span',{staticClass:\"text-h5 primary__blue py-1 ml-2\",attrs:{\"color\":\"\"}},[_vm._v(\"Editar la línea \"+_vm._s(_vm.num_line + 1))]),_c('v-spacer'),_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"color\":\"primary_blue\",\"icon\":\"\"},on:{\"click\":function($event){return _vm.tryDelete()}}},'v-btn',attrs,false),on),[_c('v-icon',[_vm._v(\"mdi-delete\")])],1)]}}])},[_c('span',[_vm._v(\"Eliminar línea\")])])],1),_c('v-divider'),_c('v-card-text',{staticClass:\"pt-5 pb-5\"},[_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Descripción\")]),_c('v-combobox',{attrs:{\"outlined\":\"\",\"filled\":\"\",\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"white\",\"value\":_vm.line['description'],\"items\":_vm.rest_products,\"item-text\":\"description\",\"hide-details\":\"\",\"return-object\":\"\",\"readonly\":_vm.readonly,\"filter\":_vm.filterProducts},on:{\"change\":function (product) { return _vm.product_changed(product, _vm.num_line); }},scopedSlots:_vm._u([{key:\"item\",fn:function(data){return [_vm._v(\"\\n                                    \"+_vm._s((\"(\" + (data.item.code) + \") - \" + (data.item.description)))+\"\\n                                \")]}}])})],1),_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Precio Unitario\")]),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"required\":true,\"readonly\":_vm.readonly,\"reverse\":true,\"type\":\"number\"},model:{value:(_vm.line['unit_price_without_tax']),callback:function ($$v) {_vm.$set(_vm.line, 'unit_price_without_tax', $$v)},expression:\"line['unit_price_without_tax']\"}})],1)],1),_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Cantidad\")]),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"required\":true,\"readonly\":_vm.readonly,\"reverse\":true,\"type\":\"number\"},model:{value:(_vm.line['quantity']),callback:function ($$v) {_vm.$set(_vm.line, 'quantity', $$v)},expression:\"line['quantity']\"}})],1),_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(_vm._s(_vm.computed_tax_type.toUpperCase()))]),_c('v-autocomplete',{attrs:{\"autocomplete\":\"off\",\"outlined\":\"\",\"filled\":\"\",\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"white\",\"value\":_vm.line['selected_tax'],\"items\":_vm.computed_tax_items,\"item-text\":\"name\",\"item-value\":\"value\",\"return-object\":false,\"hide-details\":\"\",\"readonly\":_vm.readonly},on:{\"change\":function (newRate) { return _vm.tax_change(newRate, _vm.num_line); }}})],1)],1),_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Retención\")]),_c('v-autocomplete',{attrs:{\"autocomplete\":\"off\",\"outlined\":\"\",\"filled\":\"\",\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"white\",\"value\":_vm.line['selected_retention'],\"items\":_vm.line_retentions,\"item-text\":\"name\",\"item-value\":\"value\",\"return-object\":false,\"hide-details\":\"\",\"readonly\":_vm.readonly},on:{\"change\":function (newRate) { return _vm.retention_change(newRate, _vm.num_line); }}})],1),(_vm.line['selected_tax']==0.0)?_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Tipo\")]),_c('v-autocomplete',{attrs:{\"autocomplete\":\"off\",\"outlined\":\"\",\"filled\":\"\",\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"white\",\"value\":_vm.line['selected_tax_event'],\"items\":_vm.type_0_options,\"hide-details\":\"\",\"readonly\":_vm.readonly},on:{\"change\":function (newTaxEvent) { return _vm.tax_event_change(newTaxEvent, _vm.num_line); }}})],1):_vm._e()],1)],1),_c('v-card-actions',{staticClass:\"px-8 pb-5\"},[_c('v-btn',{staticClass:\"action__btn\",attrs:{\"outlined\":\"\"},on:{\"click\":function($event){return _vm.cancelEditLineChange()}}},[_vm._v(\"Cancelar\")]),_c('v-spacer'),_c('v-btn',{staticClass:\"white--text action__btn\",attrs:{\"color\":\"#060647\",\"disabled\":_vm.readonly},on:{\"click\":function($event){return _vm.changeInvoiceLine(_vm.num_line)}}},[_vm._v(\"\\n                        Guardar\\n                    \")])],1)],1)],1)],2),_c('v-dialog',{attrs:{\"persistent\":\"\",\"max-width\":\"500\"},model:{value:(_vm.delete_pop_up),callback:function ($$v) {_vm.delete_pop_up=$$v},expression:\"delete_pop_up\"}},[_c('v-card',[_c('v-card-title',[_c('span',{staticClass:\"primary_blue--text prevent-cut\"},[_vm._v(\"¿Estás seguro de que quieres eliminar la línea \"+_vm._s(_vm.num_line + 1)+\"?\")])]),_c('v-card-actions',{staticClass:\"acction_btns\"},[_c('v-btn',{staticClass:\"action__btn\",attrs:{\"outlined\":\"\"},on:{\"click\":function($event){_vm.delete_pop_up = false}}},[_vm._v(\"Cancelar\")]),_c('v-spacer'),_c('v-btn',{staticClass:\"white--text action__btn\",attrs:{\"color\":\"#060647\"},on:{\"click\":function($event){return _vm.deleteInvoiceLine(_vm.num_line)}}},[_vm._v(\"\\n                Confirmar\\n                \")])],1)],1)],1),_c('div',{staticClass:\"d-flex mt-4 ml-4\"},[_c('v-btn',_vm._g({attrs:{\"outlined\":\"\",\"small\":\"\",\"disabled\":_vm.readonly || _vm.loading}},{ click: _vm.addInvoiceLine }),[_vm._m(0),_vm._v(\"\\n            Añadir línea\\n        \")],1)],1),_c('v-dialog',{key:_vm.keyDialog,staticClass:\"pa-0 ma-0 rounded-lg\",attrs:{\"max-width\":\"1000\",\"persistent\":\"\"},model:{value:(_vm.otherInformationDialog),callback:function ($$v) {_vm.otherInformationDialog=$$v},expression:\"otherInformationDialog\"}},[_c('v-card',{staticStyle:{\"max-height\":\"1000px\",\"height\":\"100%\",\"overflow-y\":\"auto\"}},[_c('v-card-title',{staticClass:\"more__info__editor__title\"},[_c('span',[_vm._v(\"Otros datos\")])]),_c('v-divider'),_c('v-card-text',{staticClass:\"px-0 py-5\"},[_c('v-tabs',{staticClass:\"card__tabs px-5 pt-5\",attrs:{\"background-color\":\"transparent\",\"color\":\"primary\"},model:{value:(_vm.activeTab),callback:function ($$v) {_vm.activeTab=$$v},expression:\"activeTab\"}},[_vm._l((_vm.tabs),function(tab){return [_c('v-tab',_vm._g({key:tab.code,staticClass:\"text-capitalize\"},{ click: function () { return _vm.activeTab = tab.code; } }),[_vm._v(\"\\n                            \"+_vm._s(tab.name)+\"\\n                        \")])]})],2),_c('v-divider'),_c('v-tabs-items',{model:{value:(_vm.activeTab),callback:function ($$v) {_vm.activeTab=$$v},expression:\"activeTab\"}},_vm._l((_vm.tabs),function(tab){return _c('v-tab-item',{key:tab.code},[_c('app-row',{directives:[{name:\"show\",rawName:\"v-show\",value:(tab.code == 'delivery_note'),expression:\"tab.code == 'delivery_note'\"}],staticClass:\"px-16 py-5\",attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Número Albarán\")]),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"readonly\":_vm.readonly},model:{value:(_vm.delivery_note_number),callback:function ($$v) {_vm.delivery_note_number=$$v},expression:\"delivery_note_number\"}})],1),_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Fecha de albarán\")]),_c('AppDateField',{attrs:{\"disabled\":_vm.readonly},model:{value:(_vm.delivery_note_date),callback:function ($$v) {_vm.delivery_note_date=$$v},expression:\"delivery_note_date\"}})],1)],1),_c('app-row',{directives:[{name:\"show\",rawName:\"v-show\",value:(tab.code == 'sender'),expression:\"tab.code == 'sender'\"}],staticClass:\"px-16 py-5\",attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Número de presupuesto\")]),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"readonly\":_vm.readonly},model:{value:(_vm.sender_info.budget_number),callback:function ($$v) {_vm.$set(_vm.sender_info, \"budget_number\", $$v)},expression:\"sender_info.budget_number\"}})],1),_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Fecha de presupuesto\")]),_c('AppDateField',{attrs:{\"disabled\":_vm.readonly},model:{value:(_vm.sender_info.budget_date),callback:function ($$v) {_vm.$set(_vm.sender_info, \"budget_date\", $$v)},expression:\"sender_info.budget_date\"}})],1)],1),_c('app-row',{directives:[{name:\"show\",rawName:\"v-show\",value:(tab.code == 'receiver'),expression:\"tab.code == 'receiver'\"}],staticClass:\"px-16 py-5\",attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Número de presupuesto\")]),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"readonly\":_vm.readonly},model:{value:(_vm.receiver_info.budget_number),callback:function ($$v) {_vm.$set(_vm.receiver_info, \"budget_number\", $$v)},expression:\"receiver_info.budget_number\"}})],1),_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"6\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Fecha de presupuesto\")]),_c('AppDateField',{attrs:{\"disabled\":_vm.readonly},model:{value:(_vm.receiver_info.budget_date),callback:function ($$v) {_vm.$set(_vm.receiver_info, \"budget_date\", $$v)},expression:\"receiver_info.budget_date\"}})],1)],1),_c('app-row',{directives:[{name:\"show\",rawName:\"v-show\",value:(tab.code == 'additional_line_information'),expression:\"tab.code == 'additional_line_information'\"}],staticClass:\"px-16 py-5\",attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"12\"}},[_c('label',{staticClass:\"text-no-wrap\"},[_vm._v(\"Infromación Adicional\")]),_c('v-textarea',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"readonly\":_vm.readonly,\"rows\":\"9\"},model:{value:(_vm.additional_line_information),callback:function ($$v) {_vm.additional_line_information=$$v},expression:\"additional_line_information\"}})],1)],1)],1)}),1)],1),_c('v-card-actions',{staticClass:\"pb-5 d-flex justify-center\"},[_c('v-btn',{staticClass:\"action__btn\",attrs:{\"outlined\":\"\"},on:{\"click\":function($event){_vm.otherInformationDialog=false}}},[_vm._v(\"Cancelar\")]),_c('v-btn',{staticClass:\"white--text action__btn\",attrs:{\"color\":\"#060647\",\"disabled\":_vm.readonly},on:{\"click\":function($event){return _vm.chnageOtherInformation()}}},[_vm._v(\"\\n                    Guardar\\n                \")])],1)],1)],1)],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-icon',[_vm._v(\" mdi-plus \")])}]\n\nexport { render, staticRenderFns }","<template>\n    <div>\n        <v-row class=\"sector-head\">\n            <v-col class=\"primary_blue--text subtitle-1 flex-sm-nowrap font-weight-bold\" cols=\"5\" md=\"6\">\n                <p class=\"mb-0\">Líneas de {{invoice.name}}</p> \n            </v-col>\n\n            <v-col class=\"d-flex justify-end align-center flex-sm-nowrap\" cols=\"7\" md=\"6\">\n                <v-progress-circular v-if=\"loading\" indeterminate class=\"mr-2\" color=\"primary\"></v-progress-circular>\n\n                <v-btn outlined class=\"mr-2\" small color=\"primary\" @click=\"ImportLinesFromExcel()\"\n                :disabled=\"!allow_import || loading\">\n                    <img src=\"../assets/upload_excel.svg\" />\n                    <span v-if=\"!is_mobile\"> Subir Excel </span>\n                </v-btn>\n\n                <v-btn color=\"primary\" outlined small class=\"mr-2\" @click=\"openDialogAdditionalInfo()\" :disabled=\"loading\">\n                    <img src=\"../assets/add_info.svg\" />\n                    <span v-if=\"!is_mobile\"> Información adicional </span>\n                </v-btn>\n\n                <v-btn color=\"primary\" outlined small class=\"mr-2\" @click=\"openDialogDeleteAllLines()\" :disabled=\"readonly || loading\">\n                    <v-icon>mdi-delete</v-icon>\n                    <span v-if=\"!is_mobile\"> Borrar todas las líneas </span>\n                </v-btn>\n            </v-col>\n        </v-row>\n\n        <v-row class=\"error__msg\"\n            v-if=\"showErrors && !areInvoiceLinesValid\">\n            <v-col cols=12>\n                <!-- Para poder firmar y emitir la factura, es necesario rellenar los campos \"Descripción\", \"Precio Unitario\" y \"Cantidad\" en las líneas de factura. -->\n                <!-- Para poder firmar y emitir la factura, es necesario rellenar el campo \"Descripción\" en las líneas de factura. --> \n                <span v-if=\"!isRecurringContract\">\n                    Para poder \n                    <span v-if=\"invoiceable_type == 'invoice'\">\n                        firmar y emitir la factura\n                    </span>\n                    <span v-else>\n                        emitir el {{invoice.name}}\n                    </span>\n                    <!-- , es necesario rellenar los campos \"Descripción\", \"Precio Unitario\" y \"Cantidad\" en las líneas de {{ invoice.name }}. -->\n                    , es necesario rellenar el campo \"Descripción\" en las líneas de {{ invoice.name }}.\n                </span>\n                <span v-else>\n                    <!-- Para poder empezar el contrato, es necesario rellenar los campos \"Descripción\", \"Precio Unitario\" y \"Cantidad\" en las líneas de {{ invoice.name }}. -->\n                    Para poder empezar el contrato, es necesario rellenar el campo \"Descripción\" en las líneas de {{ invoice.name }}.\n                </span>\n            </v-col>\n        </v-row>\n        <v-card flat width=\"100%\" class=\"text-center lines__table\" style=\"overflow-y:scroll\">\n            \n            <v-row class=\"table-head-row flex-sm-nowrap d-flex align-center justify-center\" no-gutters v-if=\"!is_mobile\">\n                <v-col :cols=\"invoiceable_type == 'invoice' ? (some_0_tax ? 5 : 6) : (some_0_tax ? 6 : 7)\">Descripci&oacute;n</v-col>\n                <v-divider vertical/>\n                <div class=\"col\" cols=\"1\">Precio Unitario</div>\n                <v-divider vertical/>\n                <div class=\"col\" cols=\"1\">Cantidad</div>\n                <v-divider vertical/>\n\n                <template v-if=\"showLineDiscount\">\n                    <div class=\"col\" cols=\"1\">Descuento %</div>\n                    <v-divider vertical/>\n                </template>\n\n                <div class=\"col\" cols=\"1\">{{computed_tax_type.toUpperCase()}}</div>\n                <v-divider vertical/>\n                <div v-if=\"some_0_tax\" class=\"col\" cols=\"1\">Tipo</div>\n                <v-divider v-if=\"some_0_tax\" vertical/>\n                <div class=\"col\" cols=\"1\">Retención</div>\n                <v-divider vertical/>\n                <div class=\"col\" cols=\"1\">Importe total</div>\n                <!-- <v-divider v-if=\"invoiceable_type=='invoice'\" vertical/> -->\n                <!-- <div v-if=\"invoiceable_type=='invoice'\" class=\"col small_col\">Más datos</div> -->\n                <v-divider vertical/>\n                <div class=\"col small_col\">Más datos</div>\n            </v-row>\n\n            <div no-gutters v-for=\"(invoice_line, index) in invoice_lines\" v-bind:key=\"index\" v-if=\"!is_mobile\">\n                <div class=\"d-flex flex-sm-nowrap table-row\">\n                    <template>\n                        <v-col :cols=\"invoiceable_type == 'invoice' ? (some_0_tax ? 5 : 6) : (some_0_tax ? 6 : 7)\" class=\" pa-0 ma-0 d-flex flex-sm-nowrap \">\n                            <div class=\"d-flex align-center justify-center\">\n                                <v-btn icon color=\"#4c4c4c\" @click=\"deleteInvoiceLine(index)\" :disabled=\"readonly\">\n                                    <v-icon>mdi-delete</v-icon>\n                                </v-btn>\n                            </div>\n                            <v-divider vertical/>\n                            <div class=\"d-flex align-center justify-center px-2\"\n                                :class=\"index % 2 == 0 ? 'bg__gray__2' : 'bg__gray'\">\n                                {{ (index + 1) }}\n                            </div>\n                            <v-divider vertical/>\n                            <v-combobox filled dense flat solo background-color=\"white\"\n                                :value=\"invoice_line.description\" :items=\"rest_products\" item-text=\"description\"\n                                hide-details return-object :readonly=\"readonly\" :filter=\"filterProducts\"\n                                @change=\"(product) => product_changed(product, index)\">\n                                <template v-slot:item=\"data\">\n                                    {{ `(${data.item.code}) - ${data.item.description}` }}\n                                </template>\n                            </v-combobox>\n                        </v-col>\n                    </template>\n                    <v-divider vertical/>\n                    <div class=\"col\">\n                        <TableCustomTextField v-model=\"invoice_line.unit_price_without_tax\" :required=\"true\"\n                            @input=\"change(index)\" :readonly=\"readonly\" :reverse=\"true\" :type=\"'number'\">\n                        </TableCustomTextField>\n                    </div>\n                    <v-divider vertical/>\n                    <div class=\"col\">\n                        <TableCustomTextField @input=\"change(index)\" :required=\"true\" v-model=\"invoice_line.quantity\"\n                            :readonly=\"readonly\" :reverse=\"true\" :type=\"'number'\"></TableCustomTextField>\n                    </div>\n                    <v-divider vertical/>\n\n                    <template v-if=\"showLineDiscount && invoice_line.discounts.length>0\">\n                        <div class=\"col\">\n                            <TableCustomTextField @input=\"change(index)\" v-model.number=\"invoice_line.discounts[0].rate\"\n                                :readonly=\"readonly\" :reverse=\"true\" :type=\"'number'\"></TableCustomTextField>\n                        </div>\n                        <v-divider vertical/>\n                    </template>\n\n                    <div class=\"col\">\n                        <v-autocomplete autocomplete=\"off\" filled dense flat solo background-color=\"white\"\n                            :value=\"invoice_line.selected_tax\" :items=\"computed_tax_items\" item-text=\"name\" item-value=\"value\"\n                            :return-object=\"false\" hide-details :readonly=\"readonly\" style=\"width: 100%\"\n                            @change=\"(newRate) => tax_change(newRate, index)\"></v-autocomplete>\n                    </div>\n                    <v-divider vertical/>\n                    <div class=\"col\" v-if=\"some_0_tax\">\n                        <v-autocomplete v-if=\"invoice_line.selected_tax==0.0\"\n                            autocomplete=\"off\" filled dense flat solo background-color=\"white\" :value=\"invoice_line.selected_tax_event\"\n                            :items=\"type_0_options\"  hide-details :readonly=\"readonly\"\n                            @change=\"(newTaxEvent) => tax_event_change(newTaxEvent, index)\"></v-autocomplete>\n                    </div>\n                    <v-divider  v-if=\"some_0_tax\" vertical/>\n                    <div class=\"col\">\n                        <v-autocomplete autocomplete=\"off\" filled dense flat solo background-color=\"white\"\n                            :value=\"invoice_line.selected_retention\" :items=\"line_retentions\" item-text=\"name\"\n                            item-value=\"value\" :return-object=\"false\" hide-details :readonly=\"readonly\"\n                            @change=\"(newRate) => retention_change(newRate, index)\"></v-autocomplete>\n\n                    </div>\n                    <v-divider vertical/>\n                    <div class=\"col\">\n                        <TableCustomTextField :value=\"get_total_amount(invoice_line)\" readonly :reverse=\"true\">\n                        </TableCustomTextField>\n                    </div>\n                    <!-- <v-divider v-if=\"invoiceable_type=='invoice'\"  vertical/>\n                    <div v-if=\"invoiceable_type=='invoice'\" class=\"col small_col\"> -->\n                    <v-divider vertical/>\n                    <div class=\"col small_col\">\n                        <v-btn icon @click=\"openDialogOtherInformation(invoice_line)\">\n                            <img src=\"../assets/folder_info.svg\"/>\n                        </v-btn>\n                    </div>\n                </div>\n                <v-divider/>\n            </div>\n            <v-row class=\"pa-3\" v-if=\"is_mobile\">\n                <v-col cols=\"12\">\n                    <v-card outlined>\n                        <v-card-text>\n                            <v-row no-gutters class=\"table-head-row flex-nowrap\">\n                                <v-col cols=\"5\" class=\"table-head\">Descripci&oacute;n</v-col>\n                                <v-divider vertical/>\n                                <v-col class=\"table-head\" cols=\"3\">Cantidad</v-col>\n                                <v-divider vertical/>\n                                <v-col cols=\"4\" class=\" table-head \" >Importe total</v-col>\n                            </v-row>\n                            <v-row no-gutters v-for=\"(invoice_line, index) in invoice_lines\" v-bind:key=\"index\" @click=\"openDialogEditLine(invoice_line, index)\">\n                                <v-col cols=\"1\" class=\"pa-0 d-flex align-center justify-center\" :class=\"index % 2 == 0 ? 'bg__gray__2' : 'bg__gray'\">\n                                    {{ (index + 1) }}\n                                </v-col>\n                                <v-col cols=\"4\" class=\" pa-0 ma-0 d-flex flex-sm-nowrap\">\n                                    <TableCustomTextField \n                                        :required=\"true\" \n                                        v-model=\"invoice_line.description\"\n                                        :kind=\"'invoice_line_kind'\" \n                                        readonly\n                                    />\n                                </v-col>\n                                <v-divider vertical/>\n                                <v-col cols=\"3\">\n                                    <TableCustomTextField \n                                        @change=\"change(index)\" \n                                        :required=\"true\" \n                                        v-model=\"invoice_line.quantity\"\n                                        readonly\n                                        :reverse=\"true\" \n                                        :type=\"'number'\"\n                                    />\n                                </v-col>\n                                <v-divider vertical/>\n                                <v-col  class=\"pa-0\">\n                                    <TableCustomTextField \n                                        :value=\"get_total_amount(invoice_line)\" \n                                        readonly \n                                        :reverse=\"true\"\n                                    />\n                                </v-col>\n                            </v-row>\n                            <v-divider/>\n                        </v-card-text>\n                    </v-card>\n                </v-col>   \n            </v-row>\n            <v-dialog v-model=\"showAdditionalInfoDilog\" max-width=\"880\">\n                <v-card>\n                    <v-card-title class=\"headline\">\n                        <span class=\"text-h5 primary__blue py-1 ml-2\" color=\"\">Información adicional</span>\n                    </v-card-title>\n                    <v-divider></v-divider>\n                    <v-card-text class=\"pt-5 pb-5\">\n                        <v-tabs\n                        v-model=\"additionalInfoActiveTab\"\n                        background-color=\"transparent\"\n                        color=\"primary\"\n                        class=\"card__tabs px-5\"\n                        >\n                            <template v-for=\"tab in additionalInfoTabs\">\n                                <v-tab class=\"text-capitalize\" :key=\"tab.code\" v-on=\"{ click: () => additionalInfoActiveTab = tab.code }\">\n                                    {{ tab.name }}\n                                </v-tab>\n                            </template>\n                        </v-tabs>\n                        <v-divider></v-divider>\n                        <v-tabs-items v-model=\"additionalInfoActiveTab\">\n                            <v-tab-item v-for=\"tab in additionalInfoTabs\" :key=\"tab.code\">\n                                <template v-if=\"tab.code == 'retention'\">\n                                    <app-row class=\"mt-5\" contains-input-fields>\n                                        <app-col contains-input-fields cols=\"6\">\n                                            <label class=\"text-no-wrap\">Importe de retención</label>\n                                            <v-text-field type=\"number\" outlined dense hide-details v-model=\"ret_amount\"\n                                                :readonly=\"readonly\"></v-text-field>\n                                        </app-col>\n                                        <app-col contains-input-fields cols=\"6\">\n                                            <label class=\"text-no-wrap\">Concepto de retención</label>\n                                            <v-text-field type=\"text\" outlined dense hide-details v-model=\"ret_concept\"\n                                                :readonly=\"readonly\"></v-text-field>\n                                        </app-col>\n                                    </app-row>\n                                    <app-row contains-input-fields>\n                                        <app-col contains-input-fields cols=\"6\">\n                                            <label class=\"text-no-wrap\">Suplido</label>\n                                            <v-text-field type=\"number\" outlined dense hide-details v-model=\"reimbursable_expense\"\n                                                :readonly=\"readonly\"></v-text-field>\n                                        </app-col>\n                                    </app-row>\n                                </template>\n\n                                <template v-if=\"tab.code == 'discounts'\">                                \n                                    <app-row class=\"mt-5\" contains-input-fields>\n                                        <v-checkbox\n                                            class=\"ma-0 pl-2\"\n                                            v-model=\"checkedLineDiscount\"\n                                            :disabled=\"readonly || checkedGlobalDiscount\"\n                                        >\n                                            <template v-slot:label>\n                                                <span class=\"text-field-size\">Descuento por línea</span>\n                                            </template>\n                                        </v-checkbox>\n                                    </app-row>\n                                    <app-row contains-input-fields>\n                                        <v-checkbox\n                                            class=\"ma-0 pl-2\"\n                                            v-model=\"checkedGlobalDiscount\"\n                                            :disabled=\"readonly || checkedLineDiscount\"\n                                        >\n                                            <template v-slot:label>\n                                                <span class=\"text-field-size\">Descuento global</span>\n                                            </template>\n                                        </v-checkbox>\n                                    </app-row>\n\n                                    <app-row contains-input-fields v-if=\"checkedGlobalDiscount\">\n                                        <app-col contains-input-fields cols=\"6\">\n                                            <label class=\"text-no-wrap\">Cantidad descuento</label>\n                                            <v-text-field type=\"number\" outlined dense hide-details v-model=\"discount_amount\"\n                                                :readonly=\"readonly\"></v-text-field>\n                                        </app-col>\n                                        <app-col contains-input-fields cols=\"6\">\n                                            <label class=\"text-no-wrap\">Concepto de descuento</label>\n                                            <v-text-field type=\"text\" outlined dense hide-details v-model=\"discount_reason\"\n                                                :readonly=\"readonly\"></v-text-field>\n                                        </app-col>\n                                    </app-row>\n                                </template>\n                            </v-tab-item>   \n                        </v-tabs-items>                                    \n                    </v-card-text>\n                    <v-card-actions class=\"pr-8 pb-5\">\n                        <v-spacer></v-spacer>\n                        <v-btn outlined @click=\"cancelChange()\" class=\"action__btn\">Cancelar</v-btn>\n                        <v-btn color=\"#060647\" class=\"white--text action__btn\" @click=\"changeAdditionaInfo()\"\n                            :disabled=\"readonly\">\n                            Guardar\n                        </v-btn>\n                    </v-card-actions>\n                </v-card>\n            </v-dialog>\n            <v-dialog v-model=\"showEditLineDialog\" max-width=\"880\">\n                <v-card>\n                    <v-card-title class=\"headline\">\n                        <span class=\"text-h5 primary__blue py-1 ml-2\" color=\"\">Editar la l&iacute;nea {{ num_line + 1 }}</span>\n                        <v-spacer/>\n                        <v-tooltip top>\n                            <template v-slot:activator=\"{ on, attrs }\">\n                                <v-btn  color=\"primary_blue\" @click=\"tryDelete()\" icon v-bind=\"attrs\" v-on=\"on\">\n                                    <v-icon>mdi-delete</v-icon>\n                                </v-btn>\n                            </template>\n                            <span>Eliminar línea</span>\n                        </v-tooltip>\n                    </v-card-title>\n                    <v-divider/>\n                    <v-card-text class=\"pt-5 pb-5\">\n                        <app-row contains-input-fields>\n                            <app-col contains-input-fields cols=\"6\">\n                                <label class=\"text-no-wrap\">Descripción</label>\n                                <v-combobox outlined filled dense flat solo background-color=\"white\"\n                                    :value=\"line['description']\" :items=\"rest_products\" item-text=\"description\"\n                                    hide-details return-object :readonly=\"readonly\" :filter=\"filterProducts\"\n                                    @change=\"(product) => product_changed(product, num_line)\">\n                                    <template v-slot:item=\"data\">\n                                        {{ `(${data.item.code}) - ${data.item.description}` }}\n                                    </template>\n                                </v-combobox>\n                            </app-col>\n                            <!-- <app-col v-else cols=\"6\">\n                                <label class=\"text-no-wrap\">Descripción</label>\n                                <v-text-field outlined dense hide-details :required=\"true\" v-model=\"line['description']\"\n                                    :kind=\"'invoice_line_kind'\" :readonly=\"readonly\"\n                                />\n                            </app-col> -->\n                            <app-col contains-input-fields cols=\"6\">\n                                <label class=\"text-no-wrap\">Precio Unitario</label>\n                                <v-text-field outlined dense hide-details v-model=\"line['unit_price_without_tax']\" :required=\"true\"\n                                   :readonly=\"readonly\" :reverse=\"true\" type=\"number\"\n                                />\n                            </app-col>\n                        </app-row>\n                        <app-row contains-input-fields>\n                            <app-col contains-input-fields cols=\"6\">\n                                <label class=\"text-no-wrap\">Cantidad</label>\n                                <v-text-field outlined dense hide-details :required=\"true\" v-model=\"line['quantity']\"\n                                    :readonly=\"readonly\" :reverse=\"true\" type=\"number\"\n                                />\n                            </app-col>\n                            <app-col contains-input-fields cols=\"6\">\n                                <label class=\"text-no-wrap\">{{computed_tax_type.toUpperCase()}}</label>\n                                <v-autocomplete \n                                    autocomplete=\"off\" outlined filled dense flat solo background-color=\"white\"\n                                    :value=\"line['selected_tax']\" :items=\"computed_tax_items\" item-text=\"name\" item-value=\"value\"\n                                    :return-object=\"false\" hide-details :readonly=\"readonly\"\n                                    @change=\"(newRate) => tax_change(newRate, num_line)\"\n                                />\n                            </app-col>\n                        </app-row>\n                        <app-row contains-input-fields>\n                            <app-col contains-input-fields cols=\"6\">\n                                <label class=\"text-no-wrap\">Retención</label>\n                                <v-autocomplete \n                                    autocomplete=\"off\" outlined filled dense flat solo background-color=\"white\"\n                                    :value=\"line['selected_retention']\" :items=\"line_retentions\" item-text=\"name\"\n                                    item-value=\"value\" :return-object=\"false\" hide-details :readonly=\"readonly\"\n                                    @change=\"(newRate) => retention_change(newRate, num_line)\"\n                                />\n                            </app-col>\n                            <app-col contains-input-fields cols=\"6\" v-if=\"line['selected_tax']==0.0\">\n                                <label class=\"text-no-wrap\">Tipo</label>\n                                <v-autocomplete \n                                    autocomplete=\"off\" outlined filled dense flat solo background-color=\"white\" :value=\"line['selected_tax_event']\"\n                                    :items=\"type_0_options\"  hide-details :readonly=\"readonly\"\n                                    @change=\"(newTaxEvent) => tax_event_change(newTaxEvent, num_line)\"\n                                />\n                            </app-col>\n\n                        </app-row>\n                    </v-card-text>\n                    <v-card-actions class=\"px-8 pb-5\">\n                        <v-btn outlined @click=\"cancelEditLineChange()\" class=\"action__btn\">Cancelar</v-btn>\n                        <v-spacer></v-spacer>\n                        <v-btn \n                            color=\"#060647\" class=\"white--text action__btn\" @click=\"changeInvoiceLine(num_line)\"\n                            :disabled=\"readonly\"\n                        >\n                            Guardar\n                        </v-btn>\n                    </v-card-actions>\n                </v-card>\n            </v-dialog>\n        </v-card>\n\n        <v-dialog v-model=\"delete_pop_up\" persistent max-width=\"500\">\n            <v-card>\n                <v-card-title>\n                    <span class=\"primary_blue--text prevent-cut\">¿Est&aacute;s seguro de que quieres eliminar la l&iacute;nea {{ num_line + 1}}?</span>\n                </v-card-title>\n                <v-card-actions class=\"acction_btns\">\n                    <v-btn outlined @click=\"delete_pop_up = false\" class=\"action__btn\">Cancelar</v-btn>\n                    <v-spacer/>\n                    <v-btn \n                        color=\"#060647\"\n                        class=\"white--text action__btn\"\n                        @click=\"deleteInvoiceLine(num_line)\"\n                    >\n                    Confirmar\n                    </v-btn>\n                </v-card-actions>\n            </v-card>\n        </v-dialog>\n\n        <div class=\"d-flex mt-4 ml-4\">\n            <v-btn outlined small v-on=\"{ click: addInvoiceLine }\" :disabled=\"readonly || loading\">\n                <v-icon v-once> mdi-plus </v-icon>\n                Añadir línea\n            </v-btn>\n        </div>\n\n        <v-dialog v-model=\"otherInformationDialog\" max-width=\"1000\"  class=\"pa-0 ma-0 rounded-lg\" persistent :key=\"keyDialog\">\n            <v-card style=\"max-height: 1000px; height: 100%; overflow-y: auto;\">\n                <v-card-title class=\"more__info__editor__title\">\n                    <span>Otros datos</span>\n                </v-card-title>\n                <v-divider></v-divider>\n                <v-card-text class=\"px-0 py-5\">\n\n                    <!-- <app-row contains-input-fields class=\"px-16\">\n                        <app-col contains-input-fields cols=\"4\">\n                            <label class=\"text-no-wrap\">Número de albarán</label>\n                            <v-text-field outlined dense hide-details v-model=\"delivery_note_number\"\n                                :readonly=\"readonly\"></v-text-field>\n                        </app-col>\n                        <app-col contains-input-fields cols=\"4\">\n                            <label class=\"text-no-wrap\">Fecha de albarán</label>\n                            <AppDateField\n                                v-model=\"delivery_note_date\"\n                                :disabled=\"readonly\"\n                            />\n                        </app-col>\n                        <app-col contains-input-fields cols=\"12\">\n                            <label class=\"text-no-wrap\">Información Adicional</label>\n                            <v-textarea outlined dense hide-details v-model=\"additional_line_information\" \n                                :readonly=\"readonly\"></v-textarea>\n                        </app-col>\n                    </app-row> -->\n\n                    <v-tabs\n                        v-model=\"activeTab\"\n                        background-color=\"transparent\"\n                        color=\"primary\"\n                        class=\"card__tabs px-5 pt-5\"\n                    >\n                        <template v-for=\"tab in tabs\">\n                            <v-tab class=\"text-capitalize\" :key=\"tab.code\" v-on=\"{ click: () => activeTab = tab.code }\">\n                                {{ tab.name }}\n                            </v-tab>\n                        </template>\n                    </v-tabs>\n                    <v-divider></v-divider>\n                    <v-tabs-items v-model=\"activeTab\">\n                        <v-tab-item v-for=\"tab in tabs\" :key=\"tab.code\">\n                            <app-row v-show=\"tab.code == 'delivery_note'\" contains-input-fields class=\"px-16 py-5\">\n                                <app-col contains-input-fields cols=\"6\">\n                                    <label class=\"text-no-wrap\">Número Albarán</label>\n                                    <v-text-field outlined dense hide-details v-model=\"delivery_note_number\" \n                                :readonly=\"readonly\"></v-text-field>\n                                </app-col>\n                                <app-col contains-input-fields cols=\"6\">\n                                    <label class=\"text-no-wrap\">Fecha de albarán</label>\n                                    <AppDateField\n                                        v-model=\"delivery_note_date\"\n                                        :disabled=\"readonly\"\n                                    />\n                                </app-col>\n                            </app-row>\n\n                            <app-row v-show=\"tab.code == 'sender'\" contains-input-fields class=\"px-16 py-5\">\n                                <app-col contains-input-fields cols=\"6\">\n                                    <label class=\"text-no-wrap\">Número de presupuesto</label>\n                                    <v-text-field outlined dense hide-details v-model=\"sender_info.budget_number\"\n                                        :readonly=\"readonly\"></v-text-field>\n                                </app-col>\n                                <app-col contains-input-fields cols=\"6\">\n                                    <label class=\"text-no-wrap\">Fecha de presupuesto</label>\n                                    <AppDateField\n                                        v-model=\"sender_info.budget_date\"\n                                        :disabled=\"readonly\"\n                                    />\n                                </app-col>  \n                            </app-row>\n                            <app-row v-show=\"tab.code == 'receiver'\" contains-input-fields class=\"px-16 py-5\">\n                                <app-col contains-input-fields cols=\"6\">\n                                    <label class=\"text-no-wrap\">Número de presupuesto</label>\n                                    <v-text-field outlined dense hide-details v-model=\"receiver_info.budget_number\"\n                                        :readonly=\"readonly\"></v-text-field>\n                                </app-col>\n                                <app-col contains-input-fields cols=\"6\">\n                                    <label class=\"text-no-wrap\">Fecha de presupuesto</label>\n                                    <AppDateField\n                                        v-model=\"receiver_info.budget_date\"\n                                        :disabled=\"readonly\"\n                                    />\n                                </app-col>\n                            </app-row>\n                            \n                            <app-row v-show=\"tab.code == 'additional_line_information'\" contains-input-fields class=\"px-16 py-5\">\n                                <app-col contains-input-fields cols=\"12\">\n                                    <label class=\"text-no-wrap\">Infromación Adicional</label>\n                                    <v-textarea outlined dense hide-details v-model=\"additional_line_information\" \n                                        :readonly=\"readonly\" rows=\"9\">\n                                    </v-textarea>\n                                </app-col>\n                            </app-row>\n                        </v-tab-item>\n                    </v-tabs-items>\n\n                </v-card-text>\n                <v-card-actions class=\"pb-5 d-flex justify-center\">\n                    <v-btn outlined @click=\"otherInformationDialog=false\" class=\"action__btn\">Cancelar</v-btn>\n                    <v-btn color=\"#060647\" class=\"white--text action__btn\"\n                        :disabled=\"readonly\" @click=\"chnageOtherInformation()\">\n                        Guardar\n                    </v-btn>\n                </v-card-actions>\n            </v-card>\n        </v-dialog>\n    </div>\n</template>\n\n<script>\nimport TableCustomTextField from \"../components/layout/TableCustomTextField.vue\"\nimport AppRow from '@/components/layout/AppRow.vue';\nimport AppCol from '@/components/layout/AppCol.vue';\nimport { mapGetters } from \"vuex\";\nimport { AdditionalInformation, ExtraAmount, ReceiverInfo, SenderInfo } from '../modules/facturae/domain/Invoiceable'\nimport { Product } from \"@/modules/facturae/domain/Product\";\nimport AppDateField from \"@/modules/widgets/infra/AppDateField.vue\";\n\nexport default {\n    name: \"InvoiceLinesEditor\",\n    components: {\n        AppRow,\n        AppCol,\n        TableCustomTextField,\n        AppDateField\n    },\n\n    props: {\n        invoice_lines: {\n            type: Array,\n            required: true\n        },\n        allow_import: {\n            type: Boolean,\n            required: false,\n            default: false\n        },\n        loading: {\n            type: Boolean,\n            required: false,\n            default: false\n        },\n        readonly: {\n            type: Boolean,\n            required: false,\n            default: false\n        },\n        invoice: {\n            type: Object,\n            required: false,\n        },\n        products: {\n            type: Array,\n            required: false,\n        },\n        showErrors: {\n            type: Boolean,\n            required: false,\n            default: false\n        },\n        tax_type:{\n            type: String,\n            required: false,\n            default: 'iva/igic'\n        },\n        invoiceable_type: {\n            type: String,\n            required: false,\n            default: 'invoice'\n        },\n        isRecurringContract: {\n            type: Boolean,\n            required: false,\n            default: false\n        }\n    },\n    data() {\n        return {\n            showAdditionalInfoDilog: false,\n            showEditLineDialog:false,\n            ret_amount: undefined,\n            ret_concept: undefined,\n            line: {},\n            checkedLineDiscount: false,\n            checkedGlobalDiscount: false,\n            discount_reason: undefined,\n            discount_amount: undefined,\n            reimbursable_expense: undefined,\n            num_line: undefined,\n            delete_pop_up: false,\n            line_retentions: [\n                { name: 'N/A', value: 'na' },\n                { name: '7%', value: 0.07 },\n                { name: '15%', value: 0.15 },\n                { name: '19%', value: 0.19 },\n            ],\n            type_0_options: ['N/A','EX' ,'ISP', 'NS','INTRA.','EXPORT.'],\n            rest_products: this.products,\n            otherInformationDialog: false,\n            keyDialog: 0,\n            sender_info: new SenderInfo(),\n            receiver_info: new ReceiverInfo(),\n            delivery_note_number: '',\n            delivery_note_date: '',\n            additional_line_information: '',\n\n            // tabs: [\n            //     {code: \"delivery_note\", \"name\": \"Albarán\"},\n            //     {code: \"sender\", \"name\": \"Refs. Emisor\"},\n            //     {code: \"receiver\", \"name\": \"Refs. Receptor\"},\n            //     {code: \"additional_line_information\", \"name\": \"Información Adicional\"}\n            // ],    \n            activeTab: 'receiver',\n            additionalInfoTabs: [\n                {code: \"retention\", \"name\": \"Retención\"},\n                {code: \"discounts\", \"name\": \"Descuentos\"}\n            ],\n            additionalInfoActiveTab: 'retention',\n            actualOtherInformationLine: undefined\n\n        }\n    },\n    computed: {\n        tabs(){\n            if (this.invoiceable_type === 'invoice'){\n                return [\n                    {code: \"delivery_note\", \"name\": \"Albarán\"},\n                    {code: \"sender\", \"name\": \"Refs. Emisor\"},\n                    {code: \"receiver\", \"name\": \"Refs. Receptor\"},\n                    {code: \"additional_line_information\", \"name\": \"Información Adicional\"}\n                ];\n            }else{\n                return [{code: \"additional_line_information\", \"name\": \"Información Adicional\"}];\n            }\n        },\n\n        ...mapGetters({\n            got_feature: 'got_feature',\n            is_mobile: 'is_mobile',\n        }),\n        computed_tax_type(){\n            return this.tax_type;\n        },\n        computed_tax_items(){\n            let tax_items = [{ name: '0%', value: 0.00 },{ name: '5%', value: 0.05 } ];\n            if(this.computed_tax_type.includes('iva')){\n                tax_items.push({ name: '21%', value: 0.21 });\n                tax_items.push({ name: '10%', value: 0.10 });\n                tax_items.push({ name: '4%', value: 0.04 });\n                tax_items.push({ name: '21% RE 5.2%', value: 0.052 });\n                tax_items.push({ name: '10% RE 1.4%', value: 0.014 });\n                tax_items.push({ name: '4% RE 0.5%', value: 0.005 });\n            }\n            if(this.computed_tax_type.includes('igic')){\n                tax_items.push({ name: '20%', value: 0.2 });\n                tax_items.push({ name: '15%', value: 0.15 });\n                tax_items.push({ name: '7%', value: 0.07 });\n                tax_items.push({ name: '3%', value: 0.03 });\n                \n            }\n            return tax_items;\n            \n        },\n        some_0_tax(){\n            return this.invoice_lines.some(line => line.selected_tax == 0.0);\n        },\n        showLineDiscount() {\n            for (const line of this.invoice_lines) {\n                if (line.discounts && line.discounts.length > 0)\n                    return true;\n            }\n            return false\n        },\n        areInvoiceLinesValid(){\n            for (let i=0; i<this.invoice_lines.length; i++){\n                console.log('línia ', i)\n                if (!this.invoice_lines[i].iamvalid()){\n                    return false\n                }\n            }\n            return true\n        },\n    },\n    methods: {\n        alternateGray(index) {\n            return index % 2 == 1 ? 'background-color: #eeeeee' : '#f2f2f2';\n        },\n        deleteInvoiceLine(index) {\n            this.$emit('delete-line', index);\n            if (this.is_mobile) {\n                this.delete_pop_up = false;\n                this.showEditLineDialog = false;\n            }\n        },\n        tryDelete(){\n            let allow = true;\n            if (allow){\n                this.delete_pop_up = true;\n            }\n\n        },\n        change(index) {\n            this.$emit('change-line', index);\n        },\n        get_total_amount(invoice_line) {\n            let gross = invoice_line.gross_amount;\n            if (invoice_line.discounts.length > 0 && invoice_line.discounts[0].rate > 0)\n                gross -= gross * invoice_line.discounts[0].rate / 100;\n            let tax_amount = gross * invoice_line.taxes[0].rate;\n            let recargo = 0;\n            //console.log(invoice_line.taxes[0])\n            if (invoice_line.taxes[0].recargo_amount) {\n                recargo = invoice_line.taxes[0].recargo_amount;\n            }\n            let withheld_amount = 0;\n            if (invoice_line.taxes_withheld.length) {\n                withheld_amount = invoice_line.taxes_withheld[0].amount\n            }\n            return (gross + tax_amount + recargo - withheld_amount).toFixed(2);\n        },\n        addInvoiceLine() {\n            this.$emit('add-line');\n        },\n        ImportLinesFromExcel() {\n            this.$emit('import-lines');\n        },\n        openDialogAdditionalInfo() {\n            this.showAdditionalInfoDilog = true;\n            this.ret_amount = this.invoice.retention_amount;\n            this.ret_concept = this.invoice.retention_concept;\n            if (this.invoice.general_discounts && this.invoice.general_discounts.length) {\n                this.discount_reason = this.invoice.general_discounts[0].reason;\n                this.discount_amount = this.invoice.general_discounts[0].amount;\n                this.checkedGlobalDiscount = true;\n            }\n            else {\n                this.discount_reason = undefined;\n                this.discount_amount = undefined;\n                this.checkedGlobalDiscount = false;\n            }\n            if (this.invoice.reimbursable_amounts && this.invoice.reimbursable_amounts.length) {\n                this.reimbursable_expense = this.invoice.reimbursable_amounts[0];\n            }\n            else {\n                this.reimbursable_expense = undefined;\n            }\n\n            for (let line of this.invoice_lines) {\n                if (line.discounts.length > 0 && line.discounts[0].rate>0) {\n                    this.checkedLineDiscount = true;\n                    break;\n                }\n            }\n        },\n        openDialogEditLine(invoice_line, index) {\n            this.showEditLineDialog = true;\n            this.num_line = index;\n            this.line['description'] = invoice_line.description\n            this.line['unit_price_without_tax'] = invoice_line.unit_price_without_tax\n            this.line['quantity'] = invoice_line.quantity\n            this.line['selected_tax'] = invoice_line.selected_tax\n            this.line['selected_retention'] = invoice_line.selected_retention\n            this.line['selected_tax_event'] = invoice_line.selected_tax_event\n        },\n        changeInvoiceLine(index) {\n            this.invoice_lines[index].description = this.line['description']\n            this.invoice_lines[index].unit_price_without_tax = this.line['unit_price_without_tax']\n            this.invoice_lines[index].quantity = this.line['quantity']\n            this.invoice_lines[index].selected_tax = this.line['selected_tax']\n            this.invoice_lines[index].selected_retention = this.line['selected_retention']\n            this.invoice_lines[index].selected_tax_event = this.line['selected_tax_event']\n            this.$emit('change-line', index);\n            this.showEditLineDialog = false;\n            this.invoice_line = {};\n        },\n        openDialogDeleteAllLines() {\n            this.$emit('delete-all-lines');\n        },\n        cancelEditLineChange() {\n            this.showEditLineDialog = false;\n            this.invoice_line = {};\n        },\n        cancelChange() {\n            this.showAdditionalInfoDilog = false;\n        },\n        changeAdditionaInfo() {\n            this.invoice.retention_concept = this.ret_concept;\n            this.invoice.retention_amount = this.ret_amount;\n            if (this.discount_amount) {\n                this.invoice.general_discounts = [new ExtraAmount(this.discount_reason, parseFloat(this.discount_amount))];\n            }\n            else {\n                this.invoice.general_discounts = [];\n            }\n            if (this.reimbursable_expense) {\n                this.invoice.reimbursable_amounts = [parseFloat(this.reimbursable_expense)];\n            }\n            else {\n                this.invoice.reimbursable_amounts = [];\n            }\n\n            for (let line of this.invoice_lines) {\n                if (this.checkedLineDiscount && (!line.discounts || line.discounts.length == 0))\n                    line.discounts = [new ExtraAmount('Descuento', 0, 0)]\n                else if (!this.checkedLineDiscount)\n                    line.discounts = []\n            }\n\n\n            this.$emit('change-additional-info');\n            this.showAdditionalInfoDilog = false;\n        },\n        tax_change(newRate, index) {\n            if (!this.is_mobile) {\n                this.invoice_lines[index].selected_tax = newRate;\n                this.$emit('change-line', index);\n            } else if (this.is_mobile) {\n                this.line ={...this.line, selected_tax: newRate}\n            }\n            \n        },\n        tax_event_change(newTaxEvent, index) {\n            if (!this.is_mobile) {\n                this.invoice_lines[index].selected_tax_event = newTaxEvent;\n                this.$emit('change-line', index);\n            } else if (this.is_mobile) {\n                this.line['selected_tax_event'] = newTaxEvent\n            }\n        },\n        retention_change(newRate, index) {\n            if (!this.is_mobile) {\n                this.invoice_lines[index].selected_retention = newRate;\n                this.$emit('change-line', index);\n            } else if (this.is_mobile) {\n                this.line['selected_retention'] = newRate\n            }\n        },\n        product_changed(product, index) {\n            if (product && product instanceof Product) {\n                //list of computed tax values\n                let tax_values = this.computed_tax_items.map(item => item.value);\n                if(!tax_values.includes(product.selected_tax)){\n                    product.selected_tax = tax_values[1];\n                }\n                if (product.description != this.invoice_lines[index].description && !this.is_mobile) {\n                    this.invoice_lines[index].selected_product = product;\n                    this.invoice_lines[index].description = product.description;\n                    this.$emit('change-line', index);\n                } else if (product.description != this.description && this.is_mobile) {\n                    this.line['description'] = product.description;\n                    this.line['unit_price_without_tax'] = product.price;\n                    this.line['selected_tax'] = product.selected_tax;\n                    this.line['selected_retention'] = product.selected_retention;\n                    if (product.selected_tax == 0.0) {\n                        this.line['selected_tax_event'] = product.selected_tax_event;\n                    }                    \n                    this.$emit('change-line', index);\n                }\n            } else {\n                if (product != this.invoice_lines[index].description) {\n                    this.invoice_lines[index].description = product;\n                    let p = this.products.find(p => p.description == product);\n                    if (p) {\n                        this.invoice_lines[index].selected_product = p;\n                    } else {\n                        this.invoice_lines[index].selected_product = undefined;\n                        this.line['description'] = product\n                    }\n                    this.$emit('change-line', index);\n                }\n            }\n        },\n        openDialogOtherInformation(line) {\n            this.actualOtherInformationLine = line;\n            if (line.additional_information) {\n                this.sender_info = line.additional_information.sender_info;\n                this.receiver_info = line.additional_information.receiver_info;\n                this.delivery_note_number = line.additional_information.delivery_note_number;\n                this.delivery_note_date = line.additional_information.delivery_note_date;\n                this.additional_line_information = line.additional_information.additional_line_information;\n            } else {\n                this.sender_info = new SenderInfo();\n                this.receiver_info = new ReceiverInfo();\n                this.delivery_note_number = '';\n                this.delivery_note_date = '';\n                this.additional_line_information = '';\n            }\n            this.keyDialog += 1;\n            this.otherInformationDialog = true\n        },\n        chnageOtherInformation() {\n            console.log('changeOtherInformation called')\n            this.actualOtherInformationLine.additional_information = new AdditionalInformation(this.sender_info, this.receiver_info, this.delivery_note_number, this.delivery_note_date, this.additional_line_information);\n            let index = this.invoice_lines.indexOf(this.actualOtherInformationLine);\n            this.invoice_lines[index].additional_information = this.actualOtherInformationLine.additional_information;\n            this.otherInformationDialog = false;\n            this.$emit('change-line', index);\n        },\n        filterProducts(item, queryText) {   \n            return (item.description.toLowerCase().includes(queryText.toLowerCase()) || item.code.toLowerCase().includes(queryText.toLowerCase()));\n        },\n    },\n\n}\n</script>\n\n<style scoped>\n.primary-bckground {\n    background-color: #663399;\n}\n\n.primary-border {\n    border-color: #363636 !important;\n}\n\n.lines__table {\n    font-size: 14px !important;\n    width: 100% !important;\n    max-height: 270px;\n    padding: 0px !important;\n    scrollbar-width: thin;\n}\n\n.table-head {\n    border-color: #363636;\n    background-color: #F4F4F4;\n    height: 40px !important;\n    font-weight: 600;\n}\n\n.table-right-head {\n    background-color: #F4F4F4;\n}\n\n.table-head-row {\n    position: sticky;\n    top: 0;\n    z-index: 1;\n    background-color: #F4F4F4;\n    height: 40px !important;\n    font-weight: 600;\n}\n\n.table-row .col,\n.table-row .v-text-field__slot>input {\n    padding: 0px;\n}\n\n.footer {\n    z-index: 101;\n    max-height: 100%;\n}\n\n.bg__gray {\n    background-color: rgba(217, 217, 217, 0.502);\n}\n\n.bg__gray__2 {\n    background-color: #d9d9d9;\n}\n\n.error__msg {\n    background-color: #DC0B0B1A !important;\n    padding-left: 34px !important;\n    border: 2px solid rgba(220, 11, 11, 0.898) !important;\n    font-size: 13px;\n    font-weight: 400;\n}\n\n.action__btn {\n    font-weight: 500;\n    font-size: 14px;\n    line-height: 16px;\n    border-radius: 20px;\n    padding: 18px !important;\n    gap: 8px;\n    text-transform: capitalize;\n}\n\n.primary__blue {\n    color: #060647;\n}\n\n.prevent-cut {\n    word-break: break-word; \n    overflow-wrap: break-word;\n}\n\n.card__tabs .v-tab.v-tab  {\n    font-family: Roboto;\n    font-size: 14px;\n    font-weight: 500;\n    line-height: 16.41px;\n    text-align: left;\n    text-underline-position: from-font;\n    text-decoration-skip-ink: none;\n}\n\n.card__tabs .v-tab.v-tab--active, .card__tabs >>> .v-tabs-slider {\n    color: #060647 !important;\n}\n\n.small_col {\n    flex: 0 0 5%;\n    max-width: 5%;\n}\n\n.more__info__editor__title {\n    background-color: #DEDCFF;\n    height: 70px;\n}\n\n.more__info__editor__title span {\n    font-size: 20px;\n    font-weight: 600;\n    font-family: \"Roboto\";\n    line-height: 24px;\n    text-transform: capitalize;\n    color: #060647;\n}\n</style>\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InvoiceLinesEditor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InvoiceLinesEditor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./InvoiceLinesEditor.vue?vue&type=template&id=21535cc8&scoped=true&\"\nimport script from \"./InvoiceLinesEditor.vue?vue&type=script&lang=js&\"\nexport * from \"./InvoiceLinesEditor.vue?vue&type=script&lang=js&\"\nimport style0 from \"./InvoiceLinesEditor.vue?vue&type=style&index=0&id=21535cc8&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"21535cc8\",\n  null\n  \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VAutocomplete } from 'vuetify/lib/components/VAutocomplete';\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCheckbox } from 'vuetify/lib/components/VCheckbox';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VCombobox } from 'vuetify/lib/components/VCombobox';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTab } from 'vuetify/lib/components/VTabs';\nimport { VTabItem } from 'vuetify/lib/components/VTabs';\nimport { VTabs } from 'vuetify/lib/components/VTabs';\nimport { VTabsItems } from 'vuetify/lib/components/VTabs';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VTextarea } from 'vuetify/lib/components/VTextarea';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VAutocomplete,VBtn,VCard,VCardActions,VCardText,VCardTitle,VCheckbox,VCol,VCombobox,VDialog,VDivider,VIcon,VProgressCircular,VRow,VSpacer,VTab,VTabItem,VTabs,VTabsItems,VTextField,VTextarea,VTooltip})\n","export * from \"-!../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InvoiceTotalsViewer.vue?vue&type=style&index=0&id=70e1d2a5&scoped=true&lang=css&\"","import { CommandDispatcher } from \"@/modules/shared/domain/CommandDispatcher\";\nimport { QueryDispatcher } from \"@/modules/shared/domain/QueryDispatcher\";\nimport { query_dispatcher_get, sync_command_dispatcher, async_command_dispatcher } from \"@/api/client\";\nimport { ProductRepository } from \"../domain/ProductRepository\";\nimport { Product } from \"../domain/Product\";\nimport { v4 as uuidv4 } from 'uuid';\nimport { Tax } from \"../domain/Invoiceable\";\n\nfunction objectToDict(obj: any): Record<string, any> {\n    const dict: Record<string, any> = {};\n\n    for (const key in obj) {\n        if (Object.prototype.hasOwnProperty.call(obj, key)) {\n            const value = obj[key];\n            if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n                // Recursively convert nested object\n                dict[key] = objectToDict(value);\n            } else {\n                dict[key] = value;\n            }\n        }\n    }\n\n    return dict;\n}\n\nexport class ApiProductRepository implements ProductRepository {\n\n    command_dispatcher: CommandDispatcher\n    async_command_dispatcher: CommandDispatcher\n    query_dispatcher: QueryDispatcher\n    constructor() {\n        this.command_dispatcher = sync_command_dispatcher\n        this.async_command_dispatcher = async_command_dispatcher\n        this.query_dispatcher = query_dispatcher_get\n    }\n\n    api_to_domain(product) {\n\n        let p =  new Product(\n            product.id,\n            product.code,\n            product.description,\n            product.price,\n            product.company_id,\n            product.taxes.map(tax => new Tax(tax.rate, tax.base, tax.amount, tax.recargo_rate, tax.recargo_amount)),\n            product.deleted, \n            product.taxes_withheld.map(tax => new Tax(tax.rate, tax.base, tax.amount)),\n            product.special_taxable_event\n        );\n        p.selected_tax = product.taxes[0].rate;\n        p.selected_retention = 'na'\n        if (product.taxes_withheld.length) {\n            p.selected_retention = product.taxes_withheld[0].rate;\n        }\n\n        p.selected_tax_event = 'N/A'\n        if (p.special_taxable_event){\n            let code = p.special_taxable_event['code']\n            if (code == '01'){\n                if (p.special_taxable_event['reason'].includes('sujeto pasivo')){\n                    p.selected_tax_event = 'ISP'\n                }\n                else if(p.special_taxable_event['reason'].includes('intracomunitaria')){\n                    p.selected_tax_event = 'INTRA.'\n                }\n                else if(p.special_taxable_event['reason'].includes('exportaci')){\n                    p.selected_tax_event = 'EXPORT.'\n                }\n                else if(p.special_taxable_event['reason'].includes('exent')){\n                    p.selected_tax_event = 'EX'\n                }\n            }\n            else if (code == '02'){\n                p.selected_tax_event = 'NS'\n            }\n        }\n\n        return p;\n    }\n    domain_to_api(product: Product) {\n        return JSON.parse(JSON.stringify(objectToDict(product)));\n    }\n\n    async getProductList(company_id:Number, filters:Object): Promise<Product[]> {\n        let args = { \n            company_id: company_id,\n            filters: []\n        };\n\n        (Object.entries(filters) as [string, any][]).forEach(([key, value]) => {\n            if(value.value) {\n                args.filters.push({key: key, value: value.value})\n            }\n        })\n        let productData = await this.query_dispatcher.dispatch('get.product.list', args)\n        let productList: Product[] = []\n        for (let inv in productData) {\n            productList.push(this.api_to_domain(productData[inv]))\n        }\n        return productList\n    }\n\n    async save(product: Product) {\n        let product_data = this.domain_to_api(product)\n        let res = await this.command_dispatcher.dispatch('save.product', { product: product_data })\n        return res['output']\n    }\n\n    create_empty_product(company_id) {\n        return new Product(uuidv4(), '', '', 0.0, parseInt(company_id.toString()), [new Tax(0.21, 0, 0)], false)\n    }\n\n    async delete(products: Product[]) {\n        let args = { \n            products: products.map(product => this.domain_to_api(product))\n        }\n        let res = await this.command_dispatcher.dispatch('delete.products', args)\n        return res['output']\n    }\n\n    async upload_products_file(company_id, file_path, filename) {\n        let args = {\n            company_id: company_id,\n            file_path: file_path,\n            og_file_name: filename\n          }\n          let res = await this.async_command_dispatcher.dispatch('import.products.from.excel', args)\n          return res.job_id\n    }\n}"],"sourceRoot":""}