QB USA Changes

This commit is contained in:
Patrick Fic
2023-04-04 14:03:08 -07:00
parent 460d6fcf12
commit fbd52bc14e
3 changed files with 46 additions and 8 deletions

View File

@@ -4414,6 +4414,30 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
<InputNumber precision={2} /> <InputNumber precision={2} />
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
<Form.Item
label={t("bodyshop.fields.responsibilitycenters.itemexemptcode")}
rules={[
{
required: true,
//message: t("general.validation.required"),
},
]}
name={["md_responsibility_centers", "taxes", "itemexemptcode"]}
>
<Input />
</Form.Item>
<Form.Item
label={t("bodyshop.fields.responsibilitycenters.invoiceexemptcode")}
rules={[
{
required: true,
//message: t("general.validation.required"),
},
]}
name={["md_responsibility_centers", "taxes", "invoiceexemptcode"]}
>
<Input />
</Form.Item>
<LayoutFormRow> <LayoutFormRow>
<Form.Item <Form.Item
label={t("bodyshop.fields.responsibilitycenters.local_tax")} label={t("bodyshop.fields.responsibilitycenters.local_tax")}

View File

@@ -124,7 +124,9 @@ exports.default = function ({
Quantity: 1, //jobline.part_qty, Quantity: 1, //jobline.part_qty,
Amount: DineroAmount, //.toFormat(DineroQbFormat), Amount: DineroAmount, //.toFormat(DineroQbFormat),
SalesTaxCodeRef: { SalesTaxCodeRef: {
FullName: "E", FullName:
bodyshop.md_responsibility_centers.taxes.itemexemptcode ||
"NON",
}, },
}; };
} else { } else {
@@ -194,7 +196,9 @@ exports.default = function ({
Amount: DineroAmount, Amount: DineroAmount,
//Amount: DineroAmount.toFormat(DineroQbFormat), //Amount: DineroAmount.toFormat(DineroQbFormat),
SalesTaxCodeRef: { SalesTaxCodeRef: {
FullName: "E", FullName:
bodyshop.md_responsibility_centers.taxes.itemexemptcode ||
"NON",
}, },
}; };
} else { } else {
@@ -263,7 +267,8 @@ exports.default = function ({
DineroQbFormat DineroQbFormat
), ),
SalesTaxCodeRef: { SalesTaxCodeRef: {
FullName: "E", FullName:
bodyshop.md_responsibility_centers.taxes.itemexemptcode || "NON",
}, },
}); });
} }
@@ -329,7 +334,8 @@ exports.default = function ({
DineroQbFormat DineroQbFormat
), ),
SalesTaxCodeRef: { SalesTaxCodeRef: {
FullName: "E", FullName:
bodyshop.md_responsibility_centers.taxes.itemexemptcode || "NON",
}, },
}); });
} }
@@ -409,7 +415,8 @@ exports.default = function ({
amount: Math.round((jobs_by_pk.towing_payable || 0) * 100), amount: Math.round((jobs_by_pk.towing_payable || 0) * 100),
}).toFormat(DineroQbFormat), }).toFormat(DineroQbFormat),
SalesTaxCodeRef: { SalesTaxCodeRef: {
FullName: "E", FullName:
bodyshop.md_responsibility_centers.taxes.itemexemptcode || "NON",
}, },
}); });
} }
@@ -460,7 +467,8 @@ exports.default = function ({
amount: Math.round((jobs_by_pk.storage_payable || 0) * 100), amount: Math.round((jobs_by_pk.storage_payable || 0) * 100),
}).toFormat(DineroQbFormat), }).toFormat(DineroQbFormat),
SalesTaxCodeRef: { SalesTaxCodeRef: {
FullName: "E", FullName:
bodyshop.md_responsibility_centers.taxes.itemexemptcode || "NON",
}, },
}); });
} }
@@ -510,7 +518,8 @@ exports.default = function ({
amount: Math.round((jobs_by_pk.adjustment_bottom_line || 0) * 100), amount: Math.round((jobs_by_pk.adjustment_bottom_line || 0) * 100),
}).toFormat(DineroQbFormat), }).toFormat(DineroQbFormat),
SalesTaxCodeRef: { SalesTaxCodeRef: {
FullName: "E", FullName:
bodyshop.md_responsibility_centers.taxes.itemexemptcode || "NON",
}, },
}); });
} }
@@ -768,7 +777,8 @@ exports.createMultiQbPayerLines = function ({
amount: Math.round((payer.amount || 0) * 100), amount: Math.round((payer.amount || 0) * 100),
}).toFormat(DineroQbFormat), }).toFormat(DineroQbFormat),
SalesTaxCodeRef: { SalesTaxCodeRef: {
FullName: "E", FullName:
bodyshop.md_responsibility_centers.taxes.itemexemptcode || "NON",
}, },
}); });
} }

View File

@@ -285,6 +285,10 @@ const generateInvoiceQbxml = (
PostalCode: jobs_by_pk.ownr_zip, PostalCode: jobs_by_pk.ownr_zip,
}, },
PONumber: jobs_by_pk.clm_no, PONumber: jobs_by_pk.clm_no,
ItemSalesTaxRef: {
FullName:
bodyshop.md_responsibility_centers.taxes.invoiceexemptcode,
},
IsToBePrinted: bodyshop.accountingconfig.printlater, IsToBePrinted: bodyshop.accountingconfig.printlater,
...(jobs_by_pk.ownr_ea ...(jobs_by_pk.ownr_ea
? { IsToBeEmailed: bodyshop.accountingconfig.emaillater } ? { IsToBeEmailed: bodyshop.accountingconfig.emaillater }