Admin Portal - Profile

This commit is contained in:
hillelcoren 2022-04-23 21:29:21 +00:00
parent 3d7db35e2d
commit 813663a87b

View File

@ -298756,6 +298756,30 @@
} else } else
return _this.taxRate1; return _this.taxRate1;
}, },
get$calculatetaxRate2() {
var t1, t2, _this = this;
if (_this.calculateTaxByAmount === true) {
t1 = _this.taxAmount2;
t2 = _this.amount;
if (_this.usesInclusiveTaxes)
return t1 / (t2 - t1) * 100;
else
return t1 / t2 * 100;
} else
return _this.taxRate2;
},
get$calculatetaxRate3() {
var t1, t2, _this = this;
if (_this.calculateTaxByAmount === true) {
t1 = _this.taxAmount3;
t2 = _this.amount;
if (_this.usesInclusiveTaxes)
return t1 / (t2 - t1) * 100;
else
return t1 / t2 * 100;
} else
return _this.taxRate3;
},
get$taxAmount() { get$taxAmount() {
return this.get$calculateTaxAmount1() + this.get$calculateTaxAmount2() + this.get$calculateTaxAmount3(); return this.get$calculateTaxAmount1() + this.get$calculateTaxAmount2() + this.get$calculateTaxAmount3();
}, },
@ -298767,12 +298791,12 @@
t1 = _this.taxRate1; t1 = _this.taxRate1;
if (t1 !== 0) { if (t1 !== 0) {
t2 = _this.amount; t2 = _this.amount;
return t2 - t2 / (1 + t1 / 100); return A.round(t2 - t2 / (1 + t1 / 100), 2);
} }
} else { } else {
t1 = _this.taxRate1; t1 = _this.taxRate1;
if (t1 !== 0) if (t1 !== 0)
return _this.amount * t1 / 100; return A.round(_this.amount * t1 / 100, 2);
} }
return 0; return 0;
}, },
@ -298784,12 +298808,12 @@
t1 = _this.taxRate2; t1 = _this.taxRate2;
if (t1 !== 0) { if (t1 !== 0) {
t2 = _this.amount; t2 = _this.amount;
return t2 - t2 / (1 + t1 / 100); return A.round(t2 - t2 / (1 + t1 / 100), 2);
} }
} else { } else {
t1 = _this.taxRate2; t1 = _this.taxRate2;
if (t1 !== 0) if (t1 !== 0)
return _this.amount * t1 / 100; return A.round(_this.amount * t1 / 100, 2);
} }
return 0; return 0;
}, },
@ -298801,12 +298825,12 @@
t1 = _this.taxRate3; t1 = _this.taxRate3;
if (t1 !== 0) { if (t1 !== 0) {
t2 = _this.amount; t2 = _this.amount;
return t2 - t2 / (1 + t1 / 100); return A.round(t2 - t2 / (1 + t1 / 100), 2);
} }
} else { } else {
t1 = _this.taxRate3; t1 = _this.taxRate3;
if (t1 !== 0) if (t1 !== 0)
return _this.amount * t1 / 100; return A.round(_this.amount * t1 / 100, 2);
} }
return 0; return 0;
}, },
@ -345306,27 +345330,12 @@
t3 = t2 >= 2; t3 = t2 >= 2;
t4 = t3 ? t1.taxName2 : ""; t4 = t3 ? t1.taxName2 : "";
b.get$_invoice_model$_$this()._taxName2 = t4; b.get$_invoice_model$_$this()._taxName2 = t4;
if (t3) t3 = t3 ? t1.get$calculatetaxRate2() : 0;
if (t1.calculateTaxByAmount === true) {
t3 = t1.taxAmount2;
t3 = t3 / (t1.amount - t3) * 100;
} else
t3 = t1.taxRate2;
else
t3 = 0;
b.get$_invoice_model$_$this()._taxRate2 = t3; b.get$_invoice_model$_$this()._taxRate2 = t3;
t2 = t2 >= 3; t2 = t2 >= 3;
t3 = t2 ? t1.taxName3 : ""; t3 = t2 ? t1.taxName3 : "";
b.get$_invoice_model$_$this()._taxName3 = t3; b.get$_invoice_model$_$this()._taxName3 = t3;
if (t2) t1 = t2 ? t1.get$calculatetaxRate3() : 0;
if (t1.calculateTaxByAmount === true) {
t2 = t1.taxAmount3;
t2 = t2 / (t1.amount - t2) * 100;
t1 = t2;
} else
t1 = t1.taxRate3;
else
t1 = 0;
b.get$_invoice_model$_$this()._taxRate3 = t1; b.get$_invoice_model$_$this()._taxRate3 = t1;
return b; return b;
}, },
@ -429098,14 +429107,18 @@
_this._widget.viewModel.onSettingsChanged.call$1(settings); _this._widget.viewModel.onSettingsChanged.call$1(settings);
}, },
_templates_and_reminders$_onTabChanged$0() { _templates_and_reminders$_onTabChanged$0() {
var store, _this = this, var store, t2, previewIndex, _this = this,
t1 = _this._framework$_element; t1 = _this._framework$_element;
t1.toString; t1.toString;
store = A.StoreProvider_of(t1, type$.legacy_AppState); store = A.StoreProvider_of(t1, type$.legacy_AppState);
t1 = _this._templates_and_reminders$_controller._tab_controller$_index; t1 = _this._templates_and_reminders$_controller._tab_controller$_index;
store.get$_dispatchers()[0].call$1(new A.UpdateSettingsTab(t1)); store.get$_dispatchers()[0].call$1(new A.UpdateSettingsTab(t1));
_this.setState$1(new A._TemplatesAndRemindersState__onTabChanged_closure(_this)); _this.setState$1(new A._TemplatesAndRemindersState__onTabChanged_closure(_this));
if (_this._templates_and_reminders$_controller._tab_controller$_index !== 2) t1 = A._lateReadCheck(store.__Store__state, "_state");
t2 = t1.userCompanyStates;
t1 = t1.uiState.selectedCompanyIndex;
previewIndex = t2._list[t1].userCompany.company.markdownEmailEnabled ? 2 : 1;
if (_this._templates_and_reminders$_controller._tab_controller$_index !== previewIndex)
return; return;
_this._renderTemplate$0(); _this._renderTemplate$0();
}, },