Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jamesporl
Copy link
Contributor

@jamesporl jamesporl commented Mar 14, 2019

Impact: major
Type: bugfix

Issue

It is currently impossible to checkout because of schema validation issue here:

This validation always fails because the required fields here are not provided:

OrderItem.extend({
/**
* Custom key/value data that you need to store.
* You'll need to extend GraphQL schemas if you
* want to expose any of this data through the API.
*/
"customTaxFields": {
type: Object,
blackbox: true,
optional: true
},
"isTaxable": Boolean,
"tax": Number,
"taxableAmount": Number,
"taxCode": {
type: String,
optional: true
},
"taxes": {
type: Array,
optional: true
},
"taxes.$": Taxes
});

since the following lines were removed:

const updatedItem = {
...item,
tax: itemTax.tax,
taxableAmount: itemTax.taxableAmount,
taxes: itemTax.taxes
};

Also, some fields needed by SE Team to be saved in an order were removed.

Solution

I put back tax data per item and added a blackbox taxData field to invoice schema to allow saving of custom fields returned by tax service in a fulfillment group..

Testing

You should be able to checkout.

@jamesporl jamesporl changed the base branch from master to develop March 14, 2019 08:54
@brent-hoover brent-hoover requested a review from aldeed March 14, 2019 08:57
@nnnnat nnnnat self-requested a review March 14, 2019 14:42
@aldeed
Copy link
Contributor

aldeed commented Mar 14, 2019

@ajporlante There is a simpler fix. I have it in #5018 already, so we can either get that merged or cherry pick fdc1cbf

@aldeed
Copy link
Contributor

aldeed commented Mar 14, 2019

There is an alternative PR here: #5043

I know this fixes the main checkout error I was seeing, but I'll leave this open for now in case there's still some additional issue.

@aldeed aldeed closed this Mar 14, 2019
@machikoyasuda machikoyasuda deleted the ajporlante-fix-unable-to-checkout-with-taxes branch November 5, 2019 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants