Added sales tax codes & resolved no tax codes on payables export IO-453
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
import { DeleteFilled } from "@ant-design/icons";
|
||||
import { Button, Form, Input, InputNumber, Select } from "antd";
|
||||
import {
|
||||
Button,
|
||||
Form,
|
||||
Input,
|
||||
InputNumber,
|
||||
Select,
|
||||
Switch,
|
||||
Typography,
|
||||
} from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
@@ -1536,6 +1544,99 @@ export default function ShopInfoResponsibilityCenterComponent({ form }) {
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<Typography.Title level={4}>
|
||||
{t("bodyshop.labels.responsibilitycenters.sales_tax_codes")}
|
||||
</Typography.Title>
|
||||
<Form.List name={["md_responsibility_centers", "sales_tax_codes"]}>
|
||||
{(fields, { add, remove }) => {
|
||||
return (
|
||||
<div>
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item key={field.key}>
|
||||
<LayoutFormRow>
|
||||
<Form.Item
|
||||
label={t(
|
||||
"bodyshop.fields.responsibilitycenters.sales_tax_codes.description"
|
||||
)}
|
||||
key={`${index}description`}
|
||||
name={[field.name, "description"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t(
|
||||
"bodyshop.fields.responsibilitycenters.sales_tax_codes.code"
|
||||
)}
|
||||
key={`${index}code`}
|
||||
name={[field.name, "code"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t(
|
||||
"bodyshop.fields.responsibilitycenters.sales_tax_codes.federal"
|
||||
)}
|
||||
key={`${index}federal`}
|
||||
name={[field.name, "federal"]}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t(
|
||||
"bodyshop.fields.responsibilitycenters.sales_tax_codes.state"
|
||||
)}
|
||||
key={`${index}state`}
|
||||
name={[field.name, "state"]}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t(
|
||||
"bodyshop.fields.responsibilitycenters.sales_tax_codes.local"
|
||||
)}
|
||||
key={`${index}local`}
|
||||
name={[field.name, "local"]}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<DeleteFilled
|
||||
onClick={() => {
|
||||
remove(field.name);
|
||||
}}
|
||||
/>
|
||||
</LayoutFormRow>
|
||||
</Form.Item>
|
||||
))}
|
||||
<Form.Item>
|
||||
<Button
|
||||
type="dashed"
|
||||
onClick={() => {
|
||||
add();
|
||||
}}
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
{t("bodyshop.actions.newsalestaxcode")}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
</Form.List>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
"addspeedprint": "Add Speed Print",
|
||||
"addtemplate": "Add Template",
|
||||
"newlaborrate": "New Labor Rate",
|
||||
"newsalestaxcode": "New Sales Tax Code",
|
||||
"newstatus": "Add Status",
|
||||
"testrender": "Test Render"
|
||||
},
|
||||
@@ -334,6 +335,14 @@
|
||||
"pap": "OEM Partial",
|
||||
"par": "Recored",
|
||||
"pas": "Sublet",
|
||||
"refund": "Refund",
|
||||
"sales_tax_codes": {
|
||||
"code": "Code",
|
||||
"description": "Description",
|
||||
"federal": "Federal Tax Applies",
|
||||
"local": "Local Tax Applies",
|
||||
"state": "State Tax Applies"
|
||||
},
|
||||
"state_tax": "State Tax",
|
||||
"tow": "Towing"
|
||||
},
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
"addspeedprint": "",
|
||||
"addtemplate": "",
|
||||
"newlaborrate": "",
|
||||
"newsalestaxcode": "",
|
||||
"newstatus": "",
|
||||
"testrender": ""
|
||||
},
|
||||
@@ -334,6 +335,14 @@
|
||||
"pap": "",
|
||||
"par": "",
|
||||
"pas": "",
|
||||
"refund": "",
|
||||
"sales_tax_codes": {
|
||||
"code": "",
|
||||
"description": "",
|
||||
"federal": "",
|
||||
"local": "",
|
||||
"state": ""
|
||||
},
|
||||
"state_tax": "",
|
||||
"tow": ""
|
||||
},
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
"addspeedprint": "",
|
||||
"addtemplate": "",
|
||||
"newlaborrate": "",
|
||||
"newsalestaxcode": "",
|
||||
"newstatus": "",
|
||||
"testrender": ""
|
||||
},
|
||||
@@ -334,6 +335,14 @@
|
||||
"pap": "",
|
||||
"par": "",
|
||||
"pas": "",
|
||||
"refund": "",
|
||||
"sales_tax_codes": {
|
||||
"code": "",
|
||||
"description": "",
|
||||
"federal": "",
|
||||
"local": "",
|
||||
"state": ""
|
||||
},
|
||||
"state_tax": "",
|
||||
"tow": ""
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user