IO-1178 Resolve line markup issues.
This commit is contained in:
@@ -28,7 +28,7 @@ import JobsShow from "../jobs/jobs.show";
|
|||||||
const httpLink = new HttpLink({
|
const httpLink = new HttpLink({
|
||||||
uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
|
uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
|
||||||
headers: {
|
headers: {
|
||||||
"x-hasura-admin-secret": `Dev-BodyShopAppBySnaptSoftware!`,
|
"x-hasura-admin-secret": `Dev-BodyShopApp!`,
|
||||||
// 'Authorization': `Bearer xxxx`,
|
// 'Authorization': `Bearer xxxx`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -67,7 +67,7 @@ const client = new ApolloClient({
|
|||||||
// uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
|
// uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
|
||||||
// cache: new InMemoryCache(),
|
// cache: new InMemoryCache(),
|
||||||
// headers: {
|
// headers: {
|
||||||
// "x-hasura-admin-secret": `Dev-BodyShopAppBySnaptSoftware!`,
|
// "x-hasura-admin-secret": `Dev-BodyShopApp!`,
|
||||||
// // 'Authorization': `Bearer xxxx`,
|
// // 'Authorization': `Bearer xxxx`,
|
||||||
// },
|
// },
|
||||||
// });
|
// });
|
||||||
|
|||||||
@@ -15232,6 +15232,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>prt_dsmk_p</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>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>status</name>
|
<name>status</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ export function JobLinesComponent({
|
|||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<>
|
<>
|
||||||
<CurrencyFormatter>{record.act_price}</CurrencyFormatter>
|
<CurrencyFormatter>{record.act_price}</CurrencyFormatter>
|
||||||
{record.prt_dsmk_p !== 0 && (
|
{record.prt_dsmk_p && record.prt_dsmk_p !== 0 && (
|
||||||
<span
|
<span
|
||||||
style={{ marginLeft: ".2rem" }}
|
style={{ marginLeft: ".2rem" }}
|
||||||
>{`(${record.prt_dsmk_p}%)`}</span>
|
>{`(${record.prt_dsmk_p}%)`}</span>
|
||||||
|
|||||||
@@ -210,6 +210,13 @@ export default function JobLinesUpsertModalComponent({
|
|||||||
>
|
>
|
||||||
<InputCurrency precision={2} min={0} />
|
<InputCurrency precision={2} min={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("joblines.fields.prt_dsmk_p")}
|
||||||
|
name="prt_dsmk_p"
|
||||||
|
initialValue={0}
|
||||||
|
>
|
||||||
|
<InputCurrency precision={0} min={0} max={100} />
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -957,6 +957,7 @@
|
|||||||
},
|
},
|
||||||
"profitcenter_labor": "Profit Center: Labor",
|
"profitcenter_labor": "Profit Center: Labor",
|
||||||
"profitcenter_part": "Profit Center: Part",
|
"profitcenter_part": "Profit Center: Part",
|
||||||
|
"prt_dsmk_p": "Line Markup %",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
"total": "Total",
|
"total": "Total",
|
||||||
"unq_seq": "Seq #"
|
"unq_seq": "Seq #"
|
||||||
|
|||||||
@@ -957,6 +957,7 @@
|
|||||||
},
|
},
|
||||||
"profitcenter_labor": "",
|
"profitcenter_labor": "",
|
||||||
"profitcenter_part": "",
|
"profitcenter_part": "",
|
||||||
|
"prt_dsmk_p": "",
|
||||||
"status": "Estado",
|
"status": "Estado",
|
||||||
"total": "",
|
"total": "",
|
||||||
"unq_seq": "Seq #"
|
"unq_seq": "Seq #"
|
||||||
|
|||||||
@@ -957,6 +957,7 @@
|
|||||||
},
|
},
|
||||||
"profitcenter_labor": "",
|
"profitcenter_labor": "",
|
||||||
"profitcenter_part": "",
|
"profitcenter_part": "",
|
||||||
|
"prt_dsmk_p": "",
|
||||||
"status": "Statut",
|
"status": "Statut",
|
||||||
"total": "",
|
"total": "",
|
||||||
"unq_seq": "Seq #"
|
"unq_seq": "Seq #"
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
Must set the environment variables using:
|
||||||
|
|
||||||
Must set the environment variables using:
|
firebase functions:config:set auth.graphql_endpoint="https://bodyshop-dev-db.herokuapp.com/v1/graphql" auth.hasura_secret_admin_key="Dev-BodyShopApp!"
|
||||||
|
|
||||||
firebase functions:config:set auth.graphql_endpoint="https://bodyshop-dev-db.herokuapp.com/v1/graphql" auth.hasura_secret_admin_key="Dev-BodyShopAppBySnaptSoftware!"
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
endpoint: https://bodyshop-dev-db.herokuapp.com
|
endpoint: https://bodyshop-dev-db.herokuapp.com
|
||||||
admin_secret: Dev-BodyShopAppBySnaptSoftware!
|
admin_secret: Dev-BodyShopApp!
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
- args:
|
||||||
|
cascade: false
|
||||||
|
read_only: false
|
||||||
|
sql: ALTER TABLE ONLY "public"."joblines" ALTER COLUMN "prt_dsmk_p" DROP DEFAULT;
|
||||||
|
type: run_sql
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
- args:
|
||||||
|
cascade: false
|
||||||
|
read_only: false
|
||||||
|
sql: ALTER TABLE ONLY "public"."joblines" ALTER COLUMN "prt_dsmk_p" SET DEFAULT
|
||||||
|
0;
|
||||||
|
type: run_sql
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
- args:
|
||||||
|
cascade: false
|
||||||
|
read_only: false
|
||||||
|
sql: "update joblines \nset prt_dsmk_p = 0 where joblines.prt_dsmk_p is null;"
|
||||||
|
type: run_sql
|
||||||
@@ -281,7 +281,7 @@ function GenerateCostingData(job) {
|
|||||||
amount: Math.round((val.act_price || 0) * 100),
|
amount: Math.round((val.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(val.part_qty || 0)
|
.multiply(val.part_qty || 0)
|
||||||
.percentage(val.prt_dsmk_p)
|
.percentage(val.prt_dsmk_p || 0)
|
||||||
);
|
);
|
||||||
if (!acc.parts[partsProfitCenter])
|
if (!acc.parts[partsProfitCenter])
|
||||||
acc.parts[partsProfitCenter] = Dinero();
|
acc.parts[partsProfitCenter] = Dinero();
|
||||||
@@ -310,7 +310,7 @@ function GenerateCostingData(job) {
|
|||||||
amount: Math.round((val.act_price || 0) * 100),
|
amount: Math.round((val.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(val.part_qty || 0)
|
.multiply(val.part_qty || 0)
|
||||||
.percentage(val.prt_dsmk_p)
|
.percentage(val.prt_dsmk_p || 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!acc.parts[partsProfitCenter])
|
if (!acc.parts[partsProfitCenter])
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ function CalculatePartsTotals(jobLines) {
|
|||||||
amount: Math.round((value.act_price || 0) * 100),
|
amount: Math.round((value.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(value.part_qty || 0)
|
.multiply(value.part_qty || 0)
|
||||||
.percentage(value.prt_dsmk_p)
|
.percentage(value.prt_dsmk_p || 0)
|
||||||
),
|
),
|
||||||
list: {
|
list: {
|
||||||
...acc.parts.list,
|
...acc.parts.list,
|
||||||
@@ -248,7 +248,7 @@ function CalculatePartsTotals(jobLines) {
|
|||||||
amount: Math.round((value.act_price || 0) * 100),
|
amount: Math.round((value.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(value.part_qty || 0)
|
.multiply(value.part_qty || 0)
|
||||||
.percentage(value.prt_dsmk_p)
|
.percentage(value.prt_dsmk_p || 0)
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -382,7 +382,7 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
amount: Math.round((val.act_price || 0) * 100),
|
amount: Math.round((val.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(val.part_qty || 0)
|
.multiply(val.part_qty || 0)
|
||||||
.percentage(val.prt_dsmk_p)
|
.percentage(val.prt_dsmk_p || 0)
|
||||||
)
|
)
|
||||||
.percentage(
|
.percentage(
|
||||||
((job.parts_tax_rates &&
|
((job.parts_tax_rates &&
|
||||||
|
|||||||
Reference in New Issue
Block a user