From 800c0ec50c14724a0f16f359ffe7171f4bd5c067 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 20 May 2021 17:49:46 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 25 ++-------- ayanova/src/components/tax-picker.vue | 43 ++++++++++++++++ .../src/components/work-order-item-labors.vue | 50 +++++++++---------- 3 files changed, 72 insertions(+), 46 deletions(-) create mode 100644 ayanova/src/components/tax-picker.vue diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 76c72cf8..b35c8a4d 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -342,29 +342,12 @@ todo: many biz objects are not using new PUT methodology 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. - - + change to composite control + diff --git a/ayanova/src/components/tax-picker.vue b/ayanova/src/components/tax-picker.vue new file mode 100644 index 00000000..8eef3e42 --- /dev/null +++ b/ayanova/src/components/tax-picker.vue @@ -0,0 +1,43 @@ + + diff --git a/ayanova/src/components/work-order-item-labors.vue b/ayanova/src/components/work-order-item-labors.vue index 4aee5506..3a09d887 100644 --- a/ayanova/src/components/work-order-item-labors.vue +++ b/ayanova/src/components/work-order-item-labors.vue @@ -850,32 +850,32 @@ export default { this.pvm.rights.change && 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; + // } + // } } };