Resolve stripe issues on export IO-490
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<babeledit_project be_version="2.7.1" version="1.2">
|
<babeledit_project version="1.2" be_version="2.7.1">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
BabelEdit project file
|
BabelEdit project file
|
||||||
@@ -23448,6 +23448,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>exporting-partner</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ export function JobChecklistForm({
|
|||||||
...(type === "intake" && {
|
...(type === "intake" && {
|
||||||
scheduled_completion: values.scheduled_completion,
|
scheduled_completion: values.scheduled_completion,
|
||||||
}),
|
}),
|
||||||
|
...(type === "deliver" && {
|
||||||
|
actual_completion: values.actual_completion,
|
||||||
|
}),
|
||||||
[(type === "intake" && "intakechecklist") ||
|
[(type === "intake" && "intakechecklist") ||
|
||||||
(type === "deliver" && "deliverchecklist")]: {
|
(type === "deliver" && "deliverchecklist")]: {
|
||||||
...values,
|
...values,
|
||||||
@@ -154,7 +156,7 @@ export function JobChecklistForm({
|
|||||||
{type === "deliver" && (
|
{type === "deliver" && (
|
||||||
<div>
|
<div>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="actualCompletion"
|
name="actual_completion"
|
||||||
label={t("jobs.fields.actual_completion")}
|
label={t("jobs.fields.actual_completion")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,11 +32,7 @@ export default function ShopEmployeesListComponent({
|
|||||||
dataIndex: "last_name",
|
dataIndex: "last_name",
|
||||||
key: "last_name",
|
key: "last_name",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: t("employees.fields.cost_center"),
|
|
||||||
dataIndex: "cost_center",
|
|
||||||
key: "cost_center",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: t("employees.fields.base_rate"),
|
title: t("employees.fields.base_rate"),
|
||||||
dataIndex: "base_rate",
|
dataIndex: "base_rate",
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ export const QUERY_DELIVER_CHECKLIST = gql`
|
|||||||
`;
|
`;
|
||||||
export const QUERY_STRIPE_ID = gql`
|
export const QUERY_STRIPE_ID = gql`
|
||||||
query QUERY_STRIPE_ID {
|
query QUERY_STRIPE_ID {
|
||||||
bodyshops {
|
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||||
stripe_acct_id
|
stripe_acct_id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,9 +148,12 @@ const { Content, Header } = Layout;
|
|||||||
|
|
||||||
const stripePromise = new Promise((resolve, reject) => {
|
const stripePromise = new Promise((resolve, reject) => {
|
||||||
client.query({ query: QUERY_STRIPE_ID }).then((resp) => {
|
client.query({ query: QUERY_STRIPE_ID }).then((resp) => {
|
||||||
|
console.log(resp);
|
||||||
|
|
||||||
resolve(
|
resolve(
|
||||||
loadStripe(process.env.REACT_APP_STRIPE_PUBLIC_KEY, {
|
loadStripe(process.env.REACT_APP_STRIPE_PUBLIC_KEY, {
|
||||||
stripeAccount: resp.data.bodyshops[0].stripe_acct_id || "",
|
stripeAccount:
|
||||||
|
resp.data.bodyshops[0].stripe_acct_id || "No Stripe Id Resolve",
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1423,7 +1423,8 @@
|
|||||||
},
|
},
|
||||||
"payments": {
|
"payments": {
|
||||||
"errors": {
|
"errors": {
|
||||||
"exporting": "Error exporting payment(s). {{error}}"
|
"exporting": "Error exporting payment(s). {{error}}",
|
||||||
|
"exporting-partner": "Error exporting to partner. Please check the partner interaction log for more errors."
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
"amount": "Amount",
|
"amount": "Amount",
|
||||||
|
|||||||
@@ -1423,7 +1423,8 @@
|
|||||||
},
|
},
|
||||||
"payments": {
|
"payments": {
|
||||||
"errors": {
|
"errors": {
|
||||||
"exporting": ""
|
"exporting": "",
|
||||||
|
"exporting-partner": ""
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
"amount": "",
|
"amount": "",
|
||||||
|
|||||||
@@ -1423,7 +1423,8 @@
|
|||||||
},
|
},
|
||||||
"payments": {
|
"payments": {
|
||||||
"errors": {
|
"errors": {
|
||||||
"exporting": ""
|
"exporting": "",
|
||||||
|
"exporting-partner": ""
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
"amount": "",
|
"amount": "",
|
||||||
|
|||||||
@@ -110,8 +110,7 @@ const generatePayment = (payment) => {
|
|||||||
payment.job.bodyshop.md_responsibility_centers.ar.accountname,
|
payment.job.bodyshop.md_responsibility_centers.ar.accountname,
|
||||||
},
|
},
|
||||||
TxnDate: moment(payment.date).format("YYYY-MM-DD"), //Trim String
|
TxnDate: moment(payment.date).format("YYYY-MM-DD"), //Trim String
|
||||||
RefNumber:
|
RefNumber: payment.paymentnum || payment.transactionid,
|
||||||
payment.paymentnum || payment.stripeid || payment.transactionid,
|
|
||||||
TotalAmount: Dinero({
|
TotalAmount: Dinero({
|
||||||
amount: Math.round(payment.amount * 100),
|
amount: Math.round(payment.amount * 100),
|
||||||
}).toFormat(DineroQbFormat),
|
}).toFormat(DineroQbFormat),
|
||||||
|
|||||||
Reference in New Issue
Block a user