IO-809 Disable reconciliation on removed joblines.
This commit is contained in:
@@ -113,6 +113,9 @@ export default function JobReconcilitionPartsTable({
|
|||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
rowSelection={{
|
rowSelection={{
|
||||||
onChange: handleOnRowClick,
|
onChange: handleOnRowClick,
|
||||||
|
getCheckboxProps: (record) => ({
|
||||||
|
disabled: record.removed,
|
||||||
|
}),
|
||||||
selectedRowKeys: selectedLines,
|
selectedRowKeys: selectedLines,
|
||||||
}}
|
}}
|
||||||
rowClassName={(record) => record.removed && "text-strikethrough"}
|
rowClassName={(record) => record.removed && "text-strikethrough"}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const reconcileByAssocLine = (
|
|||||||
const [selectedJobLines, setSelectedJobLines] = jobLineState;
|
const [selectedJobLines, setSelectedJobLines] = jobLineState;
|
||||||
|
|
||||||
const allJoblinesFromBills = billLines
|
const allJoblinesFromBills = billLines
|
||||||
.filter((bl) => !!bl.joblineid)
|
.filter((bl) => bl.joblineid && !(bl.jobline && bl.jobline.removed))
|
||||||
.map((bl) => bl.joblineid);
|
.map((bl) => bl.joblineid);
|
||||||
|
|
||||||
const duplicatedJobLinesbyInvoiceId = _.filter(
|
const duplicatedJobLinesbyInvoiceId = _.filter(
|
||||||
@@ -73,7 +73,7 @@ export const reconcileByPrice = (
|
|||||||
|
|
||||||
jobLines.forEach((jl) => {
|
jobLines.forEach((jl) => {
|
||||||
const matchingBillLineIds = billLines
|
const matchingBillLineIds = billLines
|
||||||
.filter((bl) => bl.actual_price === jl.act_price)
|
.filter((bl) => bl.actual_price === jl.act_price && !jl.removed)
|
||||||
.map((bl) => bl.id);
|
.map((bl) => bl.id);
|
||||||
|
|
||||||
if (matchingBillLineIds.length > 1) {
|
if (matchingBillLineIds.length > 1) {
|
||||||
|
|||||||
@@ -608,6 +608,10 @@ export const GET_JOB_RECONCILIATION_BY_PK = gql`
|
|||||||
line_desc
|
line_desc
|
||||||
applicable_taxes
|
applicable_taxes
|
||||||
deductedfromlbr
|
deductedfromlbr
|
||||||
|
jobline {
|
||||||
|
id
|
||||||
|
removed
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jobs_by_pk(id: $id) {
|
jobs_by_pk(id: $id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user