PageSourceSearch

https://dz.diesel.com/on/demandware.static/Sites-DieselWW-Site/-/e…/component-BillingInvoiceHandler.chunks.js

js diesel.com collected 2026-09-24 08:40:53 UTC 2,643 bytes, 1 lines download raw bytes

1(self.webpackChunkapp_project=self.webpackChunkapp_project||[]).push([[1146],{46924:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>l});const s=i(38302).default;class l extends s{constructor(e){super(e),this.invoiceRequiredCheckbox=document.querySelector(".js-invoice-required"),this.invoiceContainerElement=e,this.legalEntityCheckBox=document.querySelector("#isLegalEntity"),this.physicalEntityCheckBox=document.querySelector("#isPhysicalEntity"),this.RFC_Element=this.element.querySelector("#RFC"),this.taxRegimeSelect=this.element.querySelector("#taxRegime"),this.cfidUsagSelect=this.element.querySelector("#CFDI_Usag"),this.taxRegimeSelect&&this.cfidUsagSelect?(this.taxRegimeSelect.addEventListener("change",this.onTaxRegimeChange.bind(this)),this.cfidUsagSelect.disabled=!0,""!==this.taxRegimeSelect.value.trim()&&(this.cfidUsagSelect.disabled=!1,this.taxRegimeSelect.dispatchEvent(new Event("change"))),this.legalEntityCheckBox&&this.legalEntityCheckBox.addEventListener("change",this.onEntityChange.bind(this)),this.physicalEntityCheckBox&&this.physicalEntityCheckBox.addEventListener("change",this.onEntityChange.bind(this)),this.invoiceRequiredCheckbox&&this.invoiceRequiredCheckbox.addEventListener("change",this.updateInputsStatus.bind(this)),this.onEntityChange(null),this.updateInputsStatus()):console.warn("Unable to initialize selects for tax regime and cfid usag")}updateInputsStatus(){if(this.invoiceRequiredCheckbox){if(this.invoiceRequiredCheckbox.checked)return this.taxRegimeSelect.disabled=!1,this.cfidUsagSelect.disabled=!this.taxRegimeSelect.value,void(this.RFC_Element.disabled=!1);this.taxRegimeSelect.disabled=!0,this.cfidUsagSelect.disabled=!0,this.RFC_Element.disabled=!0}}onEntityChange(e){if(!this.legalEntityCheckBox)return;let t=this.legalEntityCheckBox.checked;[...this.taxRegimeSelect.querySelectorAll("option")].forEach((e=>{let i=e.dataset.id.toString();i&&0!==i.length&&(e.disabled=!1,(t&&!i.includes("legal")||!t&&!i.includes("physical"))&&(e.disabled=!0,e.selected&&(e.selected=!1,this.onTaxRegimeChange(null))))}))}onTaxRegimeChange(e){let t=e&&e.target.value||this.taxRegimeSelect.value,i=document.querySelector("#tax-regime-"+t);if(!i)return void console.error("Unable to find the tax regime with selector:","#tax-regime-"+t);let s=i.dataset.id||"",l=s.split("|");if(l.length<2)return console.error("Error with the tax regime configuration:",s),this.cfidUsagSelect.disabled=!0,void(this.cfidUsagSelect.value="");let a=l[1].split(",");this.cfidUsagSelect.querySelectorAll("option").forEach((e=>{e.disabled=-1===a.indexOf(e.value),e.disabled&&(e.selected=!1)})),this.cfidUsagSelect.disabled=!1}}}}]);

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.