PageSourceSearch

https://glow.fieldstone.io/737.50d99e08a7563826.js

js fieldstone.io collected 2026-10-02 01:57:55 UTC 56,876 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[737],{57463(j,C,u){u.d(C,{Q:()=>k});var v=u(10036),s=u(61259),e=u(13822),M=u(24802),d=u(72730),_=u(22281),t=u(22618);const A=()=>({standalone:!0});function F(p,b){if(1&p&&(t.j41(0,"ion-label",10),t.EFF(1),t.k0s()),2&p){const i=t.XpG();t.Aen(i.sStyle()),t.Y8G("position",i.sLabelPosition),t.R7$(),t.JRh(i.sLabel)}}function x(p,b){if(1&p){const i=t.RV6();t.j41(0,"div",6)(1,"input",11,0),t.bIt("focus",function(l){_.eBV(i);const g=t.XpG();return _.Njj(g.onFocus(l))}),t.k0s()()}if(2&p){const i=t.XpG();t.R7$(),t.xc7("font-size",i.sFontSize),t.Y8G("ngClass",i.sInputAlignClass)("maskito",i.posPercentMask)("formControlName",i.sFormControlName),t.BMQ("aria-label",i.sMarginInputAria)}}function r(p,b){if(1&p){const i=t.RV6();t.j41(0,"div",7)(1,"span",12),t.EFF(2,"$"),t.k0s(),t.j41(3,"input",13,0),t.mxI("ngModelChange",function(l){_.eBV(i);const g=t.XpG();return t.DH7(g.sSellingRateInputValue,l)||(g.sSellingRateInputValue=l),_.Njj(l)}),t.bIt("ngModelChange",function(l){_.eBV(i);const g=t.XpG();return _.Njj(g.onSellingRateInputChange(l))})("focus",function(l){_.eBV(i);const g=t.XpG();return _.Njj(g.onFocus(l))}),t.k0s()()}if(2&p){const i=t.XpG();t.R7$(),t.xc7("font-size",i.sFontSize),t.R7$(2),t.xc7("font-size",i.sFontSize),t.Y8G("ngClass",i.sInputAlignClass)("disabled",i.fDisabled),t.R50("ngModel",i.sSellingRateInputValue),t.Y8G("ngModelOptions",t.lJ4(9,A)),t.BMQ("aria-label",i.sPriceInputAria)}}function h(p,b){1&p&&(t.j41(0,"ion-item",9)(1,"ion-text",14),t.EFF(2,"Required"),t.k0s()())}function S(p,b){1&p&&(t.j41(0,"ion-item",9)(1,"ion-text",14),t.EFF(2,"Invalid"),t.k0s()())}function E(p,b){if(1&p&&(t.j41(0,"ion-item",9)(1,"ion-text",15),t.EFF(2),t.k0s()()),2&p){const i=t.XpG();t.R7$(2),t.JRh(i.sSellingRateError)}}let k=(()=>{class p{constructor(){this.posPercentMask={mask:/^\d{0,2}(\.\d{0,10})?\s?%?$/},this.sFormControlName="s_Margin",this.fRequired=!0,this.sFontSize="12px",this.sLabel="",this.sLabelPosition="stacked",this.sAlignInput="start",this.formGroup=new s.gE({[this.sFormControlName]:new s.MJ("")}),this._fDisable=!1,this._fDisableValidators=!1,this._dTrueMarginPercent=null,this.fSyncingSellingInput=!1,this.fSellingRateMode=!1,this.sSellingRateInputValue="",this.sSellingRateError=null}set fDisable(i){this._fDisable=i,this.updateDisabled()}set fDisableValidators(i){this._fDisableValidators=i,this.updateValidators()}get fStackedLabel(){return"stacked"===this.sLabelPosition}get fHostDisabled(){return this._fDisable}ngOnInit(){this.bindMarginChanges(),this.updateDisabled(),this.updateValidators()}ngOnChanges(i){i.formGroup&&!i.formGroup.firstChange&&(this.bindMarginChanges(),this.updateDisabled(),this.updateValidators()),i.iBaseRatePennies&&this.fSellingRateMode&&!this.fSyncingSellingInput&&this.syncSellingInputFromMargin()}ngOnDestroy(){this.marginChangesSub?.unsubscribe()}get fMarginMode(){return!this.fSellingRateMode}get fDisabled(){return this._fDisable}get sToggleGroupLabel(){return`${this.sLabel||"Margin"} entry mode`}get sMarginInputAria(){return`${this.sLabel||"Margin"} percent`}get sPriceInputAria(){return`${this.sLabel||"Margin"} price`}get sInputAlignClass(){return{"ion-text-start":"start"===this.sAlignInput,"ion-text-center":"center"===this.sAlignInput,"ion-text-end":"end"===this.sAlignInput}}get sMirrorText(){return this.fMarginMode?`= ${this.sSellingRate}`:`= ${this.sMarginRate}`}toggleMarginSellingRateMode(){if(!this._fDisable){if(this.fSellingRateMode)return void this.onSelectMarginMode();this.onSelectPriceMode()}}onSelectMarginMode(){this._fDisable||this.fMarginMode||(this.sSellingRateError=null,this.fSellingRateMode=!1)}onSelectPriceMode(){this._fDisable||this.fSellingRateMode||(this.syncSellingInputFromMargin(),this.fSellingRateMode=!0)}onFocus(i){i.target instanceof HTMLInputElement&&i.target.select()}onSellingRateInputChange(i){this.sSellingRateInputValue=i,!this.fSyncingSellingInput&&this.applySellingRateToMargin(i)}sStyle(){return`font-size: ${this.sFontSize}`}get sSellingRate(){const i=this.iBaseRatePennies;if(null==i||i<=0)return"\u2014";const f=this._dTrueMarginPercent??d.Sen.cleanAndParseFloat(this.formGroup.get(this.sFormControlName)?.value);if(null==f)return"\u2014";const l=f/100;if(l>=1)return"\u2014";const g=i+d.odl.iMargin(i,l);return d.qz1.sPenniesToMoney(g,null,!0)}get sMarginRate(){const i=this._dTrueMarginPercent??d.Sen.cleanAndParseFloat(this.formGroup.get(this.sFormControlName)?.value);return null==i?"\u2014":`${i.toFixed(2).replace(/\.?0+$/,"")}%`}bindMarginChanges(){this.marginChangesSub?.unsubscribe();const i=this.formGroup.get(this.sFormControlName);i&&(this.marginChangesSub=i.valueChanges.subscribe(()=>{this.fMarginMode&&(this._dTrueMarginPercent=null)}))}updateDisabled(){const i=this.formGroup.get(this.sFormControlName);i&&(this._fDisable?i.disable({emitEvent:!1}):i.enable({emitEvent:!1}))}updateValidators(){const i=this.formGroup.get(this.sFormControlName);
1i&&(i.setValidators(this.getValidators()),i.updateValueAndValidity())}getValidators(){if(this._fDisableValidators)return null;const i=[s.k0.pattern("^(\\d{0,2}(\\.\\d{0,10})?\\s?%?)?$")];return this.fRequired&&i.push(s.k0.required),i}syncSellingInputFromMargin(){this.fSyncingSellingInput=!0;const i=d.qz1.iCurrencyFromString(this.sSellingRate);this.sSellingRateInputValue=i>0?(i/100).toFixed(2):"",queueMicrotask(()=>{this.fSyncingSellingInput=!1})}applySellingRateToMargin(i){const f=this.iBaseRatePennies;if(!f||f<=0)return void(this.sSellingRateError=null);const l=d.qz1.iCurrencyFromString(i);if(l<=0)return void(this.sSellingRateError=null);const g=this.formGroup.get(this.sFormControlName);if(!g)return;if(l<=f)return this.sSellingRateError=`Price must be greater than the cost (${d.qz1.sPenniesToMoney(f,null,!0)}).`,void g.setValue(0);this.sSellingRateError=null;const I=d.odl.dMargin(f,l-f);this._dTrueMarginPercent=d.Sen.RoundAwayFromZero(100*I,10),g.setValue(this.sPersistableMarginPercent(this._dTrueMarginPercent))}sPersistableMarginPercent(i){return d.Sen.RoundAwayFromZero(i,10).toFixed(10).replace(/\.?0+$/,"")}static{this.\u0275fac=function(f){return new(f||p)}}static{this.\u0275cmp=t.VBU({type:p,selectors:[["app-margin-selling-rate-input"]],hostVars:4,hostBindings:function(f,l){2&f&&t.AVh("msr--stacked",l.fStackedLabel)("msr--disabled",l.fHostDisabled)},inputs:{sFormControlName:"sFormControlName",fRequired:"fRequired",sFontSize:"sFontSize",sLabel:"sLabel",sLabelPosition:"sLabelPosition",sAlignInput:"sAlignInput",iBaseRatePennies:"iBaseRatePennies",formGroup:"formGroup",fDisable:"fDisable",fDisableValidators:"fDisableValidators"},features:[t.OA$],decls:15,vars:17,consts:[["msrInput",""],[1,"ion-no-margin","ion-no-padding","msr-item",3,"formGroup"],[3,"position","style"],[1,"msr"],["role","radiogroup",1,"msr-toggle"],["type","button","role","radio",1,"msr-toggle-btn",3,"click","disabled"],[1,"msr-field","input-wrapper","percent"],[1,"msr-field","input-wrapper"],["aria-live","polite",1,"msr-mirror"],["lines","none",1,"ion-no-padding","ion-no-margin"],[3,"position"],["type","text","inputmode","decimal","autocorrect","off","autocomplete","off",1,"app-percent-input","msr-field-input",3,"focus","ngClass","maskito","formControlName"],[1,"currency-symbol","currency-symbol-end"],["type","text","inputmode","decimal","autocorrect","off","autocomplete","off",1,"app-currency-input","msr-field-input",3,"ngModelChange","focus","ngClass","disabled","ngModel","ngModelOptions"],["color","danger",1,"ion-no-margin","msr-error"],["color","danger",1,"msr-error"]],template:function(f,l){if(1&f&&(t.j41(0,"ion-item",1),t.nVh(1,F,2,4,"ion-label",2),t.j41(2,"div",3)(3,"div",4)(4,"button",5),t.bIt("click",function(){return l.onSelectMarginMode()}),t.EFF(5," Margin % "),t.k0s(),t.j41(6,"button",5),t.bIt("click",function(){return l.onSelectPriceMode()}),t.EFF(7," Price $ "),t.k0s()(),t.nVh(8,x,3,6,"div",6)(9,r,5,10,"div",7),t.j41(10,"div",8),t.EFF(11),t.k0s()()(),t.nVh(12,h,3,0,"ion-item",9),t.nVh(13,S,3,0,"ion-item",9),t.nVh(14,E,3,1,"ion-item",9)),2&f){let g,I;t.Y8G("formGroup",l.formGroup),t.R7$(),t.vxM(l.sLabel&&l.sLabel.length?1:-1),t.R7$(2),t.BMQ("aria-label",l.sToggleGroupLabel)("aria-disabled",l.fDisabled),t.R7$(),t.AVh("msr-toggle-btn--active",l.fMarginMode),t.Y8G("disabled",l.fDisabled),t.BMQ("aria-checked",l.fMarginMode),t.R7$(2),t.AVh("msr-toggle-btn--active",l.fSellingRateMode),t.Y8G("disabled",l.fDisabled),t.BMQ("aria-checked",l.fSellingRateMode),t.R7$(2),t.vxM(l.fMarginMode?8:9),t.R7$(3),t.JRh(l.sMirrorText),t.R7$(),t.vxM(null!=(g=l.formGroup.get(l.sFormControlName))&&g.touched&&null!=(g=l.formGroup.get(l.sFormControlName))&&g.hasError("required")?12:-1),t.R7$(),t.vxM(null!=(I=l.formGroup.get(l.sFormControlName))&&I.hasError("pattern")?13:-1),t.R7$(),t.vxM(l.sSellingRateError?14:-1)}},dependencies:[s.X1,s.me,s.BC,s.cb,s.j4,s.JD,s.YN,s.vS,e.YU,v.IonItem,v.IonLabel,v.IonText,M.uj],styles:['[_nghost-%COMP%]{display:block;width:100%;min-width:0}.msr-item[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;--padding-end: 0;--inner-padding-end: 0;--padding-start: 0;--inner-padding-start: 0;--background: transparent}.msr--stacked[_nghost-%COMP%]   .msr-item[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}ion-label[_ngcontent-%COMP%]{flex:0 0 50%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:8px}.msr--stacked[_nghost-%COMP%]   ion-label[_ngcontent-%COMP%]{flex:0 0 auto;width:100%;max-width:100%;margin:0 0 4px;white-space:normal}.msr[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;width:100%;min-width:0}.msr-toggle[_ngcontent-%COMP%]{display:flex;width:100%;padding:3px;border-radius:999px;background:rgba(var(--ion-color-medium-rgb),.12)}.msr-toggle-btn[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;min-height:2.2em;margin:0;padding:.4em .7em;border:0;border-radius:999px;background:transparent;color:var(--ion-text-color-step-200, var(--ion-color-medium-shade));font:inherit;font-size:.875em;font-weight:700;line-height:1.2;white-space:nowrap;cursor:pointer}.msr-toggle-btn--active[_ngcontent-%COMP%]{background:var(--ion-background-color, #fff);color:var(--ion-color-primary);box-shadow:0 0 0 1px rgba(var(--ion-color-primary-rgb),.18)}.msr-toggle-btn[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.7}.msr-field[_ngcontent-%COMP%], .input-wrapper[_ngcontent-%COMP%]{width:100%;position:relative;display:block}.input-wrapper.percent[_ngcontent-%COMP%]:after{content:"%";position:absolute;right:8px;top:50%;transform:translateY(-50%);pointer-events:none}.currency-symbol-end[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);pointer-events:none}.msr-field-input[_ngcontent-%COMP%], .app-percent-input[_ngcontent-%COMP%], .app-currency-input[_ngcontent-%COMP%]{width:100%;min-height:2.67em;padding:.35em 1.6em .35em .25em;border:none;border-bottom:1px solid var(--ion-color-light-shade);border-radius:0;color:var(--ion-text-color);background-color:transparent;box-sizing:border-box}.msr-field-input[_ngcontent-%COMP%]:focus, .app-percent-input[_ngcontent-%COMP%]:focus, .app-currency-input[_ngcontent-%COMP%]:focus{outline:none;border-bottom-color:var(--ion-color-primary)}
1.msr-field-input[_ngcontent-%COMP%]:disabled, .app-percent-input[_ngcontent-%COMP%]:disabled, .app-currency-input[_ngcontent-%COMP%]:disabled{color:#999;opacity:.7;cursor:not-allowed}.msr-mirror[_ngcontent-%COMP%]{color:var(--ion-text-color-step-350, var(--ion-color-medium));font-size:.875em;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.3;padding-inline:2px;overflow-wrap:anywhere}.msr-error[_ngcontent-%COMP%]{font-size:12px}.msr--disabled[_nghost-%COMP%]   .msr-toggle-btn--active[_ngcontent-%COMP%]{color:var(--ion-text-color-step-200, var(--ion-color-medium-shade))}@media(max-width:767.98px){.msr-toggle-btn[_ngcontent-%COMP%]{min-height:44px}}']})}}return p})()},60737(j,C,u){u.d(C,{m:()=>Q});var v=u(86330),s=u(22281),e=u(22618),M=u(36069),d=u(591),_=u(10036),t=u(61259),A=u(2313),F=u(68294),x=u(76211),r=u(72730),h=u(22249),S=u(87307),E=u(10909),k=u(38244),p=u(57463),b=u(19730);const i=(o,m)=>m.id;function f(o,m){if(1&o&&(e.j41(0,"ion-col",12),e.nrm(1,"ion-input",21),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.BMQ("readonly",!n.fAllowEditItemNameDescriptionTaxable())}}function l(o,m){if(1&o){const n=e.RV6();e.j41(0,"ion-button",51),e.bIt("click",function(){s.eBV(n);const a=e.XpG(2);return s.Njj(a.fShowIncludedServiceAgreementBody.set(!1))}),e.nrm(1,"ion-icon",52),e.k0s()}}function g(o,m){if(1&o){const n=e.RV6();e.j41(0,"ion-button",51),e.bIt("click",function(){s.eBV(n);const a=e.XpG(2);return s.Njj(a.fShowIncludedServiceAgreementBody.set(!0))}),e.nrm(1,"ion-icon",53),e.k0s()}}function I(o,m){if(1&o){const n=e.RV6();e.j41(0,"ion-row")(1,"ion-col")(2,"ion-button",54),e.bIt("click",function(){s.eBV(n);const a=e.XpG(2);return s.Njj(a.onRemoveIncludedServiceAgreement())}),e.nrm(3,"ion-icon",55),e.EFF(4," Remove "),e.k0s()()()}}function T(o,m){if(1&o&&(e.j41(0,"ion-grid",3)(1,"ion-row",5)(2,"ion-col"),e.nrm(3,"ion-input",56),e.k0s()(),e.j41(4,"ion-row",5)(5,"ion-col"),e.nrm(6,"ion-textarea",57),e.k0s()(),e.j41(7,"ion-row",5)(8,"ion-col")(9,"ion-input",58)(10,"ion-text",25),e.EFF(11,"mo"),e.k0s()()()(),e.j41(12,"ion-row",5)(13,"ion-col"),e.nrm(14,"app-percent-input",59),e.k0s()(),e.j41(15,"ion-row",5)(16,"ion-col"),e.nrm(17,"app-percent-input",60),e.k0s()(),e.j41(18,"ion-row",5)(19,"ion-col",23),e.nrm(20,"app-currency-input",61),e.k0s(),e.j41(21,"ion-col",28)(22,"ion-text"),e.EFF(23),e.k0s()()(),e.j41(24,"ion-row",5)(25,"ion-col",23),e.nrm(26,"app-currency-input",62),e.k0s(),e.j41(27,"ion-col",28)(28,"ion-text"),e.EFF(29),e.k0s()()(),e.j41(30,"ion-row",5)(31,"ion-col",23),e.nrm(32,"app-percent-input",63),e.k0s(),e.j41(33,"ion-col",28),e.EFF(34),e.k0s()(),e.j41(35,"ion-row",35)(36,"ion-col",29)(37,"b"),e.EFF(38,"ISA Total"),e.k0s()(),e.j41(39,"ion-col",33)(40,"ion-text")(41,"b"),e.EFF(42),e.k0s()()()()()),2&o){const n=e.XpG(2);e.R7$(3),e.BMQ("readonly",!n.fAllowEditISA()),e.R7$(3),e.BMQ("readonly",!n.fAllowEditISA()),e.R7$(3),e.BMQ("readonly",!n.fAllowEditISA()),e.R7$(5),e.Y8G("formGroup",n.fg)("fAllowNegative",!1)("fDisable",!n.fAllowEditISA()),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!1)("fDisable",!n.fAllowEditISA()),e.R7$(3),e.Y8G("formGroup",n.fg)("fDisable",!n.fAllowEditISA())("fAllowNegative",!1),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateServiceAgreementCost)),e.R7$(3),e.Y8G("formGroup",n.fg)("fDisable",!n.fAllowEditISA())("fAllowNegative",!1),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateServiceAgreementPrice)),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!1)("fDisable",!n.fAllowEditISA()),e.R7$(2),e.SpI(" ",null!=n.invoiceItem&&n.invoiceItem.fTaxable?n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateServiceAgreementTax):"No Tax"," "),e.R7$(8),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateServiceAgreementTotal))}}function P(o,m){if(1&o){const n=e.RV6();e.j41(0,"ion-button",51),e.bIt("click",function(){s.eBV(n);const a=e.XpG(2);return s.Njj(a.fShowNonTaxableFeeBody.set(!1))}),e.nrm(1,"ion-icon",52),e.k0s()}}function w(o,m){if(1&o){const n=e.RV6();e.j41(0,"ion-button",51),e.bIt("click",function(){s.eBV(n);const a=e.XpG(2);return s.Njj(a.fShowNonTaxableFeeBody.set(!0))}),e.nrm(1,"ion-icon",53),e.k0s()}}function y(o,m){if(1&o&&(e.j41(0,"ion-grid",3)(1,"ion-row",5)(2,"ion-col",23),e.nrm(3,"app-currency-input",64),e.k0s(),e.j41(4,"ion-col",28)(5,"ion-text"),e.EFF(6),e.k0s()()(),e.j41(7,"ion-row",32)(8,"ion-col",29),e.EFF(9),e.k0s(),e.j41(10,"ion-col",33)(11,"ion-text"),e.EFF(12),e.k0s()()(),e.j41(13,"ion-row",65)(14,"ion-col",29)(15,"b"),e.EFF(16,"Non-Taxable Fee Total"),e.k0s()(),e.j41(17,"ion-col",33)(18,"ion-text")(19,"b"),e.EFF(20),e.k0s()()()()()),2&o){const n=e.XpG(2);e.R7$(3),e.Y8G("formGroup",n.fg)("fDisable",!n.fAllowEditNonTaxableFee())("fAllowNegative",!1),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateNonTaxableFee)),e.R7$(3),e.SpI("ISA Discount (",null==n.invoiceItem?null:n.invoiceItem.pcntServiceAgreementInItemDiscount(),"%) "),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateNonTaxableFeeIsaDiscount)),e.R7$(8),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateNonTaxableFeeTotal))}}function B(o,m){if(1&o){const n=e.RV6();e.j41(0,"ion-button",51),e.bIt("click",function(){s.eBV(n);const a=e.XpG(2);return s.Njj(a.fShowPricingAdjustments.set(!1))}),e.nrm(1,"ion-icon",52),e.k0s()}}function D(o,m){if(1&o){const n=e.RV6();e.j41(0,"ion-button",51),e.bIt("click",function(){s.eBV(n);const a=e.XpG(2);return s.Njj(a.fShowPricingAdjustments.set(!0))}),e.nrm(1,"ion-icon",53),e.k0s()}}
1function O(o,m){if(1&o&&(e.j41(0,"ion-row",66)(1,"ion-col"),e.nrm(2,"ion-input",67),e.k0s()()),2&o){const n=e.XpG(3);e.R7$(2),e.BMQ("readonly",!n.fAllowEditAdjustments())}}function N(o,m){if(1&o&&(e.j41(0,"ion-row",68)(1,"ion-col")(2,"b"),e.EFF(3),e.k0s()()(),e.j41(4,"ion-row",66)(5,"ion-col"),e.nrm(6,"ion-input",69),e.k0s()(),e.j41(7,"ion-row",66)(8,"ion-col",29),e.nrm(9,"app-percent-input",70),e.k0s(),e.j41(10,"ion-col",71)(11,"ion-text")(12,"b"),e.EFF(13),e.k0s()(),e.nrm(14,"br"),e.j41(15,"ion-text",72),e.EFF(16),e.k0s()()()),2&o){const n=e.XpG(3);e.R7$(3),e.JRh(n.fg.value.s_adjustment_a_label),e.R7$(3),e.Y8G("value",n.fg.value.s_adjustment_a_label),e.BMQ("readonly",!n.fAllowEditAdjustments()),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!0)("fDisable",!n.fAllowEditAdjustments()),e.R7$(4),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iAdjustmentATotal)),e.R7$(3),e.JRh(null==n.invoiceItem?null:n.invoiceItem.sAdjustmentATotalDiffFromBase(!0,!0))}}function $(o,m){if(1&o&&(e.j41(0,"ion-row",68)(1,"ion-col")(2,"b"),e.EFF(3),e.k0s()()(),e.j41(4,"ion-row",66)(5,"ion-col"),e.nrm(6,"ion-input",73),e.k0s()(),e.j41(7,"ion-row",66)(8,"ion-col",23),e.nrm(9,"app-percent-input",74),e.k0s(),e.j41(10,"ion-col",71)(11,"ion-text")(12,"b"),e.EFF(13),e.k0s()(),e.nrm(14,"br"),e.j41(15,"ion-text",72),e.EFF(16),e.k0s()()()),2&o){const n=e.XpG(3);e.R7$(3),e.JRh(n.fg.value.s_adjustment_b_label),e.R7$(3),e.Y8G("value",n.fg.value.s_adjustment_b_label),e.BMQ("readonly",!n.fAllowEditAdjustments()),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!0)("fDisable",!n.fAllowEditAdjustments()),e.R7$(4),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iAdjustmentBTotal)),e.R7$(3),e.JRh(null==n.invoiceItem?null:n.invoiceItem.sAdjustmentBTotalDiffFromBase(!0,!0))}}function G(o,m){if(1&o&&(e.j41(0,"ion-row",68)(1,"ion-col")(2,"b"),e.EFF(3),e.k0s()()(),e.j41(4,"ion-row",66)(5,"ion-col"),e.nrm(6,"ion-input",75),e.k0s()(),e.j41(7,"ion-row",66)(8,"ion-col",23),e.nrm(9,"app-percent-input",76),e.k0s(),e.j41(10,"ion-col",71)(11,"ion-text")(12,"b"),e.EFF(13),e.k0s()(),e.nrm(14,"br"),e.j41(15,"ion-text",72),e.EFF(16),e.k0s()()()),2&o){const n=e.XpG(3);e.R7$(3),e.JRh(n.fg.value.s_adjustment_c_label),e.R7$(3),e.Y8G("value",n.fg.value.s_adjustment_c_label),e.BMQ("readonly",!n.fAllowEditAdjustments()),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!0)("fDisable",!n.fAllowEditAdjustments()),e.R7$(4),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iAdjustmentCTotal)),e.R7$(3),e.JRh(null==n.invoiceItem?null:n.invoiceItem.sAdjustmentCTotalDiffFromBase(!0,!0))}}function L(o,m){if(1&o&&(e.j41(0,"ion-grid",3),e.nVh(1,O,3,1,"ion-row",66),e.nVh(2,N,17,8),e.nVh(3,$,17,8),e.nVh(4,G,17,8),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.vxM(null!=n.invoiceItem&&n.invoiceItem.fBaseRateEnabled?1:-1),e.R7$(),e.vxM(null!=n.invoiceItem&&n.invoiceItem.fAdjustmentAEnabled?2:-1),e.R7$(),e.vxM(null!=n.invoiceItem&&n.invoiceItem.fAdjustmentBEnabled?3:-1),e.R7$(),e.vxM(null!=n.invoiceItem&&n.invoiceItem.fAdjustmentCEnabled?4:-1)}}function J(o,m){if(1&o&&(e.j41(0,"ion-item")(1,"ion-radio",16)(2,"h3"),e.EFF(3),e.k0s(),e.j41(4,"h1")(5,"b"),e.EFF(6),e.k0s()()()()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("value",n.PricingRateOption.BASE),e.R7$(2),e.JRh(n.fg.value.s_base_rate_label),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateTotal))}}function V(o,m){if(1&o&&(e.j41(0,"ion-item")(1,"ion-radio",16)(2,"h3"),e.EFF(3),e.k0s(),e.j41(4,"h1")(5,"b"),e.EFF(6),e.k0s()(),e.j41(7,"h2",77)(8,"b"),e.EFF(9),e.k0s()()()()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("value",n.PricingRateOption.ADJUSTMENT_A),e.R7$(2),e.JRh(n.fg.value.s_adjustment_a_label),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iAdjustmentATotal)),e.R7$(3),e.JRh(null==n.invoiceItem?null:n.invoiceItem.sAdjustmentATotalDiffFromBase(!0,!0))}}function U(o,m){if(1&o&&(e.j41(0,"ion-item")(1,"ion-radio",16)(2,"h3"),e.EFF(3),e.k0s(),e.j41(4,"h1")(5,"b"),e.EFF(6),e.k0s()(),e.j41(7,"h2",77)(8,"b"),e.EFF(9),e.k0s()()()()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("value",n.PricingRateOption.ADJUSTMENT_B),e.R7$(2),e.JRh(n.fg.value.s_adjustment_b_label),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iAdjustmentBTotal)),e.R7$(3),e.JRh(null==n.invoiceItem?null:n.invoiceItem.sAdjustmentBTotalDiffFromBase(!0,!0))}}function z(o,m){if(1&o&&(e.j41(0,"ion-item")(1,"ion-radio",16)(2,"h3"),e.EFF(3),e.k0s(),e.j41(4,"h1")(5,"b"),e.EFF(6),e.k0s()(),e.j41(7,"h2",77)(8,"b"),e.EFF(9),e.k0s()()()()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("value",n.PricingRateOption.ADJUSTMENT_C),e.R7$(2),e.JRh(n.fg.value.s_adjustment_c_label),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iAdjustmentCTotal)),e.R7$(3),e.JRh(null==n.invoiceItem?null:n.invoiceItem.sAdjustmentCTotalDiffFromBase(!0,!0))}}function Y(o,m){if(1&o&&(e.j41(0,"ion-card")(1,"ion-card-content")(2,"h2",1),e.nrm(3,"ion-icon",22)(4,"br"),e.EFF(5,"Labor "),e.k0s(),e.j41(6,"ion-grid",3)(7,"ion-row",5)(8,"ion-col",23)(9,"ion-input",24)(10,"ion-text",25),e.EFF(11,"hr"),e.k0s()()(),e.j41(12,"ion-col",26)(13,"ion-text"),e.EFF(14,"\xa0"),e.k0s()()(),e.j41(15,"ion-row",5)(16,"ion-col",23),e.nrm(17,"app-currency-input",27),e.k0s(),e.j41(18,"ion-col",28)(19,"ion-text"),e.EFF(20),e.k0s()()(),e.j41(21,"ion-row",5)(22,"ion-col",29),e.nrm(23,"app-percent-input",30),e.k0s(),e.j41(24,"ion-col",28)(25,"ion-text"),e.EFF(26),e.k0s()()(),e.j41(27,"ion-row",5)(28,"ion-col",23),e.nrm(29,"app-margin-selling-rate-input",31),e.k0s(),e.j41(30,"ion-col",28)(31,"ion-text"),e.EFF(32),e.k0s()()(),e.j41(33,"ion-row",32)(34,"ion-col",29),e.EFF(35),e.k0s(),e.j41(36,"ion-col",33)(37,"ion-text"),e.EFF(38),e.k0s()()(),e.j41(39,"ion-row",32)(40,"ion-col",29),e.EFF(41,"Price"),e.k0s(),e.j41(42,"ion-col",33)(43,"ion-text"),e.EFF(44),e.k0s()()(),e.j41(45,"ion-row",5)(46,"ion-col",23),e.nrm(47,"app-percent-input",34),e.k0s(),e.j41(48,"ion-col",28),e.EFF(49),e.k0s()(),e.j41(50,"ion-row",35)(51,"ion-col",29)(52,"b"),e.EFF(53,"Labor Total"),e.k0s()(),e.j41(54,"ion-col",33)(55,"ion-text")(56,"b"),e.EFF(57),e.k0s()()()()()()(),e.j41(58,"ion-card")(59,"ion-card-content")(60,"h2",1),e.nrm(61,"ion-icon",36)(62,"br"),e.EFF(63,"Material "),e.k0s(),e.j41(64,"ion-grid",3)(65,"ion-row",5)(66,"ion-col",23),e.nrm(67,"app-currency-input",37),e.k0s(),e.j41(68,"ion-col",28)(69,"ion-text"),e.EFF(70),e.k0s()()(),e.j41(71,"ion-row",5)(72,"ion-col",23),e.nrm(73,"app-percent-input",38),e.k0s(),e.j41(74,"ion-col",28)(75,"ion-text"),e.EFF(76),e.k0s()()(),e.j41(77,"ion-row",32)(78,"ion-col",29),e.EFF(79,"Total Cost"),e.k0s(),e.j41(80,"ion-col",33)(81,"ion-text"),e.EFF(82),e.k0s()()(),e.j41(83,"ion-row",5)(84,"ion-col",23),e.nrm(85,"app-percent-input",39),e.k0s(),e.j41(86,"ion-col",28)(87,"ion-text"),e.EFF(88),e.k0s()()(),e.j41(89,"ion-row",5)(90,"ion-col",23),e.nrm(91,"app-margin-selling-rate-input",40),e.k0s(),e.j41(92,"ion-col",28)(93,"ion-text"),e.EFF(94),e.k0s()()(),e.j41(95,"ion-row",32)(96,"ion-col",29),e.EFF(97),e.k0s(),e.j41(98,"ion-col",33)(99,"ion-text"),e.EFF(100),e.k0s()()(),e.j41(101,"ion-row",32)(102,"ion-col",29),e.EFF(103,"Price"),e.k0s(),e.j41(104,"ion-col",33),e.EFF(105),e.k0s()(),e.j41(106,"ion-row",5)(107,"ion-col",23),e.nrm(108,"app-percent-input",41),e.k0s(),e.j41(109,"ion-col",28)(110,"ion-text"),e.EFF(111),e.k0s()()(),e.j41(112,"ion-row",35)(113,"ion-col",29)(114,"b"),e.EFF(115,"Material Total"),e.k0s()(),e.j41(116,"ion-col",33)(117,"ion-text")(118,"b"),e.EFF(119),e.k0s()()()()()()(),e.j41(120,"ion-card")(121,"ion-card-content")(122,"ion-grid",42)(123,"ion-row")(124,"ion-col",43),e.EFF(125,"\xa0"),e.k0s(),e.j41(126,"ion-col",44)(127,"h2",1),e.nrm(128,"ion-icon",17)(129,"br"),e.EFF(130,"Included"),e.nrm(131,"br"),e.EFF(132,"Service Agreement (ISA) "),e.k0s()(),e.j41(133,"ion-col",45),e.nVh(134,l,2,0,"ion-button",46)(135,g,2,0,"ion-button",46),e.k0s()(),e.nVh(136,I,5,0,"ion-row"),e.k0s(),e.nVh(137,T,43,22,"ion-grid",3),e.k0s()(),e.j41(138,"ion-card")(139,"ion-card-content")(140,"ion-grid",42)(141,"ion-row")(142,"ion-col",43),e.EFF(143,"\xa0"),e.k0s(),e.j41(144,"ion-col",44)(145,"h2",1),e.nrm(146,"ion-icon",47)(147,"br"),e.EFF(148,"Non-Taxable Fee "),e.k0s()(),e.j41(149,"ion-col",45),e.nVh(150,P,2,0,"ion-button",46)(151,w,2,0,"ion-button",46),e.k0s()()(),e.nVh(152,y,21,7,"ion-grid",3),e.k0s()(),e.j41(153,"ion-card")(154,"ion-card-content")(155,"ion-grid",42)(156,"ion-row")(157,"ion-col",43),e.EFF(158,"\xa0"),e.k0s(),e.j41(159,"ion-col",44)(160,"h2",1),e.nrm(161,"ion-icon",48)(162,"br"),e.EFF(163,"Pricing Adjustments "),e.k0s()(),e.j41(164,"ion-col",45),e.nVh(165,B,2,0,"ion-button",46)(166,D,2,0,"ion-button",46),e.k0s()()(),e.nVh(167,L,5,4,"ion-grid",3),e.k0s()(),e.j41(168,"ion-card")(169,"ion-card-content")(170,"h2",1),e.nrm(171,"ion-icon",49)(172,"br"),e.EFF(173,"Select Price "),e.k0s(),e.j41(174,"ion-list")(175,"ion-radio-group",50),e.nVh(176,J,7,3,"ion-item"),e.nV
1h(177,V,10,4,"ion-item"),e.nVh(178,U,10,4,"ion-item"),e.nVh(179,z,10,4,"ion-item"),e.k0s()()()()),2&o){const n=e.XpG();e.R7$(9),e.BMQ("readonly",!n.fAllowEditLaborHours()),e.R7$(8),e.Y8G("formGroup",n.fg)("fDisable",!n.fAllowEditLaborRateMarginTax())("fAllowNegative",!1),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateLaborCost)),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!1)("fDisable",!n.fAllowEditBookMargin()),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateLaborMarginBook())),e.R7$(3),e.Y8G("formGroup",n.fg)("fDisable",!n.fAllowEditLaborRateMarginTax())("iBaseRatePennies",null==n.invoiceItem?null:n.invoiceItem.iBaseRateLaborCost),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateLaborMarginCustom())),e.R7$(3),e.SpI("ISA Discount (",null==n.invoiceItem?null:n.invoiceItem.pcntServiceAgreementInItemDiscount(),"%) "),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateLaborIsaDiscount)),e.R7$(6),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateLaborPrice)),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!1)("fDisable",!n.fAllowEditLaborRateMarginTax()),e.R7$(2),e.SpI(" ",null!=n.invoiceItem&&n.invoiceItem.fTaxable?n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateLaborTax):"No Tax"," "),e.R7$(8),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateLaborTotal)),e.R7$(10),e.Y8G("formGroup",n.fg)("fDisable",!n.fAllowEditMaterialCost())("fAllowNegative",!1),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialCost)),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!1)("fDisable",!n.fAllowEditMaterialTax()),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialTaxC)),e.R7$(6),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialCostWTaxC)),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!1)("fDisable",!n.fAllowEditBookMargin()),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialMarginBook())),e.R7$(3),e.Y8G("formGroup",n.fg)("fDisable",!n.fAllowEditMaterialMargin())("iBaseRatePennies",null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialCost),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialMarginCustom())),e.R7$(3),e.SpI("ISA Discount (",null==n.invoiceItem?null:n.invoiceItem.pcntServiceAgreementInItemDiscount(),"%) "),e.R7$(3),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialIsaDiscount)),e.R7$(5),e.SpI(" ",n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialPrice)," "),e.R7$(3),e.Y8G("formGroup",n.fg)("fAllowNegative",!1)("fDisable",!n.fAllowEditMaterialTax()),e.R7$(3),e.SpI("",null!=n.invoiceItem&&n.invoiceItem.fTaxable?n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialTaxP):"No Tax"," "),e.R7$(8),e.JRh(n.CurrencyUtil.sPenniesToMoney(null==n.invoiceItem?null:n.invoiceItem.iBaseRateMaterialTotal)),e.R7$(15),e.vxM(n.fShowIncludedServiceAgreementBody()?134:135),e.R7$(2),e.vxM(n.fHasRemovableIncludedServiceAgreement()?136:-1),e.R7$(),e.vxM(n.fShowIncludedServiceAgreementBody()?137:-1),e.R7$(13),e.vxM(n.fShowNonTaxableFeeBody()?150:151),e.R7$(2),e.vxM(n.fShowNonTaxableFeeBody()?152:-1),e.R7$(13),e.vxM(n.fShowPricingAdjustments()?165:166),e.R7$(2),e.vxM(n.fShowPricingAdjustments()?167:-1),e.R7$(8),e.Y8G("value",null==n.invoiceItem?null:n.invoiceItem.nInvoiceRateSource),e.R7$(),e.vxM(null!=n.invoiceItem&&n.invoiceItem.fBaseRateEnabled?176:-1),e.R7$(),e.vxM(null!=n.invoiceItem&&n.invoiceItem.fAdjustmentAEnabled?177:-1),e.R7$(),e.vxM(null!=n.invoiceItem&&n.invoiceItem.fAdjustmentBEnabled?178:-1),e.R7$(),e.vxM(null!=n.invoiceItem&&n.invoiceItem.fAdjustmentCEnabled?179:-1)}}function q(o,m){if(1&o&&(e.j41(0,"ion-item",15)(1,"ion-radio",16)(2,"h3"),e.EFF(3),e.k0s(),e.j41(4,"p"),e.EFF(5),e.k0s()()()),2&o){const n=m.$implicit;e.R7$(),e.Y8G("value",n.hvacrSystemId),e.R7$(2),e.JRh(null==n.hvacrSystem?null:n.hvacrSystem.sName),e.R7$(2),e.JRh(null==n.hvacrSystem?null:n.hvacrSystem.sType())}}function X(o,m){if(1&o&&(e.j41(0,"ion-item",15)(1,"ion-radio",16)(2,"h3"),e.EFF(3),e.k0s(),e.j41(4,"p"),e.EFF(5),e.k0s()()()),2&o){const n=m.$implicit;e.R7$(),e.Y8G("value",n.id),e.R7$(2),e.JRh(null==n?null:n.sName),e.R7$(2),e.JRh(n.sType())}}function K(o,m){if(1&o&&(e.j41(0,"h2",78),e.nrm(1,"ion-icon",13)(2,"br"),e.EFF(3,"Serviced HVACR Equipment "),e.k0s(),e.j41(4,"ion-list")(5,"ion-radio-group",79)(6,"ion-item",15)(7,"ion-radio",16)(8,"h3"),e.EFF(9,"None"),e.k0s()()(),e.Z7z(10,X,6,3,"ion-item",15,i),e.k0s()()),2&o){const n=e.XpG();e.R7$(5),e.Y8G("value",null==n.invoiceItem?null:n.invoiceItem.hvacrEquipmentId),e.R7$(2),e.Y8G("value",null),e.R7$(3),e.Dyx(n.get
1SelectedSystemEquipment())}}function H(o,m){1&o&&(e.j41(0,"div",19)(1,"ion-text",72),e.EFF(2,"Complete all required information to continue."),e.k0s()())}function W(o,m){if(1&o){const n=e.RV6();e.j41(0,"ion-grid",20)(1,"ion-row")(2,"ion-col")(3,"ion-button",80),e.bIt("click",function(){s.eBV(n);const a=e.XpG();return s.Njj(a.onCancelClick())}),e.nrm(4,"ion-icon",55),e.EFF(5," Cancel "),e.k0s()(),e.j41(6,"ion-col")(7,"ion-button",81),e.nrm(8,"ion-icon",82),e.EFF(9),e.k0s()()()()}if(2&o){const n=e.XpG();e.R7$(7),e.Y8G("disabled",n.fSubmitting||!n.fIsServiceAgreement&&n.fg.invalid),e.R7$(2),e.SpI(" ",n.sSubmitButtonLabel," ")}}let Q=(()=>{class o extends k.q{constructor(n){super(),this._priceBookPriceTierRepo=n,this.sSubmitButtonLabel="Save",this.invoice=null,this.invoiceItem=null,this.fSubmitting=!1,this.fHideActions=!1,this.invoiceItemChange=new e.bkB,this.submitted=new e.bkB,this.canceled=new e.bkB,this.fShowIncludedServiceAgreementBody=(0,s.vPA)(!1),this.fShowNonTaxableFeeBody=(0,s.vPA)(!1),this.fShowPricingAdjustments=(0,s.vPA)(!1),this.lastEmittedInvoiceItem=null,this.iInvoiceItemEmitSeq=0,this.fSubmitStarted=!1,(0,M.d)({informationOutline:d.Hzj,buildOutline:d.xfo,cubeOutline:d.a7r,readerOutline:d.mIG,ellipseOutline:d.zF,chevronExpandOutline:d.EYr,pricetagsOutline:d.f4,chevronUpOutline:d.PbN,chevronDownOutline:d.SJM,closeOutline:d.xfX,checkmarkOutline:d.g1L,shapesOutline:d.hFJ}),this.fg=new t.gE({s_base_rate_label:new t.MJ(null,{updateOn:"change",validators:[t.k0.required,t.k0.maxLength(64)]}),c_quantity:new t.MJ(1,{updateOn:"change",validators:[t.k0.required,t.k0.min(1),t.k0.max(1e4)]}),s_item_number:new t.MJ(null,{updateOn:"change",validators:[t.k0.required,t.k0.maxLength(64)]}),s_name:new t.MJ(null,{updateOn:"change",validators:[t.k0.required,t.k0.maxLength(255)]}),s_description:new t.MJ(null,{updateOn:"change",validators:[t.k0.maxLength(65535)]}),f_taxable:new t.MJ(!0,{updateOn:"change",validators:[t.k0.required]}),s_non_taxable_reason:new t.MJ(null,{updateOn:"change",validators:[t.k0.maxLength(128)]}),d_base_rate_labor:new t.MJ(100,{updateOn:"change",validators:[t.k0.required,t.k0.min(0),t.k0.max(1e4)]}),d_labor_hours:new t.MJ(1,{updateOn:"change",validators:[t.k0.required,t.k0.min(0),t.k0.max(1e4)]}),pcnt_base_rate_labor_tax:new t.MJ(5,{updateOn:"change",validators:[t.k0.required,t.k0.min(0),t.k0.max(100)]}),pcnt_base_rate_labor_margin_book:new t.MJ(0,{updateOn:"change",validators:[t.k0.min(0),t.k0.max(100)]}),pcnt_base_rate_labor_margin_custom:new t.MJ(20,{updateOn:"change",validators:[t.k0.min(0),t.k0.max(100)]}),d_base_rate_material_cost:new t.MJ(100,{updateOn:"change",validators:[t.k0.required,t.k0.min(0),t.k0.max(1e7)]}),pcnt_base_rate_material_tax_c:new t.MJ(5,{updateOn:"change",validators:[t.k0.required,t.k0.min(0),t.k0.max(100)]}),pcnt_base_rate_material_tax_p:new t.MJ(5,{updateOn:"change",validators:[t.k0.required,t.k0.min(0),t.k0.max(100)]}),pcnt_base_rate_material_margin_book:new t.MJ(0,{updateOn:"change",validators:[t.k0.min(0),t.k0.max(100)]}),pcnt_base_rate_material_margin_custom:new t.MJ(20,{updateOn:"change",validators:[t.k0.min(0),t.k0.max(100)]}),s_service_agreement_name:new t.MJ(null,{updateOn:"change",validators:[t.k0.maxLength(255)]}),s_service_agreement_description:new t.MJ(null,{updateOn:"change",validators:[t.k0.maxLength(65535)]}),c_service_agreement_duration_months:new t.MJ(0,{updateOn:"change",validators:[t.k0.min(0),t.k0.max(360)]}),pcnt_service_agreement_in_item_discount:new t.MJ(0,{updateOn:"change",validators:[t.k0.min(-99),t.k0.max(99)]}),pcnt_service_agreement_discount:new t.MJ(0,{updateOn:"change",validators:[t.k0.min(-99),t.k0.max(99)]}),d_base_rate_service_agreement_cost:new t.MJ(0,{updateOn:"change",validators:[t.k0.min(0),t.k0.max(1e7)]}),d_base_rate_service_agreement_price:new t.MJ(0,{updateOn:"change",validators:[t.k0.min(0),t.k0.max(1e7)]}),pcnt_base_rate_service_agreement_tax:new t.MJ(0,{updateOn:"change",validators:[t.k0.min(0),t.k0.max(99)]}),d_base_rate_non_taxable_fee:new t.MJ(20,{updateOn:"change",validators:[t.k0.required,t.k0.min(0),t.k0.max(1e7)]}),s_adjustment_a_label:new t.MJ("Adjustment A",{updateOn:"change",validators:[t.k0.required,t.k0.maxLength(64)]}),s_adjustment_b_label:new t.MJ("Adjustment B",{updateOn:"change",validators:[t.k0.required,t.k0.maxLength(64)]}),s_adjustment_c_label:new t.MJ("Adjustment C",{updateOn:"change",validators:[t.k0.required,t.k0.maxLength(64)]}),pcnt_adjustment_a_rate:new t.MJ(-5,{updateOn:"change",validators:[t.k0.min(-100),t.k0.max(100)]}),pcnt_adjustment_b_rate:new t.MJ(-10,{updateOn:"change",validators:[t.k0.min(-100),t.k0.max(100)]}),pcnt_adjustment_c_rate:new t.MJ(-15,{updateOn:"change",validators:[t.k0.min(-100),t.k0.max(100)]}),n_invoice_rate_source:new t.MJ(r.wSG.BASE,{updateOn:"change"}),hvacr_system_id:new t.MJ(null,{updateOn:"change"}),hvacr_equipment_id:new t.MJ(null,{updateOn:"change"})}),this.fIsServiceAgreement&&(0,h.gM)(this.fg,{fIsServiceAgreement:!0,fItemIsServiceAgreement:!1,nPricingSource:r.U7C.SERVICE_AGREEMENT,fPriceBookItemCustomized:!1,sRateSourceControlName:"n_invoice_rate_source"})}ngOnInit(){var n=()=>super.ngOnInit,c=this;return(0,v.A)(function*(){yield n().call(c),c.fg.valueChanges.pipe((0,F.B)(300),(0,x.Q)(c.unsubscribe$)).subscribe((0,v.A)(function*(){yield c.updateInvoiceItemFromFg(
1)}))})()}ngOnChanges(n){var c=this;return(0,v.A)(function*(){n.fSubmitting&&n.fSubmitting.previousValue&&!c.fSubmitting&&(c.fSubmitStarted=!1),null==c.lastEmittedInvoiceItem||(n.invoiceItem?n.invoiceItem.currentValue:c.invoiceItem)!==c.lastEmittedInvoiceItem?(n.invoiceItem||n.fIsServiceAgreement)&&(yield c.updateFgFromInvoiceItem(!1),c.applyContextualValidators()):n.fIsServiceAgreement&&c.applyContextualValidators()})()}fBaseRateEnabled(){return this.invoiceItem?.fBaseRateEnabled??!0}pricingSource(){return this.invoiceItem?.pricingSource()??new r.U7C(r.U7C.MANUAL)}fAllowEditIfSetToCustomized(){if(!this.invoiceItem)return!1;const n=this.pricingSource();return!n.is(r.U7C.PRICE_BOOK_ITEM)&&!n.is(r.U7C.SERVICE_AGREEMENT)||this.invoiceItem.fPriceBookItemCustomized}fAllowEditItemNameDescriptionTaxable(){return this.fAllowEditIfSetToCustomized()}fAllowEditLaborHours(){return this.fAllowEditIfSetToCustomized()}fAllowEditBookMargin(){return!!this.invoiceItem&&this.pricingSource().notIn([r.U7C.PRICE_BOOK,r.U7C.PRICE_BOOK_ITEM,r.U7C.SERVICE_AGREEMENT])}fAllowEditLaborRateMarginTax(){return!this.pricingSource().is(r.U7C.PRICE_BOOK)&&this.fAllowEditIfSetToCustomized()}fAllowEditMaterialCost(){return this.fAllowEditIfSetToCustomized()}fAllowEditMaterialMargin(){return!this.pricingSource().is(r.U7C.PRICE_BOOK)&&this.fAllowEditIfSetToCustomized()}fAllowEditMaterialTax(){return!this.pricingSource().is(r.U7C.PRICE_BOOK)&&this.fAllowEditIfSetToCustomized()}fAllowEditISA(){return this.fAllowEditIfSetToCustomized()}fHasRemovableIncludedServiceAgreement(){return!(this.fIsServiceAgreement||!this.invoiceItem)&&(this.invoiceItem.fHasIncludedServiceAgreement()||this.invoiceItem.fIncludesServiceAgreement()||!!this.invoiceItem.sServiceAgreementName)}onRemoveIncludedServiceAgreement(){var n=this;return(0,v.A)(function*(){n.fg.patchValue({s_service_agreement_name:null,s_service_agreement_description:null,c_service_agreement_duration_months:0,pcnt_service_agreement_in_item_discount:0,pcnt_service_agreement_discount:0,d_base_rate_service_agreement_cost:0,d_base_rate_service_agreement_price:0,pcnt_base_rate_service_agreement_tax:0},{emitEvent:!1}),n.fShowIncludedServiceAgreementBody.set(!1),yield n.updateInvoiceItemFromFg()})()}fAllowEditNonTaxableFee(){return this.fAllowEditIfSetToCustomized()}fAllowEditAdjustments(){return!this.pricingSource().is(r.U7C.PRICE_BOOK)&&this.fAllowEditIfSetToCustomized()}applyContextualValidators(){(0,h.gM)(this.fg,{fIsServiceAgreement:this.fIsServiceAgreement,fItemIsServiceAgreement:this.invoiceItem?.fIsServiceAgreement()??!1,nPricingSource:this.invoiceItem?.nPricingSource??r.U7C.MANUAL,fPriceBookItemCustomized:this.invoiceItem?.fPriceBookItemCustomized??!1,sRateSourceControlName:"n_invoice_rate_source"})}dBaseRateLabor(){return r.Sen.cleanAndParseFloat(this.fg.get("d_base_rate_labor").value)??0}dLaborHours(){return r.Sen.cleanAndParseFloat(this.fg.get("d_labor_hours").value)??0}dBaseRateLaborMarginBook(){const n=this.fg.get("pcnt_base_rate_labor_margin_book").value;return n?(r.Sen.cleanAndParseFloat(n)??0)/100:null}dBaseRateLaborMarginCustom(){const n=this.fg.get("pcnt_base_rate_labor_margin_custom").value;return n?(r.Sen.cleanAndParseFloat(n)??0)/100:null}dBaseRateLaborTax(){return(r.Sen.cleanAndParseFloat(this.fg.get("pcnt_base_rate_labor_tax").value)??0)/100}dBaseRateMaterialCost(){return r.Sen.cleanAndParseFloat(this.fg.get("d_base_rate_material_cost").value)??0}dBaseRateMaterialMarginBook(){const n=this.fg.get("pcnt_base_rate_material_margin_book").value;return n?(r.Sen.cleanAndParseFloat(n)??0)/100:null}dBaseRateMaterialMarginCustom(){const n=this.fg.get("pcnt_base_rate_material_margin_custom").value;return n?(r.Sen.cleanAndParseFloat(n)??0)/100:null}dBaseRateMaterialTaxC(){return(r.Sen.cleanAndParseFloat(this.fg.get("pcnt_base_rate_material_tax_c").value)??0)/100}dBaseRateMaterialTaxP(){return(r.Sen.cleanAndParseFloat(this.fg.get("pcnt_base_rate_material_tax_p").value)??0)/100}sServiceAgreementName(){return this.fg.get("s_service_agreement_name").value}sServiceAgreementDescription(){return this.fg.get("s_service_agreement_description").value}cServiceAgreementDurationMonths(){return r.Sen.cleanAndParseInt(this.fg.get("
1c_service_agreement_duration_months").value)??0}dServiceAgreementDiscount(){return-1*Math.abs((r.Sen.cleanAndParseFloat(this.fg.get("pcnt_service_agreement_discount").value)??0)/100)}dServiceAgreementInItemDiscount(){return-1*Math.abs((r.Sen.cleanAndParseFloat(this.fg.get("pcnt_service_agreement_in_item_discount").value)??0)/100)}dBaseRateServiceAgreementCost(){return r.Sen.cleanAndParseFloat(this.fg.get("d_base_rate_service_agreement_cost").value)??0}dBaseRateServiceAgreementPrice(){return r.Sen.cleanAndParseFloat(this.fg.get("d_base_rate_service_agreement_price").value)??0}dBaseRateServiceAgreementTax(){return Math.abs((r.Sen.cleanAndParseFloat(this.fg.get("pcnt_base_rate_service_agreement_tax").value)??0)/100)}dBaseRateNonTaxableFee(){return r.Sen.cleanAndParseFloat(this.fg.get("d_base_rate_non_taxable_fee").value)??0}fAdjustmentAEnabled(){return this.invoiceItem?.fAdjustmentAEnabled??!0}fAdjustmentBEnabled(){return this.invoiceItem?.fAdjustmentBEnabled??!0}fAdjustmentCEnabled(){return this.invoiceItem?.fAdjustmentCEnabled??!0}dAdjustmentARate(){return(r.Sen.cleanAndParseFloat(this.fg.get("pcnt_adjustment_a_rate").value)??0)/100}dAdjustmentBRate(){return(r.Sen.cleanAndParseFloat(this.fg.get("pcnt_adjustment_b_rate").value)??0)/100}dAdjustmentCRate(){return(r.Sen.cleanAndParseFloat(this.fg.get("pcnt_adjustment_c_rate").value)??0)/100}getSelectedSystemEquipment(){return this.invoiceItem?.invoice?.job?.arrJobHvacrSystem?.find(c=>c.hvacrSystemId===this.fg.get("hvacr_system_id").value)?.hvacrSystem?.arrHvacrEquipment()||[]}updateFgFromInvoiceItem(){var n=this;return(0,v.A)(function*(c=!1){if(!n.invoiceItem)return;const a=n.invoiceItem.nPricingSource===r.U7C.SERVICE_AGREEMENT,R=n.invoiceItem.priceBookPriceTier;n.fg.patchValue({s_base_rate_label:n.invoiceItem.sBaseRateLabel,c_quantity:n.invoiceItem.cQuantity,s_item_number:n.invoiceItem.sItemNumber,s_name:n.invoiceItem.sName,s_description:n.invoiceItem.sDescription,f_taxable:n.invoiceItem.fTaxable,s_non_taxable_reason:n.invoiceItem.sNonTaxableReason,s_service_agreement_name:n.invoiceItem.sServiceAgreementName,s_service_agreement_description:n.invoiceItem.sServiceAgreementDescription,c_service_agreement_duration_months:n.invoiceItem.cServiceAgreementDurationMonths,pcnt_service_agreement_in_item_discount:Math.abs(n.invoiceItem.pcntServiceAgreementInItemDiscount()),pcnt_service_agreement_discount:Math.abs(n.invoiceItem.pcntServiceAgreementDiscount()),d_base_rate_service_agreement_cost:n.invoiceItem.dBaseRateServiceAgreementCost(),d_base_rate_service_agreement_price:n.invoiceItem.dBaseRateServiceAgreementPrice(),pcnt_base_rate_service_agreement_tax:n.invoiceItem.pcntBaseRateServiceAgreementTax(),...a?{hvacr_system_id:n.invoiceItem.hvacrSystemId,hvacr_equipment_id:n.invoiceItem.hvacrEquipmentId}:{d_base_rate_labor:n.invoiceItem.dBaseRateLabor(),d_labor_hours:n.invoiceItem.dLaborHours,pcnt_base_rate_labor_tax:n.invoiceItem.pcntBaseRateLaborTax(),pcnt_base_rate_labor_margin_book:n.invoiceItem.pcntBaseRateLaborMarginBook(),pcnt_base_rate_labor_margin_custom:n.invoiceItem.pcntBaseRateLaborMarginCustom()??n.invoiceItem.pcntBaseRateLaborMarginBook(),d_base_rate_material_cost:n.invoiceItem.dBaseRateMaterialCost(),pcnt_base_rate_material_tax_c:n.invoiceItem.pcntBaseRateMaterialTaxC(),pcnt_base_rate_material_tax_p:n.invoiceItem.pcntBaseRateMaterialTaxP(),pcnt_base_rate_material_margin_book:n.invoiceItem.pcntBaseRateMaterialMarginBook(),pcnt_base_rate_material_margin_custom:n.invoiceItem.pcntBaseRateMaterialMarginCustom()??n.invoiceItem.pcntBaseRateMaterialMarginBook(),d_base_rate_non_taxable_fee:n.invoiceItem.dBaseRateNonTaxableFee(),s_adjustment_a_label:(0,r.MyZ)(n.invoiceItem.sAdjustmentALabel,R?.sAdjustALabel,"Adjustment A"),s_adjustment_b_label:(0,r.MyZ)(n.invoiceItem.sAdjustmentBLabel,R?.sAdjustBLabel,"Adjustment B"),s_adjustment_c_label:(0,r.MyZ)(n.invoiceItem.sAdjustmentCLabel,R?.sAdjustCLabel,"Adjustment C"),pcnt_adjustment_a_rate:n.invoiceItem.pcntAdjustmentARate(),pcnt_adjustment_b_rate:n.invoiceItem.pcntAdjustmentBRate(),pcnt_adjustment_c_rate:n.invoiceItem.pcntAdjustmentCRate(),n_invoice_rate_source:n.invoiceItem.nInvoiceRateSource,hvacr_system_id:n.invoiceItem.hvacrSystemId,hvacr_equipment_id:n.invoiceItem.hvacrEquipmentId}},{emitEvent:c})}).apply(this,arguments)}flushPendingChanges(){var n=this;return(0,v.A)(function*(){return yield n.updateInvoiceItemFromFg(
1),n.lastEmittedInvoiceItem})()}updateInvoiceItemFromFg(){var n=this;return(0,v.A)(function*(){if(!n.invoiceItem||!n.invoice)return;const c=++n.iInvoiceItemEmitSeq,a=new r.rIH;yield a.setAttributes(n.invoiceItem.toObject(),!0),c===n.iInvoiceItemEmitSeq&&(a.setRelationsFromObj(n.invoiceItem),a.setAndCalculate(n.fg.get("s_item_number").value,n.fg.get("s_name").value,n.fg.get("s_description").value,r.HBe.parseBool(n.fg.get("f_taxable").value??!0),n.fg.get("s_non_taxable_reason").value,n.fg.get("s_base_rate_label").value,n.dBaseRateLabor(),n.dLaborHours(),n.dBaseRateLaborMarginBook(),n.dBaseRateLaborMarginCustom(),n.dBaseRateLaborTax(),n.dBaseRateMaterialCost(),n.dBaseRateMaterialTaxC(),n.dBaseRateMaterialMarginBook(),n.dBaseRateMaterialMarginCustom(),n.dBaseRateMaterialTaxP(),n.sServiceAgreementName(),n.sServiceAgreementDescription(),n.cServiceAgreementDurationMonths(),n.dServiceAgreementInItemDiscount(),n.dServiceAgreementDiscount(),n.dBaseRateServiceAgreementCost(),n.dBaseRateServiceAgreementPrice(),n.dBaseRateServiceAgreementTax(),n.dBaseRateNonTaxableFee(),n.fg.get("s_adjustment_a_label").value,n.dAdjustmentARate(),n.fg.get("s_adjustment_b_label").value,n.dAdjustmentBRate(),n.fg.get("s_adjustment_c_label").value,n.dAdjustmentCRate(),new r.wSG(n.fg.get("n_invoice_rate_source").value),n.fg.get("hvacr_system_id").value,
1n.fg.get("hvacr_equipment_id").value,r.Sen.parseNumber(n.fg.get("c_quantity").value)??1),console.log("setInvoiceItemFromFg newInvoiceItem: ",a),n.lastEmittedInvoiceItem=a,n.invoiceItemChange.emit(a))})()}onSubmitAsync(){var n=this;return(0,v.A)(function*(){if(!n.fSubmitting&&!n.fSubmitStarted){if(n.fSubmitStarted=!0,n.fIsServiceAgreement)return yield n.updateInvoiceItemFromFg(),void n.submitted.emit();if(n.fg.invalid)return n.fSubmitStarted=!1,void n.logFormValidationErrors(n.fg);if(!n.invoice||!n.invoiceItem)return n.fSubmitStarted=!1,void console.error("Invoice or InvoiceItem is not set.");yield n.updateInvoiceItemFromFg(),n.submitted.emit()}})()}onCancelClick(){var n=this;return(0,v.A)(function*(){yield n.updateFgFromInvoiceItem(),n.applyContextualValidators(),n.canceled.emit()})()}static{this.\u0275fac=function(c){return new(c||o)(e.rXU(b.cDc))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["app-invoice-item-form"]],inputs:{sSubmitButtonLabel:"sSubmitButtonLabel",invoice:"invoice",invoiceItem:"invoiceItem",fIsServiceAgreement:"fIsServiceAgreement",fSubmitting:"fSubmitting",fHideActions:"fHideActions"},outputs:{invoiceItemChange:"invoiceItemChange",submitted:"submitted",canceled:"canceled"},features:[e.Vt3,e.OA$],decls:50,vars:14,consts:[[3,"ngSubmit","formGroup"],[1,"ion-text-center","ion-no-margin",2,"font-weight","bold","margin-bottom","20px"],["name","information-outline","size","large"],[1,"ion-no-padding"],["type","text","label","Quantity","autocomplete","on","autocorrect","on","errorText","Required","formControlName","c_quantity",1,"ion-text-end"],[1,"ion-justify-content-center","ion-align-items-center"],["type","text","label","Item Number","maxlength","64","autocomplete","on","autocorrect","on","errorText","Required","formControlName","s_item_number",1,"ion-text-end"],["type","text","label","Name","maxlength","255","autocomplete","on","autocorrect","on","errorText","Required","formControlName","s_name",1,"ion-text-end"],["labelPlacement","stacked","label","Description","formControlName","s_description"],[1,"ion-align-items-center","ion-margin-top"],["size-xs","12","size-md","2"],["formControlName","f_taxable","justify","space-between",1,"ion-padding-bottom",3,"checked"],["size-xs","12","size-md","10",1,"pl1"],["name","shapes-outline","size","large"],["formControlName","hvacr_system_id",3,"value"],["lines","full"],["justify","space-between",3,"value"],["name","reader-outline","size","large"],[3,"invoiceItem"],[1,"ion-text-center","ion-margin-top"],[1,"ion-margin-top"],["type","text","label","Non-Taxable Reason","counter","true","maxlength","128","autocomplete","on","autocorrect","on","errorText","Required","formControlName","s_non_taxable_reason",1,"ion-text-end"],["name","build-outline","size","large"],["size","8","size-xl","9"],["type","text","inputmode","numeric","label","Hours","errorText","Required","formControlName","d_labor_hours",1,"ion-text-end"],["slot","end"],["size","4","size-xl","3"],["sFormControlName","d_base_rate_labor","sLabelPosition","start","sFontSize","15px","sLabel","Rate","sAlignInput","end",3,"formGroup","fDisable","fAllowNegative"],["size","4","size-xl","3",1,"ion-text-end",2,"padding-bottom","6px"],["size","8","size-xl","9",1,"ion-text-end"],["sFormControlName","pcnt_base_rate_labor_margin_book","sLabel","Book Margin","sLabelPosition","start","sAlignInput","end","sFontSize","15px",3,"formGroup","fAllowNegative","fDisable"],["sFormControlName","pcnt_base_rate_labor_margin_custom","sLabel","Custom Margin","sLabelPosition","start","sAlignInput","end","sFontSize","15px",3,"formGroup","fDisable","iBaseRatePennies"],[1,"ion-justify-content-center","ion-align-items-center","ion-padding-top","ion-padding-bottom"],["size","4","size-xl","3",1,"ion-text-end"],["sFormControlName","pcnt_base_rate_labor_tax","sLabel","Tax","sLabelPosition","start","sAlignInput","end","sFontSize","15px",3,"formGroup","fAllowNegative","fDisable"],[1,"ion-justify-content-center","ion-align-items-center","ion-padding-top"],["name","cube-outline","size","large"],["sFormControlName","d_base_rate_material_cost","sLabel","Cost","sLabelPosition","start","sFontSize","15px","sAlignInput","end",3,"formGroup","fDisable","fAllowNegative"],["sFormControlName","pcnt_base_rate_material_tax_c","sLabel","Tax on Cost","sLabelPosition","start","sAlignInput","end","sFontSize","15px",3,"formGroup","fAllowNegative","fDisable"],["sFormControlName","pcnt_base_rate_material_margin_book","sLabel","Book Margin","sLabelPosition","start","sAlignInput","end","sFontSize","15px",3,"formGroup","fAllowNegative","fDisable"],["sFormControlName","pcnt_base_rate_material_margin_custom","sLabel","Custom Margin","sLabelPosition","start","sAlignInput","end","sFontSize","15px",3,"formGroup","fDisable","iBaseRatePennies"],["sFormControlName","pcnt_base_rate_material_tax_p","sLabel","Tax on Price","sLabelPosition","start","sAlignInput","end","sFontSize","15px",3,"formGroup","fAllowNegative","fDisable"],[1,"ion-no-margin","ion-no-padding"],["size-xs","2"],["size-xs","8"],["size-xs","2",1,"ion-text-end"],["fill","outline"],["name","ellipse-outline","size","large"],["name","chevron-expand-outline","size","large"],["name","pricetags-outline","size","large"],["formControlName","n_invoice_rate_source",3,"value"],["fill","outline",3,"click"],["slot","icon-only","name","chevron-up-outline"],["slot","icon-only","name","chevron-down-outline"],["expand","block","fill","outline","color","danger",3,"click"],["name","close-outline","slot","start"],["type","text","label","Name","autocomplete","on","autocorrect","on","errorText","Required","formControlName","s_service_agreement_name",1,"ion-text-end"],["labelPlacement","stacked","label","Description","formControlName","s_service_agreement_description"],["type","text","label","Duration (Months)","errorText","Required","formControlName","c_service_agreement_duration_months",1,"ion-text-end"],["sFormControlName","pcnt_service_agreement_in_
1item_discount","sLabel","In-Item Discount","sLabelPosition","start","sAlignInput","end","sFontSize","15px",3,"formGroup","fAllowNegative","fDisable"],["sFormControlName","pcnt_service_agreement_discount","sLabel","Discount","sLabelPosition","start","sAlignInput","end","sFontSize","15px",3,"formGroup","fAllowNegative","fDisable"],["sFormControlName","d_base_rate_service_agreement_cost","sLabel","Cost","sLabelPosition","start","sFontSize","15px","sAlignInput","end",3,"formGroup","fDisable","fAllowNegative"],["sFormControlName","d_base_rate_service_agreement_price","sLabel","Price","sLabelPosition","start","sFontSize","15px","sAlignInput","end",3,"formGroup","fDisable","fAllowNegative"],["sFormControlName","pcnt_base_rate_service_agreement_tax","sLabel","Tax","sLabelPosition","start","sFontSize","15px","sAlignInput","end",3,"formGroup","fAllowNegative","fDisable"],["sFormControlName","d_base_rate_non_taxable_fee","sLabel","Amount","sLabelPosition","start","sFontSize","15px","sAlignInput","end",3,"formGroup","fDisable","fAllowNegative"],[1,"ion-justify-content-center","ion-align-items-center",2,"padding-top","6px"],[1,"ion-align-items-start"],["type","text","label","Base Rate Label","formControlName","s_base_rate_label",1,"ion-text-end"],[1,"ion-align-items-start","ion-margin-top"],["type","text","label","Label","formControlName","s_adjustment_a_label",1,"ion-text-end",3,"value"],["sFormControlName","pcnt_adjustment_a_rate","sLabel","Rate",3,"formGroup","fAllowNegative","fDisable"],["size","4","size-xl","3",1,"ion-text-end",2,"padding-top","12px"],["color","danger"],["type","text","label","Label","formControlName","s_adjustment_b_label",1,"ion-text-end",3,"value"],["sLabel","Rate","sFormControlName","pcnt_adjustment_b_rate",3,"formGroup","fAllowNegative","fDisable"],["type","text","label","Label","formControlName","s_adjustment_c_label",1,"ion-text-end",3,"value"],["sLabel","Rate","sFormControlName","pcnt_adjustment_c_rate",3,"formGroup","fAllowNegative","fDisable"],[1,"color-danger"],[1,"ion-text-center","ion-no-margin",2,"font-weight","bold","margin","20px 0"],["formControlName","hvacr_equipment_id",3,"value"],["type","button","expand","block","fill","outline","color","danger",3,"click"],["type","submit","expand","block","fill","outline","color","success",3,"disabled"],["name","checkmark-outline","slot","start"]],template:function(c,a){1&c&&(e.j41(0,"form",0),e.bIt("ngSubmit",function(){return a.onSubmitAsync()}),e.j41(1,"ion-card")(2,"ion-card-content")(3,"h2",1),e.nrm(4,"ion-icon",2)(5,"br"),e.EFF(6,"General Info "),e.k0s(),e.j41(7,"ion-grid",3)(8,"ion-row")(9,"ion-col"),e.nrm(10,"ion-input",4),e.k0s()(),e.j41(11,"ion-row",5)(12,"ion-col"),e.nrm(13,"ion-input",6),e.k0s()(),e.j41(14,"ion-row",5)(15,"ion-col"),e.nrm(16,"ion-input",7),e.k0s()(),e.j41(17,"ion-row",5)(18,"ion-col"),e.nrm(19,"ion-textarea",8),e.k0s()(),e.j41(20,"ion-row",9)(21,"ion-col",10)(22,"ion-toggle",11),e.EFF(23,"Taxable "),e.k0s()(),e.nVh(24,f,2,1,"ion-col",12),e.k0s()()()(),e.nVh(25,Y,180,58),e.j41(26,"ion-card")(27,"ion-card-content")(28,"h2",1),e.nrm(29,"ion-icon",13)(30,"br"),e.EFF(31,"Serviced HVACR System "),e.k0s(),e.j41(32,"ion-list")(33,"ion-radio-group",14)(34,"ion-item",15)(35,"ion-radio",16)(36,"h3"),e.EFF(37,"None"),e.k0s()()(),e.Z7z(38,q,6,3,"ion-item",15,i),e.k0s()(),e.nVh(40,K,12,2),e.k0s()(),e.j41(41,"ion-card")(42,"ion-card-content")(43,"h2",1),e.nrm(44,"ion-icon",17)(45,"br"),e.EFF(46,"Summary "),e.k0s(),e.nrm(47,"app-show-invoice-item",18),e.k0s()(),e.nVh(48,H,3,0,"div",19),e.nVh(49,W,10,2,"ion-grid",20),e.k0s()),2&c&&(e.Y8G("formGroup",a.fg),e.R7$(13),e.BMQ("readonly",!a.fAllowEditItemNameDescriptionTaxable()),e.R7$(3),e.BMQ("readonly",!a.fAllowEditItemNameDescriptionTaxable()),e.R7$(3),e.BMQ("readonly",!a.fAllowEditItemNameDescriptionTaxable()),e.R7$(3),e.Y8G("checked",a.TypeUtil.parseBool(a.fg.value.f_taxable)),e.BMQ("readonly",!a.fAllowEditItemNameDescriptionTaxable()),e.R7$(2),e.vxM(a.fg.value.f_taxable?-1:24),e.R7$(),e.vxM(a.fIsServiceAgreement?-1:25),e.R7$(8),e.Y8G("value",null==a.invoiceItem?null:a.invoiceItem.hvacrSystemId),e.R7$(2),e.Y8G("value",null),e.R7$(3),e.Dyx(null==a.invoiceItem||null==a.invoiceItem.invoice||null==a.invoiceItem.invoice.job?null:a.invoiceItem.invoice.job.arrJobHvacrSystem),e.R7$(2),e.vxM(a.getSelectedSystemEquipment().length?40:-1),e.R7$(7),e.Y8G("invoiceItem",a.invoiceItem),e.R7$(),e.vxM(!a.fIsServiceAgreement&&a.fg.invalid?48:-1),e.R7$(),e.vxM(a.fHideActions?-1:49))},dependencies:[_.IonCard,_.IonCardContent,_.IonIcon,_.IonGrid,_.IonRow,_.IonCol,_.IonList,_.IonItem,t.X1,t.qT,t.BC,t.cb,t.tU,t.j4,t.JD,_.IonText,_.IonInput,_.IonTextarea,_.IonToggle,_.IonRadioGroup,_.IonRadio,_.IonButton,A.h,S.L,E.J,p.Q],encapsulation:2})}}return o}
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.