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