IO-1978 Updated parts return logic and removed extra button.
This commit is contained in:
@@ -94,7 +94,20 @@ export function BillDetailEditReturn({
|
|||||||
<table style={{ tableLayout: "auto", width: "100%" }}>
|
<table style={{ tableLayout: "auto", width: "100%" }}>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>
|
||||||
|
<Checkbox
|
||||||
|
onChange={(e) => {
|
||||||
|
form.setFieldsValue({
|
||||||
|
billlines: form
|
||||||
|
.getFieldsValue()
|
||||||
|
.billlines.map((b) => ({
|
||||||
|
...b,
|
||||||
|
selected: e.target.checked,
|
||||||
|
})),
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</td>
|
||||||
<td>{t("billlines.fields.line_desc")}</td>
|
<td>{t("billlines.fields.line_desc")}</td>
|
||||||
<td>{t("billlines.fields.quantity")}</td>
|
<td>{t("billlines.fields.quantity")}</td>
|
||||||
<td>{t("billlines.fields.actual_price")}</td>
|
<td>{t("billlines.fields.actual_price")}</td>
|
||||||
|
|||||||
@@ -67,39 +67,7 @@ export function BillsListTableComponent({
|
|||||||
jobRO
|
jobRO
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Button
|
|
||||||
disabled={
|
|
||||||
record.is_credit_memo ||
|
|
||||||
record.vendorid === bodyshop.inhousevendorid ||
|
|
||||||
jobRO
|
|
||||||
}
|
|
||||||
onClick={() => {
|
|
||||||
setPartsOrderContext({
|
|
||||||
actions: {},
|
|
||||||
context: {
|
|
||||||
jobId: job.id,
|
|
||||||
vendorId: record.vendorid,
|
|
||||||
returnFromBill: record.id,
|
|
||||||
invoiceNumber: record.invoice_number,
|
|
||||||
linesToOrder: record.billlines.map((i) => {
|
|
||||||
return {
|
|
||||||
line_desc: i.line_desc,
|
|
||||||
// db_price: i.actual_price,
|
|
||||||
act_price: i.actual_price,
|
|
||||||
cost: i.actual_cost,
|
|
||||||
quantity: i.quantity,
|
|
||||||
joblineid: i.joblineid,
|
|
||||||
oem_partno: i.jobline && i.jobline.oem_partno,
|
|
||||||
part_type: i.jobline && i.jobline.part_type,
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
isReturn: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("bills.actions.return")}
|
|
||||||
</Button>
|
|
||||||
{record.isinhouse && (
|
{record.isinhouse && (
|
||||||
<PrintWrapperComponent
|
<PrintWrapperComponent
|
||||||
templateObject={{
|
templateObject={{
|
||||||
|
|||||||
Reference in New Issue
Block a user