This commit is contained in:
@@ -342,29 +342,12 @@ todo: many biz objects are not using new PUT methodology
|
|||||||
CURRENTLY DOING:
|
CURRENTLY DOING:
|
||||||
|
|
||||||
|
|
||||||
todo: Tax code decoupling from wo so can delete separately (almost there, a bit of testing and decisions first though)
|
todo: Tax code decoupling from wo so can delete separately
|
||||||
|
replace tax code drop down with a composite control instead that shows as text with an edit button when a taxname is set and just a dropdown when it's not set (null)
|
||||||
|
|
||||||
Test what happens when tax code is deleted and removed at back from workorderitemlabor tax id first
|
|
||||||
want it to be null., can that be automated with an on delete sql constraint?
|
|
||||||
|
|
||||||
should I jsut show the taxname separately as a hint *all* the time so no calcs necessary?
|
|
||||||
that would make shit waaay easier
|
|
||||||
|
|
||||||
Pros and cons of removing tax code id from workorder when it's deleted?
|
|
||||||
|
|
||||||
|
|
||||||
Keep tax code id's as are and saving to db as it's convenient for picklist but change schema so that the workorderitem*.tax*id field is not referencing the taxcodes table
|
|
||||||
so that a tax code can be removed and it's doesn't break the workorder
|
|
||||||
also, maybe show the taxname if the taxname is nonempty but there is null in the taxcodeid as a failsafe on the form
|
|
||||||
(small letters underneath picklist if picklist bound to null id but has taxname: "{{taxName}}" not going to add a descriptive thing like "tax previously selected was "blah"" or something)
|
|
||||||
|
|
||||||
also todo, if tax code is deleted it *must* be also deleted from all workorderitem* taxcodeid fields it's present on
|
|
||||||
maybe easiest is a constraint that removes the value when it's removed??
|
|
||||||
on delete blah blah or handle that at the back end on delete of tax code
|
|
||||||
|
|
||||||
todo: once settled needs to flow this back to the po and other tax code items.
|
todo: once settled needs to flow this back to the po and other tax code items.
|
||||||
|
change to composite control
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
43
ayanova/src/components/tax-picker.vue
Normal file
43
ayanova/src/components/tax-picker.vue
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
barebones template
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/* XXXeslint-disable */
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
default: null,
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
pvm: {
|
||||||
|
default: null,
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
|
||||||
|
formKey: { type: String, default: "" }, //used to grab template from store
|
||||||
|
readonly: Boolean,
|
||||||
|
disabled: Boolean
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
form() {
|
||||||
|
return window.$gz.form;
|
||||||
|
},
|
||||||
|
fieldValueChanged(ref) {
|
||||||
|
if (!this.pvm.formState.loading && !this.pvm.formState.readonly) {
|
||||||
|
window.$gz.form.fieldValueChanged(this.pvm, ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -850,32 +850,32 @@ export default {
|
|||||||
this.pvm.rights.change &&
|
this.pvm.rights.change &&
|
||||||
this.pvm.subRights.labors.delete
|
this.pvm.subRights.labors.delete
|
||||||
);
|
);
|
||||||
},
|
|
||||||
laborTaxRateSaleHint: function() {
|
|
||||||
if (this.activeItemIndex == null || this.activeWoItemIndex == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
console.log(
|
|
||||||
"laborTaxRateSaleHint",
|
|
||||||
this.value.items[this.activeWoItemIndex].labors[this.activeItemIndex]
|
|
||||||
.taxCodeSaleId
|
|
||||||
);
|
|
||||||
if (
|
|
||||||
this.value.items[this.activeWoItemIndex].labors[this.activeItemIndex]
|
|
||||||
.taxCodeSaleId == null &&
|
|
||||||
this.value.items[this.activeWoItemIndex].labors[this.activeItemIndex]
|
|
||||||
.taxName != null
|
|
||||||
) {
|
|
||||||
return (
|
|
||||||
'"' +
|
|
||||||
this.value.items[this.activeWoItemIndex].labors[this.activeItemIndex]
|
|
||||||
.taxName +
|
|
||||||
'"'
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// , laborTaxRateSaleHint: function() {
|
||||||
|
// if (this.activeItemIndex == null || this.activeWoItemIndex == null) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// // console.log(
|
||||||
|
// // "laborTaxRateSaleHint",
|
||||||
|
// // this.value.items[this.activeWoItemIndex].labors[this.activeItemIndex]
|
||||||
|
// // .taxCodeSaleId
|
||||||
|
// // );
|
||||||
|
// if (
|
||||||
|
// this.value.items[this.activeWoItemIndex].labors[this.activeItemIndex]
|
||||||
|
// .taxCodeSaleId == null &&
|
||||||
|
// this.value.items[this.activeWoItemIndex].labors[this.activeItemIndex]
|
||||||
|
// .taxName != null
|
||||||
|
// ) {
|
||||||
|
// return (
|
||||||
|
// '"' +
|
||||||
|
// this.value.items[this.activeWoItemIndex].labors[this.activeItemIndex]
|
||||||
|
// .taxName +
|
||||||
|
// '"'
|
||||||
|
// );
|
||||||
|
// } else {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user