PageSourceSearch

https://application.betool.fr/js/6734.8a9adad2.js

js betool.fr collected 2026-09-24 15:03:08 UTC 9,946 bytes, 1 lines download raw bytes

1"use strict";(self["webpackChunkcrm"]=self["webpackChunkcrm"]||[]).push([[6734],{16114(t,e,i){i.r(e),i.d(e,{default:()=>S});var u=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("fisca-sheet-base",{ref:"base",attrs:{fisca:t.fisca,position:t.position,"is-normal-mode":t.isNormalMode,id:t.id,"sheet-label":t.sheet?t.sheet.label:"","cee-cumac":t.CEECoupDePouceCumac,"cee-euros":t.CEECoupDePouceEuros,sheet:t.sheet,"loaded-component":t.loadedComponent},on:{deleteSheet:t.deleteSheet,"create-sub-product":t.openNewSubProduct,"product-list-input":t.updateAssociatedSubProductList,"validate-sub-product":t.validateEditSubProduct,"delete-sub-product":t.onDeleteSubProduct},scopedSlots:t._u([{key:"fields",fn:function(){return[i("v-text-field",{staticClass:"crm-vuetify-selectandinput",attrs:{"hide-details":"",label:"Surface d'isolant posé",suffix:"m²",type:"number",min:"0",outlined:"",dense:""},model:{value:t.floorInsulationSurface,callback:function(e){t.floorInsulationSurface=t._n(e)},expression:"floorInsulationSurface"}}),i("v-checkbox",{staticClass:"crm-vuetify-selectandinput",attrs:{"hide-details":"","true-value":1,"false-value":0,label:"Bâtiment > 2 ans"},model:{value:t.isBuildingOlderThan2Years,callback:function(e){t.isBuildingOlderThan2Years=e},expression:"isBuildingOlderThan2Years"}})]},proxy:!0}])})},n=[],d=i(59258),a=i(28161),o=i(30388),s=i(41034),r=(i(88431),i(50113),i(48980),i(51629),i(62062),i(44114),i(72712),i(15086),i(62010),i(18111),i(81148),i(20116),i(7588),i(61701),i(18237),i(13579),i(2892),i(26099),i(16034),i(23500),i(55548)),c=i(95353),l=i(1611),f=5200,p=4200,h=2800,v=.6,E=.7,C=1.2,m=.6;const A={name:"batEn103",components:{FiscaSheetBase:r.A},inject:["fiscaApi"],props:{allPolueurs:{type:Array,required:!0},fisca:{type:Object,required:!0},position:{type:Number,required:!0},discountCouponMap:{type:Object,required:!0},fiscaAdvantagesTypeList:{type:Array,required:!0},fiscalAdvantageTypeEnum:{type:Object,required:!0},sheetId:{type:Number,required:!0},activitySectorEnum:{type:Object,required:!0},zoneH:{type:String,required:!0},isNormalMode:{type:Boolean,required:!0},id:{type:Number,required:!0},widgetMapForm:{type:Object,default:function(){return{}}}},data:function(){return{loadedComponent:!1,sheet:null,floorInsulationSurface:0,isBuildingOlderThan2Years:1}},computed:(0,s.A)((0,s.A)((0,s.A)((0,s.A)({},(0,c.L8)("translator",["msg"])),(0,c.L8)("fisca",["getMySheet"])),(0,c.L8)("forms",["getProductDynaFieldTagEnum"])),{},{cumacPerM2:function(){return"H1"===this.zoneH?f:"H2"===this.zoneH?p:"H3"===this.zoneH?h:0},sectorFactor:function(){var t=this.activitySectorEnum,e=this.fisca.activitySectorId;return e===t.OFFICES.id||e===t.EDUCATION.id||e===t.COMMERCE.id?v:e===t.HOTEL_COM_HOUSING.id||e===t.CATERING.id?E:e===t.HEALTH.id?C:m},CEECoupDePouceCumac:function(){return this.isEligibleSector(this.fisca.activitySectorId)?1!==this.isBuildingOlderThan2Years?0:(0,l.dx)(this.cumacPerM2*this.sectorFactor*this.floorInsulationSurface):0},CEECoupDePouceMultiplierIndex:function(){var t,e=this;if(null==this.fisca.pollueurIdLinked||this.fisca.pollueurIdLinked<=0)return 0;if(null===(t=this.allPolueurs)||void 0===t||!t.length)return 0;var i=this.allPolueurs.find(function(t){return t.id===e.fisca.pollueurIdLinked});return(null===i||void 0===i?void 0:i.price)>0?Number(i.price):0},CEECoupDePouceEuros:function(){return(0,l.dx)(this.CEECoupDePouceCumac*this.CEECoupDePouceMultiplierIndex)},currentFiscalProduct:function(){var t=this;return this.fisca.selectedFiscalProduct.find(function(e){return e.id===t.id})},currentSubProductsTotalTTC:function(){var t,e,i=null!==(t=null===(e=this.currentFiscalProduct)||void 0===e?void 0:e.associatedSubProductList)&&void 0!==t?t:[];return i.reduce(function(t,e){var i;return t+(null!==(i=e.totalTTC)&&void 0!==i?i:0)},0)},discountCouponCEE:function(){var t,e,i=this;if(!this.loadedComponent)return null;var u=this.fiscaAdvantagesTypeList.find(function(t){return t.id===i.fiscalAdvantageTypeEnum.CEE.id}),n=this.fisca.fiscalAdvantages.find(function(t){return t.faTypeId===i.fiscalAdvantageTypeEnum.CEE.id&&t.f2fAdvantageProductId===i.id}),d=null!==(t=null===n||void 0===n?void 0:n.value)&&void 0!==t?t:0,a=this.allPolueurs.find(function(t){return t.id===i.fisca.pollueurIdLinked});return(0,l.LJ)({fiscalProductId:this.id,sheet:this.sheet,advantage:u,totalTTC:this.currentSubProductsTotalTTC,value:d,pollueurName:null!==(e=null===a||void 0===a?void 0:a.name)&&void 0!==e?e:null,advantageTypeId:this.fiscalAdvantageTypeEnum.CEE.id,tokens:this.CEECoupDePouceCumac})}}),methods:(0,s.A)((0,s.A)({},(0,c.i0)("products",["getProductGlobalById"])),{},{deleteSheet:function(){this.$emit("deleteSheet",{sheetId:this.sheet.id,id:this.id})},isNotInitializedSheet:function(){var t=this;return!this.fisca.selectedFiscalProduct.some(function(e){return e.id===t.id})},isDefaultProduct:function(t){var e;return(null===(e=this.sheet)||void 0===e?void 0:e.defaultSubProductId)===t},isEligibleSector:function(t){return null!=t&&t>0&&t!==this.activitySectorEnum.AGRICULTURE.id},getDefaultFiscalProduct:function(){var t=this;return(0,o.A)((0,a.A)().m(function e(){var i;return(0,a.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.getProductGlobalById({id:t.sheet.defaultSubProductId,withChild:!0});case 1:return i=e.v,e.a(2,{cifId:t.fisca.id,fapId:t.sheet.id,id:t.id,lot:null,position:t.position,status:1,associatedSubProductList:[(0,l.X8)(i,l.or.FROM_DB.id,!0)]})}},e)}))()},buildSubProduct:function(t){if(null==t){var e,i,u=null!==(e=null===(i=this.currentFiscalProduct)||void 0===i?void 0:i.associatedSubProductList)&&void 0!==e?e:[];return(0,l.O4)(u.length,l.or.FROM_WIDGET.id)}return(0,l.X8)(t,l.or.FROM_DB.id,this.isDefaultProduct(t.id))},openNewSubProduct:function(){this.$refs.base.openNewProductDialog(this.buildSubProduct(null))},updateAssociatedSubProductList:function(t){var e=this,i=[];t.forEach(function(t){var u;if((null===(u=t.multiFieldList)||void 0===u?void 0:u.length)>0){var n,a,o=t.multiFieldList.findIndex(function(t){return t.label===e.getProductDynaFieldTagEnum.SELLING_PRICE}),s=null===(n=t.multiFieldList[o])||void 0===n?void 0:n.dataField,r=s?null===(a=e.widgetMapForm[s])||void 0===a?void 0:a.newValue:null;r&&(t.sellPrice=r)}i.push(t),i.push.apply(i,(0,d.A)(t.children))});var u=i.map(function(t){return e.buildSubProduct(t)});this.fiscaApi.addSubProducts(this.id,u)},validateEditSubProduct:function(t){var e=t.productSelected,i=t.productSelectedIndex,u=t.validState,n=t.close;""===e.uht&&(e.uht=null),u.productUht=(0,l.gs)(e.uht,!0,0,null);var d=Object.values(u).every(function(t){return null==t||t});d&&((0,l.NL)(e),-1!==i?this.fiscaApi.replaceSubProduct(this.id,i,e):this.fiscaApi.addSubProducts(this.id,[e]),n())},onDeleteSubProduct:function(t){this.fiscaApi.removeSubProduct(this.id,t)},addTotalHTAndTotalTTCToAssociatedSubProductList:function(){var t,e,i=this,u=null!==(t=null===(e=this.currentFiscalProduct)||void 0===e?void 0:e.associatedSubProductList)&&void 0!==t?t:[],n=u.map(function(t){var e=(0,s.A)({},t);return i.isDefaultProduct(t.productId)?(e.uht=e.totalHT=null,e.uttc=e.totalTTC=null,e.quantity=null):(0,l.W6)(e),e});this.fiscaApi.replaceSubProducts(this.id,n)},updateDiscountCouponMap:function(){this.loadedComponent&&(this.fiscaApi.upsertDiscountCoupon({fiscalProductId:this.id,advantageTypeId:this.fiscalAdvantageTypeEnum.CEE.id,coupon:this.discountCouponCEE}),this.$emit("onCouponUpdated",{onProductsUpdated:!1}))}}),created:function(){var t=this;return(0,o.A)((0,a.A)().m(function e(){var i,u,n;return(0,a.A)().w(function(e){while(1)switch(e.n){case 0:if(t.sheet=t.getMySheet(t.sheetId),!t.isNotInitializedSheet()){e.n=2;break}return e.n=1,t.getDefaultFiscalProduct();case 1:i=e.v,t.fiscaApi.initFiscalSheet({fiscalProductId:t.id,faProductId:t.sheet.id,position:t.position,defaultProduct:i,advantages:[{typeId:t.fiscalAdvantageTypeEnum.CEE.id,value:t.CEECoupDePouceEuros},{typeId:t.fiscalAdvantageTypeEnum.CUMAC.id,value:t.CEECoupDePouceCumac},{typeId:t.fiscalAdvantageTypeEnum.FLOOR_INSULATION_SURFACE.id,value:t.floorInsulationSurface},{typeId:t.fiscalAdvantageTypeEnum.BUILDING_OLDER_2_YEARS.id,value:t.isBuildingOlderThan2Years}]}),e.n=3;break;case 2:u=t.fisca.fiscalAdvantages.find(function(e){return e.f2fAdvantageProductId===t.id&&e.faTypeId===t.fiscalAdvantageTypeEnum.FLOOR_INSULATION_SURFACE.id}),null!=u&&(t.floorInsulationSurface=u.value),n=t.fisca.fiscalAdvantages.find(function(e){return e.f2fAdvantageProductId===t.id&&e.faTypeId===t.fiscalAdvantageTypeEnum.BUILDING_OLDER_2_YEARS.id}),null!=n&&(t.isBuildingOlderThan2Years=n.value),t.addTotalHTAndTotalTTCToAssociatedSubProductList();case 3:t.updateDiscountCouponMap(),t.loadedComponent=!0;case 4:return e.a(2)}},e)}))()},watch:{CEECoupDePouceCumac:function(t){this.loadedComponent&&this.fiscaApi.upsertFiscalAdvantage({fiscalProductId:this.id,typeId:this.fiscalAdvantageTypeEnum.CUMAC.id,value:t,faProductId:this.sheet.id})},CEECoupDePouceEuros:function(t){this.loadedComponent&&(this.fiscaApi.upsertFiscalAdvantage({fiscalProductId:this.id,typeId:this.fiscalAdvantageTypeEnum.CEE.id,value:t,faProductId:this.sheet.id}),this.updateDiscountCouponMap())},floorInsulationSurface:function(t){this.loadedComponent&&this.fiscaApi.upsertFiscalAdvantage({fiscalProductId:this.id,typeId:this.fiscalAdvantageTypeEnum.FLOOR_INSULATION_SURFACE.id,value:t,faProductId:this.sheet.id})},isBuildingOlderThan2Years:function(t){this.loadedComponent&&this.fiscaApi.upsertFiscalAdvantage({fiscalProductId:this.id,typeId:this.fiscalAdvantageTypeEnum.BUILDING_OLDER_2_YEARS.id,value:t,faProductId:this.sheet.id})},fisca:function(){this.loadedComponent&&0!==this.fisca.id&&!this.isNotInitializedSheet()&&this.addTotalHTAndTotalTTCToAssociatedSubProductList()},"fisca.pollueurIdLinked":function(){this.updateDiscountCouponMap()},"discountCouponCEE.value":function(){this.updateDiscountCouponMap()}}},I=A;var P=i(81656),T=(0,P.A)(I,u,n,!1,null,null,null);const S=T.exports}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.