Changed RO Search Select to use RO searching and possible provided job value for options IMEX-129 IMEX-327
This commit is contained in:
@@ -32,15 +32,15 @@ export default function JobsClosePartsAllocation({
|
||||
<td>{t(`jobs.fields.${alloc.toLowerCase()}`)}</td>
|
||||
<td>
|
||||
{partsAllocations[alloc].total &&
|
||||
partsAllocations[alloc].total.toFormat()}
|
||||
Dinero(partsAllocations[alloc].total).toFormat()}
|
||||
</td>
|
||||
<td>
|
||||
{partsAllocations[alloc].total
|
||||
{Dinero(partsAllocations[alloc].total)
|
||||
.subtract(
|
||||
Dinero({
|
||||
amount: partsAllocations[alloc].allocations.reduce(
|
||||
(acc, val) => {
|
||||
return acc + val.amount.getAmount();
|
||||
return acc + Dinero(val.amount).getAmount();
|
||||
},
|
||||
0
|
||||
),
|
||||
@@ -52,12 +52,12 @@ export default function JobsClosePartsAllocation({
|
||||
<AllocationButton
|
||||
allocationKey={alloc}
|
||||
invoiced={invoiced}
|
||||
remainingAmount={partsAllocations[alloc].total
|
||||
remainingAmount={Dinero(partsAllocations[alloc].total)
|
||||
.subtract(
|
||||
Dinero({
|
||||
amount: partsAllocations[alloc].allocations.reduce(
|
||||
(acc, val) => {
|
||||
return acc + val.amount.getAmount();
|
||||
return acc + Dinero(val.amount).getAmount();
|
||||
},
|
||||
0
|
||||
),
|
||||
@@ -70,7 +70,7 @@ export default function JobsClosePartsAllocation({
|
||||
</td>
|
||||
<td>
|
||||
<AllocationTags
|
||||
invoiced={invoiced}
|
||||
invoiced={invoiced}
|
||||
allocationKey={alloc}
|
||||
allocation={partsAllocations[alloc]}
|
||||
setAllocations={setPartsAllocations}
|
||||
@@ -85,7 +85,7 @@ export default function JobsClosePartsAllocation({
|
||||
{Dinero({
|
||||
amount: Object.keys(partsAllocations).reduce((acc, val) => {
|
||||
return (acc =
|
||||
acc + partsAllocations[val].total.getAmount());
|
||||
acc + Dinero(partsAllocations[val].total).getAmount());
|
||||
}, 0),
|
||||
}).toFormat()}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user