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

@@ -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": "",