Merged in feature/IO-3529-DMS-Make-Code (pull request #2929)
IO-3529 Fix for Parts Return
This commit is contained in:
@@ -48,7 +48,7 @@ export function BillDetailEditReturn({ setPartsOrderContext, data, disabled }) {
|
|||||||
// db_price: i.actual_price,
|
// db_price: i.actual_price,
|
||||||
act_price: i.actual_price,
|
act_price: i.actual_price,
|
||||||
cost: i.actual_cost,
|
cost: i.actual_cost,
|
||||||
quantity: i.quantity,
|
part_qty: i.quantity,
|
||||||
joblineid: i.joblineid,
|
joblineid: i.joblineid,
|
||||||
oem_partno: i.jobline && i.jobline.oem_partno,
|
oem_partno: i.jobline && i.jobline.oem_partno,
|
||||||
part_type: i.jobline && i.jobline.part_type
|
part_type: i.jobline && i.jobline.part_type
|
||||||
@@ -104,6 +104,10 @@ export function BillDetailEditReturn({ setPartsOrderContext, data, disabled }) {
|
|||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
<tr key={field.key}>
|
<tr key={field.key}>
|
||||||
<td>
|
<td>
|
||||||
|
{/* Hidden field to preserve the id */}
|
||||||
|
<Form.Item name={[field.name, "id"]} hidden>
|
||||||
|
<input type="hidden" />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
// label={t("joblines.fields.selected")}
|
// label={t("joblines.fields.selected")}
|
||||||
key={`${index}selected`}
|
key={`${index}selected`}
|
||||||
|
|||||||
@@ -13,6 +13,13 @@ import PartsOrderModalPriceChange from "./parts-order-modal-price-change.compone
|
|||||||
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx";
|
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx";
|
||||||
import { selectIsPartsEntry } from "../../redux/application/application.selectors.js";
|
import { selectIsPartsEntry } from "../../redux/application/application.selectors.js";
|
||||||
|
|
||||||
|
const PriceInputWrapper = ({ value, onChange, form, field }) => (
|
||||||
|
<Space.Compact style={{ width: "100%" }}>
|
||||||
|
<PartsOrderModalPriceChange form={form} field={field} />
|
||||||
|
<CurrencyInput style={{ flex: 1 }} value={value} onChange={onChange} />
|
||||||
|
</Space.Compact>
|
||||||
|
);
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
isPartsEntry: selectIsPartsEntry
|
isPartsEntry: selectIsPartsEntry
|
||||||
@@ -199,10 +206,7 @@ export function PartsOrderModalComponent({
|
|||||||
key={`${index}act_price`}
|
key={`${index}act_price`}
|
||||||
name={[field.name, "act_price"]}
|
name={[field.name, "act_price"]}
|
||||||
>
|
>
|
||||||
<Space.Compact style={{ width: "100%" }}>
|
<PriceInputWrapper form={form} field={field} />
|
||||||
<PartsOrderModalPriceChange form={form} field={field} />
|
|
||||||
<CurrencyInput style={{ flex: 1 }} />
|
|
||||||
</Space.Compact>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{isReturn && (
|
{isReturn && (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
Reference in New Issue
Block a user