This commit is contained in:
2021-03-08 00:48:26 +00:00
parent 983618a9a8
commit abc49d1d83
3 changed files with 13 additions and 117 deletions

View File

@@ -44,9 +44,7 @@ todo: test service rate pick list variants
todo: NOT import PO's unless they are current, active and unreceived
todo: erase database should reset all id values if they aren't reset already so that future data doesn't result in a new PO starting at 29000 due to huge db trial seed prior
todo: Popup notes - do they really need to "pop" or could they just display statically on the form in a special section
for example there's a case to have notes display on a workorder if set in a contract and was thinking of statically showing them
but there could be a whole section of important notes at the top that shows *all* notes like customer popup and contract notes
todo: Popup notes now AlertNotes - a whole section of important notes at the top that shows *all* notes combined like customer popup and contract notes
that shows all the time in the workorder UI with an option to minimize maybe or something
This would be better than popup as it's always visible not dismissed and less ui fuckery to boot.
See case 3855
@@ -86,6 +84,7 @@ todo: it's a bit hard to click on a single digit or character link in a data tab
todo: partassembly form should use an edit dialog rather than edit in place in the grid as it's ugly and clunky and outside of the standard that will be used in PO and wo etc
copy from Contract form and use it's technique for immediate viz value sync event
todo: WHEN HAVE WORKORDER FORM customer alert notes
@@ -170,7 +169,7 @@ todo: many biz objects are not using new PUT methodology
also this includes *all* of the initial workorder object so there's that
might be that they don't need it but for consistency should check into it
todo: Changes to allow in place updates of server:
todo: Changes to allow in place updates of server without erasing data:
Needs to be supporting this early as possible so that upon release we can easily make changes without breaking existing setups or forcing complex actions
how to add locale keys in future after release without erasing all data?
Ideally I'd like to continue on to just edit the json translation files and the server looks for missing items and adds them automatically
@@ -191,125 +190,21 @@ todo: Changes to allow in place updates of server:
CURRENTLY DOING: Contract form
CURRENTLY DOING: Contract server loose ends
todo: service rates contract list
biz rule No dupes rule at server
biz rule contract rates only must have some contract rates selected
'' travel
todo: make other list / edit forms same as service rates list / edit form
use list index, NOT id for crud ops
way it deletes
buttons (remove close just OK button)
todo: Maybe don't need alt format buttons for narrow view??
'' travel
todo: foreign key check in rate validatedelete now that service rate can be set on contract
todo: edit item by item being passed in is flawed potentially because it looks for ID to match when in reality it should pass the index
because id is 0 for added items and there could be two added items
every op should be by index to ensure it works properly
go back and fix the ones by looking at teh edit first to find the by id and then switchup to index like for contract service rates which does it correctly
todo: might want to put more fields in the contractdatalist, it's very sparse adn the old v7 had pretty much all the fields as well
todo: confirm Unit contract fields are ok and datalist is ok
todo: both rates need contract checkbox so they only appear in conjunction with a contract also the picklists need updating for rates with variants to take contract into consideration
add to ui
default to false (is required)
Picklists supply contractid with variant so that the server knows which list to produce
Need variant that shows only rates with contractonly=true (for selection in contract)
Need variant that shows only rates for a specific contract (limit to contract rates contract in effect on workorder)
Need variant that shows all rates *without* any contract rates (no contract workorder)
Need variant that shows all regular rates and also specific contract rates
Perhaps all of these will work with the addition of just the contract id?
can join in the contract table and items and only show if present or whatever the query needs to be
return results are same just the where criteria or server criteria and FROM part of query
As non contract scenario is just all items
Contract may or may not be all items plus contract or just contract (different queries)
But it all needs to go through same picklist code for client simplicity
todo: test error handling from server, correctly displays in table (narrator: "It didn't")
todo: report test
todo: smoke test
todo: help docs
Contract general notes / changes
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Overview
V7 contracts did this:
Limit rates that can be selected to only those selected in contract and which are set to "Contract rate" in themselves
or just offer those contract rates in addition to regular rates
apply a discount to all parts selected for that contract in effect
V8 contracts need to do this:
Markup OR Discount option (mutually exclusive)
Rates in addition to parts
Tag selectable to apply discount or markup
Can have multiple by tag but can have only one by non tag (all parts, all rates)
wo applies discount / markup if part or rate is tagged if tag is chosen
Keep in mind individual Units will be contractable as well
Special notes field kind of like popup notes but it doesn't popup, instead displays on workorder statically somewhere as a reminder.
perhaps a contract in effect section with a ui affordance to open for more details or perhaps not.
I can imagine the first time people would need to read it but after the thousandth it's just taking up space.
Response time duration control for notification purposes, overrides default response time globally set
if a unit has one and customer has one the shortest one applies as this is an entire workorder issue
User can make seperate workorders to work around this if it's an issue
Contracts are never tied directly to an object they affect other than the Customer or Headoffice with a foreign key link
workorders should never be reliant on the existance of a contract but rather just have a contract applied to them for example
Contracts *are* tied to objects that use them like Client, HeadOffice, Unit
Which contract to apply
In order of least to most specific: Headoffice, Customer, Unit
so Unit contract overrides any above contract
Need rates picklists to support criteria of contract rates only for selection
perhaps server supplies which contract id is in effect and limit to rates
then client uses variant to say "limittocontractid:xx" when fetching rate lists or other contract restricted items
Markup / Markdown / Discount
v7 can only have discount % but we now want:
Discount % off price
Markup on cost to price
Markup on price
Contract affected fields
in a wo or other object a contract should only affect adjacent fields, never the primary field like price or cost
In this way a contract can be rescinded off a workorder when a customer is changed (required feature) and it's easy to update it
without breaking anything
Contract applied field
objects with contract that affects then should seperately have a contract name field for contract applied
this supports not directly linking the contract but rather seeing it as an object that is applied to another object,
not linked to it. Can apply, unapply, delete contract and no affect on primary wo or other object
TAGS
in v7 contracts could be set to apply to all parts or none
in v8 need finer control so:
Contract needs selectable tags for any aspect to apply
Discount / markup etc parts / rates
So, in practice like in v7 you set a discount for all parts but then you can also on the same line restrict it to specific part tags and select tags right there
If any items have tags then there can be no "all Items" item? Or do they contradict each other in some way
i.e. a discount for all but a special discount if it's tagged this (could be zero percent so no change if tagged that way as a way to Exclude certain items)
The server then applies the discount based on whether the parts are tagged or not if that's the case in it's bizactions
then the picklist can be supplied the variant for contract id which pulls the contract, finds the tags and then populates the picklist with the extra tag search
MULTIPLE discount / markup ITEMS
Can have ONE default for all box
Can have multiple tagged ones (tag is REQUIRED)
Not two can have same tags in them, that's a biz rule / error
Algorithm:
Default item applied normally UNLESS tagged item which is more specific overrides it
todo: go through contract cases and ones that are only for contract form itself and object can be closed now
todo: v8migrate
------------------------------------------
@@ -343,7 +238,6 @@ EACH OBJECT DEV CYCLE:
front route
List form
Edit form (## TEST ALL INPUTS ON EDIT FORM, DON"T ASSSUME THEY WORK)
Add to smoke test
DOCS (at back but with front links, maybe not fleshed out just placeholder ok for now)
REPORTING

View File

@@ -282,7 +282,8 @@ export default {
cost: 0,
charge: 0,
unit: null,
accountNumber: null
accountNumber: null,
contractOnly: false
},
formState: {
ready: false,

View File

@@ -280,7 +280,8 @@ export default {
cost: 0,
charge: 0,
unit: null,
accountNumber: null
accountNumber: null,
contractOnly: false
},
formState: {
ready: false,