Added GST registrant BOD-389

This commit is contained in:
Patrick Fic
2020-09-24 15:30:12 -07:00
parent 4253fe39d6
commit a463887fa4
35 changed files with 4680 additions and 873 deletions

View File

@@ -7,9 +7,9 @@
"@lourenci/react-kanban": "^2.0.0",
"@stripe/react-stripe-js": "^1.1.2",
"@stripe/stripe-js": "^1.9.0",
"@tanem/react-nprogress": "^3.0.40",
"@tinymce/tinymce-react": "^3.6.0",
"antd": "^4.6.1",
"@tanem/react-nprogress": "^3.0.44",
"@tinymce/tinymce-react": "^3.6.1",
"antd": "^4.6.5",
"apollo-boost": "^0.4.9",
"apollo-link-context": "^1.0.20",
"apollo-link-error": "^1.1.13",
@@ -17,28 +17,28 @@
"apollo-link-retry": "^2.2.16",
"apollo-link-ws": "^1.0.20",
"axios": "^0.20.0",
"codemirror": "^5.57.0",
"codemirror-graphql": "^0.12.1",
"codemirror": "^5.58.1",
"codemirror-graphql": "^0.12.2",
"dinero.js": "^1.8.1",
"dotenv": "^8.2.0",
"fingerprintjs2": "^2.1.2",
"firebase": "^7.19.0",
"firebase": "^7.21.0",
"graphql": "^15.3.0",
"i18next": "^19.7.0",
"i18next-browser-languagedetector": "^6.0.1",
"inline-css": "^2.6.3",
"jsoneditor": "^9.0.4",
"jsoneditor": "^9.1.1",
"jsoneditor-react": "^3.0.1",
"logrocket": "^1.0.11",
"logrocket": "^1.0.13",
"moment-business-days": "^1.2.0",
"node-sass": "^4.14.1",
"phone": "^2.4.15",
"phone": "^2.4.16",
"prop-types": "^15.7.2",
"query-string": "^6.13.1",
"query-string": "^6.13.2",
"react": "^16.13.1",
"react-apollo": "^3.1.5",
"react-barcode": "^1.4.0",
"react-big-calendar": "^0.26.1",
"react-big-calendar": "^0.28.0",
"react-codemirror2": "^7.2.1",
"react-color": "^2.18.1",
"react-dom": "^16.13.1",
@@ -46,14 +46,14 @@
"react-email-editor": "^1.1.1",
"react-ga": "^3.1.2",
"react-grid-gallery": "^0.5.5",
"react-grid-layout": "^1.0.0",
"react-i18next": "^11.7.1",
"react-grid-layout": "^1.1.1",
"react-i18next": "^11.7.3",
"react-icons": "^3.11.0",
"react-image-file-resizer": "^0.3.6",
"react-image-file-resizer": "^0.3.8",
"react-moment": "^0.9.7",
"react-number-format": "^4.4.1",
"react-redux": "^7.2.1",
"react-resizable": "^1.10.1",
"react-resizable": "^1.11.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3",
"react-trello": "^2.2.8",
@@ -64,7 +64,7 @@
"redux-saga": "^1.1.3",
"redux-state-sync": "^3.1.2",
"reselect": "^4.0.0",
"styled-components": "^5.1.1",
"styled-components": "^5.2.0",
"subscriptions-transport-ws": "^0.9.18"
},
"scripts": {
@@ -92,7 +92,7 @@
"devDependencies": {
"@apollo/react-testing": "^4.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.3",
"enzyme-adapter-react-16": "^1.15.5",
"redux-logger": "^3.0.6",
"source-map-explorer": "^2.5.0"
}

View File

@@ -269,6 +269,49 @@ export function JobsTotalsTableComponent({ bodyshop, job }) {
value={Dinero(job.job_totals.totals.federal_tax).toFormat()}
/>
</div>
<div
className="job-totals-stats"
onClick={(e) => {
if (e.detail === 3) {
try {
console.log("Job", job);
} catch {
console.log("Unable to show job.");
}
}
}}
>
<Statistic
title={t("jobs.fields.ded_amt")}
value={Dinero(
job.job_totals.totals.custPayable.deductible
).toFormat()}
/>
<Statistic
title={t("jobs.fields.federal_tax_payable")}
value={Dinero(
job.job_totals.totals.custPayable.federal_tax
).toFormat()}
/>
<Statistic
title={t("jobs.fields.other_amount_payable")}
value={Dinero(
job.job_totals.totals.custPayable.other_customer_amount
).toFormat()}
/>
<Statistic
title={t("jobs.fields.depreciation_taxes")}
value={Dinero(
job.job_totals.totals.custPayable.dep_taxes
).toFormat()}
/>
<Statistic
title={t("jobs.labels.total_cust_payable")}
value={Dinero(
job.job_totals.totals.custPayable.total
).toFormat()}
/>
</div>
<div
className="job-totals-stats"
onClick={(e) => {

View File

@@ -215,12 +215,12 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
>
<InputNumberCalculator />
</Form.Item>
TODO This is equivalent of GST payable.
<Form.Item
label={t("jobs.fields.federal_tax_payable")}
name="federal_tax_payable"
label={t("jobs.fields.ca_gst_registrant")}
name="ca_gst_registrant"
valuePropName="checked"
>
<InputNumberCalculator />
<Switch />
</Form.Item>
<Form.Item
label={t("jobs.fields.other_amount_payable")}

View File

@@ -1,4 +1,4 @@
import { Form, Select } from "antd";
import { Form, Select, Switch } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
@@ -38,18 +38,19 @@ export default function JobsDetailRates({ job, form }) {
>
<CurrencyInput />
</Form.Item>
<Form.Item
label={t("jobs.fields.federal_tax_payable")}
name="federal_tax_payable"
>
<CurrencyInput />
</Form.Item>
<Form.Item
label={t("jobs.fields.adjustment_bottom_line")}
name="adjustment_bottom_line"
>
<CurrencyInput />
</Form.Item>
<Form.Item
label={t("jobs.fields.ca_gst_registrant")}
name="ca_gst_registrant"
valuePropName="checked"
>
<Switch />
</Form.Item>
</FormRow>
<JobsDetailRatesChangeButton form={form} />
<FormRow header={t("jobs.forms.laborrates")}>

View File

@@ -209,7 +209,6 @@ export const QUERY_JOB_COSTING_DETAILS = gql`
ded_amt
ded_status
depreciation_taxes
federal_tax_payable
other_amount_payable
towing_payable
storage_payable
@@ -372,7 +371,6 @@ export const GET_JOB_BY_PK = gql`
ded_amt
ded_status
depreciation_taxes
federal_tax_payable
other_amount_payable
towing_payable
storage_payable
@@ -399,6 +397,7 @@ export const GET_JOB_BY_PK = gql`
ownr_zip
ownr_ctry
ownr_ph1
ca_gst_registrant
owner {
id
ownr_fn
@@ -875,7 +874,6 @@ export const QUERY_ALL_JOB_FIELDS = gql`
est_ph1
est_st
est_zip
federal_tax_payable
federal_tax_rate
g_bett_amt
ins_addr1
@@ -1161,7 +1159,6 @@ export const QUERY_JOB_CLOSE_DETAILS = gql`
ded_amt
ded_status
depreciation_taxes
federal_tax_payable
other_amount_payable
towing_payable
storage_payable

View File

@@ -113,7 +113,9 @@ export function JobsDetailPage({
job: {
...values,
clm_total: Dinero(newTotals.totals.total_repairs).toFormat("0.00"),
owner_owing: Dinero(newTotals.custPayable.total).toFormat("0.00"),
owner_owing: Dinero(newTotals.totals.custPayable.total).toFormat(
"0.00"
),
job_totals: newTotals, //JSON.stringify(newTotals),
},
},

View File

@@ -820,6 +820,7 @@
"actual_delivery": "Actual Delivery",
"actual_in": "Actual In",
"adjustment_bottom_line": "Adjustments",
"ca_gst_registrant": "GST Registrant",
"category": "Category",
"ccc": "CC Cleaning",
"ccd": "CC Damage Waiver",
@@ -1042,6 +1043,7 @@
"subtotal": "Subtotal",
"suspense": "Suspense",
"total_cost": "Total Cost",
"total_cust_payable": "Total Customer Amount Payable",
"total_repairs": "Total Repairs",
"total_sales": "Total Sales",
"totals": "Totals",

View File

@@ -820,6 +820,7 @@
"actual_delivery": "Entrega real",
"actual_in": "Real en",
"adjustment_bottom_line": "Ajustes",
"ca_gst_registrant": "",
"category": "",
"ccc": "",
"ccd": "",
@@ -1042,6 +1043,7 @@
"subtotal": "",
"suspense": "",
"total_cost": "",
"total_cust_payable": "",
"total_repairs": "",
"total_sales": "",
"totals": "",

View File

@@ -820,6 +820,7 @@
"actual_delivery": "Livraison réelle",
"actual_in": "En réel",
"adjustment_bottom_line": "Ajustements",
"ca_gst_registrant": "",
"category": "",
"ccc": "",
"ccd": "",
@@ -1042,6 +1043,7 @@
"subtotal": "",
"suspense": "",
"total_cost": "",
"total_cust_payable": "",
"total_repairs": "",
"total_sales": "",
"totals": "",

File diff suppressed because it is too large Load Diff