diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 1a1ec7f14..6963e536d 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -8350,6 +8350,27 @@ + + enteringcreditmemo + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + federal_tax false diff --git a/client/src/components/invoice-form/invoice-form.component.jsx b/client/src/components/invoice-form/invoice-form.component.jsx index 52daf7cdf..be50940f3 100644 --- a/client/src/components/invoice-form/invoice-form.component.jsx +++ b/client/src/components/invoice-form/invoice-form.component.jsx @@ -9,6 +9,7 @@ import { } from "antd"; import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; +import AlertComponent from "../alert/alert.component"; import CurrencyInput from "../form-items-formatted/currency-form-item.component"; import JobSearchSelect from "../job-search-select/job-search-select.component"; import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component"; @@ -50,17 +51,18 @@ export default function InvoiceFormComponent({ }, [form, setDiscount, vendorAutoCompleteOptions, loadLines]); return ( -
-
+
+
+ ]} + > + ]} + >
-
+
+ ]} + > + ]} + > + name="is_credit_memo" + valuePropName="checked" + > - + ]} + > + - + name="federal_tax_rate" + > + - + name="state_tax_rate" + > + - + name="local_tax_rate" + > +
{ console.log("Upload event:", e); if (Array.isArray(e)) { return e; } return e && e.fileList; - }}> - false} listType='picture'> + }} + > + false} listType="picture"> @@ -185,46 +196,54 @@ export default function InvoiceFormComponent({ totals = CalculateInvoiceTotal(values); if (!!totals) return ( -
- - - - - - - +
+
+ + + + + + + +
+ {form.getFieldValue("is_credit_memo") ? ( + + ) : null}
); return null; diff --git a/client/src/components/invoice-form/invoice-form.lines.component.jsx b/client/src/components/invoice-form/invoice-form.lines.component.jsx index 80793b2f8..3fe86b0f5 100644 --- a/client/src/components/invoice-form/invoice-form.lines.component.jsx +++ b/client/src/components/invoice-form/invoice-form.lines.component.jsx @@ -15,13 +15,13 @@ export default function InvoiceEnterModalLinesComponent({ const { setFieldsValue, getFieldsValue } = form; return ( - + {(fields, { add, remove }) => { return ( -
+
{fields.map((field, index) => ( -
+
+ ]} + > { @@ -68,7 +69,8 @@ export default function InvoiceEnterModalLinesComponent({ required: true, message: t("general.validation.required"), }, - ]}> + ]} + > - + ]} + > + + ]} + > { setFieldsValue({ invoicelines: getFieldsValue( @@ -122,8 +127,9 @@ export default function InvoiceEnterModalLinesComponent({ required: true, message: t("general.validation.required"), }, - ]}> - + ]} + > + {() => { @@ -151,7 +157,8 @@ export default function InvoiceEnterModalLinesComponent({ required: true, message: t("general.validation.required"), }, - ]}> + ]} + >