From 172860b2804d9b6c0220624fab6de508b09ebeb3 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 5 Jan 2022 13:56:15 -0800 Subject: [PATCH] IO-1618 Prevent PAE posting of bills. --- .../src/components/bill-form/bill-form.lines.component.jsx | 4 +++- .../parts-order-list-table.component.jsx | 6 ++++-- client/src/graphql/associations.queries.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx index cb88e7e54..f78448e0e 100644 --- a/client/src/components/bill-form/bill-form.lines.component.jsx +++ b/client/src/components/bill-form/bill-form.lines.component.jsx @@ -74,7 +74,9 @@ export function BillEnterModalLinesComponent({ actual_price: opt.cost, cost_center: opt.part_type ? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid - ? opt.part_type + ? opt.part_type !== "PAE" + ? opt.part_type + : null : responsibilityCenters.defaults && (responsibilityCenters.defaults.costs[ opt.part_type diff --git a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx index 2a2701d6e..324fcb1ed 100644 --- a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx +++ b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx @@ -10,7 +10,7 @@ import { PageHeader, Popconfirm, Space, - Table + Table, } from "antd"; import queryString from "query-string"; import React, { useState } from "react"; @@ -168,7 +168,9 @@ export function PartsOrderListTableComponent({ cost_center: pol.jobline?.part_type ? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid - ? pol.jobline.part_type + ? pol.jobline.part_type !== "PAE" + ? pol.jobline.part_type + : null : responsibilityCenters.defaults && (responsibilityCenters.defaults.costs[ pol.jobline.part_type diff --git a/client/src/graphql/associations.queries.js b/client/src/graphql/associations.queries.js index e97d4c267..b1af48640 100644 --- a/client/src/graphql/associations.queries.js +++ b/client/src/graphql/associations.queries.js @@ -2,7 +2,7 @@ import { gql } from "@apollo/client"; export const QUERY_ALL_ASSOCIATIONS = gql` query QUERY_ALL_ASSOCIATIONS { - associations { + associations(order_by: { bodyshop: { shopname: asc } }) { id active bodyshop {