This commit is contained in:
@@ -341,44 +341,12 @@ todo: many biz objects are not using new PUT methodology
|
|||||||
|
|
||||||
CURRENTLY DOING:
|
CURRENTLY DOING:
|
||||||
|
|
||||||
todo: do expenses, part and travel objects: model, schema, FormFieldReference, biz object, front end UI
|
|
||||||
|
|
||||||
todo: remove taxcode edit control once done
|
todo: remove taxcode edit control once done
|
||||||
|
|
||||||
Move back to original linked tax codes with hybrid history preservation system
|
|
||||||
BACKEND:
|
|
||||||
|
|
||||||
- FORM FIELD DEFINITIONS
|
todo: part prices are going to change / volatile, are they snapshotted? (cost/charge)
|
||||||
Edit to remove fields and add manual override field back
|
rates and taxes are ok to not snapshot, their values are protected once used but parts are volatile and should be snapshotted
|
||||||
|
|
||||||
- Workorder
|
|
||||||
TAXES
|
|
||||||
remove all the code that preserves the tax info like name and values and move back to the single ID
|
|
||||||
update the calcs code to fetch the tax code to apply it
|
|
||||||
put back the tax code viz field
|
|
||||||
update the FormFieldReference to remove the tax code shit
|
|
||||||
|
|
||||||
RATES
|
|
||||||
Rates are fixed now so no need to store redundantly except user can override so...?
|
|
||||||
How about a single override field that is null by default and if an entry is made that takes over from the default rate
|
|
||||||
To clear it they simply empty the field and if null the viz calcs will use the rate price instead
|
|
||||||
|
|
||||||
CALCS / VIZ
|
|
||||||
Calcs are now all Viz fields populated on the fly and not stored in the wo
|
|
||||||
Override field is used if non-null otherwise the rate is pulled and used for the calc
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FRONT:
|
|
||||||
Revert back to viz fields and remove snapshotted fields
|
|
||||||
switch back to simple picklist for taxes
|
|
||||||
Expose the override field
|
|
||||||
|
|
||||||
|
|
||||||
HYBRID - mostly fixed with a few things snapshotted that are likely to change regularly
|
|
||||||
Impermanent things:
|
|
||||||
prices of things
|
|
||||||
addresses
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,103 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<template v-if="pickMode">
|
|
||||||
<gz-pick-list
|
|
||||||
:aya-type="$ay.ayt().TaxCode"
|
|
||||||
:show-edit-icon="true"
|
|
||||||
:value="value"
|
|
||||||
:readonly="readonly"
|
|
||||||
:disabled="disabled"
|
|
||||||
:label="label"
|
|
||||||
:error-messages="errorMessages"
|
|
||||||
@input="emitInput($event)"
|
|
||||||
@update:name="emitName"
|
|
||||||
></gz-pick-list>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div class="mb-n2 ml-10">
|
|
||||||
<span class="text-caption">{{ label }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="mb-6 mb-sm-0">
|
|
||||||
<v-btn icon class="ml-n1 mr-2" @click="picking = true">
|
|
||||||
<v-icon>$ayiEdit</v-icon>
|
|
||||||
</v-btn>
|
|
||||||
<span>{{ display }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/* XXXeslint-disable */
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
picking: false //display picker
|
|
||||||
};
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
value: {
|
|
||||||
type: Number,
|
|
||||||
default: null
|
|
||||||
},
|
|
||||||
display: {
|
|
||||||
type: String,
|
|
||||||
default: null
|
|
||||||
},
|
|
||||||
rules: { type: Array, default: undefined },
|
|
||||||
errorMessages: { type: Array, default: null },
|
|
||||||
readonly: { type: Boolean, default: false },
|
|
||||||
disabled: { type: Boolean, default: false },
|
|
||||||
|
|
||||||
ayaType: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
},
|
|
||||||
includeInactive: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
showEditIcon: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
allowNoSelection: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
canClear: { type: Boolean, default: true },
|
|
||||||
label: { type: String, default: "" }
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
display() {
|
|
||||||
this.picking = false; //this is to attempt to make the picker go away when the record changes to another, otherwise it seems to stick
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
emitInput(e) {
|
|
||||||
this.$emit("input", e);
|
|
||||||
this.picking = false;
|
|
||||||
},
|
|
||||||
emitName(e) {
|
|
||||||
this.$emit("update:name", e);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
pickMode: function() {
|
|
||||||
//show picker if nothing selected or display name is empty
|
|
||||||
if (this.picking) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.display == null || this.display == "" || this.display == "-") {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -278,7 +278,7 @@
|
|||||||
></gz-currency>
|
></gz-currency>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<!-- <v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderItemExpenseChargeTaxCodeID')"
|
v-if="form().showMe(this, 'WorkOrderItemExpenseChargeTaxCodeID')"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
@@ -314,6 +314,42 @@
|
|||||||
"
|
"
|
||||||
@update:name="taxCodeChange"
|
@update:name="taxCodeChange"
|
||||||
></gz-tax-picker>
|
></gz-tax-picker>
|
||||||
|
</v-col> -->
|
||||||
|
|
||||||
|
<v-col
|
||||||
|
v-if="form().showMe(this, 'WorkOrderItemExpenseChargeTaxCodeID')"
|
||||||
|
cols="12"
|
||||||
|
sm="6"
|
||||||
|
lg="4"
|
||||||
|
xl="3"
|
||||||
|
>
|
||||||
|
<gz-pick-list
|
||||||
|
:aya-type="$ay.ayt().TaxCode"
|
||||||
|
:show-edit-icon="true"
|
||||||
|
v-model="
|
||||||
|
value.items[activeWoItemIndex].expenses[activeItemIndex]
|
||||||
|
.chargeTaxCodeId
|
||||||
|
"
|
||||||
|
:readonly="formState.readOnly || isDeleted"
|
||||||
|
:disabled="isDeleted"
|
||||||
|
:label="$ay.t('WorkOrderItemExpenseChargeTaxCodeID')"
|
||||||
|
:ref="
|
||||||
|
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].chargeTaxCodeId`
|
||||||
|
"
|
||||||
|
data-cy="expenseChargeTaxCode"
|
||||||
|
:error-messages="
|
||||||
|
form().serverErrors(
|
||||||
|
this,
|
||||||
|
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].chargeTaxCodeId`
|
||||||
|
)
|
||||||
|
"
|
||||||
|
@input="
|
||||||
|
fieldValueChanged(
|
||||||
|
`Items[${activeWoItemIndex}].expenses[${activeItemIndex}].chargeTaxCodeId`
|
||||||
|
)
|
||||||
|
"
|
||||||
|
@update:name="taxCodeChange"
|
||||||
|
></gz-pick-list>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
@@ -427,11 +463,8 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/* XXXeslint-disable */
|
/* XXXeslint-disable */
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
import GzTaxPicker from "./tax-picker.vue";
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
GzTaxPicker
|
|
||||||
},
|
|
||||||
created() {
|
created() {
|
||||||
this.setDefaultView();
|
this.setDefaultView();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user